mbien commented on code in PR #7062:
URL: https://github.com/apache/netbeans/pull/7062#discussion_r1486953508
##########
platform/core.netigso/src/org/netbeans/core/netigso/Netigso.java:
##########
@@ -118,7 +118,7 @@ protected void prepare(Lookup lkp, Collection<? extends
Module> preregister) {
if (framework == null) {
readBundles();
- Map configMap = new HashMap();
+ Map configMap = new HashMap<>();
Review Comment:
left side has no generics. Diamonds tell the compiler to to copy the
generics to the right side of the declaration. I don't think t his does
anything here.
##########
java/ant.debugger/src/org/netbeans/modules/ant/debugger/AntDebugger.java:
##########
@@ -589,7 +589,7 @@ private boolean ignoreFrame() {
return false;
}
- private Map watches = new HashMap ();
+ private Map watches = new HashMap<>();
Review Comment:
remove diamond or add generics
##########
java/java.file.launcher/src/org/netbeans/modules/java/file/launcher/actions/JPDAStart.java:
##########
@@ -107,7 +107,7 @@ public void run() {
}
SingleSourceFileUtil.LOG.log(Level.INFO, "Debug Port:{0}",
lock[0]); //NOI18N
- final Map properties = new HashMap();
+ final Map properties = new HashMap<>();
Review Comment:
remove diamond or add generics
##########
platform/openide.filesystems/src/org/openide/filesystems/DefaultAttributes.java:
##########
@@ -905,8 +905,7 @@ private ElementHandler parseFirstLevel() {
private final String[] ELM_KEYS = { "ATTRIBUTES" }; //
NOI18N
private final String[] MANDAT_ATTR_KEYS = { "VERSION" };
// NOI18N
- @Override
- public void internalStartElement(String elemName, HashMap
mapMandatory, HashMap mapAllowed)
+ public void internalStartElement(String elemName, Map
mapMandatory, Map mapAllowed)
Review Comment:
having to remove `@Override` is a red flag. This doesn't override the method
anymore - i suppose due to signature change?.
##########
java/java.openjdk.project/src/org/netbeans/modules/java/openjdk/jtreg/JPDAStart.java:
##########
@@ -164,7 +164,7 @@ public void run() {
// list);
// }
- final Map properties = new HashMap();
+ final Map properties = new HashMap<>();
Review Comment:
remove diamond or add generics
##########
groovy/groovy.support/src/org/netbeans/modules/groovy/support/actions/singlefilerun/JPDAStart.java:
##########
@@ -105,7 +105,7 @@ public void run() {
}
LOG.log(Level.INFO, "Debug Port:{0}", lock[0]); //NOI18N
- final Map properties = new HashMap();
+ final Map properties = new HashMap<>();
Review Comment:
remove diamond or add generics
##########
webcommon/extbrowser.chrome/src/org/netbeans/modules/extbrowser/plugins/ExternalBrowserPlugin.java:
##########
@@ -349,7 +349,7 @@ private void handleInit( Message message , SelectionKey key
){
tab.registerKeyForFeature(FEATURE_ROS, key);
browserImpl.setBrowserTabDescriptor(tab);
knownBrowserTabs.add(tab);
- Map map = new HashMap();
+ Map map = new HashMap<>();
Review Comment:
remove diamond or add generics
##########
webcommon/extbrowser.chrome/src/org/netbeans/modules/extbrowser/plugins/ExternalBrowserPlugin.java:
##########
@@ -338,7 +338,7 @@ private void handleInit( Message message , SelectionKey key
){
}
ChromeBrowserImpl browserImpl = p != null ? p.impl : null;
if (browserImpl == null) {
- Map map = new HashMap();
+ Map map = new HashMap<>();
Review Comment:
remove diamond or add generics
##########
webcommon/extbrowser.chrome/src/org/netbeans/modules/extbrowser/plugins/ExternalBrowserPlugin.java:
##########
@@ -620,7 +620,7 @@ public void run() {
}
private String createReloadMessage(int tabId, URL newURL) {
- Map params = new HashMap();
+ Map params = new HashMap<>();
Review Comment:
remove diamond or add generics
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists