Index: trunk/src/org/openstreetmap/josm/io/AbstractReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/AbstractReader.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/AbstractReader.java	(revision 7005)
@@ -41,15 +41,15 @@
      * to identify primitives unknown to the OSM server
      */
-    protected final Map<PrimitiveId, OsmPrimitive> externalIdMap = new HashMap<PrimitiveId, OsmPrimitive>();
+    protected final Map<PrimitiveId, OsmPrimitive> externalIdMap = new HashMap<>();
 
     /**
      * Data structure for the remaining way objects
      */
-    protected final Map<Long, Collection<Long>> ways = new HashMap<Long, Collection<Long>>();
+    protected final Map<Long, Collection<Long>> ways = new HashMap<>();
 
     /**
      * Data structure for relation objects
      */
-    protected final Map<Long, Collection<RelationMemberData>> relations = new HashMap<Long, Collection<RelationMemberData>>();
+    protected final Map<Long, Collection<RelationMemberData>> relations = new HashMap<>();
     
     /**
@@ -84,5 +84,5 @@
         for (Long externalWayId: ways.keySet()) {
             Way w = (Way)externalIdMap.get(new SimplePrimitiveId(externalWayId, OsmPrimitiveType.WAY));
-            List<Node> wayNodes = new ArrayList<Node>();
+            List<Node> wayNodes = new ArrayList<>();
             for (long id : ways.get(externalWayId)) {
                 Node n = (Node)externalIdMap.get(new SimplePrimitiveId(id, OsmPrimitiveType.NODE));
@@ -137,5 +137,5 @@
                     new SimplePrimitiveId(externalRelationId, OsmPrimitiveType.RELATION)
             );
-            List<RelationMember> relationMembers = new ArrayList<RelationMember>();
+            List<RelationMember> relationMembers = new ArrayList<>();
             for (RelationMemberData rm : relations.get(externalRelationId)) {
                 OsmPrimitive primitive = null;
Index: trunk/src/org/openstreetmap/josm/io/CacheFiles.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/CacheFiles.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/CacheFiles.java	(revision 7005)
@@ -245,5 +245,5 @@
         if(!this.enabled || maxsize == -1) return;
 
-        TreeMap<Long, File> modtime = new TreeMap<Long, File>();
+        TreeMap<Long, File> modtime = new TreeMap<>();
         long dirsize = 0;
 
Index: trunk/src/org/openstreetmap/josm/io/Capabilities.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/Capabilities.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/Capabilities.java	(revision 7005)
@@ -95,5 +95,5 @@
         } else {
             if (! capabilities.containsKey(element))  {
-                HashMap<String,String> h = new HashMap<String, String>();
+                HashMap<String,String> h = new HashMap<>();
                 capabilities.put(element, h);
             }
@@ -104,6 +104,6 @@
 
     public final void clear() {
-        capabilities = new HashMap<String, HashMap<String,String>>();
-        imageryBlacklist = new ArrayList<String>();
+        capabilities = new HashMap<>();
+        imageryBlacklist = new ArrayList<>();
     }
 
Index: trunk/src/org/openstreetmap/josm/io/ChangesetQuery.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/ChangesetQuery.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/ChangesetQuery.java	(revision 7005)
@@ -401,5 +401,5 @@
             return value == null || value.isEmpty()
                     ? Collections.<Long>emptySet() :
-                    new HashSet<Long>(Utils.transform(Arrays.asList(value.split(",")), new Utils.Function<String, Long>() {
+                    new HashSet<>(Utils.transform(Arrays.asList(value.split(",")), new Utils.Function<String, Long>() {
                         @Override
                         public Long apply(String x) {
@@ -457,5 +457,5 @@
 
         protected Map<String,String> createMapFromQueryString(String query) {
-            Map<String,String> queryParams  = new HashMap<String, String>();
+            Map<String,String> queryParams  = new HashMap<>();
             String[] keyValuePairs = query.split("&");
             for (String keyValuePair: keyValuePairs) {
Index: trunk/src/org/openstreetmap/josm/io/DefaultProxySelector.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/DefaultProxySelector.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/DefaultProxySelector.java	(revision 7005)
@@ -64,6 +64,6 @@
     private ProxySelector delegate;
 
-    private final Set<String> errorResources = new HashSet<String>();
-    private final Set<String> errorMessages = new HashSet<String>();
+    private final Set<String> errorResources = new HashSet<>();
+    private final Set<String> errorMessages = new HashSet<>();
     private Set<String> proxyExceptions;
 
@@ -140,5 +140,5 @@
             }
         }
-        proxyExceptions = new HashSet<String>(
+        proxyExceptions = new HashSet<>(
             Main.pref.getCollection(ProxyPreferencesPanel.PROXY_EXCEPTIONS,
                     Arrays.asList(new String[]{"localhost", "127.0.0.1"}))
@@ -161,5 +161,5 @@
      */
     public final Set<String> getErrorResources() {
-        return new TreeSet<String>(errorResources);
+        return new TreeSet<>(errorResources);
     }
 
