diff --git a/src/main/java/com/oracle/coherence/demo/application/PersistenceHelper.java b/src/main/java/com/oracle/coherence/demo/application/PersistenceHelper.java index 14884ea..8d110c9 100644 --- a/src/main/java/com/oracle/coherence/demo/application/PersistenceHelper.java +++ b/src/main/java/com/oracle/coherence/demo/application/PersistenceHelper.java @@ -1,7 +1,7 @@ /* * File: PersistenceHelper.java * - * Copyright (c) 2015, 2020 Oracle and/or its affiliates. + * Copyright (c) 2015, 2024 Oracle and/or its affiliates. * * You may not use this file except in compliance with the Universal Permissive * License (UPL), Version 1.0 (the "License.") @@ -118,7 +118,7 @@ public PersistenceHelper() { waitForRegistration(registry, Registry.CLUSTER_TYPE); } catch (InterruptedException e) { - throw Base.ensureRuntimeException(e, "Unable to find MBean"); + throw new RuntimeException("Unable to find MBean", e); } } diff --git a/src/main/java/com/oracle/coherence/demo/application/TracingFilter.java b/src/main/java/com/oracle/coherence/demo/application/TracingFilter.java index 7a13fae..3de47b0 100644 --- a/src/main/java/com/oracle/coherence/demo/application/TracingFilter.java +++ b/src/main/java/com/oracle/coherence/demo/application/TracingFilter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Oracle and/or its affiliates. + * Copyright (c) 2020, 2024 Oracle and/or its affiliates. * * You may not use this file except in compliance with the Universal Permissive * License (UPL), Version 1.0 (the "License.") @@ -26,7 +26,7 @@ import java.net.URI; -import java.util.HashMap; +import java.util.Map; import jakarta.ws.rs.container.ContainerRequestContext; import jakarta.ws.rs.container.ContainerRequestFilter; @@ -89,9 +89,7 @@ public void filter(ContainerRequestContext requestContext, if (responseContext.getStatusInfo().getFamily() == Response.Status.Family.SERVER_ERROR) { Tags.ERROR.set(span, true); - span.log(new HashMap() {{ - put("event", "error"); - }}); + span.log(Map.of("event", "error")); } Tags.HTTP_STATUS.set(span, responseContext.getStatus()); diff --git a/src/main/resources/web/index.html b/src/main/resources/web/index.html index 851ed59..0404574 100644 --- a/src/main/resources/web/index.html +++ b/src/main/resources/web/index.html @@ -461,7 +461,7 @@