From 33a4c454e5f6e80a4e70099c169a790c0017f3e3 Mon Sep 17 00:00:00 2001 From: Thomas Scheffler Date: Fri, 17 Jan 2025 13:44:04 +0100 Subject: [PATCH] MCR-3229 small fixes --- .../src/main/java/org/mycore/common/xml/MCRURIResolver.java | 4 ++-- .../java/org/mycore/common/events/MCRShutdownHandlerTest.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mycore-base/src/main/java/org/mycore/common/xml/MCRURIResolver.java b/mycore-base/src/main/java/org/mycore/common/xml/MCRURIResolver.java index 5cc7f4fb08..224e76496c 100644 --- a/mycore-base/src/main/java/org/mycore/common/xml/MCRURIResolver.java +++ b/mycore-base/src/main/java/org/mycore/common/xml/MCRURIResolver.java @@ -1005,7 +1005,7 @@ private static class MCRNotNullResolver implements URIResolver { public Source resolve(String href, String base) { String target = href.substring(href.indexOf(':') + 1); // fixes exceptions if suburi is empty like "mcrobject:" - String subUri = target.substring(target.indexOf(":") + 1); + String subUri = target.substring(target.indexOf(':') + 1); if (subUri.isEmpty()) { return new JDOMSource(new Element("null")); } @@ -1184,7 +1184,7 @@ public Source resolve(String href, String base) throws TransformerException { String transformerId = new StringTokenizer(help, ":").nextToken(); String target = help.substring(help.indexOf(':') + 1); - String subUri = target.substring(target.indexOf(":") + 1); + String subUri = target.substring(target.indexOf(':') + 1); if (subUri.isEmpty()) { return new JDOMSource(new Element("null")); } diff --git a/mycore-base/src/test/java/org/mycore/common/events/MCRShutdownHandlerTest.java b/mycore-base/src/test/java/org/mycore/common/events/MCRShutdownHandlerTest.java index 5959cab043..9dc0f42118 100644 --- a/mycore-base/src/test/java/org/mycore/common/events/MCRShutdownHandlerTest.java +++ b/mycore-base/src/test/java/org/mycore/common/events/MCRShutdownHandlerTest.java @@ -21,6 +21,7 @@ import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; +import java.util.NavigableSet; import java.util.Optional; import java.util.concurrent.ConcurrentSkipListSet; import java.util.concurrent.atomic.AtomicBoolean; @@ -142,8 +143,7 @@ public String toString() { * The MCRShutdownHandlerState class represents the state of a shutdown handler. * It only used by {@link #mark} and {@link #resetCloseables()}. */ - private record MCRShutdownHandlerState(boolean shuttingDown, - java.util.NavigableSet requests) { + private record MCRShutdownHandlerState(boolean shuttingDown, NavigableSet requests) { /** * Constructs an instance of MCRShutdownHandlerState with the given parameters.