- Notifications
You must be signed in to change notification settings - Fork 135
Closed
Labels
api: spannerIssues related to the googleapis/java-spanner API.Issues related to the googleapis/java-spanner API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
InstanceId.equals threw a NullPointerException when I accidentally set the project to null. I would have expected the exception to be thrown earlier, in the factory method.
Code example
@Test public void test() { InstanceId instance1 = InstanceId.of("project", "instance-1"); InstanceId instance2 = InstanceId.of(null, "instance-2"); System.out.println(instance1.equals(instance2)); }Stack trace
java.lang.NullPointerException at com.google.cloud.spanner.InstanceId.equals(InstanceId.java:66) ... EDIT: I used google-cloud-spanner version 1.52.0.
Metadata
Metadata
Assignees
Labels
api: spannerIssues related to the googleapis/java-spanner API.Issues related to the googleapis/java-spanner API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.