[jbossseam-issues] [JBoss JIRA] Updated: (JBSEAM-3747) Boolean tests during Initialization consistent with JDK

Pete Muir (JIRA) jira-events at lists.jboss.org
Sun Nov 23 22:23:46 EST 2008


     [ https://jira.jboss.org/jira/browse/JBSEAM-3747?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pete Muir updated JBSEAM-3747:
------------------------------

    Fix Version/s: 2.1.1.CR2


> Boolean tests during Initialization consistent with JDK
> -------------------------------------------------------
>
>                 Key: JBSEAM-3747
>                 URL: https://jira.jboss.org/jira/browse/JBSEAM-3747
>             Project: Seam
>          Issue Type: Patch
>          Components: Core
>    Affects Versions: 2.1.1.CR1
>            Reporter: Anthony Whitford
>            Priority: Minor
>             Fix For: 2.1.1.CR2
>
>         Attachments: JBSEAM-3747.patch
>
>
> I noticed code like:
>       boolean autoCreate = "true".equals(factory.attributeValue("auto-create"));
> Java already has some boolean semantics that I would expect to be leveraged for consistency.  The line could be replaced with:
>       boolean autoCreate = Boolean.parseBoolean(factory.attributeValue("auto-create"));
> There is a subtle difference in that parseBoolean will do a case insensitive comparison, but at least this is consistent with core Java.
> See:  http://java.sun.com/javase/6/docs/api/java/lang/Boolean.html#parseBoolean(java.lang.String)
> and:  http://java.sun.com/javase/6/docs/api/java/lang/Boolean.html#valueOf(java.lang.String)
> The above change also removes "magic values" repeated ("true").
> Very minor issue, but also easy to fix.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list