[jbosstools-issues] [JBoss JIRA] (JBIDE-16328) Buglets in JaxrsResourceMethodValidatorDelegate.validatePublicModifierOnJavaMethod()

Xavier Coulon (JIRA) issues at jboss.org
Fri Jan 31 10:09:29 EST 2014


    [ https://issues.jboss.org/browse/JBIDE-16328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12940499#comment-12940499 ] 

Xavier Coulon commented on JBIDE-16328:
---------------------------------------

Thomas,

Thanks for reporting this issue and sorry if I missed it before.
The Pull Request I attached avoids the validation message on interfaces. It also fixes the missing '{0}' parameter substitution in the message.

Don't hesitate to report any other issue/feature request you have (I'll make sure I won't miss them next time)
                
> Buglets in JaxrsResourceMethodValidatorDelegate.validatePublicModifierOnJavaMethod()
> ------------------------------------------------------------------------------------
>
>                 Key: JBIDE-16328
>                 URL: https://issues.jboss.org/browse/JBIDE-16328
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: webservices
>    Affects Versions: 4.1.1.Final
>         Environment: Eclipse 4.3.1 EE bundle + JBoss Tools 4.1.1
>            Reporter: Thomas Maslen
>            Assignee: Fred Bricon
>            Priority: Minor
>             Fix For: 4.2.0.Alpha2
>
>
> JAX-RS resource methods are often declared in classes, but it is also valid to declare them in interfaces.  Methods in classes have to be explicitly declared public (and that's what this validator method checks for -- good), but methods in Java interfaces are implicitly public;  explicitly writing "public" just adds clutter.
> The JAX-RS validator does discover resource methods in interfaces and validates them (good), but if the methods aren't explicitly labelled public then a couple of minor bugs surface in this validator method:
> (1) It adds a RESOURCE_METHOD_NO_PUBLIC_MODIFIER problem marker, and
> (2) The Description that's displayed for the marker is "The method '{0}' should be public.", i.e. the "{0}" isn't replaced with a method name
> (Yes, I can certainly dodge this by changing the "Missing 'public' method modifier" preference from Warning to Ignore, but I'm definitely a fan of having the validators there to save me from myself).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jbosstools-issues mailing list