Skip to content

Commit 97549dc

Browse files
committed
Revert in Kotlin
1 parent f2d4027 commit 97549dc

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

awsagentprovider/src/main/java/software/amazon/opentelemetry/javaagent/providers/AwsSpanProcessingUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ static String getEgressOperation(SpanData span) {
109109
* @return the first part from the http target. Eg, /payment
110110
*/
111111
static String extractAPIPathValue(String httpTarget) {
112-
if (httpTarget == null || !httpTarget.isPresent()) {
112+
if (httpTarget == null || httpTarget.isEmpty()) {
113113
return "/";
114114
}
115115
String[] paths = httpTarget.split("/");

awsagentprovider/src/main/java/software/amazon/opentelemetry/javaagent/providers/ScopeBasedPeriodicMetricReader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ CompletableResultCode doRun() {
200200
if (exportAvailable.compareAndSet(true, false)) {
201201
try {
202202
Collection<MetricData> metricData = collectionRegistration.collectAllMetrics();
203-
if (!metricData.isPresent()) {
203+
if (metricData.isEmpty()) {
204204
logger.log(Level.FINE, "No metric data to export - skipping export.");
205205
flushResult.succeed();
206206
exportAvailable.set(true);

buildSrc/src/main/kotlin/software/amazon/adot/GradleUtils.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import com.google.cloud.tools.jib.gradle.JibExtension
99
fun JibExtension.configureImages(sourceImage:String, destinationImage: String, localDocker: Boolean, multiPlatform: Boolean, tags: Set<String> = setOf<String>()) {
1010
to {
1111
image = destinationImage
12-
if (tags.isPresent()) {
12+
if (!tags.isEmpty()) {
1313
this.tags = tags;
1414
}
1515
}

0 commit comments

Comments
 (0)