Changeset 8846 in josm for trunk/src/org/openstreetmap/josm/io/GpxWriter.java
- Timestamp:
- 2015-10-10T01:40:42+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/GpxWriter.java
r8461 r8846 135 135 String[] tmp = data.getString(META_AUTHOR_EMAIL).split("@"); 136 136 if (tmp.length == 2) { 137 inline("email", "id=\"" + tmp[0] + "\" domain=\""+tmp[1]+ "\"");137 inline("email", "id=\"" + tmp[0] + "\" domain=\""+tmp[1]+'\"'); 138 138 } 139 139 } … … 146 146 if (attr.containsKey(META_COPYRIGHT_LICENSE) 147 147 || attr.containsKey(META_COPYRIGHT_YEAR)) { 148 openAtt("copyright", "author=\""+ data.get(META_COPYRIGHT_AUTHOR) + "\"");148 openAtt("copyright", "author=\""+ data.get(META_COPYRIGHT_AUTHOR) +'\"'); 149 149 if (attr.containsKey(META_COPYRIGHT_YEAR)) { 150 150 simpleTag("year", (String) data.get(META_COPYRIGHT_YEAR)); … … 171 171 if (bounds != null) { 172 172 String b = "minlat=\"" + bounds.getMinLat() + "\" minlon=\"" + bounds.getMinLon() + 173 "\" maxlat=\"" + bounds.getMaxLat() + "\" maxlon=\"" + bounds.getMaxLon() + "\"";173 "\" maxlat=\"" + bounds.getMaxLat() + "\" maxlon=\"" + bounds.getMaxLon() + '\"'; 174 174 inline("bounds", b); 175 175 } … … 222 222 223 223 private void open(String tag) { 224 out.print(indent + "<" + tag + ">");224 out.print(indent + '<' + tag + '>'); 225 225 indent += " "; 226 226 } 227 227 228 228 private void openAtt(String tag, String attributes) { 229 out.println(indent + "<" + tag + " " + attributes + ">");229 out.println(indent + '<' + tag + ' ' + attributes + '>'); 230 230 indent += " "; 231 231 } 232 232 233 233 private void inline(String tag, String attributes) { 234 out.println(indent + "<" + tag + " "+ attributes + "/>");234 out.println(indent + '<' + tag + ' ' + attributes + "/>"); 235 235 } 236 236 237 237 private void close(String tag) { 238 238 indent = indent.substring(2); 239 out.print(indent + "</" + tag + ">");239 out.print(indent + "</" + tag + '>'); 240 240 } 241 241 … … 253 253 open(tag); 254 254 out.print(encode(content)); 255 out.println("</" + tag + ">");255 out.println("</" + tag + '>'); 256 256 indent = indent.substring(2); 257 257 } … … 263 263 private void gpxLink(GpxLink link) { 264 264 if (link != null) { 265 openAtt("link", "href=\"" + link.uri + "\"");265 openAtt("link", "href=\"" + link.uri + '\"'); 266 266 simpleTag("text", link.text); 267 267 simpleTag("type", link.type); … … 290 290 if (pnt != null) { 291 291 LatLon c = pnt.getCoor(); 292 String coordAttr = "lat=\"" + c.lat() + "\" lon=\"" + c.lon() + "\"";292 String coordAttr = "lat=\"" + c.lat() + "\" lon=\"" + c.lon() + '\"'; 293 293 if (pnt.attr.isEmpty()) { 294 294 inline(type, coordAttr);
Note:
See TracChangeset
for help on using the changeset viewer.