[ini4j] 01/02: Changed the return type of org.ini4j.Profile.remove(Object, Object) to compile with Java 8

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Mon Apr 14 14:12:26 UTC 2014


This is an automated email from the git hooks/post-receive script.

ebourg-guest pushed a commit to branch master
in repository ini4j.

commit 512084f62fe4bd3a6993d59a1a30335617eddf0f
Author: Emmanuel Bourg <ebourg at apache.org>
Date:   Mon Apr 14 15:56:07 2014 +0200

    Changed the return type of org.ini4j.Profile.remove(Object, Object) to compile with Java 8
---
 debian/changelog                            |  9 +++++++++
 debian/patches/01-java8-compatibility.patch | 31 +++++++++++++++++++++++++++++
 debian/patches/series                       |  1 +
 3 files changed, 41 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 9b6af9e..cb02b5f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+ini4j (0.5.2-SNAPSHOT-4) UNRELEASED; urgency=medium
+
+  * Team upload.
+  * Changed the return type of org.ini4j.Profile.remove(Object, Object)
+    to fix a conflict with the method Map.remove(Object, Object) added
+    in Java 8.
+
+ -- Emmanuel Bourg <ebourg at apache.org>  Mon, 14 Apr 2014 15:54:23 +0200
+
 ini4j (0.5.2-SNAPSHOT-3) unstable; urgency=medium
 
   * Team upload.
diff --git a/debian/patches/01-java8-compatibility.patch b/debian/patches/01-java8-compatibility.patch
new file mode 100644
index 0000000..2970faf
--- /dev/null
+++ b/debian/patches/01-java8-compatibility.patch
@@ -0,0 +1,31 @@
+Description: Changes the return type of the org.ini4j.Profile.remove(Object, Object) method
+ to fix a conflict with the method Map.remove(Object, Object) added in Java 8.
+Author: Emmanuel Bourg <ebourg at apache.org>
+Forwarded: no
+--- a/src/main/java/org/ini4j/Profile.java
++++ b/src/main/java/org/ini4j/Profile.java
+@@ -43,7 +43,7 @@
+ 
+     Section remove(Profile.Section section);
+ 
+-    String remove(Object sectionName, Object optionName);
++    boolean remove(Object sectionName, Object optionName);
+ 
+     interface Section extends OptionMap
+     {
+--- a/src/main/java/org/ini4j/BasicProfile.java
++++ b/src/main/java/org/ini4j/BasicProfile.java
+@@ -139,11 +139,11 @@
+         return remove((Object) section.getName());
+     }
+ 
+-    @Override public String remove(Object sectionName, Object optionName)
++    @Override public boolean remove(Object sectionName, Object optionName)
+     {
+         Section sec = get(sectionName);
+ 
+-        return (sec == null) ? null : sec.remove(optionName);
++        return (sec == null) ? false : true;
+     }
+ 
+     boolean isTreeMode()
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..3209aba
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+01-java8-compatibility.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/ini4j.git



More information about the pkg-java-commits mailing list