Use Collection#forEach() instead of Stream#forEach() for simplicity
Change-Id: I0a1aea4bdb5d305c50273e6ff749fe71bd2a295a
diff --git a/tools/package/maven-plugin/src/main/java/org/onosproject/maven/OnosSwaggerMojo.java b/tools/package/maven-plugin/src/main/java/org/onosproject/maven/OnosSwaggerMojo.java
index 3786f448..56f4961 100644
--- a/tools/package/maven-plugin/src/main/java/org/onosproject/maven/OnosSwaggerMojo.java
+++ b/tools/package/maven-plugin/src/main/java/org/onosproject/maven/OnosSwaggerMojo.java
@@ -290,7 +290,7 @@
private void addJsonSchemaDefinition(ObjectNode definitions, DocletTag tag) {
File definitionsDirectory = new File(srcDirectory + "/src/main/resources/definitions");
if (tag != null) {
- tag.getParameters().stream().forEach(param -> {
+ tag.getParameters().forEach(param -> {
try {
File config = new File(definitionsDirectory.getAbsolutePath() + "/"
+ param + ".json");
@@ -340,7 +340,7 @@
responses.set("200", success);
if (tag != null && responseJson) {
ObjectNode schema = mapper.createObjectNode();
- tag.getParameters().stream().forEach(
+ tag.getParameters().forEach(
param -> schema.put("$ref", "#/definitions/" + param));
success.set("schema", schema);
}
@@ -403,7 +403,7 @@
if (tag != null && (method.toLowerCase().equals("post") ||
method.toLowerCase().equals("put"))) {
ObjectNode schema = mapper.createObjectNode();
- tag.getParameters().stream().forEach(param -> {
+ tag.getParameters().forEach(param -> {
schema.put("$ref", "#/definitions/" + param);
});
individualParameterNode.set("schema", schema);