← Back to team overview

openjdk team mailing list archive

[Bug 716959] Re: Incorrect generation/handling of generics compared to Sun javac?

 

Status changed to 'Confirmed' because the bug affects multiple users.

** Changed in: openjdk-6 (Ubuntu)
       Status: New => Confirmed

-- 
You received this bug notification because you are a member of OpenJDK,
which is subscribed to openjdk-6 in Ubuntu.
https://bugs.launchpad.net/bugs/716959

Title:
  Incorrect generation/handling of generics compared to Sun javac?

Status in “openjdk-6” package in Ubuntu:
  Confirmed

Bug description:
  I'm currently packaging Jenkins
  (https://github.com/jenkinsci/jenkins/tree/jenkins-1_396 for a
  tarball) for Ubuntu and I've come across the following issue when
  compiling jenkins-core:

  /home/jamespage/src/hudson/github/build-
  area/jenkins-1.396/core/src/main/java/hudson/model/Build.java:[80,16]
  types hudson.model.AbstractBuild<P,B> and
  hudson.model.AbstractBuild<P,B> are incompatible; both define
  getParent(), but with unrelated return types

  /home/jamespage/src/hudson/github/build-
  area/jenkins-1.396/core/src/main/java/hudson/model/FreeStyleBuild.java:[35,7]
  types
  hudson.model.Build<hudson.model.FreeStyleProject,hudson.model.FreeStyleBuild>
  and
  hudson.model.Build<hudson.model.FreeStyleProject,hudson.model.FreeStyleBuild>
  are incompatible; both define getParent(), but with unrelated return
  types

  This is on natty (OpenJDK version below).

  java version "1.6.0_21"
  OpenJDK Runtime Environment (IcedTea6 1.10pre) (6b21~pre1-0ubuntu2)
  OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode)

  Compiling with the Sun JDK from the partner repository works
  successfully.

  I also get a similar issue on Maverick:

  /home/jamespage/src/hudson/github/normal/jenkinsci-jenkins-
  653b030/core/src/main/java/hudson/model/Build.java:[80,16] types
  hudson.model.AbstractBuild<P,B> and hudson.model.AbstractBuild<P,B>
  are incompatible; both define getParent(), but with unrelated return
  types

  /home/jamespage/src/hudson/github/normal/jenkinsci-jenkins-
  653b030/core/src/main/java/hudson/matrix/MatrixBuild.java:[60,7] types
  hudson.model.AbstractBuild<hudson.matrix.MatrixProject,hudson.matrix.MatrixBuild>
  and
  hudson.model.AbstractBuild<hudson.matrix.MatrixProject,hudson.matrix.MatrixBuild>
  are incompatible; both define getParent(), but with unrelated return
  types

  /home/jamespage/src/hudson/github/normal/jenkinsci-jenkins-
  653b030/core/src/main/java/hudson/model/FreeStyleBuild.java:[35,7]
  types
  hudson.model.Build<hudson.model.FreeStyleProject,hudson.model.FreeStyleBuild>
  and
  hudson.model.Build<hudson.model.FreeStyleProject,hudson.model.FreeStyleBuild>
  are incompatible; both define getParent(), but with unrelated return
  types

  This feels like a difference between the way the Sun JDK and OpenJDK
  handle generics.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openjdk-6/+bug/716959/+subscriptions



References