srdo commented on a change in pull request #1069: NETBEANS-1744: Support
Run/Debug Focused Test Method for @Nested JUni…
URL:
https://github.com/apache/incubator-netbeans/pull/1069#discussion_r251234136
##########
File path: ide/projectapi/src/org/netbeans/spi/project/SingleMethod.java
##########
@@ -64,6 +81,15 @@ public FileObject getFile() {
return file;
}
+ /**
+ * Returns the binary class name of the class containing the method.
+
+ * @return Class name held by this object
+ */
+ public Optional<String> getBinaryClassName() {
Review comment:
Plain nullable `String` makes it more likely that users of this method will
forget to null check the return value. Using `Optional` means that users don't
have to read and remember the Javadoc (or code) of each method, in order to
tell whether they need to null check.
I would prefer not to change it, but if you feel strongly that `Optional` is
not useful, I will change this to plain `String`.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
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