Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Schorn2008-02-25 15:17:13 +0000
committerMarkus Schorn2008-02-25 15:17:13 +0000
commit517100139327cecd34a081c6761eadbd358cfc2e (patch)
tree5d48adc4db415726cf2eb38080fde81f85fffc22 /core/org.eclipse.cdt.core/parser
parenteda39314e74d34ae1b22ef9cd68e8de510303837 (diff)
downloadorg.eclipse.cdt-517100139327cecd34a081c6761eadbd358cfc2e.tar.gz
org.eclipse.cdt-517100139327cecd34a081c6761eadbd358cfc2e.tar.xz
org.eclipse.cdt-517100139327cecd34a081c6761eadbd358cfc2e.zip
Avoid calling StringBuffer.append(CharSequence s) with a StringBuffer as argument, bug 220158.
Diffstat (limited to 'core/org.eclipse.cdt.core/parser')
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/MacroExpansionTracker.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/MacroExpansionTracker.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/MacroExpansionTracker.java
index f3d93e07bbf..fd398014a1d 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/MacroExpansionTracker.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/MacroExpansionTracker.java
@@ -124,7 +124,10 @@ public class MacroExpansionTracker {
StringBuilder after= new StringBuilder();
toString(result, lexInput, before, replace, after);
int offset= before.length();
- before.append(replace).append(after);
+ // workaround bug 220158
+ final CharSequence csr= replace;
+ final CharSequence csa= after;
+ before.append(csr).append(csa);
before.append(lexInput, endOffset, lexInput.length-endOffset);
fPreStep= before.toString();
fReplacement= new ReplaceEdit(offset, replace.length(), fReplacementText);

Back to the top