mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-24 15:49:26 +00:00
Use the diamond syntax
Closes gh-1450
This commit is contained in:
+1
-1
@@ -288,7 +288,7 @@ public class MockHttpServletRequestBuilder
|
||||
*/
|
||||
public MockHttpServletRequestBuilder accept(String... mediaTypes) {
|
||||
Assert.notEmpty(mediaTypes, "'mediaTypes' must not be empty");
|
||||
List<MediaType> result = new ArrayList<MediaType>(mediaTypes.length);
|
||||
List<MediaType> result = new ArrayList<>(mediaTypes.length);
|
||||
for (String mediaType : mediaTypes) {
|
||||
result.add(MediaType.parseMediaType(mediaType));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user