diff options
author | Jeremias Maerki <jeremias@apache.org> | 2007-05-18 11:59:26 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2007-05-18 11:59:26 +0000 |
commit | 34f930d783debd1f7f1f94e6b06e5d974dac57f3 (patch) | |
tree | e92e9a9852c4d342468628c0126d80b63e2e2faa /src/java | |
parent | 4dbd4bd6aacc9d6265c7a234aff6501d67e49876 (diff) | |
download | xmlgraphics-fop-34f930d783debd1f7f1f94e6b06e5d974dac57f3.tar.gz xmlgraphics-fop-34f930d783debd1f7f1f94e6b06e5d974dac57f3.zip |
Bugzilla #42067:
Restore JDK 1.3 compatibility.
Submitted by: Adrian Cumiskey <fop-dev.at.cumiskey.com>
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@539406 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java')
-rw-r--r-- | src/java/org/apache/fop/area/Trait.java | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/java/org/apache/fop/area/Trait.java b/src/java/org/apache/fop/area/Trait.java index 1ded69663..32582dec1 100644 --- a/src/java/org/apache/fop/area/Trait.java +++ b/src/java/org/apache/fop/area/Trait.java @@ -521,13 +521,10 @@ public class Trait implements Serializable { if (attrValue != null) { int len = attrValue.length(); if (len >= 2 && attrValue.charAt(0) == '(' && attrValue.charAt(len - 1) == ')') { - String[] values = attrValue.substring(1, len - 1).split(",", 2); - if (values.length > 0) { - result[0] = values[0].trim(); - if (values.length > 1) { - result[1] = values[1].trim(); - } - } + String value = attrValue.substring(1, len - 1); // remove brackets + int delimIndex = value.indexOf(','); + result[0] = value.substring(0, delimIndex).trim(); // PV key + result[1] = value.substring(delimIndex + 1, value.length()).trim(); // IDRef } else { // PV key only, e.g. from old area tree XML: result[0] = attrValue; |