[Stripes-dev] [JIRA] Created: (STS-285) Properties whose accessors are specified in interfaces with type parameters are not handled correctly

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Stripes-dev] [JIRA] Created: (STS-285) Properties whose accessors are specified in interfaces with type parameters are not handled correctly

JIRA jira@mc4j.org
Properties whose accessors are specified in interfaces with type parameters are not handled correctly
-----------------------------------------------------------------------------------------------------

                 Key: STS-285
                 URL: http://mc4j.org/jira/browse/STS-285
             Project: Stripes
          Issue Type: Bug
          Components: Validation
    Affects Versions: Release 1.4.1
            Reporter: Tim Fennell
         Assigned To: Tim Fennell
             Fix For: Release 1.4.2


At it's simplest, if you have an interface:
    public interface Foo<T> {    void setProp(T prop); }

and an implementing class:
    public class Bar implements Foo<String> { void setProp(String prop) { } }

stripes will treat Bar.prop as if it is of type object. This is a direct result of the JDK Introspector returning a PropertyDescriptor that contains a bridge method with the return type Object.  To fix this it is necessary to identify the appropriate/matching non-bridge method and read type information from there.


--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://mc4j.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Stripes-development mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-development
Reply | Threaded
Open this post in threaded view
|

[Stripes-dev] [JIRA] Updated: (STS-285) Properties whose accessors are specified in interfaces with type parameters are not handled correctly

JIRA jira@mc4j.org
     [ http://mc4j.org/jira/browse/STS-285?page=all ]

Tim Fennell updated STS-285:
----------------------------

    Description:
At it's simplest, if you have an interface:
    public interface Foo<T> {    void setProp(T prop); }

and an implementing class:
    public class Bar implements Foo<String> { void setProp(String prop) { } }

stripes will treat Bar.prop as if it is of type object. This is a direct result of the JDK Introspector returning a PropertyDescriptor that contains a bridge method with the parameter type Object.  To fix this it is necessary to identify the appropriate/matching non-bridge method and read type information from there.


  was:
At it's simplest, if you have an interface:
    public interface Foo<T> {    void setProp(T prop); }

and an implementing class:
    public class Bar implements Foo<String> { void setProp(String prop) { } }

stripes will treat Bar.prop as if it is of type object. This is a direct result of the JDK Introspector returning a PropertyDescriptor that contains a bridge method with the return type Object.  To fix this it is necessary to identify the appropriate/matching non-bridge method and read type information from there.



> Properties whose accessors are specified in interfaces with type parameters are not handled correctly
> -----------------------------------------------------------------------------------------------------
>
>                 Key: STS-285
>                 URL: http://mc4j.org/jira/browse/STS-285
>             Project: Stripes
>          Issue Type: Bug
>          Components: Validation
>    Affects Versions: Release 1.4.1
>            Reporter: Tim Fennell
>         Assigned To: Tim Fennell
>             Fix For: Release 1.4.2
>
>
> At it's simplest, if you have an interface:
>     public interface Foo<T> {    void setProp(T prop); }
> and an implementing class:
>     public class Bar implements Foo<String> { void setProp(String prop) { } }
> stripes will treat Bar.prop as if it is of type object. This is a direct result of the JDK Introspector returning a PropertyDescriptor that contains a bridge method with the parameter type Object.  To fix this it is necessary to identify the appropriate/matching non-bridge method and read type information from there.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://mc4j.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Stripes-development mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-development
Reply | Threaded
Open this post in threaded view
|

[Stripes-dev] [JIRA] Resolved: (STS-285) Properties whose accessors are specified in interfaces with type parameters are not handled correctly

JIRA jira@mc4j.org
In reply to this post by JIRA jira@mc4j.org
     [ http://mc4j.org/jira/browse/STS-285?page=all ]

Tim Fennell resolved STS-285.
-----------------------------

    Resolution: Fixed

This is now fixed on both the 1.4 branch and the trunk.

> Properties whose accessors are specified in interfaces with type parameters are not handled correctly
> -----------------------------------------------------------------------------------------------------
>
>                 Key: STS-285
>                 URL: http://mc4j.org/jira/browse/STS-285
>             Project: Stripes
>          Issue Type: Bug
>          Components: Validation
>    Affects Versions: Release 1.4.1
>            Reporter: Tim Fennell
>         Assigned To: Tim Fennell
>             Fix For: Release 1.4.2
>
>
> At it's simplest, if you have an interface:
>     public interface Foo<T> {    void setProp(T prop); }
> and an implementing class:
>     public class Bar implements Foo<String> { void setProp(String prop) { } }
> stripes will treat Bar.prop as if it is of type object. This is a direct result of the JDK Introspector returning a PropertyDescriptor that contains a bridge method with the parameter type Object.  To fix this it is necessary to identify the appropriate/matching non-bridge method and read type information from there.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://mc4j.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Stripes-development mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-development