Polish "Use Map#forEach instead of Map#entrySet#forEach"
Closes gh-1449
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -281,9 +281,8 @@ public class BaseViewTests {
|
||||
*/
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
private void checkContainsAll(Map expected, Map<String, Object> actual) {
|
||||
expected.forEach(
|
||||
(k, v) -> assertEquals("Values for model key '" + k + "' must match", expected.get(k), actual.get(k))
|
||||
);
|
||||
expected.forEach((k, v) -> assertEquals("Values for model key '" + k
|
||||
+ "' must match", expected.get(k), actual.get(k)));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -84,10 +84,8 @@ public class InternalResourceViewTests {
|
||||
view.render(model, request, response);
|
||||
assertEquals(url, response.getForwardedUrl());
|
||||
|
||||
|
||||
model.forEach(
|
||||
(key, value) -> assertEquals("Values for model key '" + key + "' must match", value, request.getAttribute(key))
|
||||
);
|
||||
model.forEach((key, value) -> assertEquals("Values for model key '" + key
|
||||
+ "' must match", value, request.getAttribute(key)));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user