Bug - Won't Fix [moved] compilation error under OpenJDK <1.7

gnaddelwarz

New member
D/k if it's just me, but it doesn't compile here:
Code:
compile:
    [javac] Compiling 934 source files to /home/tim/src/kolmafia/build
    [javac] /home/tim/src/kolmafia/lib/org/tmatesoft/svn/core/internal/wc17/db/SvnWcDbShared.java:139: type parameters of <X>X cannot be determined; no unique maximal instance exists for type variable X with upper bounds org.tmatesoft.svn.core.internal.wc17.db.Structure<org.tmatesoft.svn.core.internal.wc17.db.StructureFields.AdditionInfo>,org.tmatesoft.svn.core.internal.wc17.db.Structure<T>
    [javac]         Structure<AdditionInfo> info = Structure.obtain(AdditionInfo.class, fields);
    [javac]                                                        ^
    [javac] /home/tim/src/kolmafia/lib/org/tmatesoft/svn/core/internal/wc17/db/SvnWcDbShared.java:249: type parameters of <X>X cannot be determined; no unique maximal instance exists for type variable X with upper bounds org.tmatesoft.svn.core.internal.wc17.db.Structure<org.tmatesoft.svn.core.internal.wc17.db.StructureFields.DeletionInfo>,org.tmatesoft.svn.core.internal.wc17.db.Structure<T>
    [javac]         Structure<DeletionInfo> info = Structure.obtain(DeletionInfo.class);
    [javac]                                                        ^
    [javac] /home/tim/src/kolmafia/lib/org/tmatesoft/svn/core/internal/wc17/db/SvnWcDbShared.java:345: type parameters of <X>X cannot be determined; no unique maximal instance exists for type variable X with upper bounds org.tmatesoft.svn.core.internal.wc17.db.Structure<org.tmatesoft.svn.core.internal.wc17.db.StructureFields.NodeInfo>,org.tmatesoft.svn.core.internal.wc17.db.Structure<T>
    [javac]         Structure<NodeInfo> info = Structure.obtain(NodeInfo.class, fields);
    [javac]                                                    ^
    [javac] /home/tim/src/kolmafia/lib/org/tmatesoft/svn/core/internal/wc17/db/SvnWcDbShared.java:454: type parameters of <X>X cannot be determined; no unique maximal instance exists for type variable X with upper bounds org.tmatesoft.svn.core.internal.wc17.db.Structure<org.tmatesoft.svn.core.internal.wc17.db.StructureFields.NodeInfo>,org.tmatesoft.svn.core.internal.wc17.db.Structure<T>
    [javac]         Structure<NodeInfo> info = Structure.obtain(NodeInfo.class, fields);
    [javac]                                                    ^
    [javac] /home/tim/src/kolmafia/lib/org/tmatesoft/svn/core/internal/wc17/db/SVNWCDb.java:3553: type parameters of <X>X cannot be determined; no unique maximal instance exists for type variable X with upper bounds org.tmatesoft.svn.core.internal.wc17.db.Structure<org.tmatesoft.svn.core.internal.wc17.db.StructureFields.RepositoryInfo>,org.tmatesoft.svn.core.internal.wc17.db.Structure<T>
    [javac]         Structure<RepositoryInfo> info = Structure.obtain(RepositoryInfo.class);
    [javac]                                                          ^
    [javac] /home/tim/src/kolmafia/lib/org/tmatesoft/svn/core/internal/wc17/db/SVNWCDb.java:4723: type parameters of <X>X cannot be determined; no unique maximal instance exists for type variable X with upper bounds org.tmatesoft.svn.core.internal.wc17.db.Structure<org.tmatesoft.svn.core.internal.wc17.db.StructureFields.PristineInfo>,org.tmatesoft.svn.core.internal.wc17.db.Structure<T>
    [javac]         Structure<PristineInfo> result = Structure.obtain(PristineInfo.class);
    [javac]                                                          ^
    [javac] /home/tim/src/kolmafia/lib/org/tmatesoft/svn/core/internal/wc17/db/SvnWcDbReader.java:104: type parameters of <X>X cannot be determined; no unique maximal instance exists for type variable X with upper bounds org.tmatesoft.svn.core.internal.wc17.db.Structure<org.tmatesoft.svn.core.internal.wc17.db.SvnWcDbReader.ReplaceInfo>,org.tmatesoft.svn.core.internal.wc17.db.Structure<T>
    [javac]         Structure<ReplaceInfo> result = Structure.obtain(ReplaceInfo.class, fields);
    [javac]                                                         ^
    [javac] /home/tim/src/kolmafia/lib/org/tmatesoft/svn/core/internal/wc17/db/SvnWcDbReader.java:188: type parameters of <X>X cannot be determined; no unique maximal instance exists for type variable X with upper bounds org.tmatesoft.svn.core.internal.wc17.db.Structure<org.tmatesoft.svn.core.internal.wc17.db.SvnWcDbReader.InstallInfo>,org.tmatesoft.svn.core.internal.wc17.db.Structure<T>
    [javac]         final Structure<InstallInfo> result = Structure.obtain(InstallInfo.class, fields);
    [javac]                                                               ^
    [javac] /home/tim/src/kolmafia/lib/org/tmatesoft/svn/core/internal/wc17/db/SvnWcDbReader.java:303: type parameters of <X>X cannot be determined; no unique maximal instance exists for type variable X with upper bounds org.tmatesoft.svn.core.internal.wc17.db.Structure<org.tmatesoft.svn.core.internal.wc17.db.StructureFields.WalkerChildInfo>,org.tmatesoft.svn.core.internal.wc17.db.Structure<T>
    [javac]                     childInfo = Structure.obtain(WalkerChildInfo.class);
    [javac]                                                 ^
    [javac] /home/tim/src/kolmafia/lib/org/tmatesoft/svn/core/internal/wc17/SVNWCContext.java:1348: type parameters of <X>X cannot be determined; no unique maximal instance exists for type variable X with upper bounds org.tmatesoft.svn.core.internal.wc17.db.Structure<org.tmatesoft.svn.core.internal.wc17.db.StructureFields.NodeOriginInfo>,org.tmatesoft.svn.core.internal.wc17.db.Structure<T>
    [javac]         Structure<NodeOriginInfo> result = Structure.obtain(NodeOriginInfo.class, fields);
    [javac]                                                            ^
    [javac] /home/tim/src/kolmafia/lib/org/tmatesoft/svn/core/internal/wc17/db/SvnWcDbCopy.java:498: type parameters of <X>X cannot be determined; no unique maximal instance exists for type variable X with upper bounds org.tmatesoft.svn.core.internal.wc17.db.Structure<org.tmatesoft.svn.core.internal.wc17.db.SvnWcDbCopy.CopyInfo>,org.tmatesoft.svn.core.internal.wc17.db.Structure<T>
    [javac]         Structure<CopyInfo> result = Structure.obtain(CopyInfo.class);
    [javac]                                                      ^
    [javac] /home/tim/src/kolmafia/lib/org/tmatesoft/svn/core/internal/wc17/db/SvnWcDbExternals.java:48: type parameters of <X>X cannot be determined; no unique maximal instance exists for type variable X with upper bounds org.tmatesoft.svn.core.internal.wc17.db.Structure<org.tmatesoft.svn.core.internal.wc17.db.StructureFields.ExternalNodeInfo>,org.tmatesoft.svn.core.internal.wc17.db.Structure<T>
    [javac]         Structure<ExternalNodeInfo> externalInfo = Structure.obtain(ExternalNodeInfo.class);
    [javac]                                                                    ^
    [javac] /home/tim/src/kolmafia/lib/org/tmatesoft/svn/core/internal/wc17/db/SvnWcDbExternals.java:228: type parameters of <X>X cannot be determined; no unique maximal instance exists for type variable X with upper bounds org.tmatesoft.svn.core.internal.wc17.db.Structure<org.tmatesoft.svn.core.internal.wc17.db.StructureFields.ExternalNodeInfo>,org.tmatesoft.svn.core.internal.wc17.db.Structure<T>
    [javac]                 Structure<ExternalNodeInfo> info = Structure.obtain(ExternalNodeInfo.class, fields);
    [javac]                                                                    ^
    [javac] /home/tim/src/kolmafia/lib/org/tmatesoft/svn/core/internal/wc17/db/SvnWcDbExternals.java:300: type parameters of <X>X cannot be determined; no unique maximal instance exists for type variable X with upper bounds org.tmatesoft.svn.core.internal.wc17.db.Structure<org.tmatesoft.svn.core.internal.wc17.db.StructureFields.ExternalNodeInfo>,org.tmatesoft.svn.core.internal.wc17.db.Structure<T>
    [javac]         Structure<ExternalNodeInfo> externalInfo = Structure.obtain(ExternalNodeInfo.class);
    [javac]                                                                    ^
    [javac] /home/tim/src/kolmafia/lib/org/tmatesoft/svn/core/internal/wc17/db/SvnWcDbRevert.java:281: type parameters of <X>X cannot be determined; no unique maximal instance exists for type variable X with upper bounds org.tmatesoft.svn.core.internal.wc17.db.Structure<org.tmatesoft.svn.core.internal.wc17.db.SvnWcDbRevert.RevertInfo>,org.tmatesoft.svn.core.internal.wc17.db.Structure<T>
    [javac]         Structure<RevertInfo> result = Structure.obtain(RevertInfo.class);
    [javac]                                                        ^
    [javac] /home/tim/src/kolmafia/lib/org/tmatesoft/svn/core/internal/wc2/SvnRepositoryAccess.java:161: type parameters of <X>X cannot be determined; no unique maximal instance exists for type variable X with upper bounds org.tmatesoft.svn.core.internal.wc17.db.Structure<org.tmatesoft.svn.core.internal.wc2.SvnRepositoryAccess.LocationsInfo>,org.tmatesoft.svn.core.internal.wc17.db.Structure<T>
    [javac]         Structure<LocationsInfo> result = Structure.obtain(LocationsInfo.class);
    [javac]                                                           ^
    [javac] /home/tim/src/kolmafia/lib/org/tmatesoft/svn/core/internal/wc2/ng/SvnNgRepositoryAccess.java:58: type parameters of <X>X cannot be determined; no unique maximal instance exists for type variable X with upper bounds org.tmatesoft.svn.core.internal.wc17.db.Structure<org.tmatesoft.svn.core.internal.wc2.SvnRepositoryAccess.RepositoryInfo>,org.tmatesoft.svn.core.internal.wc17.db.Structure<T>
    [javac]         Structure<RepositoryInfo> result = Structure.obtain(RepositoryInfo.class);
    [javac]                                                            ^
    [javac] /home/tim/src/kolmafia/lib/org/tmatesoft/svn/core/internal/wc2/ng/SvnNgRepositoryAccess.java:68: type parameters of <X>X cannot be determined; no unique maximal instance exists for type variable X with upper bounds org.tmatesoft.svn.core.internal.wc17.db.Structure<org.tmatesoft.svn.core.internal.wc2.SvnRepositoryAccess.UrlInfo>,org.tmatesoft.svn.core.internal.wc17.db.Structure<T>
    [javac]         Structure<UrlInfo> urlInfo = Structure.obtain(UrlInfo.class);
    [javac]                                                      ^
    [javac] /home/tim/src/kolmafia/lib/org/tmatesoft/svn/core/internal/wc2/ng/SvnNgRepositoryAccess.java:97: invalid inferred types for X; inferred type does not conform to declared bound(s)
    [javac] inferred: org.tmatesoft.svn.core.internal.wc17.db.Structure<T>
    [javac] bound(s): org.tmatesoft.svn.core.internal.wc17.db.Structure<org.tmatesoft.svn.core.internal.wc2.SvnRepositoryAccess.RevisionsPair>
    [javac]         Structure<RevisionsPair> result = youngestRevision == null ? Structure.obtain(RevisionsPair.class) : youngestRevision;
    [javac]                                                                                      ^
    [javac] /home/tim/src/kolmafia/lib/org/tmatesoft/svn/core/internal/wc2/ng/SvnNgCommitUtil.java:429: type parameters of <X>X cannot be determined; no unique maximal instance exists for type variable X with upper bounds org.tmatesoft.svn.core.internal.wc17.db.Structure<org.tmatesoft.svn.core.internal.wc2.ng.SvnNgCommitUtil.NodeCommitStatus>,org.tmatesoft.svn.core.internal.wc17.db.Structure<T>
    [javac]         Structure<NodeCommitStatus> result = Structure.obtain(NodeCommitStatus.class);
    [javac]                                                              ^
    [javac] /home/tim/src/kolmafia/lib/org/tmatesoft/svn/core/internal/wc2/old/SvnOldRepositoryAccess.java:80: type parameters of <X>X cannot be determined; no unique maximal instance exists for type variable X with upper bounds org.tmatesoft.svn.core.internal.wc17.db.Structure<org.tmatesoft.svn.core.internal.wc2.SvnRepositoryAccess.RepositoryInfo>,org.tmatesoft.svn.core.internal.wc17.db.Structure<T>
    [javac]         Structure<RepositoryInfo> result = Structure.obtain(RepositoryInfo.class);
    [javac]                                                            ^
    [javac] /home/tim/src/kolmafia/lib/org/tmatesoft/svn/core/internal/wc2/old/SvnOldRepositoryAccess.java:91: invalid inferred types for X; inferred type does not conform to declared bound(s)
    [javac] inferred: org.tmatesoft.svn.core.internal.wc17.db.Structure<T>
    [javac] bound(s): org.tmatesoft.svn.core.internal.wc17.db.Structure<org.tmatesoft.svn.core.internal.wc2.SvnRepositoryAccess.RevisionsPair>
    [javac]         Structure<RevisionsPair> result = youngestRevision == null ? Structure.obtain(RevisionsPair.class) : youngestRevision;
    [javac]                                                                                      ^
    [javac] /home/tim/src/kolmafia/lib/org/tmatesoft/svn/core/internal/wc2/old/SvnOldRepositoryAccess.java:144: type parameters of <X>X cannot be determined; no unique maximal instance exists for type variable X with upper bounds org.tmatesoft.svn.core.internal.wc17.db.Structure<org.tmatesoft.svn.core.internal.wc2.SvnRepositoryAccess.UrlInfo>,org.tmatesoft.svn.core.internal.wc17.db.Structure<T>
    [javac]         Structure<UrlInfo> urlInfo = Structure.obtain(UrlInfo.class);
    [javac]                                                      ^
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 23 errors
    [javac] Compile failed; see the compiler error output for details.
 
