← Back to team overview

openjdk team mailing list archive

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

 

Something that sounds like a similar issue: Under OpenJDK, when trying
to compile https://github.com/sk89q/worldguard (commit 49bdccf020
currently), I get

[INFO] Compilation failure
/home/chris/Coding/bukkit/worldguard/src/main/java/com/sk89q/worldguard/protection/ApplicableRegionSet.java:[277,26] put(com.sk89q.worldguard.protection.regions.ProtectedRegion,V) in java.util.Map<com.sk89q.worldguard.protection.regions.ProtectedRegion,V> cannot be applied to (com.sk89q.worldguard.protection.regions.ProtectedRegion,java.lang.Object)

but with the Sun JDK this error doesn't happen.

-- 
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:
  New

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.



References