Skip to content

Commit 691458c

Browse files
committed
GP-119 fix tests to follow PECS
1 parent 1f56c41 commit 691458c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

1-0-java-basics/1-3-1-crazy-generics/src/main/java/com/bobocode/basics/CrazyGenerics.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import com.bobocode.basics.util.BaseEntity;
44
import lombok.Data;
5+
import lombok.val;
56

67
import java.io.Serializable;
78
import java.util.*;
@@ -66,7 +67,7 @@ public interface Converter<T, R> {
6667
*
6768
* @param <T> – value type
6869
*/
69-
public static class MaxHolder<T extends Comparable<T>> { // todo: refactor class to make it generic
70+
public static class MaxHolder<T extends Comparable<? super T>> { // todo: refactor class to make it generic
7071
private T max;
7172

7273
public MaxHolder(T max) {
@@ -95,7 +96,7 @@ public T getMax() {
9596
*
9697
* @param <T> – the type of objects that can be processed
9798
*/
98-
interface StrictProcessor<T extends Serializable & Comparable<T>> { // todo: make it generic
99+
interface StrictProcessor<T extends Serializable & Comparable<? super T>> { // todo: make it generic
99100
void process(T obj);
100101
}
101102

0 commit comments

Comments
 (0)