@@ -102,7 +102,7 @@ public class LoggingAppender extends UnsynchronizedAppenderBase<ILoggingEvent> {
102102 private static final String TYPE =
103103 "type.googleapis.com/google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent" ;
104104 private static final List <LoggingEventEnhancer > DEFAULT_LOGGING_EVENT_ENHANCERS =
105- ImmutableList .< LoggingEventEnhancer > of (new MDCEventEnhancer ());
105+ ImmutableList .of (new MDCEventEnhancer ());
106106 public static final String JAVA_LOGBACK_LIBRARY_NAME = "java-logback" ;
107107 // Using release-please annotations to update DEFAULT_INSTRUMENTATION_VERSION with latest version.
108108 // See
@@ -111,7 +111,7 @@ public class LoggingAppender extends UnsynchronizedAppenderBase<ILoggingEvent> {
111111 public static final String DEFAULT_INSTRUMENTATION_VERSION = "0.129.9-alpha-SNAPSHOT" ;
112112 // {x-version-update-end}
113113 private static boolean instrumentationAdded = false ;
114- private static Object instrumentationLock = new Object ();
114+ private static final Object instrumentationLock = new Object ();
115115
116116 private volatile Logging logging ;
117117 private LoggingOptions loggingOptions ;
@@ -158,7 +158,7 @@ public void setLog(String log) {
158158 * Sets the name of the monitored resource (Optional). If not define the appender will try to
159159 * identify the resource type automatically. Currently support resource types include "gae_app",
160160 * "gce_instance", "k8s_container", "cloud_run_revision" and "cloud_function". If the appender
161- * fails to identify the resource type it will be set to "global".
161+ * fails to identify the resource type, it will be set to "global".
162162 *
163163 * <p>Must be a one of the <a href=
164164 * "https://cloud.google.com/logging/docs/api/v2/resource-list">supported</a> resource types.
@@ -248,7 +248,7 @@ public void addLoggingEventEnhancer(String enhancerClassName) {
248248 /**
249249 * Returns the current value of the ingestion mode.
250250 *
251- * <p>The method is deprecated. Use appender configuration to setup the ingestion
251+ * <p>The method is deprecated. Use appender configuration to set up the ingestion
252252 *
253253 * @return a {@link Synchronicity} value of the ingestion module.
254254 */
@@ -344,7 +344,7 @@ String getProjectId() {
344344
345345 @ Override
346346 protected void append (ILoggingEvent e ) {
347- List <LogEntry > entriesList = new ArrayList <LogEntry >();
347+ List <LogEntry > entriesList = new ArrayList <>();
348348 entriesList .add (logEntryFor (e ));
349349 // Check if instrumentation was already added - if not, create a log entry with instrumentation
350350 // data
@@ -531,7 +531,7 @@ private static Severity severityFor(Level level) {
531531 * The package-private helper method used to set the flag which indicates if instrumentation info
532532 * already written or not.
533533 *
534- * @returns The value of the flag before it was set.
534+ * @return The value of the flag before it was set.
535535 */
536536 static boolean setInstrumentationStatus (boolean value ) {
537537 if (instrumentationAdded == value ) return instrumentationAdded ;
0 commit comments