diff --git a/CHANGELOG.md b/CHANGELOG.md
index da6027463..21e153fae 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,17 @@
# Changelog
+## [3.15.3](https://github.com/googleapis/java-logging/compare/v3.15.2...v3.15.3) (2023-06-08)
+
+
+### Bug Fixes
+
+* Remove org.jspecify dependency ([#1364](https://github.com/googleapis/java-logging/issues/1364)) ([8138f46](https://github.com/googleapis/java-logging/commit/8138f463e170f1927280d3c083fa403b184fca47))
+
+
+### Dependencies
+
+* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.11.0 ([#1367](https://github.com/googleapis/java-logging/issues/1367)) ([8cd2a53](https://github.com/googleapis/java-logging/commit/8cd2a53b396d4671514bf8cca1b4c2a62cfb457c))
+
## [3.15.2](https://github.com/googleapis/java-logging/compare/v3.15.1...v3.15.2) (2023-05-30)
diff --git a/README.md b/README.md
index 0d98c6ff8..a73c2a9c5 100644
--- a/README.md
+++ b/README.md
@@ -19,7 +19,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
com.google.cloud
libraries-bom
- 26.14.0
+ 26.16.0
pom
import
@@ -44,7 +44,7 @@ If you are using Maven without the BOM, add this to your dependencies:
com.google.cloud
google-cloud-logging
- 3.15.1
+ 3.15.2
```
@@ -52,20 +52,20 @@ If you are using Maven without the 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.15.0')
+implementation platform('com.google.cloud:libraries-bom:26.16.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.15.1'
+implementation 'com.google.cloud:google-cloud-logging:3.15.2'
```
If you are using SBT, add this to your dependencies:
```Scala
-libraryDependencies += "com.google.cloud" % "google-cloud-logging" % "3.15.1"
+libraryDependencies += "com.google.cloud" % "google-cloud-logging" % "3.15.2"
```
@@ -452,7 +452,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-logging/java11.html
[stability-image]: https://img.shields.io/badge/stability-stable-green
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-logging.svg
-[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-logging/3.15.1
+[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-logging/3.15.2
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles
diff --git a/google-cloud-logging-bom/pom.xml b/google-cloud-logging-bom/pom.xml
index 39edde361..b4455e004 100644
--- a/google-cloud-logging-bom/pom.xml
+++ b/google-cloud-logging-bom/pom.xml
@@ -3,12 +3,12 @@
4.0.0
com.google.cloud
google-cloud-logging-bom
- 3.15.2
+ 3.15.3
pom
com.google.cloud
google-cloud-shared-config
- 1.5.5
+ 1.5.6
Google Cloud logging BOM
@@ -53,17 +53,17 @@
com.google.cloud
google-cloud-logging
- 3.15.2
+ 3.15.3
com.google.api.grpc
grpc-google-cloud-logging-v2
- 0.104.2
+ 0.104.3
com.google.api.grpc
proto-google-cloud-logging-v2
- 0.104.2
+ 0.104.3
diff --git a/google-cloud-logging/pom.xml b/google-cloud-logging/pom.xml
index f8b18d4d0..b164f94d8 100644
--- a/google-cloud-logging/pom.xml
+++ b/google-cloud-logging/pom.xml
@@ -3,7 +3,7 @@
4.0.0
com.google.cloud
google-cloud-logging
- 3.15.2
+ 3.15.3
jar
Google Cloud Logging
https://github.com/googleapis/java-logging
@@ -11,7 +11,7 @@
com.google.cloud
google-cloud-logging-parent
- 3.15.2
+ 3.15.3
google-cloud-logging
@@ -90,11 +90,6 @@
com.google.cloud
google-cloud-core
-
- org.jspecify
- jspecify
- 0.2.0
-
com.google.errorprone
error_prone_annotations
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 cce901b2a..8eedf1822 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
@@ -29,7 +29,6 @@
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
-import org.jspecify.nullness.Nullable;
public final class Instrumentation {
public static final String DIAGNOSTIC_INFO_KEY = "logging.googleapis.com/diagnostic";
@@ -41,7 +40,7 @@ public final class Instrumentation {
// See
// https://github.com/googleapis/release-please/blob/main/docs/customizing.md#updating-arbitrary-files
// {x-version-update-start:google-cloud-logging:current}
- public static final String DEFAULT_INSTRUMENTATION_VERSION = "3.15.2";
+ public static final String DEFAULT_INSTRUMENTATION_VERSION = "3.15.3";
// {x-version-update-end}
public static final String INSTRUMENTATION_LOG_NAME = "diagnostic-log";
public static final int MAX_DIAGNOSTIC_VALUE_LENGTH = 14;
@@ -103,7 +102,7 @@ public static Tuple> populateInstrumentationInfo(
* @return The new array of oprions containing WriteOption.OptionType.PARTIAL_SUCCESS flag set to
* true
*/
- public static WriteOption @Nullable [] addPartialSuccessOption(WriteOption[] options) {
+ public static WriteOption[] addPartialSuccessOption(WriteOption[] options) {
if (options == null) {
return options;
}
diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/LogDestinationName.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/LogDestinationName.java
index 089db8f7e..dcf6a12cc 100644
--- a/google-cloud-logging/src/main/java/com/google/cloud/logging/LogDestinationName.java
+++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/LogDestinationName.java
@@ -21,7 +21,6 @@
import com.google.logging.v2.LogName;
import java.util.Map;
-import org.jspecify.nullness.Nullable;
/**
* Class for specifying resource name of the log to which this log entry belongs (see 'logName'
@@ -88,7 +87,7 @@ public static LogDestinationName billingAccount(String id) {
}
/** Creates a {@code LogEntry} object for given log ID. */
- public @Nullable LogName toLogName(String logId) {
+ public LogName toLogName(String logId) {
if (logId == null) {
return null;
}
@@ -121,7 +120,7 @@ public DestinationType getDestinationType() {
}
/** Creates a {@code LogDestinationName} object from given {@code LogName}. */
- public static @Nullable LogDestinationName fromLogName(LogName logName) {
+ public static LogDestinationName fromLogName(LogName logName) {
if (logName == null) {
return null;
}
diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/LogEntry.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/LogEntry.java
index 5c5727d27..72622031d 100644
--- a/google-cloud-logging/src/main/java/com/google/cloud/logging/LogEntry.java
+++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/LogEntry.java
@@ -38,7 +38,6 @@
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
-import org.jspecify.nullness.Nullable;
/**
* A Cloud Logging log entry. All log entries are represented via objects of this class. Log entries
@@ -369,7 +368,7 @@ public MonitoredResource getResource() {
* @return timestamp in milliseconds
*/
@Deprecated
- public @Nullable Long getTimestamp() {
+ public Long getTimestamp() {
return timestamp != null ? timestamp.toEpochMilli() : null;
}
@@ -390,7 +389,7 @@ public Instant getInstantTimestamp() {
* @return timestamp in milliseconds
*/
@Deprecated
- public @Nullable Long getReceiveTimestamp() {
+ public Long getReceiveTimestamp() {
return receiveTimestamp != null ? receiveTimestamp.toEpochMilli() : null;
}
@@ -438,13 +437,13 @@ public Operation getOperation() {
* Returns the resource name of the trace associated with the log entry, if any. If it contains a
* relative resource name, the name is assumed to be relative to `//tracing.googleapis.com`.
*/
- public @Nullable String getTrace() {
+ public String getTrace() {
// For backwards compatibility return null when trace not set instead of "null".
return trace == null ? null : trace;
}
/** Returns the ID of the trace span associated with the log entry, if any. */
- public @Nullable String getSpanId() {
+ public String getSpanId() {
// For backwards compatibility return null when spanId not set instead of "null".
return spanId == null ? null : spanId;
}
diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/LoggingHandler.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/LoggingHandler.java
index a0b176968..2e1fd9d8b 100644
--- a/google-cloud-logging/src/main/java/com/google/cloud/logging/LoggingHandler.java
+++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/LoggingHandler.java
@@ -36,7 +36,6 @@
import java.util.logging.LogRecord;
import java.util.logging.Logger;
import java.util.logging.SimpleFormatter;
-import org.jspecify.nullness.Nullable;
/**
* A logging handler that outputs logs generated with {@link java.util.logging.Logger} to Cloud
@@ -356,7 +355,7 @@ public void publish(LogRecord record) {
}
}
- private @Nullable MonitoredResource getMonitoredResource() {
+ private MonitoredResource getMonitoredResource() {
Optional resourceOption =
stream(defaultWriteOptions)
.filter(o -> o.getOptionType() == WriteOption.OptionType.RESOURCE)
diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/LoggingImpl.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/LoggingImpl.java
index 48aca324c..d1e3b0ae9 100644
--- a/google-cloud-logging/src/main/java/com/google/cloud/logging/LoggingImpl.java
+++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/LoggingImpl.java
@@ -98,7 +98,6 @@
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
-import org.jspecify.nullness.Nullable;
class LoggingImpl extends BaseService implements Logging {
protected static final String RESOURCE_NAME_FORMAT = "projects/%s/traces/%s";
@@ -791,7 +790,7 @@ private static WriteLogEntriesRequest writeLogEntriesRequest(
return builder.build();
}
- private static @Nullable LogName getLogName(
+ private static LogName getLogName(
String projectId, String logName, LogDestinationName destination) {
if (logName == null) {
return null;
@@ -921,7 +920,7 @@ public void flush() {
* @param resource A {@see MonitoredResource} describing environment metadata.
* @return A formatted trace id string.
*/
- private @Nullable String getFormattedTrace(String traceId, MonitoredResource resource) {
+ private String getFormattedTrace(String traceId, MonitoredResource resource) {
if (traceId == null) {
return null;
}
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 7e2e74f1d..1a0581626 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
@@ -24,7 +24,6 @@
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.function.Supplier;
-import org.jspecify.nullness.Nullable;
public final class MetadataLoader {
public static final String ENV_FLEXIBLE = "flex";
@@ -64,7 +63,7 @@ public MetadataLoader(ResourceTypeEnvironmentGetter getter) {
* @param label A resource metadata label of type {@see MonitoredResourceUtil.Label}
* @return A string with metadata value or {@code null} if the label is not supported.
*/
- public @Nullable String getValue(MonitoredResourceUtil.Label label) {
+ public String getValue(MonitoredResourceUtil.Label label) {
Supplier lambda = labelResolvers.get(label);
if (lambda != null) {
return lambda.get();
@@ -175,7 +174,7 @@ private String getProjectId() {
*
* @return region string id
*/
- private @Nullable String getRegion() {
+ private String getRegion() {
String loc = getter.getAttribute("instance/region");
if (loc != null) {
return loc.substring(loc.lastIndexOf('/') + 1);
@@ -199,7 +198,7 @@ private String getVersionId() {
*
* @return zone string id
*/
- private @Nullable String getZone() {
+ private String getZone() {
String loc = getter.getAttribute("instance/zone");
if (loc != null) {
return loc.substring(loc.lastIndexOf('/') + 1);
diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/ResourceTypeEnvironmentGetterImpl.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/ResourceTypeEnvironmentGetterImpl.java
index fd546aa88..2ee3a3eae 100644
--- a/google-cloud-logging/src/main/java/com/google/cloud/logging/ResourceTypeEnvironmentGetterImpl.java
+++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/ResourceTypeEnvironmentGetterImpl.java
@@ -17,12 +17,11 @@
package com.google.cloud.logging;
import com.google.cloud.MetadataConfig;
-import org.jspecify.nullness.Nullable;
final class ResourceTypeEnvironmentGetterImpl implements ResourceTypeEnvironmentGetter {
@Override
- public @Nullable String getEnv(String name) {
+ public String getEnv(String name) {
// handle exception thrown if a security manager exists and blocks access to the
// process environment
try {
diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/SinkInfo.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/SinkInfo.java
index b2a9bb97d..872db32b1 100644
--- a/google-cloud-logging/src/main/java/com/google/cloud/logging/SinkInfo.java
+++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/SinkInfo.java
@@ -25,7 +25,6 @@
import java.util.Objects;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import org.jspecify.nullness.Nullable;
/**
* Cloud Logging sinks can be used to control the export of your logs. Each sink specifies the
@@ -478,7 +477,7 @@ LogSink.VersionFormat toPb() {
return versionPb;
}
- static @Nullable VersionFormat fromPb(LogSink.VersionFormat versionPb) {
+ static VersionFormat fromPb(LogSink.VersionFormat versionPb) {
switch (versionPb) {
case V1:
return VersionFormat.V1;
diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/SourceLocation.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/SourceLocation.java
index 966ea63ef..1099fd285 100644
--- a/google-cloud-logging/src/main/java/com/google/cloud/logging/SourceLocation.java
+++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/SourceLocation.java
@@ -24,7 +24,6 @@
import com.google.logging.v2.LogEntrySourceLocation;
import java.io.Serializable;
import java.util.Objects;
-import org.jspecify.nullness.Nullable;
/** Additional information about the source code location that produced the log entry. */
public final class SourceLocation implements Serializable {
@@ -174,7 +173,7 @@ static SourceLocation fromPb(LogEntrySourceLocation sourceLocationPb) {
* @return a new instance of {@link SourceLocation} populated with file name, method and line
* number information.
*/
- static @Nullable SourceLocation fromCurrentContext(String... exclusionClassPaths) {
+ static SourceLocation fromCurrentContext(String... exclusionClassPaths) {
StackTraceElement[] stackTrace = new Exception().getStackTrace();
for (int level = 1; level < stackTrace.length; level++) {
diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/Structs.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/Structs.java
index 884e6ff08..46ba567e6 100644
--- a/google-cloud-logging/src/main/java/com/google/cloud/logging/Structs.java
+++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/Structs.java
@@ -32,7 +32,6 @@
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
-import org.jspecify.nullness.Nullable;
/**
* This class contains static utility methods that operate on or return protobuf's {@code Struct}
@@ -101,7 +100,7 @@ static Struct newStruct(Map map) {
return Struct.newBuilder().putAllFields(valueMap).build();
}
- private static @Nullable Object valueToObject(Value value) {
+ private static Object valueToObject(Value value) {
switch (value.getKindCase()) {
case NULL_VALUE:
return null;
diff --git a/grpc-google-cloud-logging-v2/pom.xml b/grpc-google-cloud-logging-v2/pom.xml
index deeae38e4..33ade1229 100644
--- a/grpc-google-cloud-logging-v2/pom.xml
+++ b/grpc-google-cloud-logging-v2/pom.xml
@@ -4,13 +4,13 @@
4.0.0
com.google.api.grpc
grpc-google-cloud-logging-v2
- 0.104.2
+ 0.104.3
grpc-google-cloud-logging-v2
GRPC library for grpc-google-cloud-logging-v2
com.google.cloud
google-cloud-logging-parent
- 3.15.2
+ 3.15.3
diff --git a/pom.xml b/pom.xml
index 0cf970c3d..ec4f27da4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
com.google.cloud
google-cloud-logging-parent
pom
- 3.15.2
+ 3.15.3
Google Cloud Logging Parent
https://github.com/googleapis/java-logging
@@ -14,7 +14,7 @@
com.google.cloud
google-cloud-shared-config
- 1.5.5
+ 1.5.6
@@ -61,23 +61,23 @@
com.google.api.grpc
proto-google-cloud-logging-v2
- 0.104.2
+ 0.104.3
com.google.api.grpc
grpc-google-cloud-logging-v2
- 0.104.2
+ 0.104.3
com.google.cloud
google-cloud-logging
- 3.15.2
+ 3.15.3
com.google.cloud
google-cloud-shared-dependencies
- 3.10.1
+ 3.11.0
pom
import
@@ -108,7 +108,7 @@
com.google.truth
truth
- 1.1.3
+ 1.1.4
test
@@ -146,7 +146,7 @@
org.apache.maven.plugins
maven-project-info-reports-plugin
- 3.4.4
+ 3.4.5
diff --git a/proto-google-cloud-logging-v2/pom.xml b/proto-google-cloud-logging-v2/pom.xml
index 45a81a28e..5569279ab 100644
--- a/proto-google-cloud-logging-v2/pom.xml
+++ b/proto-google-cloud-logging-v2/pom.xml
@@ -4,13 +4,13 @@
4.0.0
com.google.api.grpc
proto-google-cloud-logging-v2
- 0.104.2
+ 0.104.3
proto-google-cloud-logging-v2
PROTO library for proto-google-cloud-logging-v2
com.google.cloud
google-cloud-logging-parent
- 3.15.2
+ 3.15.3
diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml
index 97dafdb8e..bbba16873 100644
--- a/samples/install-without-bom/pom.xml
+++ b/samples/install-without-bom/pom.xml
@@ -28,7 +28,7 @@
com.google.cloud
google-cloud-logging
- 3.15.1
+ 3.15.2
@@ -41,7 +41,7 @@
com.google.truth
truth
- 1.1.3
+ 1.1.4
test
diff --git a/samples/native-image-sample/pom.xml b/samples/native-image-sample/pom.xml
index fea1d29a5..5b760c867 100644
--- a/samples/native-image-sample/pom.xml
+++ b/samples/native-image-sample/pom.xml
@@ -29,7 +29,7 @@
com.google.cloud
libraries-bom
- 26.14.0
+ 26.16.0
pom
import
@@ -51,7 +51,7 @@
com.google.truth
truth
- 1.1.3
+ 1.1.4
test
@@ -121,7 +121,7 @@
org.apache.maven.plugins
maven-surefire-plugin
- 3.1.0
+ 3.1.2
**/IT*
diff --git a/samples/pom.xml b/samples/pom.xml
index ab94cdcf3..dfb6f3a4b 100644
--- a/samples/pom.xml
+++ b/samples/pom.xml
@@ -65,7 +65,7 @@
com.google.truth
truth
- 1.1.3
+ 1.1.4
test
diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml
index be354ded6..af8d22a24 100644
--- a/samples/snapshot/pom.xml
+++ b/samples/snapshot/pom.xml
@@ -28,7 +28,7 @@
com.google.cloud
google-cloud-logging
- 3.15.2
+ 3.15.3
@@ -40,7 +40,7 @@
com.google.truth
truth
- 1.1.3
+ 1.1.4
test
diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml
index 5f9f6d06e..ba1b00b4f 100644
--- a/samples/snippets/pom.xml
+++ b/samples/snippets/pom.xml
@@ -29,7 +29,7 @@
com.google.cloud
libraries-bom
- 26.14.0
+ 26.16.0
pom
import
@@ -52,7 +52,7 @@
com.google.truth
truth
- 1.1.3
+ 1.1.4
test
diff --git a/versions.txt b/versions.txt
index b6cc6915c..e3dbe36e0 100644
--- a/versions.txt
+++ b/versions.txt
@@ -1,6 +1,6 @@
# Format:
# module:released-version:current-version
-google-cloud-logging:3.15.2:3.15.2
-grpc-google-cloud-logging-v2:0.104.2:0.104.2
-proto-google-cloud-logging-v2:0.104.2:0.104.2
+google-cloud-logging:3.15.3:3.15.3
+grpc-google-cloud-logging-v2:0.104.3:0.104.3
+proto-google-cloud-logging-v2:0.104.3:0.104.3