[jbosstools-issues] [JBoss JIRA] Closed: (TOOLSDOC-62) Minor improvements in code listings

Lukas Jungmann (JIRA) jira-events at lists.jboss.org
Thu May 20 10:04:06 EDT 2010


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

Lukas Jungmann closed TOOLSDOC-62.
----------------------------------



verified

> Minor improvements in code listings
> -----------------------------------
>
>                 Key: TOOLSDOC-62
>                 URL: https://jira.jboss.org/browse/TOOLSDOC-62
>             Project: Documentation for JBoss Tools/Developer Studio
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: GettingStartedGuide
>    Affects Versions: 3.0.1.GA
>            Reporter: Lukas Jungmann
>            Assignee: Anastasiya Bogachuk
>            Priority: Trivial
>
> code listing in section 3.3.1 Edit Authentication Logic:
> public boolean authenticate() {
>    if (identity.getUsername().equals("admin") && identity.getPassword().equals("password")) {
>       identity.addRole("admin");
>       return true;
>    }
>     else
>       return true;
> }
> can be improved a bit to be:
> public boolean authenticate() {
>    if ("admin".equals(identity.getUsername()) && "password".equals(identity.getPassword()) {
>       identity.addRole("admin");
>    }
>    return true;
> }
> section 5.5 - import declarations sections in code listings there can omit "import java.util.Locale;" since the class is not needed (and IDE will provide hint to remove it anyway)

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

        


More information about the jbosstools-issues mailing list