You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wink.apache.org by "Jesse Ramos (JIRA)" <ji...@apache.org> on 2009/07/03 01:15:47 UTC

[jira] Created: (WINK-38) @Encoded parameter ignored on method

@Encoded parameter ignored on method
------------------------------------

                 Key: WINK-38
                 URL: https://issues.apache.org/jira/browse/WINK-38
             Project: Wink
          Issue Type: Bug
          Components: Common
    Affects Versions: 0.1
            Reporter: Jesse Ramos
            Priority: Minor


The @Encoded method is not honored when used on a method.

Ex:
    @GET
    @Encoded
    @Path("method/city")
    public String getShopInCityMethod(@QueryParam("location") String location)

In this case, the query parameter is not encoded.  According to the JSR 311 javadoc, annotating a method with this should disable automatic decoding for all parameters.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WINK-38) @Encoded parameter ignored on method

Posted by "Jesse Ramos (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WINK-38?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jesse Ramos updated WINK-38:
----------------------------

    Attachment: WINK-38-patch.txt

Here's one possible fix.  This resolves the issue but I'm not sure that it's the "best" solution.  In the InjectableFactory.create() method I added a check to see if the Member parameter is a Method.  If so, I then see if it has the @Encoded annotation.

Another solution might be to store the fact that the method has the annotation in one of the metadata classes, although I'm not familiar enough with the implementation at this point to know where that should be stored.

> @Encoded parameter ignored on method
> ------------------------------------
>
>                 Key: WINK-38
>                 URL: https://issues.apache.org/jira/browse/WINK-38
>             Project: Wink
>          Issue Type: Bug
>          Components: Common
>    Affects Versions: 0.1
>            Reporter: Jesse Ramos
>            Priority: Minor
>         Attachments: WINK-38-patch.txt
>
>
> The @Encoded method is not honored when used on a method.
> Ex:
>     @GET
>     @Encoded
>     @Path("method/city")
>     public String getShopInCityMethod(@QueryParam("location") String location)
> In this case, the query parameter is not encoded.  According to the JSR 311 javadoc, annotating a method with this should disable automatic decoding for all parameters.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (WINK-38) @Encoded parameter ignored on method

Posted by "Michael Elman (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WINK-38?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Elman resolved WINK-38.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 0.1
         Assignee:     (was: Michael Elman)

Should be fixed after  	#791386.

> @Encoded parameter ignored on method
> ------------------------------------
>
>                 Key: WINK-38
>                 URL: https://issues.apache.org/jira/browse/WINK-38
>             Project: Wink
>          Issue Type: Bug
>          Components: Common
>    Affects Versions: 0.1
>            Reporter: Jesse Ramos
>            Priority: Minor
>             Fix For: 0.1
>
>         Attachments: WINK-38-patch.txt
>
>
> The @Encoded method is not honored when used on a method.
> Ex:
>     @GET
>     @Encoded
>     @Path("method/city")
>     public String getShopInCityMethod(@QueryParam("location") String location)
> In this case, the query parameter is not encoded.  According to the JSR 311 javadoc, annotating a method with this should disable automatic decoding for all parameters.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WINK-38) @Encoded parameter ignored on method

Posted by "Michael Elman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WINK-38?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12727321#action_12727321 ] 

Michael Elman commented on WINK-38:
-----------------------------------

I think your patch won't cover all the cases... For example it will ignore the @Encoded on the class.
I'll work on the fix using the metadata and metadata collectors.

> @Encoded parameter ignored on method
> ------------------------------------
>
>                 Key: WINK-38
>                 URL: https://issues.apache.org/jira/browse/WINK-38
>             Project: Wink
>          Issue Type: Bug
>          Components: Common
>    Affects Versions: 0.1
>            Reporter: Jesse Ramos
>            Priority: Minor
>         Attachments: WINK-38-patch.txt
>
>
> The @Encoded method is not honored when used on a method.
> Ex:
>     @GET
>     @Encoded
>     @Path("method/city")
>     public String getShopInCityMethod(@QueryParam("location") String location)
> In this case, the query parameter is not encoded.  According to the JSR 311 javadoc, annotating a method with this should disable automatic decoding for all parameters.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (WINK-38) @Encoded parameter ignored on method

Posted by "Michael Elman (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WINK-38?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Elman reassigned WINK-38:
---------------------------------

    Assignee: Michael Elman

> @Encoded parameter ignored on method
> ------------------------------------
>
>                 Key: WINK-38
>                 URL: https://issues.apache.org/jira/browse/WINK-38
>             Project: Wink
>          Issue Type: Bug
>          Components: Common
>    Affects Versions: 0.1
>            Reporter: Jesse Ramos
>            Assignee: Michael Elman
>            Priority: Minor
>         Attachments: WINK-38-patch.txt
>
>
> The @Encoded method is not honored when used on a method.
> Ex:
>     @GET
>     @Encoded
>     @Path("method/city")
>     public String getShopInCityMethod(@QueryParam("location") String location)
> In this case, the query parameter is not encoded.  According to the JSR 311 javadoc, annotating a method with this should disable automatic decoding for all parameters.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.