Maurits de Jong created NETBEANS-1615:
-----------------------------------------

             Summary: Code hint "Add @throws tag" for generic exception in Java 
shows up even if already present
                 Key: NETBEANS-1615
                 URL: https://issues.apache.org/jira/browse/NETBEANS-1615
             Project: NetBeans
          Issue Type: Bug
          Components: editor - Hints & Annotations, java - Hints, java - 
Javadoc
         Environment: Windows 10 version 10.0 running on amd64; Cp1252; nl_NL 
(nb)
            Reporter: Maurits de Jong


The code hint "Add @throws tag" for a generic exception shows up, even if I 
already added the tag.
 The following code reproduces the problem:
{code:java}
/**
 * Some method.
 *
 * @param <X>
 * @throws X Some throwable.
 */
public static <X extends Exception> void someMethod() throws X { }{code}
The hint appears at the line with the method declaration. The JavaDoc `throws` 
tag is already defined, and yet the hint appears or doesn't go away. If I click 
on the hint entry in order to apply it, another `throws` tag isĀ inserted, 
leaving the following code:

{code:java}
/**
 * Some method.
 *
 * @param <X>
 * @throws X
 * @throws X Some throwable.
 */
public static <X extends Exception> void someMethod() throws X { }{code}

Still, the hint is visible.

Obviously, the expected behaviour is that the hint is not visible if the 
`throws` tag exists for this particular generic exception type.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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