Ignore:
Timestamp:
2014-01-31T02:44:56+01:00 (10 years ago)
Author:
Don-vip
Message:

Sonar - fix various issues

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

Legend:

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

    r6084 r6792  
    4747        }
    4848
     49        @SuppressWarnings("unchecked")
    4950        @Override
    5051        public T next() {
     
    5354            current = null;
    5455            // we are save because predicate only accepts objects of type T
    55             @SuppressWarnings("unchecked") T res = (T) old;
    56             return res;
     56            return (T) old;
    5757        }
    5858
  • trunk/src/org/openstreetmap/josm/tools/Utils.java

    r6772 r6792  
    294294        return null;
    295295    }
    296    
     296
    297297    /**
    298298     * Copies the given array. Unlike {@link Arrays#copyOf}, this method is null-safe.
     
    307307        return null;
    308308    }
    309    
     309
    310310    /**
    311311     * Simple file copy function that will overwrite the target file.<br/>
     
    386386        }
    387387    }
    388    
     388
    389389    /**
    390390     * Converts the given file to its URL.
     
    457457        try {
    458458            if (t != null && t.isDataFlavorSupported(DataFlavor.stringFlavor)) {
    459                 String text = (String) t.getTransferData(DataFlavor.stringFlavor);
    460                 return text;
     459                return (String) t.getTransferData(DataFlavor.stringFlavor);
    461460            }
    462461        } catch (UnsupportedFlavorException ex) {
     
    780779    /**
    781780     * Runs an external command and returns the standard output.
    782      * 
     781     *
    783782     * The program is expected to execute fast.
    784      * 
     783     *
    785784     * @param command the command with arguments
    786785     * @return the output
     
    945944        return result;
    946945    }
    947    
     946
    948947    /**
    949948     * Adds the given item at the end of a new copy of given array.
Note: See TracChangeset for help on using the changeset viewer.