homberghp commented on issue #8594:
URL: https://github.com/apache/netbeans/issues/8594#issuecomment-2985512261

   @jlahoda In 
`javahints/org.netbeans.modules.java.hints.errors.CreateMethodFix` one could 
test for the return type to be none and change the hint message appropriately 
or otherwise higher up in the call tree, produce a different hint.
   
   Or maybe add an extra hint (if it does not already exist) to supply an 
explicit type, asking the user for the type.
   
   
https://github.com/apache/netbeans/blob/256edf4e977f03a02c7c8b78a3db8311779ac911/java/java.hints/src/org/netbeans/modules/java/hints/errors/CreateMethodFix.java#L115-L121
   
   In line line 116-120 tests for return type to be null (for void methods and 
constructors?)  or not null exist.
   A test for returnType == TypeKind.NONE can prevent the error, but may not 
provide the best user experience.
   
   One could consider this case to be a user error to be flagged as such, 
avoiding further changes in the hint system.
   The error could say something like *var types and unknown methods cannot be 
combined.* but I have no idea if a hint could be turned into such an error.
   
   With some guidance, I would be willing to work on a solution.


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