Ignore:
Timestamp:
2014-10-18T23:07:52+02:00 (10 years ago)
Author:
donvip
Message:

[josm_plugins] fix Java 7 / unused code warnings

Location:
applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/AddressEditContainer.java

    r30348 r30737  
    4747    private Collection<? extends OsmPrimitive> workingSet;
    4848    /** The street dictionary collecting all streets to a set of unique street names. */
    49     private HashMap<String, OSMStreet> streetDict = new HashMap<String, OSMStreet>(100);
     49    private HashMap<String, OSMStreet> streetDict = new HashMap<>(100);
    5050
    5151    /** The unresolved (addresses without valid street name) addresses list. */
    52     private List<OSMAddress> unresolvedAddresses = new ArrayList<OSMAddress>(100);
     52    private List<OSMAddress> unresolvedAddresses = new ArrayList<>(100);
    5353
    5454    /** The incomplete addresses list. */
    55     private List<OSMAddress> incompleteAddresses = new ArrayList<OSMAddress>(100);
     55    private List<OSMAddress> incompleteAddresses = new ArrayList<>(100);
    5656
    5757    /** The shadow copy to assemble the street dict during update. */
    58     private HashMap<String, OSMStreet> shadowStreetDict = new HashMap<String, OSMStreet>(100);
     58    private HashMap<String, OSMStreet> shadowStreetDict = new HashMap<>(100);
    5959    /** The shadow copy to assemble the unresolved addresses during update. */
    60     private List<OSMAddress> shadowUnresolvedAddresses = new ArrayList<OSMAddress>(100);
     60    private List<OSMAddress> shadowUnresolvedAddresses = new ArrayList<>(100);
    6161    /** The shadow copy to assemble the incomplete addresses during update. */
    62     private List<OSMAddress> shadowIncompleteAddresses = new ArrayList<OSMAddress>(100);
     62    private List<OSMAddress> shadowIncompleteAddresses = new ArrayList<>(100);
    6363
    6464    /** The visited nodes cache to increase iteration speed. */
    65     private HashSet<Node> visitedNodes = new HashSet<Node>();
     65    private HashSet<Node> visitedNodes = new HashSet<>();
    6666    /** The visited ways cache to increase iteration speed. */
    67     private HashSet<Way> visitedWays = new HashSet<Way>();
     67    private HashSet<Way> visitedWays = new HashSet<>();
    6868    /** The tag list used within the data area. */
    69     private HashSet<String> tags = new HashSet<String>();
     69    private HashSet<String> tags = new HashSet<>();
    7070    /** The tag list used within the data area. */
    71     private HashMap<String, String> values = new HashMap<String, String>();
     71    private HashMap<String, String> values = new HashMap<>();
    7272
    7373    /** The list containing the problems */
    74     private List<IProblem> problems = new ArrayList<IProblem>();
     74    private List<IProblem> problems = new ArrayList<>();
    7575
    7676    /** The change listeners. */
    77     private List<IAddressEditContainerListener> listeners = new ArrayList<IAddressEditContainerListener>();
     77    private List<IAddressEditContainerListener> listeners = new ArrayList<>();
    7878
    7979    /**
     
    115115    protected void fireContainerChanged() {
    116116        List<IAddressEditContainerListener> shadowListeners =
    117             new ArrayList<IAddressEditContainerListener>(listeners);
     117            new ArrayList<>(listeners);
    118118
    119119        for (IAddressEditContainerListener listener : shadowListeners) {
     
    129129
    130130        List<IAddressEditContainerListener> shadowListeners =
    131             new ArrayList<IAddressEditContainerListener>(listeners);
     131            new ArrayList<>(listeners);
    132132
    133133        for (IAddressEditContainerListener listener : shadowListeners) {
     
    336336     */
    337337    public List<OSMStreet> getStreetList() {
    338         ArrayList<OSMStreet> sortedList = new ArrayList<OSMStreet>(streetDict.values());
     338        ArrayList<OSMStreet> sortedList = new ArrayList<>(streetDict.values());
    339339        Collections.sort(sortedList);
    340340        return sortedList;
     
    417417     */
    418418    public List<OSMAddress> getAllAddressesToFix() {
    419         List<OSMAddress> all = new ArrayList<OSMAddress>(incompleteAddresses);
     419        List<OSMAddress> all = new ArrayList<>(incompleteAddresses);
    420420
    421421        for (OSMAddress aNode : unresolvedAddresses) {
     
    453453            return true;
    454454        }
    455        
     455
    456456        if (streetName != null && shadowStreetDict.containsKey(streetName)) {
    457457            OSMStreet sNode = shadowStreetDict.get(streetName);
     
    467467     */
    468468    public void resolveAddresses() {
    469         List<OSMAddress> resolvedAddresses = new ArrayList<OSMAddress>();
     469        List<OSMAddress> resolvedAddresses = new ArrayList<>();
    470470        for (OSMAddress node : shadowUnresolvedAddresses) {
    471471            if (assignAddressToStreet(node)) {
     
    513513                }
    514514            }
    515            
     515
    516516            // match streets with addresses...
    517517            resolveAddresses();
     
    521521
    522522            // put results from shadow copy into real lists
    523             incompleteAddresses = new ArrayList<OSMAddress>(shadowIncompleteAddresses);
    524             unresolvedAddresses = new ArrayList<OSMAddress>(shadowUnresolvedAddresses);
    525             streetDict = new HashMap<String, OSMStreet>(shadowStreetDict);
     523            incompleteAddresses = new ArrayList<>(shadowIncompleteAddresses);
     524            unresolvedAddresses = new ArrayList<>(shadowUnresolvedAddresses);
     525            streetDict = new HashMap<>(shadowStreetDict);
    526526            // remove temp data
    527527            shadowStreetDict.clear();
     
    568568    public void attachToDataSet(Collection<? extends OsmPrimitive> osmDataToWorkOn) {
    569569        if (osmDataToWorkOn != null && !osmDataToWorkOn.isEmpty()) {
    570             workingSet = new ArrayList<OsmPrimitive>(osmDataToWorkOn);
     570            workingSet = new ArrayList<>(osmDataToWorkOn);
    571571        } else {
    572572            detachFromDataSet(); // drop old stuff, if present
     
    643643        CheckParameterUtil.ensureParameterNotNull(entity, "entity");
    644644
    645         List<IProblem> problemsToRemove = new ArrayList<IProblem>();
     645        List<IProblem> problemsToRemove = new ArrayList<>();
    646646        for (IProblem problem : problems) {
    647647            if (problem.getSource() == entity) {
     
    673673        if (maxEntries < 1) maxEntries = 1;
    674674
    675         List<StreetScore> scores = new ArrayList<StreetScore>();
    676         List<String> matches = new ArrayList<String>();
     675        List<StreetScore> scores = new ArrayList<>();
     676        List<String> matches = new ArrayList<>();
    677677
    678678        // Find the longest common sub string
  • applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/AddressProblem.java

    r30348 r30737  
    5656    private void lazyCreateSolutions() {
    5757        if (solutions == null) {
    58             solutions = new ArrayList<ISolution>();
     58            solutions = new ArrayList<>();
    5959        }
    6060    }
  • applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/GuessAddressRunnable.java

    r30348 r30737  
    2525public class GuessAddressRunnable extends PleaseWaitRunnable {
    2626    private List<OSMAddress> addressesToGuess;
    27     private List<IProgressMonitorFinishedListener> finishListeners = new ArrayList<IProgressMonitorFinishedListener>();
     27    private List<IProgressMonitorFinishedListener> finishListeners = new ArrayList<>();
    2828    private boolean isRunning = false;
    2929    private boolean canceled;
    3030
    31     private GuessedValueHandler[] wayGuessers = new GuessedValueHandler[]{new GuessStreetValueHandler(TagUtils.ADDR_STREET_TAG)}; 
     31    private GuessedValueHandler[] wayGuessers = new GuessedValueHandler[]{new GuessStreetValueHandler(TagUtils.ADDR_STREET_TAG)};
    3232    private GuessedValueHandler[] nodeGuessers = new GuessedValueHandler[]{
    3333            new GuessedValueHandler(TagUtils.ADDR_POSTCODE_TAG, 500.0),
     
    9999    protected void fireFinished() {
    100100        for (IProgressMonitorFinishedListener l : finishListeners) {
    101             l.finished();           
     101            l.finished();
    102102        }
    103103        // this event is fired only once, then we disconnect all listeners
     
    130130            progressMonitor.setTicksCount(addressesToGuess.size());
    131131
    132             List<OSMAddress> shadowCopy = new ArrayList<OSMAddress>(addressesToGuess);
     132            List<OSMAddress> shadowCopy = new ArrayList<>(addressesToGuess);
    133133            for (OSMAddress aNode : shadowCopy) {
    134134                if (!aNode.needsGuess()) { // nothing to do
     
    148148                for (int i = 0; i < wayGuessers.length; i++) {
    149149                    GuessedValueHandler guesser = wayGuessers[i];
    150                    
     150
    151151                    guesser.setAddressNode(aNode);
    152152
     
    156156                            break;
    157157                        }
    158                         way.accept(guesser);                       
    159                     }
    160                    
     158                        way.accept(guesser);
     159                    }
     160
    161161                    String guessedVal = guesser.getCurrentValue();
    162162                    if (guessedVal != null) {
     
    164164                    }
    165165                }
    166                
     166
    167167                // Run node-related guessers
    168168                for (int i = 0; i < nodeGuessers.length; i++) {
    169169                    GuessedValueHandler guesser = nodeGuessers[i];
    170                    
     170
    171171                    guesser.setAddressNode(aNode);
    172172
     
    176176                            break;
    177177                        }
    178                         node.accept(guesser);                       
    179                     }
    180                    
     178                        node.accept(guesser);
     179                    }
     180
    181181                    String guessedVal = guesser.getCurrentValue();
    182182                    if (guessedVal != null) {
     
    214214                OSMAddress aNode = getAddressNode();
    215215                String newVal = TagUtils.getNameValue(w);
    216                
     216
    217217                if (newVal != null) {
    218218                    double dist = OsmUtils.getMinimumDistanceToWay(aNode.getCoor(), w);
    219                    
     219
    220220                    if (dist < minDist && dist < getMaxDistance()) {
    221221                        minDist = dist;
  • applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/OSMAddress.java

    r30348 r30737  
    2727
    2828    /** The dictionary containing guessed values. */
    29     private HashMap<String, String> guessedValues = new HashMap<String, String>();
     29    private HashMap<String, String> guessedValues = new HashMap<>();
    3030    /** The dictionary containing guessed objects. */
    31     private HashMap<String, OsmPrimitive> guessedObjects = new HashMap<String, OsmPrimitive>();
     31    private HashMap<String, OsmPrimitive> guessedObjects = new HashMap<>();
    3232    /** The dictionary containing indirect values. */
    33     private HashMap<String, String> derivedValues = new HashMap<String, String>();
     33    private HashMap<String, String> derivedValues = new HashMap<>();
    3434
    3535    public OSMAddress(OsmPrimitive osmObject) {
     
    4949     * Checks if the underlying address node has all tags usually needed to
    5050     * describe an address.
    51      * 
     51     *
    5252     * @return
    5353     */
     
    7272    /**
    7373     * Gets the name of the street associated with this address.
    74      * 
     74     *
    7575     * @return
    7676     */
     
    8383     * this method looks for an appropriate guess. If both, real value and
    8484     * guess, are missing, a question mark is returned.
    85      * 
     85     *
    8686     * @param tag
    8787     *            the tag
     
    115115    /**
    116116     * Returns <tt>true</tt>, if this address node has a street name.
    117      * 
     117     *
    118118     * @return
    119119     */
     
    124124    /**
    125125     * Returns the street name guessed by the nearest-neighbor search.
    126      * 
     126     *
    127127     * @return the guessedStreetName
    128128     */
     
    133133    /**
    134134     * Sets the guessed street name.
    135      * 
     135     *
    136136     * @param guessedStreetName
    137137     *            the guessedStreetName to set
     
    146146    /**
    147147     * Checks for a guessed street name.
    148      * 
     148     *
    149149     * @return true, if this instance has a guessed street name.
    150150     */
     
    162162    /**
    163163     * Sets the guessed post code.
    164      * 
     164     *
    165165     * @param guessedPostCode
    166166     *            the guessedPostCode to set
     
    174174    /**
    175175     * Checks for a guessed post code.
    176      * 
     176     *
    177177     * @return true, if this instance has a guessed post code.
    178178     */
     
    190190    /**
    191191     * Sets the guessed city.
    192      * 
     192     *
    193193     * @param guessedCity
    194194     *            the guessedCity to set
     
    202202    /**
    203203     * Checks for a guessed city name.
    204      * 
     204     *
    205205     * @return true, if this instance has a guessed city name.
    206206     */
     
    211211    /**
    212212     * Returns true, if this instance has guesses regarding address tags.
    213      * 
     213     *
    214214     * @return
    215215     */
     
    233233    /**
    234234     * Apply the guessed value for the given tag.
    235      * 
     235     *
    236236     * @param tag
    237237     *            the tag to apply the guessed value for.
     
    248248    /**
    249249     * Gets the name of the post code associated with this address.
    250      * 
     250     *
    251251     * @return
    252252     */
     
    263263    /**
    264264     * Checks if this instance has a valid postal code.
    265      * 
     265     *
    266266     * @return true, if successful
    267267     */
     
    272272    /**
    273273     * Checks for post code tag.
    274      * 
     274     *
    275275     * @return true, if successful
    276276     */
     
    281281    /**
    282282     * Gets the name of the house number associated with this address.
    283      * 
     283     *
    284284     * @return
    285285     */
     
    297297    /**
    298298     * Checks for house number.
    299      * 
     299     *
    300300     * @return true, if successful
    301301     */
     
    305305    }
    306306
    307     public String getName() {
     307    @Override
     308        public String getName() {
    308309    String name = TagUtils.getNameValue(osmObject);
    309310    if (!StringUtils.isNullOrEmpty(name)) {
     
    316317    /**
    317318     * Checks if this address is part of a address interpolation.
    318      * 
     319     *
    319320     * @return true, if is part of interpolation
    320321     */
     
    325326    /**
    326327     * Checks if this address is part of an 'associated street' relation.
    327      * 
     328     *
    328329     * @return true, if is part of interpolation
    329330     */
     
    334335    /**
    335336     * Gets the name of the city associated with this address.
    336      * 
     337     *
    337338     * @return
    338339     */
     
    343344    /**
    344345     * Checks for city tag.
    345      * 
     346     *
    346347     * @return true, if a city tag is present or available via referrer.
    347348     */
     
    352353    /**
    353354     * Gets the name of the state associated with this address.
    354      * 
     355     *
    355356     * @return
    356357     */
     
    361362    /**
    362363     * Checks for state tag.
    363      * 
     364     *
    364365     * @return true, if a state tag is present or available via referrer.
    365366     */
     
    370371    /**
    371372     * Gets the name of the country associated with this address.
    372      * 
     373     *
    373374     * @return
    374375     */
     
    379380    /**
    380381     * Checks for country tag.
    381      * 
     382     *
    382383     * @return true, if a country tag is present or available via referrer.
    383384     */
     
    401402     * Checks if the associated OSM object has the given tag or if the tag is
    402403     * available via a referrer.
    403      * 
     404     *
    404405     * @param tag
    405406     *            the tag to look for.
     
    467468    /**
    468469     * Applies the street name from the specified street node.
    469      * 
     470     *
    470471     * @param node
    471472     */
     
    483484    /**
    484485     * Gets the guessed value for the given tag.
    485      * 
     486     *
    486487     * @param tag
    487488     *            The tag to get the guessed value for.
     
    499500    /**
    500501     * Gets the guessed object.
    501      * 
     502     *
    502503     * @param tag
    503504     *            the guessed tag
     
    516517     * Gets all guessed objects or an empty list, if no guesses have been made
    517518     * yet.
    518      * 
     519     *
    519520     * @return the guessed objects.
    520521     */
     
    529530     * Check if this instance needs guessed values. This is the case, if the
    530531     * underlying OSM node has either no street name, post code or city.
    531      * 
     532     *
    532533     * @return true, if this instance needs at least one guessed value.
    533534     */
     
    542543    /**
    543544     * Check if this instance needs guessed value for a given tag.
    544      * 
     545     *
    545546     * @return true, if successful
    546547     */
     
    559560     * Checks if given tag has a guessed value (tag exists and has a non-empty
    560561     * value).
    561      * 
     562     *
    562563     * @param tag
    563564     *            the tag
     
    573574    /**
    574575     * Sets the guessed value with the given tag.
    575      * 
     576     *
    576577     * @param tag
    577578     *            the tag to set the guess for
     
    596597     * Checks if given tag has a derived value (value is available via a
    597598     * referrer).
    598      * 
     599     *
    599600     * @param tag
    600601     *            the tag
     
    610611    /**
    611612     * Returns true, if this instance has derived values from any referrer.
    612      * 
     613     *
    613614     * @return
    614615     */
     
    619620    /**
    620621     * Gets the derived value for the given tag.
    621      * 
     622     *
    622623     * @param tag
    623624     *            The tag to get the derived value for.
     
    633634    /**
    634635     * Sets the value known indirectly via a referrer with the given tag.
    635      * 
     636     *
    636637     * @param tag
    637638     *            the tag to set the derived value for
     
    645646    /**
    646647     * Sets the street name of the address node.
    647      * 
     648     *
    648649     * @param streetName
    649650     */
     
    657658    /**
    658659     * Sets the state of the address node.
    659      * 
     660     *
    660661     * @param state
    661662     */
     
    669670    /**
    670671     * Sets the country of the address node.
    671      * 
     672     *
    672673     * @param country
    673674     */
     
    681682    /**
    682683     * Sets the post code of the address node.
    683      * 
     684     *
    684685     * @param postCode
    685686     */
     
    755756    /**
    756757     * Adds the guess value solution to a problem.
    757      * 
     758     *
    758759     * @param p
    759760     *            the problem to add the solution to.
     
    771772    /**
    772773     * Adds the remove address tags solution entry to a problem.
    773      * 
     774     *
    774775     * @param problem
    775776     *            the problem
     
    790791    /**
    791792     * Gets the formatted string representation of the given node.
    792      * 
     793     *
    793794     * @param node
    794795     *            the node
  • applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/OSMEntityBase.java

    r30348 r30737  
    2828public class OSMEntityBase implements IOSMEntity, Comparable<IOSMEntity> {
    2929    public static final String ANONYMOUS = tr("No name");
    30     private static List<IAddressEditContainerListener> containerListeners = new ArrayList<IAddressEditContainerListener>();
    31     private List<ICommandListener> cmdListeners = new ArrayList<ICommandListener>();
     30    private static List<IAddressEditContainerListener> containerListeners = new ArrayList<>();
     31    private List<ICommandListener> cmdListeners = new ArrayList<>();
    3232
    3333    protected OsmPrimitive osmObject;
     
    8181     * @param listener
    8282     */
    83     public void addCommandListener(ICommandListener listener) {
     83    @Override
     84        public void addCommandListener(ICommandListener listener) {
    8485        CheckParameterUtil.ensureParameterNotNull(listener, "listener");
    8586        cmdListeners.add(listener);
     
    9091     * @param listener
    9192     */
    92     public void removeCommandListener(ICommandListener listener) {
     93    @Override
     94        public void removeCommandListener(ICommandListener listener) {
    9395        CheckParameterUtil.ensureParameterNotNull(listener, "listener");
    9496        cmdListeners.remove(listener);
     
    112114    }
    113115
    114     public OsmPrimitive getOsmObject() {
     116    @Override
     117        public OsmPrimitive getOsmObject() {
    115118        return osmObject;
    116119    }
     
    148151    protected void setOSMTag(String tag, String newValue) {
    149152        CheckParameterUtil.ensureParameterNotNull(tag, "tag");
    150        
     153
    151154
    152155        if (osmObject != null) {
     
    156159                    return;
    157160                }
    158                
     161
    159162            if ((osmObject.hasKey(tag) && newValue == null) || newValue != null) {
    160163                fireCommandIssued(new ChangePropertyCommand(osmObject, tag, newValue));
  • applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/OSMStreet.java

    r30348 r30737  
    2626    }
    2727
    28     public List<IOSMEntity> getChildren() {
     28    @Override
     29        public List<IOSMEntity> getChildren() {
    2930        return children;
    3031    }
     
    4647    private void lazyCreateChildren() {
    4748        if (children == null) {
    48             children = new ArrayList<IOSMEntity>();
     49            children = new ArrayList<>();
    4950        }
    5051    }
     
    6566    private void lazyCreateAddresses() {
    6667        if (addresses == null) {
    67             addresses = new ArrayList<OSMAddress>();
     68            addresses = new ArrayList<>();
    6869        }
    6970    }
     
    118119     */
    119120    public String getType() {
    120         List<String> types = new ArrayList<String>();
     121        List<String> types = new ArrayList<>();
    121122
    122123        for (IOSMEntity seg : getChildren()) {
  • applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/OsmFactory.java

    r30348 r30737  
    88
    99public class OsmFactory {
    10     private static HashMap<String, OSMAddress> addressCache = new HashMap<String, OSMAddress>();
     10    private static HashMap<String, OSMAddress> addressCache = new HashMap<>();
    1111
    1212    /**
  • applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/PostalCodeChecker.java

    r30348 r30737  
    1111 */
    1212public class PostalCodeChecker {
    13     private static HashMap<String, String> postalCodePatternMap = new HashMap<String, String>();
     13    private static HashMap<String, String> postalCodePatternMap = new HashMap<>();
    1414
    1515    static {
  • applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/gui/AddressEditModel.java

    r30348 r30737  
    1010import javax.swing.tree.TreeNode;
    1111
     12import org.openstreetmap.josm.plugins.fixAddresses.IOSMEntity;
    1213import org.openstreetmap.josm.plugins.fixAddresses.OSMAddress;
    13 import org.openstreetmap.josm.plugins.fixAddresses.IOSMEntity;
    1414import org.openstreetmap.josm.plugins.fixAddresses.OSMStreet;
    1515
     
    1717    private List<OSMStreet> streets;
    1818    private List<OSMAddress> unresolvedAddresses;
    19     private List<OSMAddress> incompleteAddresses = new ArrayList<OSMAddress>();
     19    private List<OSMAddress> incompleteAddresses = new ArrayList<>();
    2020    private DefaultMutableTreeNode streetRoot;
    2121    private DefaultMutableTreeNode unresolvedRoot;
  • applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/gui/AddressEditSelectionEvent.java

    r30348 r30737  
    153153            int[] selRows = unresolvedAddressTable.getSelectedRows();
    154154
    155             unresolvedCache = new ArrayList<OSMAddress>();
     155            unresolvedCache = new ArrayList<>();
    156156            for (int i = 0; i < selRows.length; i++) {
    157157                if (selRows[i] >= 0 && selRows[i] < addressContainer.getNumberOfUnresolvedAddresses()) {
     
    177177            int[] selRows = incompleteAddressTable.getSelectedRows();
    178178
    179             incompleteCache = new ArrayList<OSMAddress>();
     179            incompleteCache = new ArrayList<>();
    180180            for (int i = 0; i < selRows.length; i++) {
    181181                if (selRows[i] >= 0 && selRows[i] < addressContainer.getNumberOfIncompleteAddresses()) {
  • applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/gui/IncompleteAddressesDialog.java

    r30348 r30737  
    6464        incompleteAddr.getSelectionModel().addListSelectionListener(this);
    6565
    66         LinkedList<SideButton> buttons = new LinkedList<SideButton>();
     66        LinkedList<SideButton> buttons = new LinkedList<>();
    6767        // Link actions with address container
    6868        for (AbstractAddressEditAction action : actions) {
  • applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/gui/actions/AbstractAddressEditAction.java

    r30348 r30737  
    166166        }
    167167
    168         commands = new ArrayList<Command>();
     168        commands = new ArrayList<>();
    169169        if (StringUtils.isNullOrEmpty(txName)) {
    170170            throw new RuntimeException("Transaction must have a name");
  • applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/gui/actions/ApplyAllGuessesAction.java

    r30348 r30737  
    1313
    1414import org.openstreetmap.josm.plugins.fixAddresses.AddressEditContainer;
     15import org.openstreetmap.josm.plugins.fixAddresses.IOSMEntity;
    1516import org.openstreetmap.josm.plugins.fixAddresses.OSMAddress;
    16 import org.openstreetmap.josm.plugins.fixAddresses.IOSMEntity;
    1717import org.openstreetmap.josm.plugins.fixAddresses.StringUtils;
    1818import org.openstreetmap.josm.plugins.fixAddresses.gui.AddressEditSelectionEvent;
     
    7070    private void applyGuesses(List<OSMAddress> addrToFix) {
    7171        beginTransaction(tr("Applied guessed values"));
    72         List<OSMAddress> addrToFixShadow = new ArrayList<OSMAddress>(addrToFix);
     72        List<OSMAddress> addrToFixShadow = new ArrayList<>(addrToFix);
    7373        for (OSMAddress aNode : addrToFixShadow) {
    7474            beginObjectTransaction(aNode);
  • applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/gui/actions/SelectAddressesInMapAction.java

    r30348 r30737  
    6262        if (addrToSel == null) return;
    6363
    64         List<OsmPrimitive> sel = new ArrayList<OsmPrimitive>();
     64        List<OsmPrimitive> sel = new ArrayList<>();
    6565
    6666        getCurrentDataSet().clearSelection();
  • applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/gui/actions/SelectIncompleteAddressesAction.java

    r30348 r30737  
    3030
    3131        if (addressEditContainer.getIncompleteAddresses() != null) {
    32             List<OsmPrimitive> osms = new ArrayList<OsmPrimitive>();
     32            List<OsmPrimitive> osms = new ArrayList<>();
    3333
    3434            for (OSMAddress aNode : addressEditContainer.getIncompleteAddresses()) {
Note: See TracChangeset for help on using the changeset viewer.