- Timestamp:
- 2017-09-09T14:00:39+02:00 (7 years ago)
- Location:
- trunk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/Diff.java
r11389 r12798 570 570 * @see #equivCount() 571 571 */ 572 private byte[] discardable(final int 572 private byte[] discardable(final int... counts) { 573 573 final int end = bufferedLines; 574 574 final byte[] discards = new byte[end]; -
trunk/src/org/openstreetmap/josm/tools/HiDPISupport.java
r12732 r12798 28 28 * @since 12722 29 29 */ 30 public class HiDPISupport {30 public final class HiDPISupport { 31 31 32 32 private static volatile Optional<Class<? extends Image>> baseMultiResolutionImageClass; 33 33 private static volatile Optional<Constructor<? extends Image>> baseMultiResolutionImageConstructor; 34 34 private static volatile Optional<Method> resolutionVariantsMethod; 35 36 private HiDPISupport() { 37 // Hide default constructor 38 } 35 39 36 40 /** -
trunk/src/org/openstreetmap/josm/tools/ImageResource.java
r12723 r12798 137 137 * @param dim The requested dimensions. Use (-1,-1) for the original size and (width, -1) 138 138 * to set the width, but otherwise scale the image proportionally. 139 * @return ImageIcon object for the image of this resource, scaled according to dim 139 140 * @see #getImageIconBounded(java.awt.Dimension, boolean) 140 * @return ImageIcon object for the image of this resource, scaled according to dim141 141 */ 142 142 public ImageIcon getImageIcon(Dimension dim) { -
trunk/src/org/openstreetmap/josm/tools/ImageWarp.java
r12624 r12798 17 17 * @since 11858 18 18 */ 19 public class ImageWarp { 19 public final class ImageWarp { 20 21 private ImageWarp() { 22 // Hide default constructor 23 } 20 24 21 25 /** -
trunk/src/org/openstreetmap/josm/tools/ListenableWeakReference.java
r12276 r12798 13 13 * A special dereferenced-thread is used for this, so make sure your code is thread-safe. 14 14 * @author Michael Zangl 15 * @param <T> The weak reference 15 16 * @since 12181 16 *17 * @param <T> The weak reference18 17 */ 19 18 public class ListenableWeakReference<T> extends WeakReference<T> { -
trunk/src/org/openstreetmap/josm/tools/ListenerList.java
r12624 r12798 210 210 } 211 211 212 private static void dumpStack(StackTraceElement 212 private static void dumpStack(StackTraceElement... stackTraceElements) { 213 213 if (stackTraceElements == null) { 214 214 Logging.trace(" - (no trace recorded)"); -
trunk/src/org/openstreetmap/josm/tools/Logging.java
r12766 r12798 280 280 */ 281 281 public static void logWithStackTrace(Level level, Throwable t, String pattern, Object... args) { 282 logPrivate(level, () -> getErrorLogWithStack(MessageFormat.format(pattern, 282 logPrivate(level, () -> getErrorLogWithStack(MessageFormat.format(pattern, args), t)); 283 283 } 284 284 -
trunk/src/org/openstreetmap/josm/tools/MultikeyActionsHandler.java
r12639 r12798 148 148 lastAction = this; 149 149 timer.schedule(new MyTimerTask(lastTimestamp, lastAction), DIALOG_DELAY); 150 MainApplication.getMap().statusLine.setHelpText(STATUS_BAR_ID, tr("{0}... [please type its number]", (String) action.getValue(SHORT_DESCRIPTION))); 150 MainApplication.getMap().statusLine.setHelpText(STATUS_BAR_ID, 151 tr("{0}... [please type its number]", (String) action.getValue(SHORT_DESCRIPTION))); 151 152 } 152 153 -
trunk/src/org/openstreetmap/josm/tools/Utils.java
r12772 r12798 345 345 * @since 6222 346 346 */ 347 public static char[] copyArray(char 347 public static char[] copyArray(char... array) { 348 348 if (array != null) { 349 349 return Arrays.copyOf(array, array.length); … … 812 812 } 813 813 814 private static String strip(final String str, final char 814 private static String strip(final String str, final char... skipChars) { 815 815 816 816 int start = 0; … … 834 834 } 835 835 836 private static boolean isStrippedChar(char c, final char 836 private static boolean isStrippedChar(char c, final char... skipChars) { 837 837 return Character.isWhitespace(c) || Character.isSpaceChar(c) || stripChar(skipChars, c); 838 838 } … … 1496 1496 * @since 10223 1497 1497 */ 1498 public static void setObjectsAccessible(final AccessibleObject 1498 public static void setObjectsAccessible(final AccessibleObject... objects) { 1499 1499 if (objects != null && objects.length > 0) { 1500 1500 AccessController.doPrivileged((PrivilegedAction<Object>) () -> { … … 1626 1626 return 0; 1627 1627 } 1628 return firstDotPos > - 1628 return firstDotPos > -1 ? Integer.parseInt(version.substring(firstDotPos + 1, 1629 1629 lastDotPos > -1 ? lastDotPos : version.length())) : 0; 1630 1630 } -
trunk/src/org/openstreetmap/josm/tools/template_engine/CompoundTemplateEntry.java
r10680 r12798 13 13 } 14 14 15 private CompoundTemplateEntry(TemplateEntry 15 private CompoundTemplateEntry(TemplateEntry... entries) { 16 16 this.entries = entries; 17 17 } -
trunk/tools/checkstyle/josm_checks.xml
r12582 r12798 15 15 <module name="TreeWalker"> 16 16 <module name="BooleanExpressionComplexity"> 17 <property name="max" value=" 7"/>17 <property name="max" value="8"/> 18 18 </module> 19 19 <module name="CatchParameterName">
Note:
See TracChangeset
for help on using the changeset viewer.