andreituicu closed pull request #8: SLING-7752 - Deserializing and serializing
a feature model file shuffles the configurations
URL: https://github.com/apache/sling-org-apache-sling-feature-io/pull/8
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/src/main/java/org/apache/sling/feature/io/json/JSONWriterBase.java
b/src/main/java/org/apache/sling/feature/io/json/JSONWriterBase.java
index 3533e68..1a51d36 100644
--- a/src/main/java/org/apache/sling/feature/io/json/JSONWriterBase.java
+++ b/src/main/java/org/apache/sling/feature/io/json/JSONWriterBase.java
@@ -19,10 +19,7 @@
import java.io.StringReader;
import java.io.Writer;
import java.lang.reflect.Array;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
import javax.json.Json;
import javax.json.JsonStructure;
@@ -109,9 +106,9 @@ protected void writeConfigurations(final JsonGenerator
generator, final Configur
generator.writeStartObject(key);
- final Enumeration<String> e = cfg.getProperties().keys();
- while ( e.hasMoreElements() ) {
- final String name = e.nextElement();
+ final Iterator<String> e = cfg.getProperties().keySet().iterator();
+ while ( e.hasNext() ) {
+ final String name = e.next();
if ( Configuration.PROP_ARTIFACT_ID.equals(name) ) {
continue;
}
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services