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

Lukas Jungmann (JIRA) jira-events at lists.jboss.org
Wed Apr 21 08:43:10 EDT 2010


Minor improvements in code listings
-----------------------------------

                 Key: TOOLSDOC-62
                 URL: https://jira.jboss.org/jira/browse/TOOLSDOC-62
             Project: Documentation for JBoss Tools/Developer Studio
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: GettingStartedGuide
            Reporter: Lukas Jungmann
            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/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list