You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "matthiasblaesing (via GitHub)" <gi...@apache.org> on 2025/07/27 09:44:13 UTC

Re: [PR] prevent NPE, check return value before use [netbeans]

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


##########
ide/web.webkit.debugging/src/org/netbeans/modules/web/webkit/debugging/api/Runtime.java:
##########
@@ -74,7 +74,7 @@ public List<PropertyDescriptor> getRemoteObjectProperties(RemoteObject remoteObj
             return Collections.emptyList();
         }
         JSONArray array = (JSONArray)result.get("result"); // NOI18N
-        for (Object o : array) {
+        if ( array != null ) for (Object o : array) {

Review Comment:
   Please follow the style of the rest of the code and make this a full if-block.



-- 
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-unsubscribe@netbeans.apache.org

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


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

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