From 6e86b38ffc09f80585c11944ca316733cb340631 Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Fri, 6 Jun 2003 07:27:59 +0000 Subject: [PATCH] Fix NoSuchMethodError when FOP is compiled under JDK1.4 but run under JDK1.3. Reason: StringBuffer.append(StringBuffer) has been added with JDK1.4. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/fop-0_20_2-maintain@196492 13f79535-47bb-0310-9956-ffa450edef68 --- src/org/apache/fop/layout/LineArea.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/org/apache/fop/layout/LineArea.java b/src/org/apache/fop/layout/LineArea.java index 0273175c8..6dd25e217 100644 --- a/src/org/apache/fop/layout/LineArea.java +++ b/src/org/apache/fop/layout/LineArea.java @@ -1214,7 +1214,7 @@ public class LineArea extends Area { return wordStart; } else if (hyph == null && preString != null) { // no hyphenation points, but a inword non-letter character - remainingString.append(preString); + remainingString.append(preString.toString()); this.addWord(remainingString, startw, ls, textState); return wordStart + remainingString.length(); } else if (hyph != null && preString == null) { @@ -1230,12 +1230,12 @@ public class LineArea extends Area { // hyphenation points and a inword non letter character int index = getFinalHyphenationPoint(hyph, remainingWidth); if (index != -1) { - remainingString.append(preString.append(hyph.getPreHyphenText(index))); + remainingString.append(preString.append(hyph.getPreHyphenText(index)).toString()); remainingString.append(this.hyphProps.hyphenationChar); this.addWord(remainingString, startw, ls, textState); return wordStart + remainingString.length() - 1; } else { - remainingString.append(preString); + remainingString.append(preString.toString()); this.addWord(remainingString, startw, ls, textState); return wordStart + remainingString.length(); } -- 2.39.5