Changeset 10300 in josm for trunk/src/org/openstreetmap/josm/tools
- Timestamp:
- 2016-05-30T01:17:28+02:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/tools
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/HttpClient.java
r10160 r10300 122 122 final boolean hasReason = reasonForRequest != null && !reasonForRequest.isEmpty(); 123 123 Main.info("{0} {1}{2} -> {3}{4}", 124 requestMethod, url, hasReason ? " (" + reasonForRequest + ")": "",124 requestMethod, url, hasReason ? (" (" + reasonForRequest + ')') : "", 125 125 connection.getResponseCode(), 126 126 connection.getContentLengthLong() > 0 127 ? " (" + Utils.getSizeString(connection.getContentLengthLong(), Locale.getDefault()) + ")"127 ? (" (" + Utils.getSizeString(connection.getContentLengthLong(), Locale.getDefault()) + ')') 128 128 : "" 129 129 ); -
trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
r10212 r10300 928 928 } else { 929 929 final String fnMD5 = Utils.md5Hex(fn); 930 url = b + fnMD5.substring(0, 1) + '/' + fnMD5.substring(0, 2) + "/"+ fn;930 url = b + fnMD5.substring(0, 1) + '/' + fnMD5.substring(0, 2) + '/' + fn; 931 931 } 932 932 result = getIfAvailableHttp(url, type); -
trunk/src/org/openstreetmap/josm/tools/Pair.java
r9983 r10300 42 42 Pair<?, ?> pair = (Pair<?, ?>) other; 43 43 return Objects.equals(a, pair.a) && 44 44 Objects.equals(b, pair.b); 45 45 } 46 46 … … 62 62 @Override 63 63 public String toString() { 64 return "<"+a+','+b+'>';64 return '<'+a.toString()+','+b.toString()+'>'; 65 65 } 66 66 -
trunk/src/org/openstreetmap/josm/tools/bugreport/BugReport.java
r10285 r10300 70 70 if (className.equals(element.getClassName()) && "getCallingMethod".equals(element.getMethodName())) { 71 71 StackTraceElement toReturn = stackTrace[i + offset]; 72 return toReturn.getClassName().replaceFirst(".*\\.", "") + "#"+ toReturn.getMethodName();72 return toReturn.getClassName().replaceFirst(".*\\.", "") + '#' + toReturn.getMethodName(); 73 73 } 74 74 } -
trunk/src/org/openstreetmap/josm/tools/bugreport/ReportedException.java
r10285 r10300 124 124 125 125 private static String niceThreadName(Thread thread) { 126 String name = "Thread: " + thread.getName() + " (" + thread.getId() + ")";126 String name = "Thread: " + thread.getName() + " (" + thread.getId() + ')'; 127 127 ThreadGroup threadGroup = thread.getThreadGroup(); 128 128 if (threadGroup != null) { … … 221 221 @Override 222 222 public String toString() { 223 StringBuilder builder =new StringBuilder();224 builder.append("CrashReportedException [on thread ");225 builder.append(caughtOnThread);226 builder.append("]");227 return builder.toString();223 return new StringBuilder(48) 224 .append("CrashReportedException [on thread ") 225 .append(caughtOnThread) 226 .append(']') 227 .toString(); 228 228 } 229 229 … … 235 235 this.key = key; 236 236 this.value = value; 237 238 237 } 239 238 … … 273 272 */ 274 273 public void printSection(PrintWriter out) { 275 out.println(sectionName + ":");274 out.println(sectionName + ':'); 276 275 if (entries.isEmpty()) { 277 276 out.println("No data collected.");
Note:
See TracChangeset
for help on using the changeset viewer.