diff --git a/pom.xml b/pom.xml
index f9afc4e73..9f08bdd27 100644
--- a/pom.xml
+++ b/pom.xml
@@ -463,10 +463,16 @@
test
- commons-codec
- commons-codec
- 1.14
- true
+ commons-io
+ commons-io
+ 2.6
+ test
+
+
+ commons-codec
+ commons-codec
+ 1.14
+ true
@@ -534,10 +540,10 @@
2.8
- 0.8.4
+ 0.8.5
- 4.3
+ 4.4
true
Gary Gregory
86fdc7e2a11262cb
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index bde17b387..ca6b38704 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -120,6 +120,12 @@
[build] Update Apache commons-parent from 48 to 50.
+
+ Add org.apache.commons.collections4.properties.PropertiesFactory.EMPTY_PROPERTIES.
+
+
+ [build] Update Jacoco from 0.8.4 to 0.8.5.
+
diff --git a/src/main/java/org/apache/commons/collections4/properties/PropertiesFactory.java b/src/main/java/org/apache/commons/collections4/properties/PropertiesFactory.java
index 04de759d2..40f6359aa 100644
--- a/src/main/java/org/apache/commons/collections4/properties/PropertiesFactory.java
+++ b/src/main/java/org/apache/commons/collections4/properties/PropertiesFactory.java
@@ -17,7 +17,26 @@
package org.apache.commons.collections4.properties;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.PrintStream;
+import java.io.PrintWriter;
+import java.io.Reader;
+import java.io.Writer;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.InvalidPropertiesFormatException;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Objects;
import java.util.Properties;
+import java.util.Set;
+import java.util.function.BiConsumer;
+import java.util.function.BiFunction;
+import java.util.function.Function;
/**
* Creates and loads {@link Properties}.
@@ -27,6 +46,282 @@ import java.util.Properties;
*/
public class PropertiesFactory extends AbstractPropertiesFactory {
+ private static class EmptyProperties extends Properties {
+
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public synchronized void clear() {
+ // Noop
+ }
+
+ @Override
+ public synchronized Object compute(final Object key,
+ final BiFunction super Object, ? super Object, ? extends Object> remappingFunction) {
+ Objects.requireNonNull(key);
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public synchronized Object computeIfAbsent(final Object key,
+ final Function super Object, ? extends Object> mappingFunction) {
+ Objects.requireNonNull(key);
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public synchronized Object computeIfPresent(final Object key,
+ final BiFunction super Object, ? super Object, ? extends Object> remappingFunction) {
+ Objects.requireNonNull(key);
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public synchronized boolean contains(final Object value) {
+ return false;
+ }
+
+ @Override
+ public synchronized boolean containsKey(final Object key) {
+ return false;
+ }
+
+ @Override
+ public boolean containsValue(final Object value) {
+ return false;
+ }
+
+ @Override
+ public synchronized Enumeration