[ 
https://issues.apache.org/jira/browse/MJAVADOC-658?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17181264#comment-17181264
 ] 

Jin Xu commented on MJAVADOC-658:
---------------------------------

BTW if we add this function into the original test class, it will even raise a 
null pointer exception.
I havn't got any idea why.

> found a bug about wrongly handling generic functions when using fix operation
> -----------------------------------------------------------------------------
>
>                 Key: MJAVADOC-658
>                 URL: https://issues.apache.org/jira/browse/MJAVADOC-658
>             Project: Maven Javadoc Plugin
>          Issue Type: Bug
>          Components: fix
>            Reporter: Jin Xu
>            Priority: Major
>
> original function:
> {code:java}
>     public <T extends Object> void testGeneric(Class<T> tClass, Object o) {
>         return;
>     }
> {code}
> after running "fix", we get:
> {code:java}
>     /**
>      * <p>testGeneric.</p>
>      *
>      * @param tClass a {@link java.lang.Class} object.
>      * @param o a {@link java.lang.Object} object.
>      * @param <T> a T object.
>      */
>     public <T extends Object> void testGeneric(Class<T> tClass, Object o) {
>         return;
>     }
> {code}
> after running "fix" another time, we get:
> {code:java}
>     /**
>      * <p>testGeneric.</p>
>      *
>      * @param tClass a {@link java.lang.Class} object.
>      * @param o a {@link java.lang.Object} object.
>      */
>     public <T extends Object> void testGeneric(Class<T> tClass, Object o) {
>         return;
>     }
> {code}
> after running "fix" the third time, we get:
> {code:java}
>     /**
>      * <p>testGeneric.</p>
>      *
>      * @param tClass a {@link java.lang.Class} object.
>      * @param o a {@link java.lang.Object} object.
>      * @param <T> a T object.
>      */
>     public <T extends Object> void testGeneric(Class<T> tClass, Object o) {
>         return;
>     }
> {code}
> again.
> and if we run fix for another time, it will continue the loop.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to