Changeset 12798 in josm


Ignore:
Timestamp:
2017-09-09T14:00:39+02:00 (7 years ago)
Author:
Don-vip
Message:

see #14794 - checkstyle

Location:
trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/Diff.java

    r11389 r12798  
    570570         * @see #equivCount()
    571571         */
    572         private byte[] discardable(final int ... counts) {
     572        private byte[] discardable(final int... counts) {
    573573            final int end = bufferedLines;
    574574            final byte[] discards = new byte[end];
  • trunk/src/org/openstreetmap/josm/tools/HiDPISupport.java

    r12732 r12798  
    2828 * @since 12722
    2929 */
    30 public class HiDPISupport {
     30public final class HiDPISupport {
    3131
    3232    private static volatile Optional<Class<? extends Image>> baseMultiResolutionImageClass;
    3333    private static volatile Optional<Constructor<? extends Image>> baseMultiResolutionImageConstructor;
    3434    private static volatile Optional<Method> resolutionVariantsMethod;
     35
     36    private HiDPISupport() {
     37        // Hide default constructor
     38    }
    3539
    3640    /**
  • trunk/src/org/openstreetmap/josm/tools/ImageResource.java

    r12723 r12798  
    137137     * @param  dim The requested dimensions. Use (-1,-1) for the original size and (width, -1)
    138138     *         to set the width, but otherwise scale the image proportionally.
     139     * @return ImageIcon object for the image of this resource, scaled according to dim
    139140     * @see #getImageIconBounded(java.awt.Dimension, boolean)
    140      * @return ImageIcon object for the image of this resource, scaled according to dim
    141141     */
    142142    public ImageIcon getImageIcon(Dimension dim) {
  • trunk/src/org/openstreetmap/josm/tools/ImageWarp.java

    r12624 r12798  
    1717 * @since 11858
    1818 */
    19 public class ImageWarp {
     19public final class ImageWarp {
     20
     21    private ImageWarp() {
     22        // Hide default constructor
     23    }
    2024
    2125    /**
  • trunk/src/org/openstreetmap/josm/tools/ListenableWeakReference.java

    r12276 r12798  
    1313 * A special dereferenced-thread is used for this, so make sure your code is thread-safe.
    1414 * @author Michael Zangl
     15 * @param <T> The weak reference
    1516 * @since 12181
    16  *
    17  * @param <T> The weak reference
    1817 */
    1918public class ListenableWeakReference<T> extends WeakReference<T> {
  • trunk/src/org/openstreetmap/josm/tools/ListenerList.java

    r12624 r12798  
    210210        }
    211211
    212         private static void dumpStack(StackTraceElement ... stackTraceElements) {
     212        private static void dumpStack(StackTraceElement... stackTraceElements) {
    213213            if (stackTraceElements == null) {
    214214                Logging.trace("  - (no trace recorded)");
  • trunk/src/org/openstreetmap/josm/tools/Logging.java

    r12766 r12798  
    280280     */
    281281    public static void logWithStackTrace(Level level, Throwable t, String pattern, Object... args) {
    282         logPrivate(level, () -> getErrorLogWithStack(MessageFormat.format(pattern,  args), t));
     282        logPrivate(level, () -> getErrorLogWithStack(MessageFormat.format(pattern, args), t));
    283283    }
    284284
  • trunk/src/org/openstreetmap/josm/tools/MultikeyActionsHandler.java

    r12639 r12798  
    148148            lastAction = this;
    149149            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)));
    151152        }
    152153
  • trunk/src/org/openstreetmap/josm/tools/Utils.java

    r12772 r12798  
    345345     * @since 6222
    346346     */
    347     public static char[] copyArray(char ... array) {
     347    public static char[] copyArray(char... array) {
    348348        if (array != null) {
    349349            return Arrays.copyOf(array, array.length);
     
    812812    }
    813813
    814     private static String strip(final String str, final char ... skipChars) {
     814    private static String strip(final String str, final char... skipChars) {
    815815
    816816        int start = 0;
     
    834834    }
    835835
    836     private static boolean isStrippedChar(char c, final char ... skipChars) {
     836    private static boolean isStrippedChar(char c, final char... skipChars) {
    837837        return Character.isWhitespace(c) || Character.isSpaceChar(c) || stripChar(skipChars, c);
    838838    }
     
    14961496     * @since 10223
    14971497     */
    1498     public static void setObjectsAccessible(final AccessibleObject ... objects) {
     1498    public static void setObjectsAccessible(final AccessibleObject... objects) {
    14991499        if (objects != null && objects.length > 0) {
    15001500            AccessController.doPrivileged((PrivilegedAction<Object>) () -> {
     
    16261626            return 0;
    16271627        }
    1628         return firstDotPos > - 1 ? Integer.parseInt(version.substring(firstDotPos + 1,
     1628        return firstDotPos > -1 ? Integer.parseInt(version.substring(firstDotPos + 1,
    16291629                lastDotPos > -1 ? lastDotPos : version.length())) : 0;
    16301630    }
  • trunk/src/org/openstreetmap/josm/tools/template_engine/CompoundTemplateEntry.java

    r10680 r12798  
    1313    }
    1414
    15     private CompoundTemplateEntry(TemplateEntry ... entries) {
     15    private CompoundTemplateEntry(TemplateEntry... entries) {
    1616        this.entries = entries;
    1717    }
  • trunk/tools/checkstyle/josm_checks.xml

    r12582 r12798  
    1515  <module name="TreeWalker">
    1616    <module name="BooleanExpressionComplexity">
    17       <property name="max" value="7"/>
     17      <property name="max" value="8"/>
    1818    </module>
    1919    <module name="CatchParameterName">
Note: See TracChangeset for help on using the changeset viewer.