Skip to content

Commit becaef9

Browse files
committed
LinkedHashMap instead of Map is checked for yaml parsing result
1 parent e6f4d96 commit becaef9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/main/java/org/scm4j/commons/regexconfig/RegexConfig.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package org.scm4j.commons.regexconfig;
22

33
import java.util.LinkedHashMap;
4-
import java.util.Map;
54

65
public class RegexConfig {
76

@@ -42,7 +41,7 @@ public String getPlaceholderedStringByName(String nameToMatch, Object propName,
4241

4342
private LinkedHashMap<?,?> getPropsMap(LinkedHashMap<Object, Object> content, Object key) {
4443
Object res = content.get(key);
45-
if (!(Map.class.isInstance(res))) {
44+
if (!(res instanceof LinkedHashMap)) {
4645
throw new EConfigWrongFormat("Wrong config format met by key " + key + ": ordered map only is supported");
4746
}
4847
return (LinkedHashMap<?, ?>) res;

0 commit comments

Comments
 (0)