Author: julien(a)jboss.com
Date: 2007-01-25 16:08:22 -0500 (Thu, 25 Jan 2007)
New Revision: 6098
Modified:
trunk/core/src/main/org/jboss/portal/core/portlet/user/UserPortlet.java
Log:
replace sb.append("a" + x) by sb.append("a").append(x);
Modified: trunk/core/src/main/org/jboss/portal/core/portlet/user/UserPortlet.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/portlet/user/UserPortlet.java 2007-01-25
00:54:37 UTC (rev 6097)
+++ trunk/core/src/main/org/jboss/portal/core/portlet/user/UserPortlet.java 2007-01-25
21:08:22 UTC (rev 6098)
@@ -343,7 +343,7 @@
// We get usersPerPage + 1 entries so we can know if there is
// a next page
// It's tricky but it avoids to make 2 queries.
- Set users = null;
+ Set users;
if (usernameFilter.trim().length() == 0)
{
users = userModule.findUsers(offset, usersPerPage + 1);
@@ -454,7 +454,7 @@
Set roles = roleModule.findRoles();
Role[] rolesArray = new Role[roles.size()];
rolesArray = (Role[])roles.toArray(rolesArray);
- Role role = null;
+ Role role;
DelegateContext rowCtx = null;
for (int i = 0; i < rolesArray.length; i++)
{
@@ -554,7 +554,7 @@
String hash = req.getParameter(UserPortletConstants.HASH);
String userId =
req.getParameters().getParameter(UserPortletConstants.USERID);
- User user = null;
+ User user;
PortletRequestDispatcher rd;
try
{
@@ -691,7 +691,7 @@
String fakeEmail = req.getParameter("fakeemail");
String question = req.getParameter("question");
String answer = req.getParameter("answer");
- User user = null;
+ User user;
if (nbErrors == 0)
{
try
@@ -1042,20 +1042,20 @@
ResourceBundle bundle = getResourceBundle(locale);
try
{
- sb.append(bundle.getString("VALIDATIONEMAIL_1") + " - ");
+ sb.append(bundle.getString("VALIDATIONEMAIL_1")).append(" -
");
sb.append(rootURL);
sb.append("\n\n");
- sb.append(bundle.getString("VALIDATIONEMAIL_2") + ":\n\n");
+
sb.append(bundle.getString("VALIDATIONEMAIL_2")).append(":\n\n");
sb.append("----------------------------\n");
- sb.append(bundle.getString("USERNAME") + ": " +
user.getUserName() + "\n");
- sb.append(bundle.getString("PASSWORD") + ": " +
clearPassword + "\n");
+ sb.append(bundle.getString("USERNAME")).append(":
").append(user.getUserName()).append("\n");
+ sb.append(bundle.getString("PASSWORD")).append(":
").append(clearPassword).append("\n");
sb.append("----------------------------\n\n");
- sb.append(bundle.getString("VALIDATIONEMAIL_3") + ": \n");
+ sb.append(bundle.getString("VALIDATIONEMAIL_3")).append(":
\n");
sb.append(link);
sb.append("\n\n");
sb.append(bundle.getString("VALIDATIONEMAIL_4"));
sb.append("\n\n");
- sb.append(bundle.getString("VALIDATIONEMAIL_5") + "\n");
+
sb.append(bundle.getString("VALIDATIONEMAIL_5")).append("\n");
}
catch (Exception e)
{
@@ -1077,7 +1077,7 @@
String hash = req.getParameter(UserPortletConstants.HASH);
String userId = req.getParameters().getParameter(UserPortletConstants.USERID);
- User user = null;
+ User user;
try
{
user = userModule.findUserById(userId);
@@ -1241,7 +1241,7 @@
Object o = userProfileModule.getProperty(user, key);
if (o == null)
{
- return new String();
+ return "";
}
else
{
Show replies by date