File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
1-0-java-basics/1-3-1-crazy-generics/src/test/java/com/bobocode/basics Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -187,7 +187,7 @@ void maxHolderClassTypeParameterShouldBeBoundByComparableT() {
187187 var typeParam = typeParameters [0 ];
188188 var boundType = typeParam .getBounds ()[0 ];
189189
190- var expectedBoundTypeName = String .format ("%s<%s>" , Comparable .class .getTypeName (), TYPE_PARAMETER_NAME );
190+ var expectedBoundTypeName = String .format ("%s<? super %s>" , Comparable .class .getTypeName (), TYPE_PARAMETER_NAME );
191191 assertThat (boundType .getTypeName ()).isEqualTo (expectedBoundTypeName );
192192 }
193193
@@ -295,7 +295,7 @@ void strictProcessorTypeParameterIsBoundBySerializableAndComparable() {
295295 assertThat (serializableBoundType .getTypeName ())
296296 .isEqualTo (Serializable .class .getTypeName ());
297297 assertThat (comparableBoundType .getTypeName ())
298- .isEqualTo (String .format ("%s<%s>" , Comparable .class .getTypeName (), TYPE_PARAMETER_NAME ));
298+ .isEqualTo (String .format ("%s<? super %s>" , Comparable .class .getTypeName (), TYPE_PARAMETER_NAME ));
299299 }
300300
301301 @ Test
You can’t perform that action at this time.
0 commit comments