Last edited:

roippi

Developer
Moved posts out of SVN feed.

Googling around shows that this is definitely a Java bug. It looks like they backported fixes to 6u22 and later - but not to Java 1.5, and we're supposed to be 1.5 compliant. Which means that we need to provide a workaround.

gnaddelwarz: what JDK/compiler are you using? If possible, you should update your JDK to fix this javac bug.
 
Last edited:

gnaddelwarz

New member
Moved posts out of SVN feed.

Googling around shows that this is definitely a Java bug. It looks like they backported fixes to 6u22 and later - but not to Java 1.5, and we're supposed to be 1.5 compliant. Which means that we need to provide a workaround.

gnaddelwarz: what JDK/compiler are you using? If possible, you should update your JDK to fix this javac bug.

openjdk-6-jdk (Debian testing, version 6b27-1.12.5-2)

I'll try that with openjdk-7 again
 

Crowther

Active member
I can't compile since the SVN update either. It seems I have the same version.
Code:
java version "1.6.0_27"
OpenJDK Runtime Environment (IcedTea6 1.12.5) (6b27-1.12.5-0ubuntu0.12.04.1)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)
I'll look into updating java this weekend.
 

roippi

Developer
OpenJDK apparently never backported the fix to their 6 branch, so the bug still exists there. Try their 7 branch, or an oracle JDK.
 

