@@ -70,7 +70,7 @@ public void printStats() {
70
70
}
71
71
72
72
public List <File > getAllEmbedFiles () {
73
- List <File > files = new ArrayList ();
73
+ List <File > files = new ArrayList <> ();
74
74
for (ScenarioResult sr : scenarioResults ) {
75
75
for (StepResult stepResult : sr .getStepResults ()) {
76
76
if (stepResult .getEmbeds () != null ) {
@@ -105,7 +105,7 @@ public static FeatureResult fromKarateJson(File workingDir, Map<String, Object>
105
105
}
106
106
107
107
public Map <String , Object > toInfoJson () {
108
- Map <String , Object > map = new HashMap ();
108
+ Map <String , Object > map = new HashMap <> ();
109
109
map .put ("name" , feature .getName ());
110
110
map .put ("description" , feature .getDescription ());
111
111
map .put ("prefixedPath" , feature .getResource ().getPrefixedPath ());
@@ -118,7 +118,7 @@ public Map<String, Object> toInfoJson() {
118
118
}
119
119
120
120
public Map <String , Object > toSummaryJson () {
121
- Map <String , Object > map = new HashMap ();
121
+ Map <String , Object > map = new HashMap <> ();
122
122
map .put ("failed" , isFailed ());
123
123
map .put ("name" , feature .getName ());
124
124
map .put ("description" , feature .getDescription ());
@@ -132,7 +132,7 @@ public Map<String, Object> toSummaryJson() {
132
132
}
133
133
134
134
public Map <String , Object > toKarateJson () {
135
- Map <String , Object > map = new HashMap ();
135
+ Map <String , Object > map = new HashMap <> ();
136
136
// these first few are only for the ease of reports
137
137
// note that they are not involved in the reverse fromKarateJson()
138
138
map .put ("name" , feature .getName ());
@@ -148,7 +148,7 @@ public Map<String, Object> toKarateJson() {
148
148
}
149
149
map .put ("resultDate" , resultDate );
150
150
map .put ("prefixedPath" , feature .getResource ().getPrefixedPath ());
151
- List <Map <String , Object >> list = new ArrayList (scenarioResults .size ());
151
+ List <Map <String , Object >> list = new ArrayList <> (scenarioResults .size ());
152
152
map .put ("scenarioResults" , list );
153
153
for (ScenarioResult sr : scenarioResults ) {
154
154
list .add (sr .toKarateJson ());
@@ -163,7 +163,7 @@ public Map<String, Object> toKarateJson() {
163
163
}
164
164
165
165
public Map <String , Object > toCucumberJson () {
166
- Map <String , Object > map = new HashMap ();
166
+ Map <String , Object > map = new HashMap <> ();
167
167
map .put ("keyword" , Feature .KEYWORD );
168
168
map .put ("line" , feature .getLine ());
169
169
map .put ("uri" , displayName );
@@ -177,7 +177,7 @@ public Map<String, Object> toCucumberJson() {
177
177
if (feature .getTags () != null ) {
178
178
map .put ("tags" , ScenarioResult .tagsToCucumberJson (feature .getTags ()));
179
179
}
180
- List <Map <String , Object >> list = new ArrayList (scenarioResults .size ());
180
+ List <Map <String , Object >> list = new ArrayList <> (scenarioResults .size ());
181
181
map .put ("elements" , list );
182
182
for (ScenarioResult sr : scenarioResults ) {
183
183
Map <String , Object > backgroundMap = sr .backgroundToCucumberJson ();
@@ -190,7 +190,7 @@ public Map<String, Object> toCucumberJson() {
190
190
}
191
191
192
192
public List <StepResult > getAllScenarioStepResultsNotHidden () {
193
- List <StepResult > list = new ArrayList ();
193
+ List <StepResult > list = new ArrayList <> ();
194
194
for (ScenarioResult sr : scenarioResults ) {
195
195
list .addAll (sr .getStepResultsNotHidden ());
196
196
}
@@ -286,7 +286,7 @@ public boolean isFailed() {
286
286
}
287
287
288
288
public List <String > getErrors () {
289
- List <String > errors = new ArrayList ();
289
+ List <String > errors = new ArrayList <> ();
290
290
for (ScenarioResult sr : scenarioResults ) {
291
291
if (sr .isFailed ()) {
292
292
errors .add (sr .getErrorMessage ());
@@ -305,7 +305,7 @@ public void setVariables(Map<String, Object> resultVariables) {
305
305
306
306
public Map <String , Object > getVariables () {
307
307
// edge case if no scenarios were run
308
- return resultVariables == null ? new HashMap () : resultVariables ;
308
+ return resultVariables == null ? new HashMap <> () : resultVariables ;
309
309
}
310
310
311
311
public void setConfig (Config config ) {
0 commit comments