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


##########
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 Map<String, Map<String, String>> getSunDatasourcesFromXml(){
+        Map<String, Map<String, String>> dSources = new HashMap<>();

Review Comment:
   I noticed this in the past and think it is not a good idea to mix fixing 
rawtype warnings and changing declared types. If I declare a variable for 
example to be a `TreeMap` I imply, that I expect it to have a certain behavior, 
which might not be satisfied by any other map implemenation.



##########
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 Map<String, Map<String, String>> getSunDatasourcesFromXml(){

Review Comment:
   Changing the return type is only an API compatible change if it is a 
covariant return. In this case though there is no super type that declares a 
`Map` return and thus this must not be changed.



##########
enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/DomainEditor.java:
##########
@@ -532,8 +532,8 @@ private Map<String,String> getPoolValues(Map<String, Node> 
cpMap, String poolNam
         return pValues;
     }
 
-    public HashMap<String,Map> getConnPoolsFromXml(){
-        HashMap<String, Map> pools = new HashMap<>();
+    public Map<String, Map<String, String>> getConnPoolsFromXml(){

Review Comment:
   API check caught this.



##########
ide/db/libsrc/org/netbeans/lib/ddl/impl/Specification.java:
##########
@@ -76,13 +76,13 @@ public class Specification implements DatabaseSpecification 
{
     public static final String DEFAULT_SCHEMA = "SetDefaultSchemaCommand";
 
     /** Constructor */
-    public Specification(HashMap description)
+    public Specification(Map description)

Review Comment:
   To my knowledge this is not a binary compatible change. I suspect the 
library is not API checked, it should be compatible still.



##########
enterprise/payara.micro/src/org/netbeans/modules/fish/payara/micro/project/DeployOnSaveManager.java:
##########
@@ -574,7 +574,7 @@ private void createOrReplace(
                 FileObject targetFO,
                 FileObject destRoot,
                 String relativePath,
-                Map destMap, boolean checkTimeStamps) throws IOException {
+                Map<String, FileObject> destMap, boolean checkTimeStamps) 
throws IOException {

Review Comment:
   The parameter placement looks strange.
   
   ```suggestion
                   Map<String, FileObject> destMap,
                   boolean checkTimeStamps
           ) throws IOException {
   ```



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