FINERACT-822 Enforce ModifyCollectionInEnhancedForLoop check
This commit is contained in:
committed by
Michael Vorburger ⛑️
parent
4ede116861
commit
dff6109c81
@@ -394,7 +394,6 @@ tasks.withType(JavaCompile) {
|
|||||||
"ProtectedMembersInFinalClass",
|
"ProtectedMembersInFinalClass",
|
||||||
"StaticAssignmentInConstructor",
|
"StaticAssignmentInConstructor",
|
||||||
"InvalidBlockTag",
|
"InvalidBlockTag",
|
||||||
"ModifyCollectionInEnhancedForLoop",
|
|
||||||
"NonCanonicalType",
|
"NonCanonicalType",
|
||||||
"InvalidInlineTag",
|
"InvalidInlineTag",
|
||||||
)
|
)
|
||||||
@@ -453,6 +452,7 @@ tasks.withType(JavaCompile) {
|
|||||||
"UndefinedEquals",
|
"UndefinedEquals",
|
||||||
"PublicConstructorForAbstractClass",
|
"PublicConstructorForAbstractClass",
|
||||||
"UnescapedEntity",
|
"UnescapedEntity",
|
||||||
|
"ModifyCollectionInEnhancedForLoop",
|
||||||
"OperatorPrecedence",
|
"OperatorPrecedence",
|
||||||
"EqualsGetClass",
|
"EqualsGetClass",
|
||||||
"EqualsUnsafeCast",
|
"EqualsUnsafeCast",
|
||||||
|
|||||||
+5
-2
@@ -32,6 +32,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@@ -444,8 +445,10 @@ public class EmailCampaignWritePlatformCommandHandlerImpl implements EmailCampai
|
|||||||
final String response = this.genericDataService.generateJsonFromGenericResultsetData(results);
|
final String response = this.genericDataService.generateJsonFromGenericResultsetData(results);
|
||||||
resultList = new ObjectMapper().readValue(response, new TypeReference<List<HashMap<String, Object>>>() {});
|
resultList = new ObjectMapper().readValue(response, new TypeReference<List<HashMap<String, Object>>>() {});
|
||||||
// loop changes array date to string date
|
// loop changes array date to string date
|
||||||
for (HashMap<String, Object> entry : resultList) {
|
for (Iterator<HashMap<String, Object>> it = resultList.iterator(); it.hasNext();) {
|
||||||
for (Map.Entry<String, Object> map : entry.entrySet()) {
|
HashMap<String, Object> entry = it.next();
|
||||||
|
for (Iterator<Map.Entry<String, Object>> iter = entry.entrySet().iterator(); iter.hasNext();) {
|
||||||
|
Map.Entry<String, Object> map = iter.next();
|
||||||
String key = map.getKey();
|
String key = map.getKey();
|
||||||
Object ob = map.getValue();
|
Object ob = map.getValue();
|
||||||
if (ob instanceof ArrayList && ((ArrayList) ob).size() == 3) {
|
if (ob instanceof ArrayList && ((ArrayList) ob).size() == 3) {
|
||||||
|
|||||||
+5
-2
@@ -29,6 +29,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@@ -543,8 +544,10 @@ public class SmsCampaignWritePlatformServiceJpaImpl implements SmsCampaignWriteP
|
|||||||
return resultList;
|
return resultList;
|
||||||
}
|
}
|
||||||
// loop changes array date to string date
|
// loop changes array date to string date
|
||||||
for (HashMap<String, Object> entry : resultList) {
|
for (Iterator<HashMap<String, Object>> iter = resultList.iterator(); iter.hasNext();) {
|
||||||
for (Map.Entry<String, Object> map : entry.entrySet()) {
|
HashMap<String, Object> entry = iter.next();
|
||||||
|
for (Iterator<Map.Entry<String, Object>> it = entry.entrySet().iterator(); it.hasNext();) {
|
||||||
|
Map.Entry<String, Object> map = it.next();
|
||||||
String key = map.getKey();
|
String key = map.getKey();
|
||||||
Object ob = map.getValue();
|
Object ob = map.getValue();
|
||||||
if (ob instanceof ArrayList && ((ArrayList) ob).size() == 3) {
|
if (ob instanceof ArrayList && ((ArrayList) ob).size() == 3) {
|
||||||
|
|||||||
Reference in New Issue
Block a user