@@ -36,7 +36,7 @@ public class ServletSecurityElement extends HttpConstraintElement {
36
36
* element and with no HTTP Method specific constraint elements.
37
37
*/
38
38
public ServletSecurityElement () {
39
- methodConstraints = new HashSet <HttpMethodConstraintElement >();
39
+ methodConstraints = new HashSet <>();
40
40
methodNames = Collections .emptySet ();
41
41
}
42
42
@@ -52,7 +52,7 @@ public ServletSecurityElement(HttpConstraintElement constraint) {
52
52
super (constraint .getEmptyRoleSemantic (),
53
53
constraint .getTransportGuarantee (),
54
54
constraint .getRolesAllowed ());
55
- methodConstraints = new HashSet <HttpMethodConstraintElement >();
55
+ methodConstraints = new HashSet <>();
56
56
methodNames = Collections .emptySet ();
57
57
}
58
58
@@ -71,7 +71,7 @@ public ServletSecurityElement(HttpConstraintElement constraint) {
71
71
public ServletSecurityElement (
72
72
Collection <HttpMethodConstraintElement > methodConstraints ) {
73
73
this .methodConstraints = (methodConstraints == null ?
74
- new HashSet <HttpMethodConstraintElement >() : methodConstraints );
74
+ new HashSet <>() : methodConstraints );
75
75
methodNames = checkMethodNames (this .methodConstraints );
76
76
}
77
77
@@ -94,7 +94,7 @@ public ServletSecurityElement(HttpConstraintElement constraint,
94
94
constraint .getTransportGuarantee (),
95
95
constraint .getRolesAllowed ());
96
96
this .methodConstraints = (methodConstraints == null ?
97
- new HashSet <HttpMethodConstraintElement >() : methodConstraints );
97
+ new HashSet <>() : methodConstraints );
98
98
methodNames = checkMethodNames (this .methodConstraints );
99
99
}
100
100
@@ -110,7 +110,7 @@ public ServletSecurityElement(ServletSecurity annotation) {
110
110
super (annotation .value ().value (),
111
111
annotation .value ().transportGuarantee (),
112
112
annotation .value ().rolesAllowed ());
113
- this .methodConstraints = new HashSet <HttpMethodConstraintElement >();
113
+ this .methodConstraints = new HashSet <>();
114
114
for (HttpMethodConstraint constraint :
115
115
annotation .httpMethodConstraints ()) {
116
116
this .methodConstraints .add (
@@ -164,7 +164,7 @@ public Collection<String> getMethodNames() {
164
164
*/
165
165
private Collection <String > checkMethodNames (
166
166
Collection <HttpMethodConstraintElement > methodConstraints ) {
167
- Collection <String > methodNames = new HashSet <String >();
167
+ Collection <String > methodNames = new HashSet <>();
168
168
for (HttpMethodConstraintElement methodConstraint :
169
169
methodConstraints ) {
170
170
String methodName = methodConstraint .getMethodName ();
0 commit comments