xmlgraphics-fop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerem...@apache.org
Subject svn commit: r540036 - /xmlgraphics/fop/trunk/src/java/org/apache/fop/area/Trait.java
Date Mon, 21 May 2007 06:17:49 GMT
Author: jeremias
Date: Sun May 20 23:17:48 2007
New Revision: 540036

URL: http://svn.apache.org/viewvc?view=rev&rev=540036
Log:
Bugzilla #42067:
Fixed a possible StringIndexOutOfBoundsException.
Submitted by: Paul Vinkenoog <paul.at.vinkenoog.nl>

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/area/Trait.java

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/area/Trait.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/area/Trait.java?view=diff&rev=540036&r1=540035&r2=540036
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/area/Trait.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/area/Trait.java Sun May 20 23:17:48 2007
@@ -520,7 +520,8 @@
            String[] result = {null, null};
            if (attrValue != null) {
               int len = attrValue.length();
-              if (len >= 2 && attrValue.charAt(0) == '(' && attrValue.charAt(len
- 1) == ')') {
+              if (len >= 2 && attrValue.charAt(0) == '(' && attrValue.charAt(len
- 1) == ')'
+                      && attrValue.indexOf(',') != -1) {
                   String value = attrValue.substring(1, len - 1); // remove brackets
                   int delimIndex = value.indexOf(',');
                   result[0] = value.substring(0, delimIndex).trim(); // PV key



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org


Mime
View raw message