Changeset 12495 in josm for trunk/src/org/openstreetmap/josm/io
- Timestamp:
- 2017-07-23T01:09:45+02:00 (7 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/io
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/ChangesetQuery.java
r12470 r12495 19 19 import org.openstreetmap.josm.data.Bounds; 20 20 import org.openstreetmap.josm.data.coor.LatLon; 21 import org.openstreetmap.josm.gui.JosmUserIdentityManager; 21 22 import org.openstreetmap.josm.tools.CheckParameterUtil; 22 23 import org.openstreetmap.josm.tools.Utils; … … 61 62 public static ChangesetQuery buildFromUrlQuery(String query) throws ChangesetQueryUrlException { 62 63 return new ChangesetQueryUrlParser().parse(query); 64 } 65 66 /** 67 * Replies a changeset query object restricted to the current user, if known. 68 * @return a changeset query object restricted to the current user, if known 69 * @throws IllegalStateException if current user is anonymous 70 * @since 12495 71 */ 72 public static ChangesetQuery forCurrentUser() { 73 JosmUserIdentityManager im = JosmUserIdentityManager.getInstance(); 74 if (im.isAnonymous()) { 75 throw new IllegalStateException("anonymous user"); 76 } 77 ChangesetQuery query = new ChangesetQuery(); 78 if (im.isFullyIdentified()) { 79 return query.forUser(im.getUserId()); 80 } else { 81 return query.forUser(im.getUserName()); 82 } 63 83 } 64 84 -
trunk/src/org/openstreetmap/josm/io/OsmChangesetParser.java
r10212 r12495 153 153 throwException(tr("Illegal value for attribute ''{0}''. Got ''{1}''.", "max_lat", maxLatStr)); 154 154 } 155 current.setMax(new LatLon(maxL on, maxLat));155 current.setMax(new LatLon(maxLat, maxLon)); 156 156 } 157 157
Note:
See TracChangeset
for help on using the changeset viewer.