[jboss-jira] [JBoss JIRA] (LOGTOOL-64) MessageMethod does not have an usable constructor for the return type if msg is not first parameter

James Perkins (JIRA) jira-events at lists.jboss.org
Wed Apr 10 16:58:55 EDT 2013


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

James Perkins commented on LOGTOOL-64:
--------------------------------------

Could you try this with 1.1.0.Final? I can't seem to duplicate the error with it.
                
> MessageMethod does not have an usable constructor for the return type if msg is not first parameter
> ---------------------------------------------------------------------------------------------------
>
>                 Key: LOGTOOL-64
>                 URL: https://issues.jboss.org/browse/LOGTOOL-64
>             Project: Log Tool
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 1.1.0.Final
>            Reporter: Norman Maurer
>            Assignee: James Perkins
>
> If you try to to define a Exception that has the msg as second argument it will fail with:
> java: MessageMethod does not have an usable constructor for the return type javax.websocket.EncodeException.
> The EncodeException has the signature:
> EncodeException(Object obj, String msg)
> So I tried to define it as:
> @Message(id = 3008, value="No suitable encoder found")
> EncodeException noSuitableEncoder(@Param Object obj);

--
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 jboss-jira mailing list