- Timestamp:
- 2017-04-14T20:23:24+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/JosmUserIdentityManager.java
r11746 r11901 97 97 98 98 /** 99 * Reme bers the fact that the current JOSM user is partially identified99 * Remembers the fact that the current JOSM user is partially identified 100 100 * by the user name of its OSM account. 101 101 * … … 106 106 public void setPartiallyIdentified(String userName) { 107 107 CheckParameterUtil.ensureParameterNotNull(userName, "userName"); 108 if (userName.trim().isEmpty()) 108 String trimmedUserName = userName.trim(); 109 if (trimmedUserName.isEmpty()) 109 110 throw new IllegalArgumentException( 110 111 MessageFormat.format("Expected non-empty value for parameter ''{0}'', got ''{1}''", "userName", userName)); 111 this.userName = userName;112 this.userName = trimmedUserName; 112 113 userInfo = null; 113 114 } … … 125 126 public void setFullyIdentified(String username, UserInfo userinfo) { 126 127 CheckParameterUtil.ensureParameterNotNull(username, "username"); 127 if (username.trim().isEmpty()) 128 String trimmedUserName = userName.trim(); 129 if (trimmedUserName.isEmpty()) 128 130 throw new IllegalArgumentException(tr("Expected non-empty value for parameter ''{0}'', got ''{1}''", "userName", userName)); 129 131 CheckParameterUtil.ensureParameterNotNull(userinfo, "userinfo"); 130 this.userName = username;132 this.userName = trimmedUserName; 131 133 this.userInfo = userinfo; 132 134 }
Note:
See TracChangeset
for help on using the changeset viewer.