From 146037dca721ac9e65c4f6371c99e38d99249e86 Mon Sep 17 00:00:00 2001 From: Ben Creech Date: Sat, 23 Jul 2022 19:56:56 +0000 Subject: [PATCH 1/2] fix: Fix some typos --- .../java/com/google/cloud/logging/Instrumentation.java | 8 ++++---- .../com/google/cloud/logging/JavaTimeConversions.java | 2 +- .../main/java/com/google/cloud/logging/LoggingImpl.java | 4 ++-- .../java/com/google/cloud/logging/MetadataLoader.java | 4 ++-- .../java/com/google/cloud/logging/HttpRequestTest.java | 8 ++++---- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/Instrumentation.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/Instrumentation.java index 8471d882e..6aeccfa70 100644 --- a/google-cloud-logging/src/main/java/com/google/cloud/logging/Instrumentation.java +++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/Instrumentation.java @@ -48,8 +48,8 @@ public class Instrumentation { * Populates entries with instrumentation info which is added in separate log entry * * @param logEntries {Iterable} The list of entries to be populated - * @return {Tuple>} containg a flag if instrumentation info was added - * or not and a modified list of log entries + * @return {Tuple>} containing a flag if instrumentation info was + * added or not and a modified list of log entries */ public static Tuple> populateInstrumentationInfo( Iterable logEntries) { @@ -114,7 +114,7 @@ public static WriteOption[] addPartialSuccessOption(WriteOption[] options) { * with 'java'. Will be truncated if longer than 14 characters. * @param libraryVersion {string} The version of the logging library to be reported. Will be * truncated if longer than 14 characters. - * @returns {LogEntry} The entry with diagnostic instrumentation data. + * @return {LogEntry} The entry with diagnostic instrumentation data. */ public static LogEntry createDiagnosticEntry(String libraryName, String libraryVersion) { return createDiagnosticEntry(libraryName, libraryVersion, null); @@ -193,7 +193,7 @@ private static Struct createInfoStruct(String libraryName, String libraryVersion * The package-private helper method used to set the flag which indicates if instrumentation info * already written or not. * - * @returns The value of the flag before it was set. + * @return The value of the flag before it was set. */ static boolean setInstrumentationStatus(boolean value) { if (instrumentationAdded == value) return instrumentationAdded; diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/JavaTimeConversions.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/JavaTimeConversions.java index 0a64dc2da..70d5c8c58 100644 --- a/google-cloud-logging/src/main/java/com/google/cloud/logging/JavaTimeConversions.java +++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/JavaTimeConversions.java @@ -31,7 +31,7 @@ *
  • Protobuf's {@link Timestamp} and {@link java.time.Instant} * * - * The class complements convertion methods that are currently not supported in the published + * The class complements conversion methods that are currently not supported in the published * protobuf-java-util. After migrating protobuf-java-util to Java 8 this class can be removed. * * @see logEntries, WriteOption... options) { try { final Map writeOptions = optionMap(options); - final Boolean logingOptionsPopulateFlag = getOptions().getAutoPopulateMetadata(); + final Boolean loggingOptionsPopulateFlag = getOptions().getAutoPopulateMetadata(); final Boolean writeOptionPopulateFlga = WriteOption.OptionType.AUTO_POPULATE_METADATA.get(writeOptions); Tuple> pair = @@ -858,7 +858,7 @@ public void write(Iterable logEntries, WriteOption... options) { logEntries = pair.y(); if (writeOptionPopulateFlga == Boolean.TRUE - || (writeOptionPopulateFlga == null && logingOptionsPopulateFlag == Boolean.TRUE)) { + || (writeOptionPopulateFlga == null && loggingOptionsPopulateFlag == Boolean.TRUE)) { final MonitoredResource sharedResourceMetadata = RESOURCE.get(writeOptions); logEntries = populateMetadata(logEntries, sharedResourceMetadata, this.getClass().getName()); diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/MetadataLoader.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/MetadataLoader.java index 6f72d1b90..7f5bfa9c2 100644 --- a/google-cloud-logging/src/main/java/com/google/cloud/logging/MetadataLoader.java +++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/MetadataLoader.java @@ -105,7 +105,7 @@ private String getFunctionName() { String value = getter.getEnv("K_SERVICE"); if (value == null) { // keep supporting custom function name if is not provided by default - // for backward compatability only; reconsider removing it after Gen2 + // for backward compatibility only; reconsider removing it after Gen2 // environment is enrolled for Cloud Function value = getter.getEnv("FUNCTION_NAME"); } @@ -132,7 +132,7 @@ private String getModuleId() { return getter.getEnv("GAE_SERVICE"); } /** - * Heuristic to discover the namespace name of the current environment. There is no determenistic + * Heuristic to discover the namespace name of the current environment. There is no deterministic * way to discover the namespace name of the process. The name is read from the {@link * K8S_POD_NAMESPACE_PATH} when available or read from a user defined environment variable * "NAMESPACE_NAME" diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/HttpRequestTest.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/HttpRequestTest.java index f5934f1ef..56123cc26 100644 --- a/google-cloud-logging/src/test/java/com/google/cloud/logging/HttpRequestTest.java +++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/HttpRequestTest.java @@ -31,7 +31,7 @@ public class HttpRequestTest { private static final String REQUEST_URL = "http://www.example.com"; private static final Long REQUEST_SIZE = 1L; private static final Integer STATUS = 200; - private static final Long REPONSE_SIZE = 2L; + private static final Long RESPONSE_SIZE = 2L; private static final String USER_AGENT = "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)"; private static final String REMOTE_IP = "192.168.1.1"; @@ -47,7 +47,7 @@ public class HttpRequestTest { .setRequestUrl(REQUEST_URL) .setRequestSize(REQUEST_SIZE) .setStatus(STATUS) - .setResponseSize(REPONSE_SIZE) + .setResponseSize(RESPONSE_SIZE) .setUserAgent(USER_AGENT) .setRemoteIp(REMOTE_IP) .setServerIp(SERVER_IP) @@ -65,7 +65,7 @@ public void testBuilder() { assertEquals(REQUEST_URL, HTTP_REQUEST.getRequestUrl()); assertEquals(REQUEST_SIZE, HTTP_REQUEST.getRequestSize()); assertEquals(STATUS, HTTP_REQUEST.getStatus()); - assertEquals(REPONSE_SIZE, HTTP_REQUEST.getResponseSize()); + assertEquals(RESPONSE_SIZE, HTTP_REQUEST.getResponseSize()); assertEquals(USER_AGENT, HTTP_REQUEST.getUserAgent()); assertEquals(REMOTE_IP, HTTP_REQUEST.getRemoteIp()); assertEquals(SERVER_IP, HTTP_REQUEST.getServerIp()); @@ -138,7 +138,7 @@ public void testToAndFromPb() { assertEquals(REQUEST_URL, httpRequest.getRequestUrl()); assertEquals(REQUEST_SIZE, httpRequest.getRequestSize()); assertEquals(STATUS, httpRequest.getStatus()); - assertEquals(REPONSE_SIZE, httpRequest.getResponseSize()); + assertEquals(RESPONSE_SIZE, httpRequest.getResponseSize()); assertEquals(USER_AGENT, httpRequest.getUserAgent()); assertEquals(REMOTE_IP, httpRequest.getRemoteIp()); assertEquals(SERVER_IP, httpRequest.getServerIp()); From 1c03fb32a6272917dc991f17bea0f2a93967b055 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 18 Aug 2022 21:33:25 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 650d44e1c..8c185bca1 100644 --- a/README.md +++ b/README.md @@ -51,20 +51,20 @@ If you are using Maven without BOM, add this to your dependencies: If you are using Gradle 5.x or later, add this to your dependencies: ```Groovy -implementation platform('com.google.cloud:libraries-bom:26.0.0') +implementation platform('com.google.cloud:libraries-bom:26.1.0') implementation 'com.google.cloud:google-cloud-logging' ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-logging:3.10.0' +implementation 'com.google.cloud:google-cloud-logging:3.10.2' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-logging" % "3.10.0" +libraryDependencies += "com.google.cloud" % "google-cloud-logging" % "3.10.2" ``` ## Authentication