Skip to content

Commit 8494a13

Browse files
committed
tidy up generics
1 parent 0f9ba23 commit 8494a13

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

hamcrest-library/src/main/java/org/hamcrest/beans/SamePropertyValuesAs.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,15 @@ private boolean hasMatchingValues(T item, Description mismatchDescription) {
7272
}
7373

7474
private static <T> List<PropertyMatcher> propertyMatchersFor(T bean, PropertyDescriptor[] descriptors) {
75-
List<PropertyMatcher> result = new ArrayList<PropertyMatcher>(descriptors.length);
75+
List<PropertyMatcher> result = new ArrayList<>(descriptors.length);
7676
for (PropertyDescriptor propertyDescriptor : descriptors) {
7777
result.add(new PropertyMatcher(propertyDescriptor, bean));
7878
}
7979
return result;
8080
}
8181

8282
private static Set<String> propertyNamesFrom(PropertyDescriptor[] descriptors) {
83-
HashSet<String> result = new HashSet<String>();
83+
HashSet<String> result = new HashSet<>();
8484
for (PropertyDescriptor propertyDescriptor : descriptors) {
8585
result.add(propertyDescriptor.getDisplayName());
8686
}
@@ -134,7 +134,7 @@ private static Object readProperty(Method method, Object target) {
134134
* the bean against which examined beans are compared
135135
*/
136136
public static <T> Matcher<T> samePropertyValuesAs(T expectedBean) {
137-
return new SamePropertyValuesAs<T>(expectedBean);
137+
return new SamePropertyValuesAs<>(expectedBean);
138138
}
139139

140140
}

0 commit comments

Comments
 (0)