[jbosstools-issues] [JBoss JIRA] Updated: (TOOLSDOC-62) Minor improvements in code listings
Svetlana mukhina (JIRA)
jira-events at lists.jboss.org
Fri Apr 30 11:12:06 EDT 2010
[ https://jira.jboss.org/jira/browse/TOOLSDOC-62?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Svetlana mukhina updated TOOLSDOC-62:
-------------------------------------
Assignee: Svetlana mukhina
> 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
> Affects Versions: 3.0.1.GA
> Reporter: Lukas Jungmann
> Assignee: Svetlana mukhina
> 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