[jboss-jira] [JBoss JIRA] Closed: (JBRULES-421) Unnecessary Intern on String Literal in PackageBuilder
Mark Proctor (JIRA)
jira-events at jboss.com
Sat Aug 19 20:11:11 EDT 2006
[ http://jira.jboss.com/jira/browse/JBRULES-421?page=all ]
Mark Proctor closed JBRULES-421.
--------------------------------
Fix Version/s: 3.1-m1
Resolution: Done
no idea why its there either - have removed it now.
> Unnecessary Intern on String Literal in PackageBuilder
> ------------------------------------------------------
>
> Key: JBRULES-421
> URL: http://jira.jboss.com/jira/browse/JBRULES-421
> Project: JBoss Rules
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: All
> Affects Versions: 3.0.4
> Reporter: Geoffrey Wiseman
> Assigned To: Mark Proctor
> Priority: Trivial
> Fix For: 3.1-m1
>
>
> Found this:
> if ( !"1.4".intern().equals( configuration.getJavaLanguageLevel() ) ) throw new RuntimeDroolsException( "Incompatible Java language level with selected compiler" );
> Not sure why intern() is called on the string literal; literals are intern'd by default, and, besides, the code is using .equals(), so intern() is unnecessary.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list