Ignore:
Timestamp:
2015-06-02T16:40:38+02:00 (10 years ago)
Author:
Don-vip
Message:

remove extra whitespaces

Location:
trunk/src/org/openstreetmap/josm/tools
Files:
9 edited

Legend:

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

    r8291 r8443  
    111111    public static void ensureValidNodeId(PrimitiveId id, String parameterName) throws IllegalArgumentException {
    112112        ensureParameterNotNull(id, parameterName);
    113         if (! id.getType().equals(OsmPrimitiveType.NODE))
     113        if (!id.getType().equals(OsmPrimitiveType.NODE))
    114114            throw new IllegalArgumentException(MessageFormat.format("Parameter ''{0}'' of type node expected, got ''{1}''", parameterName, id.getType().getAPIName()));
    115115    }
  • trunk/src/org/openstreetmap/josm/tools/ColorScale.java

    r8419 r8443  
    3838        ColorScale sc = new ColorScale();
    3939        //                    red   yellow  green   blue    red
    40         int[] h = new int[] { 0,    59,     127,    244,    360};
    41         int[] s = new int[] { 100,  84,     99,     100 };
    42         int[] b = new int[] { 90,   93,     74,     83 };
     40        int[] h = new int[] {0,    59,     127,    244,    360};
     41        int[] s = new int[] {100,  84,     99,     100};
     42        int[] b = new int[] {90,   93,     74,     83};
    4343
    4444        sc.colors = new Color[count];
  • trunk/src/org/openstreetmap/josm/tools/Diff.java

    r8419 r8443  
    9797    public Diff(Object[] a, Object[] b) {
    9898        Map<Object,Integer> h = new HashMap<>(a.length + b.length);
    99         filevec = new FileData[] { new FileData(a,h),new FileData(b,h) };
     99        filevec = new FileData[] {new FileData(a,h), new FileData(b,h)};
    100100    }
    101101
  • trunk/src/org/openstreetmap/josm/tools/Geometry.java

    r8419 r8443  
    298298        if (Math.abs(det) > 1e-12 * mag) {
    299299            double u = uu/det, v = vv/det;
    300             if (u>-1e-8 && u < 1+1e-8 && v>-1e-8 && v < 1+1e-8 ) {
     300            if (u>-1e-8 && u < 1+1e-8 && v>-1e-8 && v < 1+1e-8) {
    301301                if (u<0) u=0;
    302302                if (u>1) u=1.0;
     
    355355            return null; // Lines are parallel
    356356
    357         return new EastNorth(b1 * c2 / det + p1.getX(),  - a1 * c2 / det + p1.getY());
     357        return new EastNorth(b1 * c2 / det + p1.getX(), -a1 * c2 / det + p1.getY());
    358358    }
    359359
  • trunk/src/org/openstreetmap/josm/tools/ImageProvider.java

    r8419 r8443  
    721721            String[] extensions;
    722722            if (name.indexOf('.') != -1) {
    723                 extensions = new String[] { "" };
     723                extensions = new String[] {""};
    724724            } else {
    725                 extensions = new String[] { ".png", ".svg"};
     725                extensions = new String[] {".png", ".svg"};
    726726            }
    727727            final int ARCHIVE = 0, LOCAL = 1;
    728             for (int place : new Integer[] { ARCHIVE, LOCAL }) {
     728            for (int place : new Integer[] {ARCHIVE, LOCAL}) {
    729729                for (String ext : extensions) {
    730730
  • trunk/src/org/openstreetmap/josm/tools/Shortcut.java

    r8419 r8443  
    415415                // Try to reassign Meta to Ctrl
    416416                int newmodifier = findNewOsxModifier(requestedGroup);
    417                 if ( findShortcut(requestedKey, newmodifier) == null ) {
     417                if (findShortcut(requestedKey, newmodifier) == null) {
    418418                    return reassignShortcut(shortText, longText, requestedKey, conflict, requestedGroup, requestedKey, newmodifier);
    419419                }
     
    422422                for (int k : keys) {
    423423                    int newmodifier = getGroupModifier(m);
    424                     if ( findShortcut(k, newmodifier) == null ) {
     424                    if (findShortcut(k, newmodifier) == null) {
    425425                        return reassignShortcut(shortText, longText, requestedKey, conflict, m, k, newmodifier);
    426426                    }
  • trunk/src/org/openstreetmap/josm/tools/TextTagParser.java

    r8375 r8443  
    132132            while (pos < n) {
    133133                c = data.charAt(pos);
    134                 if (c == '\t' || c == '\n' || c == '\r' || c == ' ' ) {
     134                if (c == '\t' || c == '\n' || c == '\r' || c == ' ') {
    135135                    pos++;
    136136                } else {
     
    142142
    143143    protected static String unescape(String k) {
    144         if(! (k.startsWith("\"") && k.endsWith("\"")) ) {
     144        if (!(k.startsWith("\"") && k.endsWith("\""))) {
    145145            if (k.contains("=")) {
    146146                // '=' not in quotes will be treated as an error!
     
    220220        String bufJson = buf.trim();
    221221        // trim { }, if there are any
    222         if (bufJson.startsWith("{") && bufJson.endsWith("}") ) bufJson = bufJson.substring(1,bufJson.length()-1);
     222        if (bufJson.startsWith("{") && bufJson.endsWith("}"))
     223            bufJson = bufJson.substring(1, bufJson.length()-1);
    223224        tags = readTagsByRegexp(bufJson, "[\\s]*,[\\s]*",
    224225                "[\\s]*(\\\".*?[^\\\\]\\\")"+"[\\s]*:[\\s]*"+"(\\\".*?[^\\\\]\\\")[\\s]*", true);
  • trunk/src/org/openstreetmap/josm/tools/Utils.java

    r8435 r8443  
    421421     */
    422422    public static boolean deleteDirectory(File path) {
    423         if( path.exists() ) {
     423        if (path.exists()) {
    424424            File[] files = path.listFiles();
    425425            if (files != null) {
  • trunk/src/org/openstreetmap/josm/tools/WindowGeometry.java

    r8394 r8443  
    6868    public static WindowGeometry centerInWindow(Component reference, Dimension extent) {
    6969        Window parentWindow = null;
    70         while(reference != null && ! (reference instanceof Window) ) {
     70        while (reference != null && !(reference instanceof Window)) {
    7171            reference = reference.getParent();
    7272        }
Note: See TracChangeset for help on using the changeset viewer.