Changeset 16579 in josm for trunk/src/org
- Timestamp:
- 2020-06-08T21:53:03+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/ShowStatusReportAction.java
r16535 r16579 277 277 } 278 278 279 private static String valueCleanup(Object value) { 280 String valueString = value.toString(); 281 if (valueString.length() > 512 && value instanceof Collection<?>) { 282 valueString = ((Collection<?>) value).stream().map(v -> { 283 if (v instanceof Map<?, ?>) { 284 LinkedHashMap<Object, Object> map = new LinkedHashMap<>(((Map<?, ?>) v)); 285 map.computeIfPresent("icon", (k, icon) -> Utils.shortenString(icon.toString(), 32)); // see #19058 286 return map.toString(); 287 } else { 288 return String.valueOf(v); 289 } 290 }).collect(Collectors.joining(",\n ", "[", "\n]")); 291 } 292 return paramCleanup(valueString); 293 } 294 279 295 @Override 280 296 public void actionPerformed(ActionEvent e) { … … 295 311 text.append(paramCleanup(key)) 296 312 .append('=') 297 .append( paramCleanup(setting.getValue().toString()))313 .append(valueCleanup(setting.getValue())) 298 314 .append('\n'); 299 315 });
Note:
See TracChangeset
for help on using the changeset viewer.