From 9f9adbe8645e92f0b9a2d6742e2b1dc24f747e15 Mon Sep 17 00:00:00 2001 From: Alena Laskavaia Date: Wed, 22 Oct 2008 17:45:54 +0000 Subject: [PATCH] - removed useless code that was causing unnecessary array object creation every for every line of build output --- .../src/org/eclipse/cdt/core/ErrorParserManager.java | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/ErrorParserManager.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/ErrorParserManager.java index d58c4c521c6..2281d3c3c27 100644 --- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/ErrorParserManager.java +++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/ErrorParserManager.java @@ -205,15 +205,10 @@ public class ErrorParserManager extends OutputStream { // Don't process it since it'll probably be really slow and won't find an error anyway if (line.length() > 1000) return; - - String[] parserIDs = new String[fErrorParsers.size()]; - Iterator items = fErrorParsers.keySet().iterator(); - for (int i = 0; items.hasNext(); i++) { - parserIDs[i] = items.next(); - } - for (int i = 0; i < parserIDs.length; ++i) { - IErrorParser[] parsers = fErrorParsers.get(parserIDs[i]); + for (Iterator items = fErrorParsers.keySet().iterator();items.hasNext();) { + String parserId = items.next(); + IErrorParser[] parsers = fErrorParsers.get(parserId); for (IErrorParser curr : parsers) { if (curr.processLine(line, this)) { return;