Bug 1087526

Summary: ini4j: FTBFS with Java 8
Product: [Fedora] Fedora Reporter: Mikolaj Izdebski <mizdebsk>
Component: ini4jAssignee: Omair Majid <omajid>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: dennis, omajid
Target Milestone: ---Keywords: Patch
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-11 15:43:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1105908    

Description Mikolaj Izdebski 2014-04-14 14:16:43 UTC
Description of problem:
Package ini4j fails to build with Java 8.  There is a conflict with new method added to java.util.Map in Java 8.

Version-Release number of selected component (if applicable):
0.5.1-11

Additional info:
Debian just added a patch for this:
http://deb.li/36DJ2

[ERROR] /builddir/build/BUILD/ini4j-0.5.1/src/main/java/org/ini4j/Profile.java:[46,12] remove(java.lang.Object,java.lang.Object) in org.ini4j.Profile clashes with remove(java.lang.Object,java.lang.Object) in java.util.Map
[ERROR] return type java.lang.String is not compatible with boolean
[ERROR] /builddir/build/BUILD/ini4j-0.5.1/src/main/java/org/ini4j/BasicProfile.java:[141,29] remove(java.lang.Object,java.lang.Object) in org.ini4j.BasicProfile cannot implement remove(java.lang.Object,java.lang.Object) in java.util.Map
[ERROR] return type java.lang.String is not compatible with boolean
[ERROR] /builddir/build/BUILD/ini4j-0.5.1/src/main/java/org/ini4j/BasicRegistry.java:[24,8] remove(java.lang.Object,java.lang.Object) in org.ini4j.BasicProfile cannot implement remove(java.lang.Object,java.lang.Object) in java.util.Map
[ERROR] return type java.lang.String is not compatible with boolean
[ERROR] /builddir/build/BUILD/ini4j-0.5.1/src/main/java/org/ini4j/Reg.java:[37,8] remove(java.lang.Object,java.lang.Object) in org.ini4j.BasicProfile cannot implement remove(java.lang.Object,java.lang.Object) in java.util.Map 
[ERROR] return type java.lang.String is not compatible with boolean
[ERROR] /builddir/build/BUILD/ini4j-0.5.1/src/main/java/org/ini4j/Ini.java:[36,8] remove(java.lang.Object,java.lang.Object) in org.ini4j.BasicProfile cannot implement remove(java.lang.Object,java.lang.Object) in java.util.Map
[ERROR] return type java.lang.String is not compatible with boolean
[ERROR] /builddir/build/BUILD/ini4j-0.5.1/src/main/java/org/ini4j/ConfigParser.java:[411,12] remove(java.lang.Object,java.lang.Object) in org.ini4j.BasicProfile cannot implement remove(java.lang.Object,java.lang.Object) in java.util.Map
[ERROR] return type java.lang.String is not compatible with boolean
[ERROR] /builddir/build/BUILD/ini4j-0.5.1/src/main/java/org/ini4j/Wini.java:[27,8] remove(java.lang.Object,java.lang.Object) in org.ini4j.BasicProfile cannot implement remove(java.lang.Object,java.lang.Object) in java.util.Map
[ERROR] return type java.lang.String is not compatible with boolean

Comment 1 Omair Majid 2014-04-14 14:44:32 UTC
I filed this upstream: https://sourceforge.net/p/ini4j/bugs/47/

There's not much I can do on Fedora-side without making changes incompatible with upstream.

Comment 2 Omair Majid 2014-06-06 21:01:55 UTC
(In reply to Mikolaj Izdebski from comment #0)
> Debian just added a patch for this:
> http://deb.li/36DJ2

This patch doesn't look right at all.

It breaks existing code that expects a String as a result of remove():

String result = BasicProfile.remove("section", "key");

Sadly, there's no way around this compatibility problem. But this change needs to be made consistently.

Also, the updated version of remove() no longer removes anything.

Comment 3 Omair Majid 2014-06-09 21:19:37 UTC
*** Bug 1106799 has been marked as a duplicate of this bug. ***

Comment 4 Omair Majid 2014-06-11 15:43:58 UTC
I pushed a slight variant of the Debian fix. I am still not sure if it's the right thing.

http://koji.fedoraproject.org/koji/buildinfo?buildID=532739