BradWalker commented on code in PR #6112:
URL: https://github.com/apache/netbeans/pull/6112#discussion_r4636102124


##########
enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/DomainEditor.java:
##########
@@ -465,12 +465,12 @@ private String formatJvmOption(String jvmOption) {
     static final String[] sysDatasources = {"jdbc/__TimerPool", 
"jdbc/__CallFlowPool"}; //NOI18N
     
 
-    public HashMap<String,Map> getSunDatasourcesFromXml(){
-        HashMap<String, Map> dSources = new HashMap<>();
+    public HashMap<String, Map<String, String>> getSunDatasourcesFromXml(){
+        HashMap<String, Map<String, String>> dSources = new HashMap<>();
         Document domainDoc = getDomainDocument();
         if (domainDoc != null) {
             Map<String,NamedNodeMap> dsMap = getDataSourcesAttrMap(domainDoc);
-            HashMap<String,Node> cpMap = getConnPoolsNodeMap(domainDoc);
+            Map<String,Node> cpMap = getConnPoolsNodeMap(domainDoc);

Review Comment:
   It's never a good thing to use an implementation for a variable declaration. 
Effective Java,  (3rd Edition, Item 64), Joshua Bloch states the core rule: 
"refer to objects by their interfaces rather than their implementation classes 
whenever an appropriate interface exists."



-- 
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

Reply via email to