You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2020/11/03 13:59:07 UTC

[GitHub] [netbeans] jlahoda commented on pull request #2513: ioContainer in IOProvider.getIO(...) is allowed to be null.

jlahoda commented on pull request #2513:
URL: https://github.com/apache/netbeans/pull/2513#issuecomment-720270848


   > I am not sure I understand the wording: Is "IOContainer allowed to be null" or not? I don't see any comment [about null being allowed](https://bits.netbeans.org/12.0/javadoc/org-openide-io/org/openide/windows/IOProvider.html#getIO-java.lang.String-boolean-javax.swing.Action:A-org.openide.windows.IOContainer-) in the Javadoc of the method. That doesn't mean much, but...
   
   There is: `@NullAllowed IOContainer ioContainer` in the javadoc. `@NullAllowed` means null is allowed, right?
   
   > 
   > I assume the observation comes from a `NullPointerException` failure. Maybe sharing a stacktrace would say more than thousand of words.
   > 
   > As noted inline: Isn't there a change in semantics?
   
   Yes. Because the existing semantics is quite likely wrong. Look at the method variant that does not take IOContainer - it does: `Lookups.fixed((Object[]) actions)`. So each individual Action will be in the Lookup. Now, if I provide an IOContainer, suddenly the array of actions becomes a Lookup element on its own. That sounds unlikely to be the intent, but I admit it might be correct  - where is the expected Lookup content documented?
   


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

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