@@ -170,5 +170,5 @@
      */
     public final Set<String> getErrorMessages() {
-        return new TreeSet<String>(errorMessages);
+        return new TreeSet<>(errorMessages);
     }
 
Index: trunk/src/org/openstreetmap/josm/io/DiffResultProcessor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/DiffResultProcessor.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/DiffResultProcessor.java	(revision 7005)
@@ -42,5 +42,5 @@
      * replied by the server
      */
-    private Map<PrimitiveId, DiffResultEntry> diffResults = new HashMap<PrimitiveId, DiffResultEntry>();
+    private Map<PrimitiveId, DiffResultEntry> diffResults = new HashMap<>();
     /**
      * the set of processed primitives *after* the new id, the new version and the new changeset id
@@ -64,5 +64,5 @@
         }
         this.primitives = primitives;
-        this.processed = new HashSet<IPrimitive>();
+        this.processed = new HashSet<>();
     }
 
Index: trunk/src/org/openstreetmap/josm/io/GeoJSONWriter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/GeoJSONWriter.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/GeoJSONWriter.java	(revision 7005)
@@ -58,5 +58,5 @@
     public String write(boolean pretty) {
         StringWriter stringWriter = new StringWriter();
-        Map<String, Object> config = new HashMap<String, Object>(1);
+        Map<String, Object> config = new HashMap<>(1);
         config.put(JsonGenerator.PRETTY_PRINTING, pretty);
         JsonWriter writer = Json.createWriterFactory(config).createWriter(stringWriter);
Index: trunk/src/org/openstreetmap/josm/io/GpxExporter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/GpxExporter.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/GpxExporter.java	(revision 7005)
@@ -290,5 +290,5 @@
                         "GNU Lesser Public License (LGPL)",
                         "BSD License (MIT/X11)"};
-                JList<String> l = new JList<String>(licenses);
+                JList<String> l = new JList<>(licenses);
                 l.setVisibleRowCount(licenses.length);
                 l.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
Index: trunk/src/org/openstreetmap/josm/io/GpxReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/GpxReader.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/GpxReader.java	(revision 7005)
@@ -67,5 +67,5 @@
         private Extensions currentExtensions;
         private Stack<State> states;
-        private final Stack<String> elements = new Stack<String>();
+        private final Stack<String> elements = new Stack<>();
 
         private StringBuffer accumulator = new StringBuffer();
@@ -75,5 +75,5 @@
         @Override public void startDocument() {
             accumulator = new StringBuffer();
-            states = new Stack<State>();
+            states = new Stack<>();
             data = new GpxData();
         }
@@ -123,6 +123,6 @@
                     states.push(currentState);
                     currentState = State.trk;
-                    currentTrack = new ArrayList<Collection<WayPoint>>();
-                    currentTrackAttr = new HashMap<String, Object>();
+                    currentTrack = new ArrayList<>();
+                    currentTrackAttr = new HashMap<>();
                 } else if (localName.equals("extensions")) {
                     states.push(currentState);
@@ -164,5 +164,5 @@
                     states.push(currentState);
                     currentState = State.trkseg;
-                    currentTrackSeg = new ArrayList<WayPoint>();
+                    currentTrackSeg = new ArrayList<>();
                 } else if (localName.equals("link")) {
                     states.push(currentState);
@@ -415,5 +415,5 @@
 
         public void tryToFinish() throws SAXException {
-            List<String> remainingElements = new ArrayList<String>(elements);
+            List<String> remainingElements = new ArrayList<>(elements);
             for (int i=remainingElements.size() - 1; i >= 0; i--) {
                 endElement(null, remainingElements.get(i), remainingElements.get(i));
Index: trunk/src/org/openstreetmap/josm/io/JpgImporter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/JpgImporter.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/JpgImporter.java	(revision 7005)
@@ -71,6 +71,6 @@
         progressMonitor.beginTask(tr("Looking for image files"), 1);
         try {
-            List<File> files = new ArrayList<File>();
-            Set<String> visitedDirs = new HashSet<String>();
+            List<File> files = new ArrayList<>();
+            Set<String> visitedDirs = new HashSet<>();
             addRecursiveFiles(files, visitedDirs, sel, progressMonitor.createSubTaskMonitor(1, true));
 
Index: trunk/src/org/openstreetmap/josm/io/MirroredInputStream.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/MirroredInputStream.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/MirroredInputStream.java	(revision 7005)
@@ -236,5 +236,5 @@
             if (!url.getProtocol().equals("file")) {
                 String prefKey = getPrefKey(url, destDir);
-                List<String> localPath = new ArrayList<String>(Main.pref.getCollection(prefKey));
+                List<String> localPath = new ArrayList<>(Main.pref.getCollection(prefKey));
                 if (localPath.size() == 2) {
                     File lfile = new File(localPath.get(1));
@@ -269,5 +269,5 @@
         long age = 0L;
         File localFile = null;
-        List<String> localPathEntry = new ArrayList<String>(Main.pref.getCollection(prefKey));
+        List<String> localPathEntry = new ArrayList<>(Main.pref.getCollection(prefKey));
         if (localPathEntry.size() == 2) {
             localFile = new File(localPathEntry.get(1));
Index: trunk/src/org/openstreetmap/josm/io/MultiFetchServerObjectReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/MultiFetchServerObjectReader.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/MultiFetchServerObjectReader.java	(revision 7005)
@@ -75,9 +75,9 @@
      */
     public MultiFetchServerObjectReader() {
-        nodes = new LinkedHashSet<Long>();
-        ways = new LinkedHashSet<Long>();
-        relations = new LinkedHashSet<Long>();
+        nodes = new LinkedHashSet<>();
+        ways = new LinkedHashSet<>();
+        relations = new LinkedHashSet<>();
         this.outputDataSet = new DataSet();
-        this.missingPrimitives = new LinkedHashSet<PrimitiveId>();
+        this.missingPrimitives = new LinkedHashSet<>();
     }
 
