-
Notifications
You must be signed in to change notification settings - Fork 38
Closed
Labels
api: loggingIssues related to the googleapis/java-logging API.Issues related to the googleapis/java-logging 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
Running the most recent Google error-prone over this codebase turns up a few categories of issues, e.g.:
- (New) Lack of notation of
CanIgnoreReturnValueon methods which return this (typically Builder methods). This partially inhibits effective use ofCheckReturnValueby users of this library. - A few methods that aren't marked
@Nullablebut clearly return null. This partially inhitibs effective use of tools likeNullAway. getClasscalled on.class, which is redundant- Attempts to check for proto lists using
== null. Proto fields are never null, these should check.isEmpty(). - A handful of tests that aren't running because of no
@Testannotation (one initially commented out, but that one should use@Ignore... and another test which is not enabled and also doesn't seem to test anything [testFromCurrentContextWithNegativeLevel]) - Backwards
assertEqual(x, y)statements (which yields backwards error messages on failure) - One unnecessary
@SupressWarnings("unchecked") - A few more tiny things
Will send a PR
Metadata
Metadata
Assignees
Labels
api: loggingIssues related to the googleapis/java-logging API.Issues related to the googleapis/java-logging 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.