This is an automated email from the ASF dual-hosted git repository.
afs pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/jena.git
The following commit(s) were added to refs/heads/main by this push:
new e070e0278b Bump Jetty from 12.1.8 to 12.1.9
e070e0278b is described below
commit e070e0278b72d389f297c4c8c0c6c967dd0232e6
Author: Andy Seaborne <[email protected]>
AuthorDate: Mon May 11 09:23:44 2026 +0100
Bump Jetty from 12.1.8 to 12.1.9
---
.../org/apache/jena/fuseki/mod/ui/FMod_UI.java | 23 ++++++++++++++--------
pom.xml | 2 +-
2 files changed, 16 insertions(+), 9 deletions(-)
diff --git
a/jena-fuseki2/jena-fuseki-main/src/main/java/org/apache/jena/fuseki/mod/ui/FMod_UI.java
b/jena-fuseki2/jena-fuseki-main/src/main/java/org/apache/jena/fuseki/mod/ui/FMod_UI.java
index ff280dc35c..09e6cc3635 100644
---
a/jena-fuseki2/jena-fuseki-main/src/main/java/org/apache/jena/fuseki/mod/ui/FMod_UI.java
+++
b/jena-fuseki2/jena-fuseki-main/src/main/java/org/apache/jena/fuseki/mod/ui/FMod_UI.java
@@ -64,7 +64,8 @@ public class FMod_UI implements FusekiModule {
private static ArgDecl argUIFiles = new ArgDecl(true, "ui");
/** Java resource name used to find the UI files. */
- private static String resourceNameUI = "webapp";
+ private static String resourceNameUI = "/webapp/index.html";
+ private static String resourceBaseNameUI = "/webapp";
/** Directory name of the root of UI files */
private static String directoryNameUI = "webapp";
@@ -153,7 +154,7 @@ public class FMod_UI implements FusekiModule {
// 3:: From a jar.
// Format jar:file:///.../jena-fuseki-ui-VERSION.jar!/webapp/"
- String r = fromClasspath(resourceNameUI);
+ String r = fromClasspath(resourceNameUI, resourceBaseNameUI);
if ( r != null ) {
// Simplify name.
String displayName = loggingName(r);
@@ -165,16 +166,22 @@ public class FMod_UI implements FusekiModule {
}
// Look for "$resourceName" on the classpath.
- private static String fromClasspath(String resourceName) {
+ private static String fromClasspath(String lookupName, String rootName) {
// Jetty 12.0.15 => warning "Leaked mount"
// Logger : "org.eclipse.jetty.util.resource.ResourceFactory"
//ResourceFactory resourceFactory = ResourceFactory.root();
- ResourceFactory resourceFactory = ResourceFactory.closeable();
- Resource resource =
resourceFactory.newClassLoaderResource(resourceName);
- if ( resource != null )
- return resource.getURI().toString();
- return null;
+ // Jetty 12.1.9: Need to lookup the name of a resource (lookup name),
not the directory (rootName)
+ try ( ResourceFactory.Closeable resourceFactory =
ResourceFactory.closeable() ) {
+ Resource resource =
resourceFactory.newClassLoaderResource(lookupName);
+ if ( resource == null )
+ return null;
+ String x = resource.getURI().toString();
+ int i = x.indexOf(rootName);
+ // Up to the rootName
+ x = x.substring(0, i + rootName.length());
+ return x;
+ }
}
// Look for "$path/$resourceName"
diff --git a/pom.xml b/pom.xml
index 2dac84174b..10872cd17c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -71,7 +71,7 @@
<ver.jakarta.json>2.0.1</ver.jakarta.json>
<!-- These two must be in-step -->
- <ver.jetty>12.1.8</ver.jetty>
+ <ver.jetty>12.1.9</ver.jetty>
<ver.jakarta-servlet>6.1.0</ver.jakarta-servlet>
<!--