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


##########
profiler/profiler.oql/src/org/netbeans/modules/profiler/oql/engine/api/impl/Snapshot.java:
##########
@@ -166,7 +166,7 @@ public Iterator getClasses() {
         return delegate.getAllClasses().iterator();
     }
 
-    public Iterator getClassNames(String regex)  {
+    public Iterator<JavaClass> getClassNames(String regex)  {

Review Comment:
   This is wrong! The iterator defined in line 170 maps the `JavaClass` to its 
name (see the implementation of `next`) so the Iterator should be 
`Iterator<String>` and the implementation should be `String next()`. That then 
correctly lets the compiler tell you something is fishy.



##########
enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/RunTimeDDCatalog.java:
##########
@@ -239,7 +239,7 @@ public static synchronized RunTimeDDCatalog 
getEE6RunTimeDDCatalog(){
      * @return null if cannot proceed, try later.
      */
     @Override
-    public Iterator getPublicIDs() {
+    public Iterator<String> getPublicIDs() {

Review Comment:
   Wouldn't it make sense to also fix the interface `CatalogReader` that is 
implemented here? The documentation indicates, that this is right, but I would 
make it explicit in the code:
   
   > Get String iterator representing all public IDs registered in catalog
   
   This affects all `CatalogReader` implementations.



##########
java/dbschema/src/org/netbeans/modules/dbschema/jdbcimpl/IndexElementImpl.java:
##########
@@ -95,7 +95,7 @@ public ColumnElement getColumn(DBIdentifier name) {
                return (ColumnElement) columns.find(name);
     }
   
-    protected void initColumns(LinkedList idxs) {
+    protected void initColumns(List idxs) {

Review Comment:
   This is an incompatible change. I don't see enough value to risk breakage 
(this is friendonly, but changing this is not friendly).



##########
enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/ejb/DDChangesPanel.java:
##########
@@ -101,12 +101,12 @@ public java.awt.Dimension getPreferredSize () {
         return new java.awt.Dimension(600, 400);
     }
     
-    public synchronized void setChanges (List changes) {
-        listModel.clear ();
+    public synchronized void setChanges (List<DefaultListModel> changes) {

Review Comment:
   This method exists more or less identically also in:
   - `org.netbeans.modules.j2ee.ddloaders.web.DDChangesPanel`
   - `org.netbeans.modules.j2ee.ddloaders.client.DDChangesPanel`
   - `org.netbeans.modules.j2ee.ddloaders.app.DDChangesPanel`
   should these not be updated?



##########
enterprise/websvc.jaxwsmodel/src/org/netbeans/modules/websvc/api/jaxws/wsdlmodel/java/WsdlJavaMethod.java:
##########
@@ -76,15 +76,15 @@ public JavaParameter getParameter(String paramName) {
 
     public List<JavaParameter> getParametersList() {
         if(this.parameters == null) {
-            this.parameters = new ArrayList<JavaParameter>();
+            this.parameters = new ArrayList<>();
             for(com.sun.tools.ws.processor.model.java.JavaParameter 
p:this.method.getParametersList()) {
                 this.parameters.add(new WsdlJavaParameter(p));
             }
         }
         return this.parameters;
     }
 
-    public Iterator getExceptions() {
+    public Iterator<String> getExceptions() {

Review Comment:
   Would it make sense to update the return value of the interface (module 
`websvc.jaxwsmodelapi`)?



-- 
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: notifications-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to