This is an automated email from the ASF dual-hosted git repository. robertlazarski pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git
commit 522466b8415d234b75a7165a8de207b9dd544e64 Author: Robert Lazarski <[email protected]> AuthorDate: Wed Sep 2 10:23:10 2026 -1000 Declare isAbsolute locally in the AAR and WAR schema resolvers XmlSchema 2.3.3 makes DefaultURIResolver.isAbsolute private, so the three resolvers that call it to gate their remote-scheme block stop inheriting it. Declare it in each, as AARBasedWSDLLocator already does. It keeps the 2.3.2 prefix semantics rather than the URI.isAbsolute() test that replaced them, and stays protected so this still compiles against the pinned 2.3.2. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> --- .../resolver/AARFileBasedURIResolver.java | 21 ++++++++++++++++++++- .../deployment/resolver/WarBasedWSDLLocator.java | 22 +++++++++++++++++++++- .../resolver/WarFileBasedURIResolver.java | 21 ++++++++++++++++++++- 3 files changed, 61 insertions(+), 3 deletions(-) diff --git a/modules/kernel/src/org/apache/axis2/deployment/resolver/AARFileBasedURIResolver.java b/modules/kernel/src/org/apache/axis2/deployment/resolver/AARFileBasedURIResolver.java index 165ef7214e..801a33a97b 100644 --- a/modules/kernel/src/org/apache/axis2/deployment/resolver/AARFileBasedURIResolver.java +++ b/modules/kernel/src/org/apache/axis2/deployment/resolver/AARFileBasedURIResolver.java @@ -119,5 +119,24 @@ public class AARFileBasedURIResolver extends DefaultURIResolver { log.info("AARFileBasedURIResolver: Unable to resolve" + lastImportLocation); return null; } - + + /** + * Override logic in DefaultURIResolver class, which made this method + * private in XmlSchema 2.3.3 so that it is no longer inherited. + * + * These are deliberately the 2.3.2 semantics rather than the + * URI.isAbsolute() test that replaced them upstream: the remote-scheme + * guard above relies on file: locations falling through to the relative + * branch, and widening this predicate would send them to the parent + * resolver instead. Keep it protected -- 2.3.2 still declares it + * protected, and narrowing an inherited member will not compile. + * + * @param uri + * @return boolean + */ + protected boolean isAbsolute(String uri) { + return uri.startsWith("http://") + || uri.startsWith("https://") + || uri.startsWith("urn:"); + } } diff --git a/modules/kernel/src/org/apache/axis2/deployment/resolver/WarBasedWSDLLocator.java b/modules/kernel/src/org/apache/axis2/deployment/resolver/WarBasedWSDLLocator.java index fcc860f6b4..db8c8274e3 100644 --- a/modules/kernel/src/org/apache/axis2/deployment/resolver/WarBasedWSDLLocator.java +++ b/modules/kernel/src/org/apache/axis2/deployment/resolver/WarBasedWSDLLocator.java @@ -97,4 +97,24 @@ public class WarBasedWSDLLocator extends DefaultURIResolver implements WSDLLocat } // Woden URIResolver.resolveURI() removed in 2.0.1 (AXIS2-6102) -} \ No newline at end of file + + /** + * Override logic in DefaultURIResolver class, which made this method + * private in XmlSchema 2.3.3 so that it is no longer inherited. + * + * These are deliberately the 2.3.2 semantics rather than the + * URI.isAbsolute() test that replaced them upstream: the remote-scheme + * guard above relies on file: locations falling through to the relative + * branch, and widening this predicate would send them to the parent + * resolver instead. Keep it protected -- 2.3.2 still declares it + * protected, and narrowing an inherited member will not compile. + * + * @param uri + * @return boolean + */ + protected boolean isAbsolute(String uri) { + return uri.startsWith("http://") + || uri.startsWith("https://") + || uri.startsWith("urn:"); + } +} diff --git a/modules/kernel/src/org/apache/axis2/deployment/resolver/WarFileBasedURIResolver.java b/modules/kernel/src/org/apache/axis2/deployment/resolver/WarFileBasedURIResolver.java index ec8fa2a79b..a19911db64 100644 --- a/modules/kernel/src/org/apache/axis2/deployment/resolver/WarFileBasedURIResolver.java +++ b/modules/kernel/src/org/apache/axis2/deployment/resolver/WarFileBasedURIResolver.java @@ -73,5 +73,24 @@ public class WarFileBasedURIResolver extends DefaultURIResolver { return new InputSource(classLoader.getResourceAsStream(resolved)); } } -} + /** + * Override logic in DefaultURIResolver class, which made this method + * private in XmlSchema 2.3.3 so that it is no longer inherited. + * + * These are deliberately the 2.3.2 semantics rather than the + * URI.isAbsolute() test that replaced them upstream: the remote-scheme + * guard above relies on file: locations falling through to the relative + * branch, and widening this predicate would send them to the parent + * resolver instead. Keep it protected -- 2.3.2 still declares it + * protected, and narrowing an inherited member will not compile. + * + * @param uri + * @return boolean + */ + protected boolean isAbsolute(String uri) { + return uri.startsWith("http://") + || uri.startsWith("https://") + || uri.startsWith("urn:"); + } +}
