mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
Merge pull request #2860 from kubikrubikvkube/master
We should not create additional Strings in loop.
This commit is contained in:
commit
52af50f77e
1 changed files with 3 additions and 3 deletions
|
@ -58,17 +58,17 @@ public class MagePreferences {
|
|||
}
|
||||
|
||||
public static String getUserNames() {
|
||||
String userIds = "";
|
||||
StringBuilder userIds = new StringBuilder();
|
||||
try {
|
||||
String[] keys = prefs().keys();
|
||||
for (String key : keys) {
|
||||
if (key.matches(".*userName$")) {
|
||||
userIds += "," + prefs().get(key, null);
|
||||
userIds.append(',').append(prefs().get(key, null));
|
||||
}
|
||||
}
|
||||
} catch (BackingStoreException ex) {
|
||||
}
|
||||
return userIds;
|
||||
return userIds.toString();
|
||||
}
|
||||
|
||||
public static void setUserName(String serverAddress, String userName) {
|
||||
|
|
Loading…
Reference in a new issue