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
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