From 34f930d783debd1f7f1f94e6b06e5d974dac57f3 Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Fri, 18 May 2007 11:59:26 +0000 Subject: Bugzilla #42067: Restore JDK 1.3 compatibility. Submitted by: Adrian Cumiskey git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@539406 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/area/Trait.java | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/java') 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; -- cgit v1.2.3