Skip to content

Commit 976ee1a

Browse files
authored
Dropped CollectionResult interface in MapResult (#347)
* Dropped CollectionResult interface in MapResult as Map does not implement Collection
1 parent 210c23d commit 976ee1a

File tree

1 file changed

+9
-2
lines changed
  • Scanner-Core/src/main/java/de/rub/nds/scanner/core/constants

1 file changed

+9
-2
lines changed

Scanner-Core/src/main/java/de/rub/nds/scanner/core/constants/MapResult.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import jakarta.xml.bind.annotation.XmlAccessType;
1212
import jakarta.xml.bind.annotation.XmlAccessorType;
1313
import jakarta.xml.bind.annotation.XmlRootElement;
14+
import java.io.Serializable;
1415
import java.util.Map;
1516

1617
/**
@@ -21,9 +22,10 @@
2122
*/
2223
@XmlRootElement(name = "result")
2324
@XmlAccessorType(XmlAccessType.FIELD)
24-
public class MapResult<S, T> extends CollectionResult<S> {
25+
public class MapResult<S, T> implements TestResult, Serializable {
2526

2627
private final Map<S, T> map;
28+
private final String name;
2729

2830
/**
2931
* The constructor for the MapResult. Use property.name() for the name parameter.
@@ -32,7 +34,7 @@ public class MapResult<S, T> extends CollectionResult<S> {
3234
* @param name the name of the MapResult.
3335
*/
3436
public MapResult(Map<S, T> map, String name) {
35-
super(map.keySet(), name);
37+
this.name = name;
3638
this.map = map;
3739
}
3840

@@ -42,4 +44,9 @@ public MapResult(Map<S, T> map, String name) {
4244
public Map<S, T> getMap() {
4345
return map;
4446
}
47+
48+
@Override
49+
public String name() {
50+
return name;
51+
}
4552
}

0 commit comments

Comments
 (0)