roippi

Developer
I just installed the official sun 1.5u22 JDK and compiled with no issue, meaning that this bug no longer exists in any of the sun-distributed javac compilers.

This makes me far less motivated to fix it. We state upfront on the sourceforge page that we are J2SE 1.5 compliant - which we are. We make no promises about OpenJDK.
 

gnaddelwarz

New member
I just installed the official sun 1.5u22 JDK and compiled with no issue, meaning that this bug no longer exists in any of the sun-distributed javac compilers.

This makes me far less motivated to fix it. We state upfront on the sourceforge page that we are J2SE 1.5 compliant - which we are. We make no promises about OpenJDK.

I just want to confirm that with openjdk-7, it works.
(I just had not already upgraded to 7, because I read some time ago, that mafia (or was it some other program and I remember it wrong??) was still not compatible with 7....)
 
SVNKit inclusion breaks OpenJDK support

Ever since SVNKit code got added to KoLMafia it is no longer possible to build the latter using OpenJDK. Attempting to do so results in a lot of errors like this:

Code:
    [javac] /build/kolmafia/lib/org/tmatesoft/svn/core/internal/wc17/db/SvnWcDbShared.java:139: type parameters of <X>X cannot be determined; no unique maximal instance exists for type variable X with upper bounds org.tmatesoft.svn.core.internal.wc17.db.Structure<org.tmatesoft.svn.core.internal.wc17.db.StructureFields.AdditionInfo>,org.tmatesoft.svn.core.internal.wc17.db.Structure<T>
    [javac]         Structure<AdditionInfo> info = Structure.obtain(AdditionInfo.class, fields);

Given the recent spate of high-impact security vulnerabilities in Oracle Java (which have even led some security experts to discourage users from installing JRE at all under Windows unless strictly necessary), this feels like a step in the wrong direction.
 

Veracity

Developer
Staff member
Merged with existing thread.

As that thread points out, you are experiencing a bug in OpenJDK itself, which apparently is fixed in openjdk-7
 

Crowther

Active member
As that thread points out, you are experiencing a bug in OpenJDK itself, which apparently is fixed in openjdk-7
It compiled for me after upgrading:
Code:
java version "1.7.0_21"
OpenJDK Runtime Environment (IcedTea 2.3.9) (7u21-2.3.9-0ubuntu0.12.04.1)
OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)
 
Top