2024-03-21 11:20:24 +00:00
|
|
|
--- ini4j-0.5.4/src/main/java/org/ini4j/BasicProfile.java
|
|
|
|
+++ ini4j-0.5.4/src/main/java/org/ini4j/BasicProfile.java
|
|
|
|
@@ -139,11 +139,17 @@ public class BasicProfile extends Common
|
2015-07-29 11:33:32 +00:00
|
|
|
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);
|
|
|
|
+ if (sec == null) {
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ if (sec.containsKey(optionName)) {
|
|
|
|
+ sec.remove(optionName);
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
boolean isTreeMode()
|
2024-03-21 11:20:24 +00:00
|
|
|
--- ini4j-0.5.4/src/main/java/org/ini4j/Profile.java
|
|
|
|
+++ ini4j-0.5.4/src/main/java/org/ini4j/Profile.java
|
|
|
|
@@ -43,7 +43,7 @@ public interface Profile extends MultiMa
|
2015-07-29 11:33:32 +00:00
|
|
|
|
|
|
|
Section remove(Profile.Section section);
|
|
|
|
|
|
|
|
- String remove(Object sectionName, Object optionName);
|
|
|
|
+ boolean remove(Object sectionName, Object optionName);
|
|
|
|
|
|
|
|
interface Section extends OptionMap
|
|
|
|
{
|