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


##########
enterprise/glassfish.tooling/src/org/netbeans/modules/glassfish/tooling/admin/Runner.java:
##########
@@ -294,7 +294,7 @@ static boolean toBoolean(final String constant) throws 
CommandException {
      * is responsible for correct <code>TaskState</code> and receiveResult 
value
      * handling.
      */
-    Result result;
+    Result<?> result;

Review Comment:
   Beware! This is not a `org.openide.util.Lookup.Result` but a 
`org.netbeans.modules.glassfish.tooling.admin.Result`.
   
   Looking at the usage, I see, that some of the overrides already have generic 
definitions and this touches an API. I think this would be better implemented 
by a generic type declared at class level and then used here and the users of 
`result`. In turn 
`org.netbeans.modules.glassfish.tooling.admin.Runner.StateChange` should also 
become generic (take a typed `Runner` and return a typed `Result`.
   
   This looks like a larger task and is not trivial cleanup.



##########
platform/openide.loaders/src/org/openide/loaders/InstanceDataObject.java:
##########
@@ -671,8 +671,8 @@ public Lookup getLookup() {
         }
     }
 
-    private Lookup.Result cookieResult = null;
-    private Lookup.Result nodeResult = null;
+    private Lookup.Result<?> cookieResult = null;
+    private Lookup.Result<?> nodeResult = null;

Review Comment:
   ```suggestion
       private Lookup.Result<InstanceCookie> nodeResult = null;
   ```



##########
enterprise/payara.tooling/src/org/netbeans/modules/payara/tooling/admin/Runner.java:
##########
@@ -294,7 +294,7 @@ static boolean toBoolean(final String constant) throws 
CommandException {
      * is responsible for correct <code>TaskState</code> and receiveResult 
value
      * handling.
      */
-    Result result;
+    Result<?> result;

Review Comment:
   Same discussion as in the `glassfish.tooling` variant.



##########
enterprise/websvc.clientapi/src/org/netbeans/modules/websvc/api/client/WebServicesClientSupport.java:
##########
@@ -56,7 +56,7 @@ public final class WebServicesClientSupport {
     public static final String WSCLIENTUPTODATE_CLASSPATH = 
"wsclientuptodate.classpath";
 
     private WebServicesClientSupportImpl impl;
-    private static final Lookup.Result implementations =
+    private static final Lookup.Result<?> implementations =

Review Comment:
   ```suggestion
       private static final Lookup.Result<WebServicesClientSupportProvider> 
implementations =
   ```



##########
ide/editor.fold.nbui/src/org/netbeans/modules/editor/fold/ui/FoldViewFactory.java:
##########
@@ -104,7 +104,7 @@ public static void register() {
     /**
      * Lookup results for color settings, being listened for changes.
      */
-    private Lookup.Result       colorSource;
+    private Lookup.Result<?>    colorSource;

Review Comment:
   ```suggestion
       private Lookup.Result<FontColorSettings>    colorSource;
   ```



##########
enterprise/websvc.clientapi/src/org/netbeans/modules/websvc/api/jaxws/client/JAXWSClientSupport.java:
##########
@@ -44,7 +44,7 @@
 public final class JAXWSClientSupport {
     
     private JAXWSClientSupportImpl impl;
-    private static final Lookup.Result implementations =
+    private static final Lookup.Result<?> implementations =

Review Comment:
   ```suggestion
       private static final Lookup.Result<WebServicesClientSupportProvider> 
implementations =
   ```



##########
platform/openide.loaders/src/org/openide/loaders/InstanceDataObject.java:
##########
@@ -671,8 +671,8 @@ public Lookup getLookup() {
         }
     }
 
-    private Lookup.Result cookieResult = null;
-    private Lookup.Result nodeResult = null;
+    private Lookup.Result<?> cookieResult = null;

Review Comment:
   ```suggestion
       private Lookup.Result<Node.Cookie> cookieResult = null;
   ```



##########
enterprise/websvc.clientapi/src/org/netbeans/modules/websvc/api/client/WebServicesClientView.java:
##########
@@ -41,7 +41,7 @@
 public final class WebServicesClientView {
 
        private WebServicesClientViewImpl impl;
-       private static final Lookup.Result implementations =
+       private static final Lookup.Result<?> implementations =

Review Comment:
   ```suggestion
        private static final Lookup.Result<WebServicesClientViewProvider> 
implementations =
   ```



##########
enterprise/websvc.clientapi/src/org/netbeans/modules/websvc/api/jaxws/client/JAXWSClientView.java:
##########
@@ -39,7 +39,7 @@
 public final class JAXWSClientView {
 
        private JAXWSClientViewImpl impl;
-       private static final Lookup.Result implementations =
+       private static final Lookup.Result<?> implementations =

Review Comment:
   ```suggestion
        private static final Lookup.Result<JAXWSClientViewProvider> 
implementations =
   ```



##########
ide/xml.core/src/org/netbeans/modules/xml/api/model/GrammarQueryManager.java:
##########
@@ -108,7 +108,7 @@ private static class DefaultQueryManager extends 
GrammarQueryManager {
 
         private static final String FOLDER = 
"Plugins/XML/GrammarQueryManagers";// NOI18N
         
-        private Lookup.Result registrations;
+        private Lookup.Result<?> registrations;

Review Comment:
   ```suggestion
           private Lookup.Result<GrammarQueryManager> registrations;
   ```
   
   After this the `Iterator` returned by `getRegistrations` can get a sane 
generic signature and then the usesite needs to be updated (in `enabled`).



##########
platform/openide.loaders/src/org/openide/loaders/XMLDataObjectInfoParser.java:
##########
@@ -95,7 +95,7 @@ private static class StopSaxException extends SAXException {
     private Reference<XMLDataObject> xml;
     private String parsedId;
     private Lookup lookup;
-    private Lookup.Result result;
+    private Lookup.Result<?> result;

Review Comment:
   ```suggestion
       private Lookup.Result<Node.Cookie> result;
   ```



##########
platform/openide.loaders/src/org/openide/loaders/XMLDataObjectInfoParser.java:
##########
@@ -327,7 +327,7 @@ private Lookup updateLookup(XMLDataObject realXML, String 
previousID, String id)
             }
         }
         synchronized (this) {
-            Lookup.Result prevRes = result;
+            Lookup.Result<?> prevRes = result;

Review Comment:
   ```suggestion
               Lookup.Result<Node.Cookie> prevRes = result;
   ```



##########
platform/openide.loaders/src/org/openide/loaders/XMLDataObjectInfoParser.java:
##########
@@ -151,7 +151,7 @@ public Object lookupCookie(final Class<?> clazz) {
                     break;
                 }
             }
-            Lookup.Result r = result;
+            Lookup.Result<?> r = result;

Review Comment:
   ```suggestion
               Lookup.Result<Node.Cookie> r = result;
   ```



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