Skip to content

Commit

Permalink
[hotfix] Cleanup raw types around PriorityQueueSetFactory
Browse files Browse the repository at this point in the history
  • Loading branch information
dawidwys committed Feb 24, 2021
1 parent 2f16bff commit 7f3aa39
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public interface PriorityQueueSetFactory {
* @return the queue with the specified unique name.
*/
@Nonnull
<T extends HeapPriorityQueueElement & PriorityComparable & Keyed>
<T extends HeapPriorityQueueElement & PriorityComparable<? super T> & Keyed<?>>
KeyGroupedInternalPriorityQueue<T> create(
@Nonnull String stateName,
@Nonnull TypeSerializer<T> byteOrderedElementSerializer);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,13 +157,13 @@ public HeapKeyedStateBackend(
@SuppressWarnings("unchecked")
@Nonnull
@Override
public <T extends HeapPriorityQueueElement & PriorityComparable & Keyed>
public <T extends HeapPriorityQueueElement & PriorityComparable<? super T> & Keyed<?>>
KeyGroupedInternalPriorityQueue<T> create(
@Nonnull String stateName,
@Nonnull TypeSerializer<T> byteOrderedElementSerializer) {

final HeapPriorityQueueSnapshotRestoreWrapper existingState =
registeredPQStates.get(stateName);
final HeapPriorityQueueSnapshotRestoreWrapper<T> existingState =
(HeapPriorityQueueSnapshotRestoreWrapper<T>) registeredPQStates.get(stateName);

if (existingState != null) {
// TODO we implement the simple way of supporting the current functionality, mimicking
Expand Down Expand Up @@ -197,7 +197,7 @@ KeyGroupedInternalPriorityQueue<T> create(
}

@Nonnull
private <T extends HeapPriorityQueueElement & PriorityComparable & Keyed>
private <T extends HeapPriorityQueueElement & PriorityComparable<? super T> & Keyed<?>>
KeyGroupedInternalPriorityQueue<T> createInternal(
RegisteredPriorityQueueStateBackendMetaInfo<T> metaInfo) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public HeapPriorityQueueSetFactory(

@Nonnull
@Override
public <T extends HeapPriorityQueueElement & PriorityComparable & Keyed>
public <T extends HeapPriorityQueueElement & PriorityComparable<? super T> & Keyed<?>>
HeapPriorityQueueSet<T> create(
@Nonnull String stateName,
@Nonnull TypeSerializer<T> byteOrderedElementSerializer) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ private static <K> void copyEntry(

@Nonnull
@Override
public <T extends HeapPriorityQueueElement & PriorityComparable & Keyed>
public <T extends HeapPriorityQueueElement & PriorityComparable<? super T> & Keyed<?>>
KeyGroupedInternalPriorityQueue<T> create(
@Nonnull String stateName,
@Nonnull TypeSerializer<T> byteOrderedElementSerializer) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ public void dispose() {

@Nonnull
@Override
public <T extends HeapPriorityQueueElement & PriorityComparable & Keyed>
public <T extends HeapPriorityQueueElement & PriorityComparable<? super T> & Keyed<?>>
KeyGroupedInternalPriorityQueue<T> create(
@Nonnull String stateName,
@Nonnull TypeSerializer<T> byteOrderedElementSerializer) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public class RocksDBPriorityQueueSetFactory implements PriorityQueueSetFactory {

@Nonnull
@Override
public <T extends HeapPriorityQueueElement & PriorityComparable & Keyed>
public <T extends HeapPriorityQueueElement & PriorityComparable<? super T> & Keyed<?>>
KeyGroupedInternalPriorityQueue<T> create(
@Nonnull String stateName,
@Nonnull TypeSerializer<T> byteOrderedElementSerializer) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,8 @@ private <N, SV, S extends State, IS extends S> IS createState(

@Nonnull
@Override
@SuppressWarnings({"rawtypes", "unchecked"})
public <T extends HeapPriorityQueueElement & PriorityComparable & Keyed>
@SuppressWarnings({"unchecked"})
public <T extends HeapPriorityQueueElement & PriorityComparable<? super T> & Keyed<?>>
KeyGroupedInternalPriorityQueue<T> create(
@Nonnull String stateName,
@Nonnull TypeSerializer<T> byteOrderedElementSerializer) {
Expand Down

0 comments on commit 7f3aa39

Please sign in to comment.