luvunix commented on issue #6822: URL: https://github.com/apache/netbeans/issues/6822#issuecomment-1849032480
First, my apologies on how ugly the code is. I did not realize how much I depended on syntax highlighting. I cleaned the code up and then started playing around with it, seeing if I could find a way to trigger the error intentionally, and I did. What I found is that I can use the generic to declare the Collection and to get and set the collection. But the moment I change the parameter in the `addEntry()`, `doesEntryExist()`, and `removeEntry()` methods from a concrete class to the generic, the exception gets triggered and I lose syntax highlighting and Javadoc access. For example, the following declaration will not trigger the exception (although it does create an error in the method) : `public boolean addEntry( String entry ) throws IllegalArgumentException` Changing the declaration to the following then triggers the exception immediately: `public boolean addEntry( <?> entry ) throws IllegalArgumentException` Messages log and code attached. Thanks again for your help. [messages.log](https://github.com/apache/netbeans/files/13628696/messages.log) [CollectionsCache.zip](https://github.com/apache/netbeans/files/13628697/CollectionsCache.zip) -- 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
