Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6709709

javadoc does not get compilation errors after type erasure

    Details

    • Subcomponent:
    • Resolved In Build:
      b08
    • CPU:
      x86
    • OS:
      windows_xp
    • Verification:
      Verified

      Backports

        Description

        FULL PRODUCT VERSION :
        java 1.5.0.12

        A DESCRIPTION OF THE PROBLEM :
        run javadoc against the following class:
        package bug;

        import java.util.List;

        public class JavaDocGenerics {
         public void a(List<String> s){}
         public void a(List<StringBuffer> s){}
        }

        No warning or error will be reported. The html will be generated, although anchors for both methods will be the same.

        However,

        Run the javadoc against the following class

        package bug;



        public class JavaDocNoneGenerics {
           public void b(int a){}
           public void b(int a){}
        }

        The javadoc will report:
        " b(int) is already defined in bug.JavaDocGenerics
           public void b(int a){}
                       ^
        "
        and the html file will be generated will one method in it.

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        run javadoc against the following class:
        package bug;

        import java.util.List;

        public class JavaDocGenerics {
         public void a(List<String> s){}
         public void a(List<StringBuffer> s){}
        }

        No warning or error will be reported. The html will be generated, although anchors for both methods will be the same.

        However,

        Run the javadoc against the following class

        package bug;



        public class JavaDocNoneGenerics {
           public void b(int a){}
           public void b(int a){}
        }

        The javadoc will report:
        " b(int) is already defined in bug.JavaDocGenerics
           public void b(int a){}
                       ^
        "
        and the html file will be generated will one method in it.


        REPRODUCIBILITY :
        This bug can be reproduced always.

        ---------- BEGIN SOURCE ----------

        package bug;
        import java.util.List;

        public class JavaDocGenerics {
         public void a(List<String> s){}
         public void a(List<StringBuffer> s){}
        }





        package bug;

        public class JavaDocNoneGenerics {
           public void b(int a){}
           public void b(int a){}
        }

        ---------- END SOURCE ----------

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  coffeys Sean Coffey
                  Reporter:
                  mbykov Misha Bykov
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported:
                    Indexed: