Skip to content

Commit 5666ee0

Browse files
bpcreechBen Creechgcf-owl-bot[bot]
authored
fix: Fix some typos (#1008)
* fix: Fix some typos * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Ben Creech <[email protected]> Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent cafafe4 commit 5666ee0

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

google-cloud-logging/src/main/java/com/google/cloud/logging/Instrumentation.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ public class Instrumentation {
4848
* Populates entries with instrumentation info which is added in separate log entry
4949
*
5050
* @param logEntries {Iterable<LogEntry>} The list of entries to be populated
51-
* @return {Tuple<Boolean, Iterable<LogEntry>>} containg a flag if instrumentation info was added
52-
* or not and a modified list of log entries
51+
* @return {Tuple<Boolean, Iterable<LogEntry>>} containing a flag if instrumentation info was
52+
* added or not and a modified list of log entries
5353
*/
5454
public static Tuple<Boolean, Iterable<LogEntry>> populateInstrumentationInfo(
5555
Iterable<LogEntry> logEntries) {
@@ -114,7 +114,7 @@ public static WriteOption[] addPartialSuccessOption(WriteOption[] options) {
114114
* with 'java'. Will be truncated if longer than 14 characters.
115115
* @param libraryVersion {string} The version of the logging library to be reported. Will be
116116
* truncated if longer than 14 characters.
117-
* @returns {LogEntry} The entry with diagnostic instrumentation data.
117+
* @return {LogEntry} The entry with diagnostic instrumentation data.
118118
*/
119119
public static LogEntry createDiagnosticEntry(String libraryName, String libraryVersion) {
120120
return createDiagnosticEntry(libraryName, libraryVersion, null);
@@ -193,7 +193,7 @@ private static Struct createInfoStruct(String libraryName, String libraryVersion
193193
* The package-private helper method used to set the flag which indicates if instrumentation info
194194
* already written or not.
195195
*
196-
* @returns The value of the flag before it was set.
196+
* @return The value of the flag before it was set.
197197
*/
198198
static boolean setInstrumentationStatus(boolean value) {
199199
if (instrumentationAdded == value) return instrumentationAdded;

google-cloud-logging/src/main/java/com/google/cloud/logging/JavaTimeConversions.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
* <li>Protobuf's {@link Timestamp} and {@link java.time.Instant}
3232
* </ul>
3333
*
34-
* The class complements convertion methods that are currently not supported in the published
34+
* The class complements conversion methods that are currently not supported in the published
3535
* protobuf-java-util. After migrating protobuf-java-util to Java 8 this class can be removed.
3636
*
3737
* @see <a href=

google-cloud-logging/src/main/java/com/google/cloud/logging/LoggingImpl.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -850,15 +850,15 @@ public void write(Iterable<LogEntry> logEntries, WriteOption... options) {
850850

851851
try {
852852
final Map<Option.OptionType, ?> writeOptions = optionMap(options);
853-
final Boolean logingOptionsPopulateFlag = getOptions().getAutoPopulateMetadata();
853+
final Boolean loggingOptionsPopulateFlag = getOptions().getAutoPopulateMetadata();
854854
final Boolean writeOptionPopulateFlga =
855855
WriteOption.OptionType.AUTO_POPULATE_METADATA.get(writeOptions);
856856
Tuple<Boolean, Iterable<LogEntry>> pair =
857857
Instrumentation.populateInstrumentationInfo(logEntries);
858858
logEntries = pair.y();
859859

860860
if (writeOptionPopulateFlga == Boolean.TRUE
861-
|| (writeOptionPopulateFlga == null && logingOptionsPopulateFlag == Boolean.TRUE)) {
861+
|| (writeOptionPopulateFlga == null && loggingOptionsPopulateFlag == Boolean.TRUE)) {
862862
final MonitoredResource sharedResourceMetadata = RESOURCE.get(writeOptions);
863863
logEntries =
864864
populateMetadata(logEntries, sharedResourceMetadata, this.getClass().getName());

google-cloud-logging/src/main/java/com/google/cloud/logging/MetadataLoader.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ private String getFunctionName() {
105105
String value = getter.getEnv("K_SERVICE");
106106
if (value == null) {
107107
// keep supporting custom function name if is not provided by default
108-
// for backward compatability only; reconsider removing it after Gen2
108+
// for backward compatibility only; reconsider removing it after Gen2
109109
// environment is enrolled for Cloud Function
110110
value = getter.getEnv("FUNCTION_NAME");
111111
}
@@ -132,7 +132,7 @@ private String getModuleId() {
132132
return getter.getEnv("GAE_SERVICE");
133133
}
134134
/**
135-
* Heuristic to discover the namespace name of the current environment. There is no determenistic
135+
* Heuristic to discover the namespace name of the current environment. There is no deterministic
136136
* way to discover the namespace name of the process. The name is read from the {@link
137137
* K8S_POD_NAMESPACE_PATH} when available or read from a user defined environment variable
138138
* "NAMESPACE_NAME"

google-cloud-logging/src/test/java/com/google/cloud/logging/HttpRequestTest.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public class HttpRequestTest {
3434
private static final String REQUEST_URL = "http://www.example.com";
3535
private static final Long REQUEST_SIZE = 1L;
3636
private static final Integer STATUS = 200;
37-
private static final Long REPONSE_SIZE = 2L;
37+
private static final Long RESPONSE_SIZE = 2L;
3838
private static final String USER_AGENT =
3939
"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)";
4040
private static final String REMOTE_IP = "192.168.1.1";
@@ -50,7 +50,7 @@ public class HttpRequestTest {
5050
.setRequestUrl(REQUEST_URL)
5151
.setRequestSize(REQUEST_SIZE)
5252
.setStatus(STATUS)
53-
.setResponseSize(REPONSE_SIZE)
53+
.setResponseSize(RESPONSE_SIZE)
5454
.setUserAgent(USER_AGENT)
5555
.setRemoteIp(REMOTE_IP)
5656
.setServerIp(SERVER_IP)
@@ -68,7 +68,7 @@ public void testBuilder() {
6868
assertEquals(REQUEST_URL, HTTP_REQUEST.getRequestUrl());
6969
assertEquals(REQUEST_SIZE, HTTP_REQUEST.getRequestSize());
7070
assertEquals(STATUS, HTTP_REQUEST.getStatus());
71-
assertEquals(REPONSE_SIZE, HTTP_REQUEST.getResponseSize());
71+
assertEquals(RESPONSE_SIZE, HTTP_REQUEST.getResponseSize());
7272
assertEquals(USER_AGENT, HTTP_REQUEST.getUserAgent());
7373
assertEquals(REMOTE_IP, HTTP_REQUEST.getRemoteIp());
7474
assertEquals(SERVER_IP, HTTP_REQUEST.getServerIp());
@@ -141,7 +141,7 @@ public void testToAndFromPb() {
141141
assertEquals(REQUEST_URL, httpRequest.getRequestUrl());
142142
assertEquals(REQUEST_SIZE, httpRequest.getRequestSize());
143143
assertEquals(STATUS, httpRequest.getStatus());
144-
assertEquals(REPONSE_SIZE, httpRequest.getResponseSize());
144+
assertEquals(RESPONSE_SIZE, httpRequest.getResponseSize());
145145
assertEquals(USER_AGENT, httpRequest.getUserAgent());
146146
assertEquals(REMOTE_IP, httpRequest.getRemoteIp());
147147
assertEquals(SERVER_IP, httpRequest.getServerIp());

0 commit comments

Comments
 (0)