Applying patch for XALANJ-2268 from Dave Brosius.
Removed an unnecessary guard from code in the initialize(URI,String) method that
does not actually protect against any exception.
diff --git a/src/org/apache/xml/serializer/utils/URI.java b/src/org/apache/xml/serializer/utils/URI.java
index 6e48b87..9100226 100644
--- a/src/org/apache/xml/serializer/utils/URI.java
+++ b/src/org/apache/xml/serializer/utils/URI.java
@@ -403,8 +403,7 @@
}
// two slashes means generic URI syntax, so we get the authority
- if (((index + 1) < uriSpecLen)
- && (uriSpec.substring(index).startsWith("//")))
+ if (uriSpec.startsWith("//"))
{
index += 2;
diff --git a/src/org/apache/xml/utils/URI.java b/src/org/apache/xml/utils/URI.java
index 209c060..d5febfb 100644
--- a/src/org/apache/xml/utils/URI.java
+++ b/src/org/apache/xml/utils/URI.java
@@ -423,8 +423,7 @@
}
// two slashes means generic URI syntax, so we get the authority
- if (((index + 1) < uriSpecLen)
- && (uriSpec.substring(index).startsWith("//")))
+ if (uriSpec.startsWith("//"))
{
index += 2;