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

Javac compiles source code despite illegal use of unchecked conversions

XMLWordPrintable

    • b01
    • generic
    • generic

      A DESCRIPTION OF THE PROBLEM :
      As recommened by Eclipse IDE Support, I'd like to report my issue to javac team.

      See details, attached source code and analysis already done by Eclipse team here:
      https://bugs.eclipse.org/bugs/show_bug.cgi?id=536978


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Compile attached java code
      https://bugs.eclipse.org/bugs/attachment.cgi?id=274960

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      javac should generate compilation error the same as Eclipse does:
      >> The return type is incompatible with AbstractDemo<Request,Response>.test(Request)
      ACTUAL -
      javac compiles the code without any errors

      ---------- BEGIN SOURCE ----------
      Source code is attached to Eclipse Bug 536978
      https://bugs.eclipse.org/bugs/show_bug.cgi?id=536978

      Direct link to the attachment:
      https://bugs.eclipse.org/bugs/attachment.cgi?id=274960
      ---------- END SOURCE ----------

      FREQUENCY : always


        1. AbstractDemo.java
          0.2 kB
          Fairoz Matte
        2. AbstractResult.java
          0.1 kB
          Fairoz Matte
        3. SimpleDemo.java
          0.6 kB
          Fairoz Matte
        4. SimpleResult.java
          0.1 kB
          Fairoz Matte

            vromero Vicente Arturo Romero Zaldivar
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: