From 14a328eab00dd5db0b9812c01a368f4ee7595991 Mon Sep 17 00:00:00 2001 From: ndw Date: Tue, 12 Apr 2005 22:56:51 +0000 Subject: [PATCH] Fix bug #25262: find longest match in rewrites git-svn-id: https://svn.apache.org/repos/asf/xml/commons/trunk@226196 13f79535-47bb-0310-9956-ffa450edef68 --- java/src/org/apache/xml/resolver/Catalog.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/java/src/org/apache/xml/resolver/Catalog.java b/java/src/org/apache/xml/resolver/Catalog.java index 6c5a5c6..e731958 100644 --- a/java/src/org/apache/xml/resolver/Catalog.java +++ b/java/src/org/apache/xml/resolver/Catalog.java @@ -1746,11 +1746,11 @@ public class Catalog { } } } + } - if (prefix != null) { - // return the systemId with the new prefix - return prefix + systemId.substring(startString.length()); - } + if (prefix != null) { + // return the systemId with the new prefix + return prefix + systemId.substring(startString.length()); } // If there's a DELEGATE_SYSTEM entry in this catalog, use it @@ -1878,11 +1878,11 @@ public class Catalog { } } } + } - if (prefix != null) { - // return the systemId with the new prefix - return prefix + uri.substring(startString.length()); - } + if (prefix != null) { + // return the systemId with the new prefix + return prefix + uri.substring(startString.length()); } // If there's a DELEGATE_URI entry in this catalog, use it