From 49ad82e81ceec41f9ef7bb15b1e73a9d6aafadff Mon Sep 17 00:00:00 2001 From: "copybara-service[bot]" Date: Tue, 6 Feb 2024 21:06:00 +0000 Subject: [PATCH] Latest docs on successful build 5965 auto-pushed to gh-pages --- bugpattern/BindingToUnqualifiedCommonType.md | 2 +- bugpattern/IsInstanceOfClass.md | 2 +- bugpattern/OverridesGuiceInjectableMethod.md | 2 +- bugpattern/RedundantOverride.md | 2 +- bugpattern/StaticAssignmentOfThrowable.md | 9 +++++---- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/bugpattern/BindingToUnqualifiedCommonType.md b/bugpattern/BindingToUnqualifiedCommonType.md index 820e082e5d3..c0173f0b439 100644 --- a/bugpattern/BindingToUnqualifiedCommonType.md +++ b/bugpattern/BindingToUnqualifiedCommonType.md @@ -16,7 +16,7 @@ To make changes, edit the @BugPattern annotation or the explanation in docs/bugp ## The problem Guice bindings are keyed by a pair of (optional Annotation, Type). -In most cirumstances, one doesn't need the annotation, as there's really just +In most circumstances, one doesn't need the annotation, as there's really just one active implementation: ```java diff --git a/bugpattern/IsInstanceOfClass.md b/bugpattern/IsInstanceOfClass.md index f7a17b79c36..f2ba234a7a4 100644 --- a/bugpattern/IsInstanceOfClass.md +++ b/bugpattern/IsInstanceOfClass.md @@ -33,7 +33,7 @@ equal to `Class` (i.e. lhs is equal to `Class.class`). ``` To test if the type represented by a class literal is a subtype of the type -reprsented by some other class literal, `isAssignableFrom` should be used +represented by some other class literal, `isAssignableFrom` should be used instead: ```java diff --git a/bugpattern/OverridesGuiceInjectableMethod.md b/bugpattern/OverridesGuiceInjectableMethod.md index 529239f635d..c14fb57188e 100644 --- a/bugpattern/OverridesGuiceInjectableMethod.md +++ b/bugpattern/OverridesGuiceInjectableMethod.md @@ -20,7 +20,7 @@ with `@com.google.inject.Inject`, Guice will inject it even if it itself is not annotated. This differs from the behavior of methods that override `@javax.inject.Inject` methods since according to the JSR-330 spec, a method that overrides a method annotated with `@javax.inject.Inject` will not be -injected unless it iself is annotated with `@Inject`. Because of this +injected unless it itself is annotated with `@Inject`. Because of this difference, it is recommended that you annotate this method explicitly. ## Suppression diff --git a/bugpattern/RedundantOverride.md b/bugpattern/RedundantOverride.md index ecba111b9ca..cf8f0252dc3 100644 --- a/bugpattern/RedundantOverride.md +++ b/bugpattern/RedundantOverride.md @@ -14,7 +14,7 @@ To make changes, edit the @BugPattern annotation or the explanation in docs/bugp ## The problem An override of a method that delegates its implementation to the super method is -redudant, and can be removed. +redundant, and can be removed. For example, the `equals` method in the following class implementation can be deleted. diff --git a/bugpattern/StaticAssignmentOfThrowable.md b/bugpattern/StaticAssignmentOfThrowable.md index f897d5aa1c2..bf71e4b43a3 100644 --- a/bugpattern/StaticAssignmentOfThrowable.md +++ b/bugpattern/StaticAssignmentOfThrowable.md @@ -15,10 +15,11 @@ To make changes, edit the @BugPattern annotation or the explanation in docs/bugp ## The problem The problem we're trying to prevent is unhelpful stack traces that don't contain -information about where the Exception was thrown from. This probem can sometimes -arise when an attempt is being made to cache or reuse a Throwable (often, a -particular Exception). In this case, consider whether this is really is -necessary: it often isn't. Could a Throwable simply be instantiated when needed? +information about where the Exception was thrown from. This problem can +sometimes arise when an attempt is being made to cache or reuse a Throwable +(often, a particular Exception). In this case, consider whether this is really +is necessary: it often isn't. Could a Throwable simply be instantiated when +needed? ``` {.bad} // this always has the same stack trace