From: incastrix Date: Sun, 20 Sep 2009 19:49:50 +0000 (+0000) Subject: fix #774 infinite loop in net.sourceforge.phpeclipse.builder.IdentifierIndexManager... X-Git-Url: http://secure.phpeclipse.com?hp=1ea36c1d125377aa2305c0920dbaadbc96d7c311 fix #774 infinite loop in net.sourceforge.phpeclipse.builder.IdentifierIndexManager.LineCreator.parseIdentifiers(char[], StringBuffer). --- diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/builder/IdentifierIndexManager.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/builder/IdentifierIndexManager.java index 526ff4b..86de9b5 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/builder/IdentifierIndexManager.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/builder/IdentifierIndexManager.java @@ -149,6 +149,7 @@ public class IdentifierIndexManager { boolean hasModifiers = false; int phpdocOffset = -1; int phpdocLength = -1; + try { while (fToken != TokenNameEOF && fToken != TokenNameERROR) { phpdocOffset = -1; @@ -325,6 +326,7 @@ public class IdentifierIndexManager { // TODO Auto-generated catch block e.printStackTrace(); } + } synchronized public void parseIdentifiers(char[] charArray, @@ -337,6 +339,7 @@ public class IdentifierIndexManager { fScanner.setSource(charArray); fScanner.setPHPMode(false); fToken = TokenNameEOF; + try { getNextToken(); while (fToken != TokenNameEOF) { // && fToken != @@ -380,11 +383,15 @@ public class IdentifierIndexManager { ident = fScanner.getCurrentIdentifierSource(); addIdentifierInformation('v', ident, buf, phpdocOffset, phpdocLength); + skipComments(); + if (fToken == TokenNameCOMMA) { + skipComments(); + } } - skipComments(); +/* skipComments(); if (fToken == TokenNameCOMMA) { skipComments(); - } + }*/ } while (fToken != TokenNameRPAREN ); } parseDeclarations(null, buf, true);