Removed some ill-advised casts from the grammars.

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4312 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Tom Copeland
2006-03-28 14:51:33 +00:00
parent 6f3401322e
commit 44e41a867c
5 changed files with 111 additions and 111 deletions
pmd
bin
etc
src/net/sourceforge/pmd
xdocs

@ -159,11 +159,11 @@
<javacc target="src/net/sourceforge/pmd/ast/Java.jj" outputdirectory="src/net/sourceforge/pmd/ast" javacchome="${javacc-home.path}" />
<delete file="src/net/sourceforge/pmd/ast/Java.jj" />
<replace file="src/net/sourceforge/pmd/ast/JavaParserTokenManager.java" token="throw new Error" value="throw new RuntimeException" />
<replace file="src/net/sourceforge/pmd/ast/JavaParser.java" token="(Error)" value="(RuntimeException)" />
<replace file="src/net/sourceforge/pmd/ast/JavaParser.java" token="throw new Error" value="throw new RuntimeException" />
<replace file="src/net/sourceforge/pmd/ast/JavaCharStream.java" token="throw new Error" value="throw new RuntimeException" />
<replace file="src/net/sourceforge/pmd/ast/ParseException.java" token="throw new Error" value="throw new RuntimeException" />
<replace file="src/net/sourceforge/pmd/ast/TokenMgrError.java" token="extends Error" value="extends RuntimeException" />
<replace file="src/net/sourceforge/pmd/ast/ParseException.java" token="extends Exception" value="extends RuntimeException" />
<replace file="src/net/sourceforge/pmd/ast/TokenMgrError.java" token="extends Error" value="extends RuntimeException" />
<replace file="src/net/sourceforge/pmd/ast/JavaParserVisitor.java" token="SimpleNode" value="SimpleJavaNode" />
</target>
@ -177,7 +177,6 @@
<javacc target="src/net/sourceforge/pmd/jsp/ast/JspParser.jj" outputdirectory="src/net/sourceforge/pmd/jsp/ast" javacchome="${javacc-home.path}" />
<delete file="src/net/sourceforge/pmd/jsp/ast/JspParser.jj" />
<replace file="src/net/sourceforge/pmd/jsp/ast/JspParserTokenManager.java" token="throw new Error" value="throw new RuntimeException" />
<replace file="src/net/sourceforge/pmd/jsp/ast/JspParser.java" token="(Error)" value="(RuntimeException)" />
<replace file="src/net/sourceforge/pmd/jsp/ast/JspParser.java" token="throw new Error" value="throw new RuntimeException" />
<replace file="src/net/sourceforge/pmd/jsp/ast/JspCharStream.java" token="throw new Error" value="throw new RuntimeException" />
<replace file="src/net/sourceforge/pmd/jsp/ast/ParseException.java" token="throw new Error" value="throw new RuntimeException" />

@ -29,6 +29,7 @@ Implemented RFE 1415487 - Added a rulesets/releases/35.xml ruleset (and similar
Wouter Zelle fixed a false positive in NonThreadSafeSingleton.
Wouter Zelle fixed a false positive in InefficientStringBuffering.
The CPD Ant task now supports an optional language attribute.
Removed some ill-advised casts from the grammars.
Fixed bug in CallSuperInConstructor; it no longer flag classes without extends clauses.
Fixed release packaging; now entire xslt/ directory contents are included.
Added more XSLT from Dave Corley - you can use them to filter PMD reports by priority level.

File diff suppressed because it is too large Load Diff

@ -60,7 +60,7 @@ public class JspParser/*@bgen(jjtree)*/implements JspParserTreeConstants, JspPar
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (RuntimeException)jjte000;}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
@ -194,7 +194,7 @@ public class JspParser/*@bgen(jjtree)*/implements JspParserTreeConstants, JspPar
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (RuntimeException)jjte000;}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
@ -283,7 +283,7 @@ public class JspParser/*@bgen(jjtree)*/implements JspParserTreeConstants, JspPar
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (RuntimeException)jjte000;}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
@ -433,7 +433,7 @@ public class JspParser/*@bgen(jjtree)*/implements JspParserTreeConstants, JspPar
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (RuntimeException)jjte000;}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
@ -681,7 +681,7 @@ public class JspParser/*@bgen(jjtree)*/implements JspParserTreeConstants, JspPar
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (RuntimeException)jjte000;}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
@ -712,7 +712,7 @@ public class JspParser/*@bgen(jjtree)*/implements JspParserTreeConstants, JspPar
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (RuntimeException)jjte000;}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
@ -845,7 +845,7 @@ public class JspParser/*@bgen(jjtree)*/implements JspParserTreeConstants, JspPar
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (RuntimeException)jjte000;}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
@ -964,7 +964,7 @@ public class JspParser/*@bgen(jjtree)*/implements JspParserTreeConstants, JspPar
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (RuntimeException)jjte000;}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
@ -1021,7 +1021,7 @@ public class JspParser/*@bgen(jjtree)*/implements JspParserTreeConstants, JspPar
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (RuntimeException)jjte000;}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);

@ -48,12 +48,12 @@
</subsection>
<subsection name="Contributors">
<ul>
<li>Xavier Le Vourch - Suggestions on cleaning up casts in grammar, SimplifyBooleanAssertion, patch to fix problem with TestClassWithoutTestCases, patch to fix rule name bugs in migration rulesets</li>
<li>Mathieu Champlon - Added language support to the CPD Ant task</li>
<li>Wouter Zelle - Fixed a false positive in InefficientStringBuffering, fixed a false positive in NonThreadSafeSingleton, a nice patch to clean up some of the Ant task properties and fix a TextRenderer bug, rewrote PositionLiteralsFirstInComparisons in XPath, Renderer improvement suggestions, wrote NonThreadSafeSingleton rule, wrote DefaultPackage rule, worked thru ASTMethodDeclaration.isSyntacticallyX design, reported docs bug 1292689 for UnnecessaryLocalBeforeReturn, reported leftover ExceptionTypeChecking source file, rewrote UselessOverridingMethod in Java, UselessOverridingMethod rule, ProperLogger rule, nifty code to allow variables in XPath rules, externalInfoUrl data for all rules in basic and unusedcode rulesets, some very nifty XSLT, improvements to UseCorrectExceptionLogging, designed and implemented the "externalInfoUrl" feature in the rule definitions, fixed a devious bug in RuleSetFactory, AvoidPrintStackTrace, initial implementation of SimplifyConditional</li>
<li>Uroshnor - Reported bug in UseNotifyAllInsteadOfNotify</li>
<li>Jan Koops - Noted missing data in MemberValuePair nodes, bug report for JBuilder plugin</li>
<li>Christopher Stach - several bug reports for rules that didn't handle JDK 1.5 enums</li>
<li>Xavier Le Vourch - SimplifyBooleanAssertion, patch to fix problem with TestClassWithoutTestCases, patch to fix rule name bugs in migration rulesets</li>
<li><a href="http://tersesystems.com/">Will Sargent</a> - Implemented AvoidThreadGroup, AvoidThrowingCertainExceptionTypesRule, AvoidCatchingNPERule, ExceptionAsFlowControlRule, URL updates for 'Similar projects' page</li>
<li>Benoit Xhenseval - noted Maven plugin bug (http://jira.codehaus.org/browse/MPPMD-24), bug report for UnusedPrivateMethod, suggestion to add elapsed time to XML report, bug report for ImmutableField, many bug reports (with good failure cases!), Ant task patch and bug report, XSLT patch, suggestion for improving XML report</li>
<li>Barak Naveh - Reported and fixed bug in CallSuperInConstructor</li>