-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
api: computeIssues related to the Compute Engine API.Issues related to the Compute Engine 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
Hi,
I have found some usage of “String.equals("xxx")” in this project.
When using string.equals("a") ,it will get nullpointexception if string ==null.
The problem can be fixed by repalced with "a".equals(string) or Objects.equals(string,"a").
Detail websites and lines are listed below
77 80 83 86 89 92 95 98 101 104 | https://github.com/googleapis/google-cloud-java/blob/master/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InsertTargetTcpProxyHttpRequest.java
There are too many cases of "fieldName.equals("xxxxx")" .
Best regards
Metadata
Metadata
Assignees
Labels
api: computeIssues related to the Compute Engine API.Issues related to the Compute Engine 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.