@@ -238,5 +238,5 @@
      */
     protected Set<Long> extractIdPackage(Set<Long> ids) {
-        HashSet<Long> pkg = new HashSet<Long>();
+        HashSet<Long> pkg = new HashSet<>();
         if (ids.isEmpty())
             return pkg;
@@ -333,5 +333,5 @@
         progressMonitor.setTicks(0);
         // The complete set containg all primitives to fetch
-        Set<Long> toFetch = new HashSet<Long>(ids);
+        Set<Long> toFetch = new HashSet<>(ids);
         // Build a list of fetchers that will  download smaller sets containing only MAX_IDS_PER_REQUEST (200) primitives each.
         // we will run up to MAX_DOWNLOAD_THREADS concurrent fetchers.
@@ -339,6 +339,6 @@
         threadsNumber = Math.min(Math.max(threadsNumber, 1), OsmApi.MAX_DOWNLOAD_THREADS);
         Executor exec = Executors.newFixedThreadPool(threadsNumber);
-        CompletionService<FetchResult> ecs = new ExecutorCompletionService<FetchResult>(exec);
-        List<Future<FetchResult>> jobs = new ArrayList<Future<FetchResult>>();
+        CompletionService<FetchResult> ecs = new ExecutorCompletionService<>(exec);
+        List<Future<FetchResult>> jobs = new ArrayList<>();
         while (!toFetch.isEmpty()) {
             jobs.add(ecs.submit(new Fetcher(type, extractIdPackage(toFetch), progressMonitor)));
@@ -388,5 +388,5 @@
         progressMonitor.beginTask(trn("Downloading {0} object from ''{1}''", "Downloading {0} objects from ''{1}''", n, n, OsmApi.getOsmApi().getBaseUrl()));
         try {
-            missingPrimitives = new HashSet<PrimitiveId>();
+            missingPrimitives = new HashSet<>();
             if (isCanceled()) return null;
             fetchPrimitives(ways,OsmPrimitiveType.WAY, progressMonitor);
Index: trunk/src/org/openstreetmap/josm/io/NmeaReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/NmeaReader.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/NmeaReader.java	(revision 7005)
@@ -172,5 +172,5 @@
         // create the data tree
         data = new GpxData();
-        Collection<Collection<WayPoint>> currentTrack = new ArrayList<Collection<WayPoint>>();
+        Collection<Collection<WayPoint>> currentTrack = new ArrayList<>();
 
         BufferedReader rd = null;
@@ -214,5 +214,5 @@
     }
     private static class NMEAParserState {
-        protected Collection<WayPoint> waypoints = new ArrayList<WayPoint>();
+        protected Collection<WayPoint> waypoints = new ArrayList<>();
         protected String p_Time;
         protected String p_Date;
Index: trunk/src/org/openstreetmap/josm/io/OsmApi.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmApi.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/OsmApi.java	(revision 7005)
@@ -76,5 +76,5 @@
 
     // The collection of instantiated OSM APIs
-    private static Map<String, OsmApi> instances = new HashMap<String, OsmApi>();
+    private static Map<String, OsmApi> instances = new HashMap<>();
 
     private URL url = null;
Index: trunk/src/org/openstreetmap/josm/io/OsmChangesetParser.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmChangesetParser.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/OsmChangesetParser.java	(revision 7005)
@@ -44,5 +44,5 @@
 
     private OsmChangesetParser() {
-        changesets = new LinkedList<Changeset>();
+        changesets = new LinkedList<>();
     }
 
Index: trunk/src/org/openstreetmap/josm/io/OsmExporter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmExporter.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/OsmExporter.java	(revision 7005)
@@ -6,5 +6,4 @@
 import java.io.File;
 import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.OutputStream;
Index: trunk/src/org/openstreetmap/josm/io/OsmReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmReader.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/OsmReader.java	(revision 7005)
@@ -60,5 +60,5 @@
     public static void registerPostprocessor(OsmServerReadPostprocessor pp) {
         if (postprocessors == null) {
-            postprocessors = new ArrayList<OsmServerReadPostprocessor>();
+            postprocessors = new ArrayList<>();
         }
         postprocessors.add(pp);
@@ -223,5 +223,5 @@
         externalIdMap.put(wd.getPrimitiveId(), w);
 
-        Collection<Long> nodeIds = new ArrayList<Long>();
+        Collection<Long> nodeIds = new ArrayList<>();
         while (true) {
             int event = parser.next();
@@ -240,5 +240,5 @@
         if (w.isDeleted() && !nodeIds.isEmpty()) {
             Main.info(tr("Deleted way {0} contains nodes", w.getUniqueId()));
-            nodeIds = new ArrayList<Long>();
+            nodeIds = new ArrayList<>();
         }
         ways.put(wd.getUniqueId(), nodeIds);
@@ -270,5 +270,5 @@
         externalIdMap.put(rd.getPrimitiveId(), r);
 
-        Collection<RelationMemberData> members = new ArrayList<RelationMemberData>();
+        Collection<RelationMemberData> members = new ArrayList<>();
         while (true) {
             int event = parser.next();
@@ -287,5 +287,5 @@
         if (r.isDeleted() && !members.isEmpty()) {
             Main.info(tr("Deleted relation {0} contains members", r.getUniqueId()));
-            members = new ArrayList<RelationMemberData>();
+            members = new ArrayList<>();
         }
         relations.put(rd.getUniqueId(), members);
Index: trunk/src/org/openstreetmap/josm/io/OsmServerBackreferenceReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmServerBackreferenceReader.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/OsmServerBackreferenceReader.java	(revision 7005)
@@ -213,5 +213,5 @@
         progressMonitor.beginTask(null, 2);
         try {
-            Collection<Way> waysToCheck = new ArrayList<Way>(ds.getWays());
+            Collection<Way> waysToCheck = new ArrayList<>(ds.getWays());
             if (isReadFull() ||primitiveType.equals(OsmPrimitiveType.NODE)) {
                 for (Way way: waysToCheck) {
@@ -225,5 +225,5 @@
             }
             if (isReadFull()) {
-                Collection<Relation> relationsToCheck  = new ArrayList<Relation>(ds.getRelations());
+                Collection<Relation> relationsToCheck  = new ArrayList<>(ds.getRelations());
                 for (Relation relation: relationsToCheck) {
                     if (!relation.isNew() && relation.hasIncompleteMembers()) {
Index: trunk/src/org/openstreetmap/josm/io/OsmServerChangesetReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmServerChangesetReader.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/OsmServerChangesetReader.java	(revision 7005)
@@ -128,5 +128,5 @@
             monitor.beginTask(trn("Downloading {0} changeset ...", "Downloading {0} changesets ...",ids.size(),ids.size()));
             monitor.setTicksCount(ids.size());
-            List<Changeset> ret = new ArrayList<Changeset>();
+            List<Changeset> ret = new ArrayList<>();
             int i=0;
             for (int id : ids) {
Index: trunk/src/org/openstreetmap/josm/io/OsmServerUserInfoReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmServerUserInfoReader.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/OsmServerUserInfoReader.java	(revision 7005)
@@ -106,5 +106,5 @@
             NodeList xmlNodeList = (NodeList)xpath.compile("/osm/user[1]/languages[1]/lang/text()").evaluate(document, XPathConstants.NODESET);
             if (xmlNodeList != null) {
-                List<String> languages = new LinkedList<String>();
+                List<String> languages = new LinkedList<>();
                 for (int i=0; i < xmlNodeList.getLength(); i++) {
                     languages.add(xmlNodeList.item(i).getNodeValue());
Index: trunk/src/org/openstreetmap/josm/io/OsmServerWriter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmServerWriter.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/OsmServerWriter.java	(revision 7005)
@@ -40,5 +40,5 @@
     public static void registerPostprocessor(OsmServerWritePostprocessor pp) {
         if (postprocessors == null) {
-            postprocessors = new ArrayList<OsmServerWritePostprocessor>();
+            postprocessors = new ArrayList<>();
         }
         postprocessors.add(pp);
@@ -152,5 +152,5 @@
         try {
             progressMonitor.beginTask(tr("Starting to upload in chunks..."));
-            List<IPrimitive> chunk = new ArrayList<IPrimitive>(chunkSize);
+            List<IPrimitive> chunk = new ArrayList<>(chunkSize);
             Iterator<? extends IPrimitive> it = primitives.iterator();
             int numChunks = (int)Math.ceil((double)primitives.size() / (double)chunkSize);
@@ -192,5 +192,5 @@
     public void uploadOsm(UploadStrategySpecification strategy, Collection<? extends IPrimitive> primitives, Changeset changeset, ProgressMonitor monitor) throws OsmTransferException {
         CheckParameterUtil.ensureParameterNotNull(changeset, "changeset");
-        processed = new LinkedList<IPrimitive>();
+        processed = new LinkedList<>();
         monitor = monitor == null ? NullProgressMonitor.INSTANCE : monitor;
         monitor.beginTask(tr("Uploading data ..."));
Index: trunk/src/org/openstreetmap/josm/io/OsmWriter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmWriter.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/OsmWriter.java	(revision 7005)
@@ -94,5 +94,5 @@
 
     protected <T extends OsmPrimitive> Collection<T> sortById(Collection<T> primitives) {
-        List<T> result = new ArrayList<T>(primitives.size());
+        List<T> result = new ArrayList<>(primitives.size());
         result.addAll(primitives);
         Collections.sort(result, byIdComparator);
@@ -255,5 +255,5 @@
                 out.println(">");
             }
-            List<Entry<String, String>> entries = new ArrayList<Entry<String,String>>(osm.getKeys().entrySet());
+            List<Entry<String, String>> entries = new ArrayList<>(osm.getKeys().entrySet());
             Collections.sort(entries, byKeyComparator);
             for (Entry<String, String> e : entries) {
Index: trunk/src/org/openstreetmap/josm/io/XmlWriter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/XmlWriter.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/XmlWriter.java	(revision 7005)
@@ -66,5 +66,5 @@
      * The output writer to save the values to.
      */
-    private static final Map<Character, String> encoding = new HashMap<Character, String>();
+    private static final Map<Character, String> encoding = new HashMap<>();
     static {
         encoding.put('<', "&lt;");
Index: trunk/src/org/openstreetmap/josm/io/auth/AbstractCredentialsAgent.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/auth/AbstractCredentialsAgent.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/auth/AbstractCredentialsAgent.java	(revision 7005)
@@ -12,5 +12,5 @@
 public abstract class AbstractCredentialsAgent implements CredentialsAgent {
 
-    protected Map<RequestorType, PasswordAuthentication> memoryCredentialsCache = new HashMap<RequestorType, PasswordAuthentication>();
+    protected Map<RequestorType, PasswordAuthentication> memoryCredentialsCache = new HashMap<>();
 
     /**
Index: trunk/src/org/openstreetmap/josm/io/auth/DefaultAuthenticator.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/auth/DefaultAuthenticator.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/auth/DefaultAuthenticator.java	(revision 7005)
@@ -33,5 +33,5 @@
     }
 
-    private final Map<RequestorType, Boolean> credentialsTried = new HashMap<RequestorType, Boolean>();
+    private final Map<RequestorType, Boolean> credentialsTried = new HashMap<>();
     private boolean enabled = true;
 
Index: trunk/src/org/openstreetmap/josm/io/imagery/HTMLGrabber.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/imagery/HTMLGrabber.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/imagery/HTMLGrabber.java	(revision 7005)
@@ -33,5 +33,5 @@
         Main.info("Grabbing HTML " + (attempt > 1? "(attempt " + attempt + ") ":"") + url);
 
-        List<String> cmdParams = new ArrayList<String>();
+        List<String> cmdParams = new ArrayList<>();
         StringTokenizer st = new StringTokenizer(MessageFormat.format(PROP_BROWSER.get(), urlstring));
         while (st.hasMoreTokens()) {
Index: trunk/src/org/openstreetmap/josm/io/imagery/ImageryReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/imagery/ImageryReader.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/imagery/ImageryReader.java	(revision 7005)
@@ -2,5 +2,4 @@
 package org.openstreetmap.josm.io.imagery;
 
-import static org.openstreetmap.josm.tools.I18n.tr;
 import static org.openstreetmap.josm.tools.Utils.equal;
 
@@ -85,7 +84,7 @@
             accumulator = new StringBuffer();
             skipEntry = false;
-            states = new Stack<State>();
+            states = new Stack<>();
             states.push(State.INIT);
-            entries = new ArrayList<ImageryInfo>();
+            entries = new ArrayList<>();
             entry = null;
             bounds = null;
@@ -141,5 +140,5 @@
                     newState = State.BOUNDS;
                 } else if (qName.equals("projections")) {
-                    projections = new ArrayList<String>();
+                    projections = new ArrayList<>();
                     newState = State.PROJECTIONS;
                 }
Index: trunk/src/org/openstreetmap/josm/io/imagery/WMSGrabber.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/imagery/WMSGrabber.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/imagery/WMSGrabber.java	(revision 7005)
@@ -41,5 +41,5 @@
     protected String baseURL;
     private ImageryInfo info;
-    private Map<String, String> props = new HashMap<String, String>();
+    private Map<String, String> props = new HashMap<>();
 
     public WMSGrabber(MapView mv, WMSLayer layer, boolean localOnly) {
Index: trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java	(revision 7005)
@@ -175,5 +175,5 @@
             child = getChild(child, "GetMap");
 
-            formats = new ArrayList<String>(Utils.filter(Utils.transform(getChildren(child, "Format"),
+            formats = new ArrayList<>(Utils.filter(Utils.transform(getChildren(child, "Format"),
                     new Utils.Function<Element, String>() {
                         @Override
@@ -226,5 +226,5 @@
         ImageryInfo i = new ImageryInfo(name, buildGetMapUrl(selectedLayers));
         if (selectedLayers != null) {
-            HashSet<String> proj = new HashSet<String>();
+            HashSet<String> proj = new HashSet<>();
             for (WMSImagery.LayerDetails l : selectedLayers) {
                 proj.addAll(l.getProjections());
@@ -236,5 +236,5 @@
 
     private List<LayerDetails> parseLayers(List<Element> children, Set<String> parentCrs) {
-        List<LayerDetails> details = new ArrayList<LayerDetails>(children.size());
+        List<LayerDetails> details = new ArrayList<>(children.size());
         for (Element element : children) {
             details.add(parseLayer(element, parentCrs));
@@ -248,5 +248,5 @@
 
         // The set of supported CRS/SRS for this layer
-        Set<String> crsList = new HashSet<String>();
+        Set<String> crsList = new HashSet<>();
         // ...including this layer's already-parsed parent projections
         crsList.addAll(parentCrs);
@@ -332,5 +332,5 @@
 
     private static List<Element> getChildren(Element parent, String name) {
-        List<Element> retVal = new ArrayList<Element>();
+        List<Element> retVal = new ArrayList<>();
         for (Node child = parent.getFirstChild(); child != null; child = child.getNextSibling()) {
             if (child instanceof Element && name.equals(child.getNodeName())) {
Index: trunk/src/org/openstreetmap/josm/io/remotecontrol/AddTagsDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/remotecontrol/AddTagsDialog.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/remotecontrol/AddTagsDialog.java	(revision 7005)
@@ -59,5 +59,5 @@
 
     String sender;
-    static Set<String> trustedSenders = new HashSet<String>();
+    static Set<String> trustedSenders = new HashSet<>();
 
     /**
@@ -81,5 +81,5 @@
         Map<String, Integer> valueCount;
         public ExistingValues(String tag) {
-            this.tag=tag; valueCount=new HashMap<String, Integer>();
+            this.tag=tag; valueCount=new HashMap<>();
         }
 
@@ -303,5 +303,5 @@
                         throw new RuntimeException(e);
                     }
-                    Set<String> tagSet = new HashSet<String>();
+                    Set<String> tagSet = new HashSet<>();
                     for (String tag : tags) {
                         if (!tag.trim().isEmpty() && tag.contains("=")) {
Index: trunk/src/org/openstreetmap/josm/io/remotecontrol/RequestProcessor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/remotecontrol/RequestProcessor.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/remotecontrol/RequestProcessor.java	(revision 7005)
@@ -61,5 +61,5 @@
      * can extend this list by using @see addRequestHandler
      */
-    private static Map<String, Class<? extends RequestHandler>> handlers = new TreeMap<String, Class<? extends RequestHandler>>();
+    private static Map<String, Class<? extends RequestHandler>> handlers = new TreeMap<>();
 
     /**
@@ -174,5 +174,5 @@
             String command = questionPos < 0 ? url : url.substring(0, questionPos);
 
-            Map <String,String> headers = new HashMap<String, String>();
+            Map <String,String> headers = new HashMap<>();
             int k=0, MAX_HEADERS=20;
             while (k<MAX_HEADERS) {
Index: trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/AddWayHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/AddWayHandler.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/AddWayHandler.java	(revision 7005)
@@ -35,5 +35,5 @@
     public static final String command = "add_way";
 
-    private final List<LatLon> allCoordinates = new ArrayList<LatLon>();
+    private final List<LatLon> allCoordinates = new ArrayList<>();
 
     /**
@@ -151,7 +151,7 @@
      */
     private void addWay() {
-        addedNodes = new HashMap<LatLon, Node>();
+        addedNodes = new HashMap<>();
         Way way = new Way();
-        List<Command> commands = new LinkedList<Command>();
+        List<Command> commands = new LinkedList<>();
         for (LatLon ll : allCoordinates) {
             Node node = findOrCreateNode(ll, commands);
Index: trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/ImageryHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/ImageryHandler.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/ImageryHandler.java	(revision 7005)
@@ -86,5 +86,5 @@
     @Override
     protected void parseArgs() {
-        HashMap<String, String> args = new HashMap<String, String>();
+        HashMap<String, String> args = new HashMap<>();
         if (request.indexOf('?') != -1) {
             String query = request.substring(request.indexOf('?') + 1);
Index: trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/ImportHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/ImportHandler.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/ImportHandler.java	(revision 7005)
@@ -85,5 +85,5 @@
     @Override
     protected void parseArgs() {
-        HashMap<String, String> args = new HashMap<String, String>();
+        HashMap<String, String> args = new HashMap<>();
         if (request.indexOf('?') != -1) {
             String query = request.substring(request.indexOf('?') + 1);
Index: trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadAndZoomHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadAndZoomHandler.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadAndZoomHandler.java	(revision 7005)
@@ -51,5 +51,5 @@
 
     // Optional argument 'select'
-    private final Set<SimplePrimitiveId> toSelect = new HashSet<SimplePrimitiveId>();
+    private final Set<SimplePrimitiveId> toSelect = new HashSet<>();
 
     @Override
@@ -161,5 +161,5 @@
                 @Override
                 public void run() {
-                    Set<OsmPrimitive> newSel = new HashSet<OsmPrimitive>();
+                    Set<OsmPrimitive> newSel = new HashSet<>();
                     DataSet ds = Main.main.getCurrentDataSet();
                     if(ds == null) // e.g. download failed
Index: trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadObjectHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadObjectHandler.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadObjectHandler.java	(revision 7005)
@@ -27,5 +27,5 @@
     public static final String command = "load_object";
 
-    private final List<PrimitiveId> ps = new LinkedList<PrimitiveId>();
+    private final List<PrimitiveId> ps = new LinkedList<>();
 
     @Override
Index: trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/RequestHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/RequestHandler.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/RequestHandler.java	(revision 7005)
@@ -194,5 +194,5 @@
         try {
             String req = URLDecoder.decode(this.request, "UTF-8");
-            HashMap<String, String> args = new HashMap<String, String>();
+            HashMap<String, String> args = new HashMap<>();
             if (req.indexOf('?') != -1) {
                 String query = req.substring(req.indexOf('?') + 1);
@@ -217,5 +217,5 @@
         String[] mandatory = getMandatoryParams();
         String[] optional = getOptionalParams();
-        List<String> missingKeys = new LinkedList<String>();
+        List<String> missingKeys = new LinkedList<>();
         boolean error = false;
         if(mandatory != null) for (String key : mandatory) {
@@ -227,5 +227,5 @@
             }
         }
-        HashSet<String> knownParams = new HashSet<String>();
+        HashSet<String> knownParams = new HashSet<>();
         if (mandatory != null) Collections.addAll(knownParams, mandatory);
         if (optional != null) Collections.addAll(knownParams, optional);
Index: trunk/src/org/openstreetmap/josm/io/session/GeoImageSessionImporter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/session/GeoImageSessionImporter.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/session/GeoImageSessionImporter.java	(revision 7005)
@@ -30,5 +30,5 @@
         }
 
-        List<ImageEntry> entries = new ArrayList<ImageEntry>();
+        List<ImageEntry> entries = new ArrayList<>();
         NodeList imgNodes = elem.getChildNodes();
         boolean useThumbs = false;
Index: trunk/src/org/openstreetmap/josm/io/session/ImagerySessionImporter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/session/ImagerySessionImporter.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/session/ImagerySessionImporter.java	(revision 7005)
@@ -31,5 +31,5 @@
             throw new IllegalDataException(tr("Version ''{0}'' of meta data for imagery layer is not supported. Expected: 0.1", version));
         }
-        Map<String, String> attributes = new HashMap<String, String>();
+        Map<String, String> attributes = new HashMap<>();
 
         NodeList nodes = elem.getChildNodes();
Index: trunk/src/org/openstreetmap/josm/io/session/SessionReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/session/SessionReader.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/session/SessionReader.java	(revision 7005)
@@ -57,5 +57,5 @@
 public class SessionReader {
 
-    private static Map<String, Class<? extends SessionLayerImporter>> sessionLayerImporters = new HashMap<String, Class<? extends SessionLayerImporter>>();
+    private static Map<String, Class<? extends SessionLayerImporter>> sessionLayerImporters = new HashMap<>();
     static {
         registerSessionLayerImporter("osm-data", OsmDataSessionImporter.class);
@@ -86,7 +86,7 @@
     private boolean zip; // true, if session file is a .joz file; false if it is a .jos file
     private ZipFile zipFile;
-    private List<Layer> layers = new ArrayList<Layer>();
+    private List<Layer> layers = new ArrayList<>();
     private int active = -1;
-    private List<Runnable> postLoadTasks = new ArrayList<Runnable>();
+    private List<Runnable> postLoadTasks = new ArrayList<>();
     private ViewportData viewport;
 
@@ -346,6 +346,6 @@
         }
 
-        MultiMap<Integer, Integer> deps = new MultiMap<Integer, Integer>();
-        Map<Integer, Element> elems = new HashMap<Integer, Element>();
+        MultiMap<Integer, Integer> deps = new MultiMap<>();
+        Map<Integer, Element> elems = new HashMap<>();
 
         NodeList nodes = layersEl.getChildNodes();
@@ -394,7 +394,7 @@
 
         List<Integer> sorted = Utils.topologicalSort(deps);
-        final Map<Integer, Layer> layersMap = new TreeMap<Integer, Layer>(Collections.reverseOrder());
-        final Map<Integer, SessionLayerImporter> importers = new HashMap<Integer, SessionLayerImporter>();
-        final Map<Integer, String> names = new HashMap<Integer, String>();
+        final Map<Integer, Layer> layersMap = new TreeMap<>(Collections.reverseOrder());
+        final Map<Integer, SessionLayerImporter> importers = new HashMap<>();
+        final Map<Integer, String> names = new HashMap<>();
 
         progressMonitor.setTicksCount(sorted.size());
@@ -430,5 +430,5 @@
             } else {
                 importers.put(idx, imp);
-                List<LayerDependency> depsImp = new ArrayList<LayerDependency>();
+                List<LayerDependency> depsImp = new ArrayList<>();
                 for (int d : deps.get(idx)) {
                     SessionLayerImporter dImp = importers.get(d);
@@ -481,5 +481,5 @@
         }
 
-        layers = new ArrayList<Layer>();
+        layers = new ArrayList<>();
         for (int idx : layersMap.keySet()) {
             Layer layer = layersMap.get(idx);
Index: trunk/src/org/openstreetmap/josm/io/session/SessionWriter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/session/SessionWriter.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/session/SessionWriter.java	(revision 7005)
@@ -48,6 +48,5 @@
 public class SessionWriter {
 
-    private static Map<Class<? extends Layer>, Class<? extends SessionLayerExporter>> sessionLayerExporters =
-            new HashMap<Class<? extends Layer>, Class<? extends SessionLayerExporter>>();
+    private static Map<Class<? extends Layer>, Class<? extends SessionLayerExporter>> sessionLayerExporters = new HashMap<>();
     static {
         registerSessionLayerExporter(OsmDataLayer.class , OsmDataSessionExporter.class);
@@ -210,5 +209,5 @@
             Set<Layer> deps = dependencies.get(layer);
             if (!deps.isEmpty()) {
-                List<Integer> depsInt = new ArrayList<Integer>();
+                List<Integer> depsInt = new ArrayList<>();
                 for (Layer depLayer : deps) {
                     int depIndex = layers.indexOf(depLayer);
