diff --git a/cpplite/cpplite.debugger/src/org/netbeans/modules/cpplite/debugger/breakpoints/BreakpointAnnotationListener.java b/cpplite/cpplite.debugger/src/org/netbeans/modules/cpplite/debugger/breakpoints/BreakpointAnnotationListener.java index e1791eedf91d..44b20daf8ae6 100644 --- a/cpplite/cpplite.debugger/src/org/netbeans/modules/cpplite/debugger/breakpoints/BreakpointAnnotationListener.java +++ b/cpplite/cpplite.debugger/src/org/netbeans/modules/cpplite/debugger/breakpoints/BreakpointAnnotationListener.java @@ -40,9 +40,8 @@ public class BreakpointAnnotationListener extends DebuggerManagerAdapter implements PropertyChangeListener { - private Map breakpointToAnnotation = new HashMap (); - - + private Map breakpointToAnnotation = new HashMap<>(); + @Override public String[] getProperties () { return new String[] {DebuggerManager.PROP_BREAKPOINTS}; diff --git a/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/DomainEditor.java b/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/DomainEditor.java index ef0a69a5fce5..0a0acd331ad2 100644 --- a/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/DomainEditor.java +++ b/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/DomainEditor.java @@ -466,10 +466,10 @@ private String formatJvmOption(String jvmOption) { public HashMap getSunDatasourcesFromXml(){ - HashMap dSources = new HashMap(); + HashMap dSources = new HashMap<>(); Document domainDoc = getDomainDocument(); if (domainDoc != null) { - HashMap dsMap = getDataSourcesAttrMap(domainDoc); + Map dsMap = getDataSourcesAttrMap(domainDoc); HashMap cpMap = getConnPoolsNodeMap(domainDoc); dsMap.keySet().removeAll(Arrays.asList(sysDatasources)); String[] ds = dsMap.keySet().toArray(new String[dsMap.size()]); @@ -497,7 +497,7 @@ private HashMap getPoolValues(HashMap cpMap, String poolName) { NodeList propsNodeList = cpElement.getElementsByTagName(CONST_PROP); //Cycle through each property element - HashMap map = new HashMap<>(); + Map map = new HashMap<>(); for (int j = 0; j < propsNodeList.getLength(); j++) { Node propNode = propsNodeList.item(j); NamedNodeMap propsMap = propNode.getAttributes(); @@ -533,7 +533,7 @@ private HashMap getPoolValues(HashMap cpMap, String poolName) { } public HashMap getConnPoolsFromXml(){ - HashMap pools = new HashMap(); + HashMap pools = new HashMap<>(); Document domainDoc = getDomainDocument(); if (domainDoc != null) { HashMap cpMap = getConnPoolsNodeMap(domainDoc); diff --git a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/api/application/DDProvider.java b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/api/application/DDProvider.java index 6022d249cc3d..43abe8fdaf58 100644 --- a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/api/application/DDProvider.java +++ b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/api/application/DDProvider.java @@ -56,7 +56,7 @@ public final class DDProvider { private static final String APP_13_DOCTYPE = "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"; //NOI18N private static final DDProvider ddProvider = new DDProvider(); - private final Map ddMap; + private final Map ddMap; private static final Logger LOGGER = Logger.getLogger(DDProvider.class.getName()); @@ -64,7 +64,7 @@ public final class DDProvider { private DDProvider() { //ddMap=new java.util.WeakHashMap(5); - ddMap = new HashMap(5); + ddMap = new HashMap<>(5); } /** diff --git a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/api/ejb/DDProvider.java b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/api/ejb/DDProvider.java index 675ed77a1d73..5038f722f954 100644 --- a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/api/ejb/DDProvider.java +++ b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/api/ejb/DDProvider.java @@ -58,13 +58,13 @@ public final class DDProvider { private static final String EJB_21_DOCTYPE = "http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd"; //NOI18N private static final DDProvider ddProvider = new DDProvider(); - private final Map ddMap; + private final Map ddMap; /** * Creates a new instance of DDProvider. */ private DDProvider() { - ddMap = new HashMap(5); + ddMap = new HashMap<>(5); } /** @@ -142,16 +142,7 @@ public EjbJar getDDRootCopy(FileObject fo) throws java.io.IOException { } private EjbJarProxy getFromCache (Object o) { - /* WeakReference wr = (WeakReference) ddMap.get(o); - if (wr == null) { - return null; - } - EjbJarProxy ejbJarProxy = (EjbJarProxy) wr.get (); - if (ejbJarProxy == null) { - ddMap.remove (o); - } - return ejbJarProxy;*/ - return (EjbJarProxy) ddMap.get(o); + return ddMap.get(o); } private void putToCache(Object o, EjbJarProxy ejbJarProxy) { diff --git a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/common/ComponentBeanMultiple.java b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/common/ComponentBeanMultiple.java index 701101958c8f..038f47c69049 100644 --- a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/common/ComponentBeanMultiple.java +++ b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/common/ComponentBeanMultiple.java @@ -25,6 +25,8 @@ package org.netbeans.modules.j2ee.dd.impl.common; import java.util.logging.Level; +import java.util.Map; +import java.util.HashMap; import java.util.logging.Logger; import org.netbeans.modules.schema2beans.Version; import org.netbeans.modules.j2ee.dd.api.common.IconInterface; @@ -85,13 +87,13 @@ public void setDisplayName(String displayName) { } } - public void setAllDisplayNames(java.util.Map displayNames) throws VersionNotSupportedException { + public void setAllDisplayNames(Map displayNames) throws VersionNotSupportedException { removeAllDisplayNames(); if (displayNames!=null) { java.util.Iterator entries = displayNames.entrySet().iterator(); int i=0; while (entries.hasNext()) { - java.util.Map.Entry entry = (java.util.Map.Entry) entries.next(); + Map.Entry entry = (Map.Entry) entries.next(); String key = (String) entry.getKey(); addDisplayName((String) entry.getValue()); setDisplayNameXmlLang(i++, key); @@ -113,8 +115,8 @@ public String getDefaultDisplayName() { return getDisplayName(null); } catch (VersionNotSupportedException ex){return null;} } - public java.util.Map getAllDisplayNames() { - java.util.Map map =new java.util.HashMap(); + public Map getAllDisplayNames() { + Map map =new HashMap<>(); for (int i=0;i map =new HashMap<>(); for (int i=0;i map = new HashMap<>(); for (int i=0;i getSunDatasourcesFromXml(){ - HashMap dSources = new HashMap(); + HashMap dSources = new HashMap<>(); Document domainDoc = getDomainDocument(); if (domainDoc != null) { HashMap dsMap = getDataSourcesAttrMap(domainDoc); @@ -526,7 +526,7 @@ private HashMap getPoolValues(HashMap cpMap, String poolName) { } public HashMap getConnPoolsFromXml(){ - HashMap pools = new HashMap(); + HashMap pools = new HashMap<>(); Document domainDoc = getDomainDocument(); if (domainDoc != null) { HashMap cpMap = getConnPoolsNodeMap(domainDoc); diff --git a/enterprise/weblogic.common/src/org/netbeans/modules/weblogic/common/RemoteLogInputReader.java b/enterprise/weblogic.common/src/org/netbeans/modules/weblogic/common/RemoteLogInputReader.java index 39b38b7219ec..2c1a740a59bc 100644 --- a/enterprise/weblogic.common/src/org/netbeans/modules/weblogic/common/RemoteLogInputReader.java +++ b/enterprise/weblogic.common/src/org/netbeans/modules/weblogic/common/RemoteLogInputReader.java @@ -278,13 +278,13 @@ private void setColumns(MBeanServerConnection connection, ObjectName wldf) throw return; } - Map columnIndexMap = (Map) connection.getAttribute(wldf, "ColumnIndexMap"); // NOI18N - recordIdIndex = ((Integer) columnIndexMap.get("RECORDID")); // NOI18N - timestampIndex = ((Integer) columnIndexMap.get("DATE")); // NOI18N - severityIndex = ((Integer) columnIndexMap.get("SEVERITY")); // NOI18N - subsystemIndex = ((Integer) columnIndexMap.get("SUBSYSTEM")); // NOI18N - messageIdIndex = ((Integer) columnIndexMap.get("MSGID")); // NOI18N - messageIndex = ((Integer) columnIndexMap.get("MESSAGE")); // NOI18N + Map columnIndexMap = (Map)connection.getAttribute(wldf, "ColumnIndexMap"); // NOI18N + recordIdIndex = columnIndexMap.get("RECORDID"); // NOI18N + timestampIndex = columnIndexMap.get("DATE"); // NOI18N + severityIndex = columnIndexMap.get("SEVERITY"); // NOI18N + subsystemIndex = columnIndexMap.get("SUBSYSTEM"); // NOI18N + messageIdIndex = columnIndexMap.get("MSGID"); // NOI18N + messageIndex = columnIndexMap.get("MESSAGE"); // NOI18N configured = true; } diff --git a/enterprise/websvc.rest/src/org/netbeans/modules/websvc/rest/support/SourceGroupSupport.java b/enterprise/websvc.rest/src/org/netbeans/modules/websvc/rest/support/SourceGroupSupport.java index b0ae68977dfa..41a9ad5bd9fd 100644 --- a/enterprise/websvc.rest/src/org/netbeans/modules/websvc/rest/support/SourceGroupSupport.java +++ b/enterprise/websvc.rest/src/org/netbeans/modules/websvc/rest/support/SourceGroupSupport.java @@ -167,11 +167,11 @@ public static FileObject getFolderForPackage(SourceGroup sourceGroup, String pgk } private static Map createFoldersToSourceGroupsMap(final SourceGroup[] sourceGroups) { - Map result; + Map result; if (sourceGroups.length == 0) { result = Collections.EMPTY_MAP; } else { - result = new HashMap(2 * sourceGroups.length, .5f); + result = new HashMap<>(2 * sourceGroups.length, .5f); for (int i = 0; i < sourceGroups.length; i++) { SourceGroup sourceGroup = sourceGroups[i]; result.put(sourceGroup.getRootFolder(), sourceGroup); diff --git a/ide/db/src/org/netbeans/modules/db/explorer/action/GrabTableHelper.java b/ide/db/src/org/netbeans/modules/db/explorer/action/GrabTableHelper.java index 23a8634c93cb..d167cd422e1d 100644 --- a/ide/db/src/org/netbeans/modules/db/explorer/action/GrabTableHelper.java +++ b/ide/db/src/org/netbeans/modules/db/explorer/action/GrabTableHelper.java @@ -131,10 +131,10 @@ private static void setPrimaryKeyColumns(List pks, */ private static void setColumnFormatToStandard(DatabaseConnector connector, AbstractTableColumn column) { - Map props = connector.getDatabaseSpecification().getProperties(); + Map props = connector.getDatabaseSpecification().getProperties(); Map cprops = connector.getDatabaseSpecification().getCommandProperties( Specification.CREATE_TABLE); - Map bindmap = (Map) cprops.get("Binding"); // NOI18N + Map bindmap = (Map) cprops.get("Binding"); // NOI18N String tname = (String) bindmap.get(TableColumn.COLUMN); column.setFormat((String) ((Map) props.get(tname)).get( "Format")); //NOI18N diff --git a/ide/parsing.indexing/src/org/netbeans/modules/parsing/impl/indexing/DefaultPathRecognizer.java b/ide/parsing.indexing/src/org/netbeans/modules/parsing/impl/indexing/DefaultPathRecognizer.java index 5e05405153d8..faf60206d3e8 100644 --- a/ide/parsing.indexing/src/org/netbeans/modules/parsing/impl/indexing/DefaultPathRecognizer.java +++ b/ide/parsing.indexing/src/org/netbeans/modules/parsing/impl/indexing/DefaultPathRecognizer.java @@ -114,8 +114,8 @@ private DefaultPathRecognizer(Set sourcePathIds, Set libraryPath this.mimeTypes = mimeTypes; } - private static Set readIdsAttribute(Map fileAttributes, String attributeName) { - Set ids = new HashSet(); + private static Set readIdsAttribute(Map fileAttributes, String attributeName) { + Set ids = new HashSet<>(); Object attributeValue = fileAttributes.get(attributeName); //NOI18N if (attributeValue instanceof String) { diff --git a/ide/spi.debugger.ui/src/org/netbeans/modules/debugger/ui/views/debugging/DebugTreeView.java b/ide/spi.debugger.ui/src/org/netbeans/modules/debugger/ui/views/debugging/DebugTreeView.java index 313764b0d638..f034f56e58da 100644 --- a/ide/spi.debugger.ui/src/org/netbeans/modules/debugger/ui/views/debugging/DebugTreeView.java +++ b/ide/spi.debugger.ui/src/org/netbeans/modules/debugger/ui/views/debugging/DebugTreeView.java @@ -165,7 +165,7 @@ private static void clearDrawingCache(JTree tree) { try { Field drawingCacheField = BasicTreeUI.class.getDeclaredField("drawingCache"); drawingCacheField.setAccessible(true); - Map table = (Map) drawingCacheField.get(tui); + Map table = (Map) drawingCacheField.get(tui); table.clear(); } catch (Exception ex) {} } diff --git a/ide/xml.core/src/org/netbeans/modules/xml/dtd/grammar/DTDGrammar.java b/ide/xml.core/src/org/netbeans/modules/xml/dtd/grammar/DTDGrammar.java index 44deecadc427..23191631cbb5 100644 --- a/ide/xml.core/src/org/netbeans/modules/xml/dtd/grammar/DTDGrammar.java +++ b/ide/xml.core/src/org/netbeans/modules/xml/dtd/grammar/DTDGrammar.java @@ -39,17 +39,17 @@ class DTDGrammar implements ExtendedGrammarQuery { // element name keyed - private Map elementDecls, attrDecls; + private Map elementDecls, attrDecls; // Map // this map is filled asynchronously as it takes some time private Map contentModels; // Map> - private Map attrEnumerations; + private Map attrEnumerations; // Map - private Map defaultAttributeValues; + private Map defaultAttributeValues; private Set entities, notations; diff --git a/ide/xml.tax/src/org/netbeans/modules/xml/tax/beans/editor/TreeNodeFilterCustomEditor.java b/ide/xml.tax/src/org/netbeans/modules/xml/tax/beans/editor/TreeNodeFilterCustomEditor.java index 37de698e8240..e278ad1fc9fb 100644 --- a/ide/xml.tax/src/org/netbeans/modules/xml/tax/beans/editor/TreeNodeFilterCustomEditor.java +++ b/ide/xml.tax/src/org/netbeans/modules/xml/tax/beans/editor/TreeNodeFilterCustomEditor.java @@ -593,7 +593,7 @@ private static void fillPublicNodeTypesInheritanceTree (Set layer, String */ private static class Item { /** */ - private static Map itemMap; + private static Map itemMap; /** */ private final NamedClass clazz; @@ -651,12 +651,12 @@ public boolean equals (Object obj) { */ private static Item getItem (Class clazz) { if ( itemMap == null ) { - itemMap = new HashMap(); + itemMap = new HashMap<>(); } - Item item = (Item) itemMap.get (clazz); + Item item = itemMap.get(clazz); if ( item == null ) { - itemMap.put (clazz, item = new Item (new NamedClass (clazz))); + itemMap.put(clazz, item = new Item (new NamedClass (clazz))); } return item; } diff --git a/ide/xsl/src/org/netbeans/modules/xsl/grammar/XSLGrammarQuery.java b/ide/xsl/src/org/netbeans/modules/xsl/grammar/XSLGrammarQuery.java index 428cb0ac109a..5657db3184a9 100644 --- a/ide/xsl/src/org/netbeans/modules/xsl/grammar/XSLGrammarQuery.java +++ b/ide/xsl/src/org/netbeans/modules/xsl/grammar/XSLGrammarQuery.java @@ -76,7 +76,7 @@ public final class XSLGrammarQuery implements GrammarQuery{ * should contain XPath expression. The element name keys should * not contain the namespace prefix. */ - private static Map exprAttributes; + private static Map exprAttributes; /** A set containing all functions allowed in XSLT */ private static Set xslFunctions; @@ -388,7 +388,7 @@ private static Set getXPathAxes() { private static Map getExprAttributes() { if (exprAttributes == null) { - exprAttributes = new HashMap(); + exprAttributes = new HashMap<>(); exprAttributes.put("key", "use"); // NOI18N exprAttributes.put("value-of", "select"); // NOI18N exprAttributes.put("copy-of", "select"); // NOI18N diff --git a/java/ant.debugger/src/org/netbeans/modules/ant/debugger/DebuggerAntLogger.java b/java/ant.debugger/src/org/netbeans/modules/ant/debugger/DebuggerAntLogger.java index d7f051b5a746..53a398d2cd0d 100644 --- a/java/ant.debugger/src/org/netbeans/modules/ant/debugger/DebuggerAntLogger.java +++ b/java/ant.debugger/src/org/netbeans/modules/ant/debugger/DebuggerAntLogger.java @@ -284,7 +284,7 @@ public int[] interestedInLogLevels (AntSession session) { private Map runningDebuggers2 = new HashMap<>(); private Set filesToDebug = new HashSet<>(); /** File => WeakReference -> ExecutorTask */ - private Map fileExecutors = new HashMap(); + private Map fileExecutors = new HashMap<>(); void debugFile (File f) { filesToDebug.add (f); diff --git a/java/ant.debugger/src/org/netbeans/modules/ant/debugger/breakpoints/BreakpointAnnotationListener.java b/java/ant.debugger/src/org/netbeans/modules/ant/debugger/breakpoints/BreakpointAnnotationListener.java index 2c5c8e7a46ba..35a35a7945db 100644 --- a/java/ant.debugger/src/org/netbeans/modules/ant/debugger/breakpoints/BreakpointAnnotationListener.java +++ b/java/ant.debugger/src/org/netbeans/modules/ant/debugger/breakpoints/BreakpointAnnotationListener.java @@ -40,9 +40,8 @@ public class BreakpointAnnotationListener extends DebuggerManagerAdapter implements PropertyChangeListener { - private Map breakpointToAnnotation = new HashMap (); - - + private Map breakpointToAnnotation = new HashMap<>(); + @Override public String[] getProperties () { return new String[] {DebuggerManager.PROP_BREAKPOINTS}; diff --git a/java/dbschema/src/org/netbeans/modules/dbschema/SchemaElement.java b/java/dbschema/src/org/netbeans/modules/dbschema/SchemaElement.java index 88d77fa0105b..4fc2eb903947 100644 --- a/java/dbschema/src/org/netbeans/modules/dbschema/SchemaElement.java +++ b/java/dbschema/src/org/netbeans/modules/dbschema/SchemaElement.java @@ -89,7 +89,7 @@ public void setVersionNo(int versionNo) { } /** Cache for read schemas. */ - protected static Map schemaCache = new HashMap(); + protected static Map schemaCache = new HashMap<>(); /** Last used schema. */ private static SchemaElement lastSchema; diff --git a/java/dbschema/src/org/netbeans/modules/dbschema/jdbcimpl/SchemaElementImpl.java b/java/dbschema/src/org/netbeans/modules/dbschema/jdbcimpl/SchemaElementImpl.java index 9e05dfe059f3..f7fe524540c8 100644 --- a/java/dbschema/src/org/netbeans/modules/dbschema/jdbcimpl/SchemaElementImpl.java +++ b/java/dbschema/src/org/netbeans/modules/dbschema/jdbcimpl/SchemaElementImpl.java @@ -343,17 +343,17 @@ private LinkedList checkReferences(LinkedList tables, DDLBridge bridge, String s rs = dmd.getImportedKeys(catalog, schema, tables.get(i).toString()); if (rs != null) { - Map rset = new HashMap(); + Map rset = new HashMap(); String c1, c2, s1, s2; while (rs.next()) { if (bridge != null) { rset = bridge.getDriverSpecification().getRow(); //test references between two schemas - c1 = (String) rset.get(new Integer(1)); - s1 = (String) rset.get(new Integer(2)); - c2 = (String) rset.get(new Integer(5)); - s2 = (String) rset.get(new Integer(6)); + c1 = rset.get(new Integer(1)); + s1 = rset.get(new Integer(2)); + c2 = rset.get(new Integer(5)); + s2 = rset.get(new Integer(6)); if (comp(c1, c2)) { if (! comp(s1, s2)) @@ -361,10 +361,10 @@ private LinkedList checkReferences(LinkedList tables, DDLBridge bridge, String s } else continue; - pkSchema = (String) rset.get(new Integer(2)); - fkSchema = (String) rset.get(new Integer(6)); + pkSchema = rset.get(new Integer(2)); + fkSchema = rset.get(new Integer(6)); if ((pkSchema == fkSchema) || (pkSchema.equals(fkSchema))) { - refTable = (String) rset.get(new Integer(3)); + refTable = rset.get(new Integer(3)); if (! tables.contains(refTable)) tables.add(refTable); } @@ -503,11 +503,11 @@ private void initViews(ConnectionProvider cp, LinkedList views, DDLBridge bridge if (rs != null) { if (! all) { String colName; - Map rset = new HashMap(); + Map rset = new HashMap<>(); while (rs.next()) { if (bridge != null) { rset = bridge.getDriverSpecification().getRow(); - colName = (String) rset.get(new Integer(4)); + colName = rset.get(new Integer(4)); rset.clear(); } else colName = rs.getString("COLUMN_NAME").trim(); //NOI18N @@ -582,7 +582,7 @@ private void initViews(ConnectionProvider cp, LinkedList views, DDLBridge bridge rs = cp.getDatabaseMetaData().getImportedKeys(cp.getConnection().getCatalog(), cp.getSchema(), tables.get(j).toString()); if (rs != null) { - Map rset = new HashMap(); + Map rset = new HashMap(); LinkedList local = new LinkedList(); LinkedList ref = new LinkedList(); LinkedList fk = new LinkedList(); @@ -592,10 +592,10 @@ private void initViews(ConnectionProvider cp, LinkedList views, DDLBridge bridge rset = bridge.getDriverSpecification().getRow(); //test references between two schemas - c1 = (String) rset.get(new Integer(1)); - s1 = (String) rset.get(new Integer(2)); - c2 = (String) rset.get(new Integer(5)); - s2 = (String) rset.get(new Integer(6)); + c1 = rset.get(new Integer(1)); + s1 = rset.get(new Integer(2)); + c2 = rset.get(new Integer(5)); + s2 = rset.get(new Integer(6)); if (comp(c1, c2)) { if (! comp(s1, s2)) @@ -603,7 +603,7 @@ private void initViews(ConnectionProvider cp, LinkedList views, DDLBridge bridge } else continue; - fkName = (String) rset.get(new Integer(12)); + fkName = rset.get(new Integer(12)); if (fkName == null) continue; else diff --git a/java/dbschema/src/org/netbeans/modules/dbschema/jdbcimpl/TableElementImpl.java b/java/dbschema/src/org/netbeans/modules/dbschema/jdbcimpl/TableElementImpl.java index 57d99d85d116..d4a7a93ed97d 100644 --- a/java/dbschema/src/org/netbeans/modules/dbschema/jdbcimpl/TableElementImpl.java +++ b/java/dbschema/src/org/netbeans/modules/dbschema/jdbcimpl/TableElementImpl.java @@ -170,7 +170,7 @@ protected void initColumns(ConnectionProvider cp) { String colName, colNull, colSize, colDec; String strAutoIncrement = null; if (rs != null) { - Map rset = new HashMap(); + Map rset = new HashMap<>(); while (rs.next()) { if (bridge != null) { rset = bridge.getDriverSpecification().getRow(); diff --git a/java/java.openjdk.project/src/org/netbeans/modules/java/openjdk/jtreg/JPDAStart.java b/java/java.openjdk.project/src/org/netbeans/modules/java/openjdk/jtreg/JPDAStart.java index 593572a24de7..3ec60529606d 100644 --- a/java/java.openjdk.project/src/org/netbeans/modules/java/openjdk/jtreg/JPDAStart.java +++ b/java/java.openjdk.project/src/org/netbeans/modules/java/openjdk/jtreg/JPDAStart.java @@ -121,7 +121,7 @@ public void run() { // TODO: revisit later when http://developer.java.sun.com/developer/bugParade/bugs/4932074.html gets integrated into JDK // This code parses the address string "HOST:PORT" to extract PORT and then point debugee to localhost:PORT // This is NOT a clean solution to the problem but it SHOULD work in 99% cases - final Map args = lc.defaultArguments(); + final Map args = lc.defaultArguments(); String address = lc.startListening(args); // try { int colon = address.indexOf(':'); diff --git a/java/websvc.saas.codegen.java/src/org/netbeans/modules/websvc/saas/codegen/java/support/SourceGroupSupport.java b/java/websvc.saas.codegen.java/src/org/netbeans/modules/websvc/saas/codegen/java/support/SourceGroupSupport.java index cd3dc0b9348b..6dbb17fc4668 100644 --- a/java/websvc.saas.codegen.java/src/org/netbeans/modules/websvc/saas/codegen/java/support/SourceGroupSupport.java +++ b/java/websvc.saas.codegen.java/src/org/netbeans/modules/websvc/saas/codegen/java/support/SourceGroupSupport.java @@ -158,7 +158,7 @@ public static FileObject getFolderForPackage(SourceGroup sourceGroup, String pgk return null; } - private static Map createFoldersToSourceGroupsMap(final SourceGroup[] sourceGroups) { + private static Map createFoldersToSourceGroupsMap(final SourceGroup[] sourceGroups) { Map result; if (sourceGroups.length == 0) { result = Collections.emptyMap(); @@ -173,7 +173,7 @@ private static Map createFoldersToSourceGroupsMap(final SourceGroup[] sourceGrou } private static Set getTestSourceGroups(SourceGroup[] sourceGroups) { - Map foldersToSourceGroupsMap = createFoldersToSourceGroupsMap(sourceGroups); + Map foldersToSourceGroupsMap = createFoldersToSourceGroupsMap(sourceGroups); Set testGroups = new HashSet<>(); for (int i = 0; i < sourceGroups.length; i++) { testGroups.addAll(getTestTargets(sourceGroups[i], foldersToSourceGroupsMap)); diff --git a/platform/api.templates/src/org/netbeans/api/templates/CreateFromTemplateImpl.java b/platform/api.templates/src/org/netbeans/api/templates/CreateFromTemplateImpl.java index 76d715b486b3..0273291adbe7 100644 --- a/platform/api.templates/src/org/netbeans/api/templates/CreateFromTemplateImpl.java +++ b/platform/api.templates/src/org/netbeans/api/templates/CreateFromTemplateImpl.java @@ -236,7 +236,7 @@ private FileObject defaultCreate() throws IOException { if (defaultMode != FileBuilder.Mode.COPY && frm instanceof MapFormat) { MapFormat mf = (MapFormat)frm; - Map m = mf.getMap(); + Map m = mf.getMap(); Map x = null; for (String s: params.keySet()) { if (m.containsKey(s)) { diff --git a/platform/core.netigso/nbproject/project.properties b/platform/core.netigso/nbproject/project.properties index f00a0003a627..2356036b3c93 100644 --- a/platform/core.netigso/nbproject/project.properties +++ b/platform/core.netigso/nbproject/project.properties @@ -16,7 +16,7 @@ # under the License. is.autoload=true -javac.source=1.6 +javac.source=1.8 javac.compilerargs=-Xlint -Xlint:-serial javadoc.arch=${basedir}/arch.xml javadoc.apichanges=${basedir}/apichanges.xml diff --git a/platform/openide.filesystems/src/org/openide/filesystems/XMLMapAttr.java b/platform/openide.filesystems/src/org/openide/filesystems/XMLMapAttr.java index 6f0a7040b882..f9d4222a379e 100644 --- a/platform/openide.filesystems/src/org/openide/filesystems/XMLMapAttr.java +++ b/platform/openide.filesystems/src/org/openide/filesystems/XMLMapAttr.java @@ -109,11 +109,11 @@ */ @SuppressWarnings("unchecked") final class XMLMapAttr implements Map { - Map/**/ map; + Map map; /** Creates new XMLMapAttr and delegetaor is instanced */ public XMLMapAttr() { - this.map = new HashMap(5); + this.map = new HashMap<>(5); } static Attr createAttributeAndDecode(String key, String value) { @@ -262,11 +262,11 @@ synchronized Object put(final Object p1, final Object p2, boolean decode) { Object[] keyValuePair = ModifiedAttribute.translateInto((String) p1, p2); String key = (String) keyValuePair[0]; Object value = keyValuePair[1]; - Object toStore; + Attr toStore; if (value == null) { toStore = null; } else if (value instanceof Attr) { - toStore = value; + toStore = (Attr)value; } else if (value instanceof Method && key.startsWith("methodvalue:")) { // NOI18N Method m = (Method)value; key = key.substring("methodvalue:".length()); // NOI18N