@@ -89,7 +89,9 @@ public interface InstanceOfAssertFactories {
89
89
*
90
90
* @see #PREDICATE
91
91
*/
92
- @ SuppressWarnings ({ "rawtypes" , "unused" }) // rawtypes: using Class instance, unused: parameter needed for type inference
92
+ @ SuppressWarnings ({"rawtypes" , "unused" , "unchecked" , "RedundantSuppression" })
93
+ // rawtypes+unchecked: using Class instance, unused: parameter needed for type inference.
94
+ // IntelliJ can warn that this is redundant when it is not.
93
95
static <T > InstanceOfAssertFactory <Predicate , PredicateAssert <T >> predicate (Class <T > type ) {
94
96
return new InstanceOfAssertFactory <>(Predicate .class , Assertions ::<T > assertThat );
95
97
}
@@ -129,7 +131,9 @@ static <T> InstanceOfAssertFactory<Predicate, PredicateAssert<T>> predicate(Clas
129
131
*
130
132
* @see #COMPLETABLE_FUTURE
131
133
*/
132
- @ SuppressWarnings ({ "rawtypes" , "unused" }) // rawtypes: using Class instance, unused: parameter needed for type inference
134
+ @ SuppressWarnings ({"rawtypes" , "unused" , "unchecked" , "RedundantSuppression" })
135
+ // rawtypes+unchecked: using Class instance, unused: parameter needed for type inference.
136
+ // IntelliJ can warn that this is redundant when it is not.
133
137
static <RESULT > InstanceOfAssertFactory <CompletableFuture , CompletableFutureAssert <RESULT >> completableFuture (Class <RESULT > resultType ) {
134
138
return new InstanceOfAssertFactory <>(CompletableFuture .class , Assertions ::<RESULT > assertThat );
135
139
}
@@ -151,7 +155,9 @@ static <RESULT> InstanceOfAssertFactory<CompletableFuture, CompletableFutureAsse
151
155
*
152
156
* @see #COMPLETION_STAGE
153
157
*/
154
- @ SuppressWarnings ({ "rawtypes" , "unused" }) // rawtypes: using Class instance, unused: parameter needed for type inference
158
+ @ SuppressWarnings ({"rawtypes" , "unused" , "unchecked" , "RedundantSuppression" })
159
+ // rawtypes+unchecked: using Class instance, unused: parameter needed for type inference.
160
+ // IntelliJ can warn that this is redundant when it is not.
155
161
static <RESULT > InstanceOfAssertFactory <CompletionStage , CompletableFutureAssert <RESULT >> completionStage (Class <RESULT > resultType ) {
156
162
return new InstanceOfAssertFactory <>(CompletionStage .class , Assertions ::<RESULT > assertThat );
157
163
}
@@ -173,7 +179,9 @@ static <RESULT> InstanceOfAssertFactory<CompletionStage, CompletableFutureAssert
173
179
*
174
180
* @see #OPTIONAL
175
181
*/
176
- @ SuppressWarnings ({ "rawtypes" , "unused" }) // rawtypes: using Class instance, unused: parameter needed for type inference
182
+ @ SuppressWarnings ({"rawtypes" , "unused" , "unchecked" , "RedundantSuppression" })
183
+ // rawtypes+unchecked: using Class instance, unused: parameter needed for type inference.
184
+ // IntelliJ can warn that this is redundant when it is not.
177
185
static <VALUE > InstanceOfAssertFactory <Optional , OptionalAssert <VALUE >> optional (Class <VALUE > resultType ) {
178
186
return new InstanceOfAssertFactory <>(Optional .class , Assertions ::<VALUE > assertThat );
179
187
}
@@ -338,7 +346,9 @@ static <VALUE> InstanceOfAssertFactory<Optional, OptionalAssert<VALUE>> optional
338
346
*
339
347
* @see #FUTURE
340
348
*/
341
- @ SuppressWarnings ({ "rawtypes" , "unused" }) // rawtypes: using Class instance, unused: parameter needed for type inference
349
+ @ SuppressWarnings ({"rawtypes" , "unused" , "unchecked" , "RedundantSuppression" })
350
+ // rawtypes+unchecked: using Class instance, unused: parameter needed for type inference.
351
+ // IntelliJ can warn that this is redundant when it is not.
342
352
static <RESULT > InstanceOfAssertFactory <Future , FutureAssert <RESULT >> future (Class <RESULT > resultType ) {
343
353
return new InstanceOfAssertFactory <>(Future .class , Assertions ::<RESULT > assertThat );
344
354
}
@@ -574,7 +584,9 @@ static <ELEMENT> InstanceOfAssertFactory<ELEMENT[][], Object2DArrayAssert<ELEMEN
574
584
*
575
585
* @see #ATOMIC_INTEGER_FIELD_UPDATER
576
586
*/
577
- @ SuppressWarnings ({ "rawtypes" , "unused" }) // rawtypes: using Class instance, unused: parameter needed for type inference
587
+ @ SuppressWarnings ({"rawtypes" , "unused" , "unchecked" , "RedundantSuppression" })
588
+ // rawtypes+unchecked: using Class instance, unused: parameter needed for type inference.
589
+ // IntelliJ can warn that this is redundant when it is not.
578
590
static <OBJECT > InstanceOfAssertFactory <AtomicIntegerFieldUpdater , AtomicIntegerFieldUpdaterAssert <OBJECT >> atomicIntegerFieldUpdater (Class <OBJECT > objectType ) {
579
591
return new InstanceOfAssertFactory <>(AtomicIntegerFieldUpdater .class , Assertions ::<OBJECT > assertThat );
580
592
}
@@ -614,7 +626,9 @@ static <OBJECT> InstanceOfAssertFactory<AtomicIntegerFieldUpdater, AtomicInteger
614
626
*
615
627
* @see #ATOMIC_LONG_FIELD_UPDATER
616
628
*/
617
- @ SuppressWarnings ({ "rawtypes" , "unused" }) // rawtypes: using Class instance, unused: parameter needed for type inference
629
+ @ SuppressWarnings ({"rawtypes" , "unused" , "unchecked" , "RedundantSuppression" })
630
+ // rawtypes+unchecked: using Class instance, unused: parameter needed for type inference.
631
+ // IntelliJ can warn that this is redundant when it is not.
618
632
static <OBJECT > InstanceOfAssertFactory <AtomicLongFieldUpdater , AtomicLongFieldUpdaterAssert <OBJECT >> atomicLongFieldUpdater (Class <OBJECT > objectType ) {
619
633
return new InstanceOfAssertFactory <>(AtomicLongFieldUpdater .class , Assertions ::<OBJECT > assertThat );
620
634
}
@@ -636,7 +650,9 @@ static <OBJECT> InstanceOfAssertFactory<AtomicLongFieldUpdater, AtomicLongFieldU
636
650
*
637
651
* @see #ATOMIC_REFERENCE
638
652
*/
639
- @ SuppressWarnings ({ "rawtypes" , "unused" }) // rawtypes: using Class instance, unused: parameter needed for type inference
653
+ @ SuppressWarnings ({"rawtypes" , "unused" , "unchecked" , "RedundantSuppression" })
654
+ // rawtypes+unchecked: using Class instance, unused: parameter needed for type inference.
655
+ // IntelliJ can warn that this is redundant when it is not.
640
656
static <VALUE > InstanceOfAssertFactory <AtomicReference , AtomicReferenceAssert <VALUE >> atomicReference (Class <VALUE > valueType ) {
641
657
return new InstanceOfAssertFactory <>(AtomicReference .class , Assertions ::<VALUE > assertThat );
642
658
}
@@ -658,7 +674,9 @@ static <VALUE> InstanceOfAssertFactory<AtomicReference, AtomicReferenceAssert<VA
658
674
*
659
675
* @see #ATOMIC_REFERENCE_ARRAY
660
676
*/
661
- @ SuppressWarnings ({ "rawtypes" , "unused" }) // rawtypes: using Class instance, unused: parameter needed for type inference
677
+ @ SuppressWarnings ({"rawtypes" , "unused" , "unchecked" , "RedundantSuppression" })
678
+ // rawtypes+unchecked: using Class instance, unused: parameter needed for type inference.
679
+ // IntelliJ can warn that this is redundant when it is not.
662
680
static <ELEMENT > InstanceOfAssertFactory <AtomicReferenceArray , AtomicReferenceArrayAssert <ELEMENT >> atomicReferenceArray (Class <ELEMENT > elementType ) {
663
681
return new InstanceOfAssertFactory <>(AtomicReferenceArray .class , Assertions ::<ELEMENT > assertThat );
664
682
}
@@ -683,7 +701,9 @@ static <ELEMENT> InstanceOfAssertFactory<AtomicReferenceArray, AtomicReferenceAr
683
701
*
684
702
* @see #ATOMIC_REFERENCE_FIELD_UPDATER
685
703
*/
686
- @ SuppressWarnings ({ "rawtypes" , "unused" }) // rawtypes: using Class instance, unused: parameter needed for type inference
704
+ @ SuppressWarnings ({"rawtypes" , "unused" , "unchecked" , "RedundantSuppression" })
705
+ // rawtypes+unchecked: using Class instance, unused: parameter needed for type inference.
706
+ // IntelliJ can warn that this is redundant when it is not.
687
707
static <FIELD , OBJECT > InstanceOfAssertFactory <AtomicReferenceFieldUpdater , AtomicReferenceFieldUpdaterAssert <FIELD , OBJECT >> atomicReferenceFieldUpdater (Class <FIELD > fieldType ,
688
708
Class <OBJECT > objectType ) {
689
709
return new InstanceOfAssertFactory <>(AtomicReferenceFieldUpdater .class , Assertions ::<FIELD , OBJECT > assertThat );
@@ -706,7 +726,9 @@ static <FIELD, OBJECT> InstanceOfAssertFactory<AtomicReferenceFieldUpdater, Atom
706
726
*
707
727
* @see #ATOMIC_MARKABLE_REFERENCE
708
728
*/
709
- @ SuppressWarnings ({ "rawtypes" , "unused" }) // rawtypes: using Class instance, unused: parameter needed for type inference
729
+ @ SuppressWarnings ({"rawtypes" , "unused" , "unchecked" , "RedundantSuppression" })
730
+ // rawtypes+unchecked: using Class instance, unused: parameter needed for type inference.
731
+ // IntelliJ can warn that this is redundant when it is not.
710
732
static <VALUE > InstanceOfAssertFactory <AtomicMarkableReference , AtomicMarkableReferenceAssert <VALUE >> atomicMarkableReference (Class <VALUE > valueType ) {
711
733
return new InstanceOfAssertFactory <>(AtomicMarkableReference .class , Assertions ::<VALUE > assertThat );
712
734
}
@@ -728,7 +750,9 @@ static <VALUE> InstanceOfAssertFactory<AtomicMarkableReference, AtomicMarkableRe
728
750
*
729
751
* @see #ATOMIC_STAMPED_REFERENCE
730
752
*/
731
- @ SuppressWarnings ({ "rawtypes" , "unused" }) // rawtypes: using Class instance, unused: parameter needed for type inference
753
+ @ SuppressWarnings ({"rawtypes" , "unused" , "unchecked" , "RedundantSuppression" })
754
+ // rawtypes+unchecked: using Class instance, unused: parameter needed for type inference.
755
+ // IntelliJ can warn that this is redundant when it is not.
732
756
static <VALUE > InstanceOfAssertFactory <AtomicStampedReference , AtomicStampedReferenceAssert <VALUE >> atomicStampedReference (Class <VALUE > valueType ) {
733
757
return new InstanceOfAssertFactory <>(AtomicStampedReference .class , Assertions ::<VALUE > assertThat );
734
758
}
@@ -794,7 +818,9 @@ static <T extends Throwable> InstanceOfAssertFactory<T, AbstractThrowableAssert<
794
818
*
795
819
* @see #ITERABLE
796
820
*/
797
- @ SuppressWarnings ({ "rawtypes" , "unused" }) // rawtypes: using Class instance, unused: parameter needed for type inference
821
+ @ SuppressWarnings ({"rawtypes" , "unused" , "unchecked" , "RedundantSuppression" })
822
+ // rawtypes+unchecked: using Class instance, unused: parameter needed for type inference.
823
+ // IntelliJ can warn that this is redundant when it is not.
798
824
static <ELEMENT > InstanceOfAssertFactory <Iterable , IterableAssert <ELEMENT >> iterable (Class <ELEMENT > elementType ) {
799
825
return new InstanceOfAssertFactory <>(Iterable .class , Assertions ::<ELEMENT > assertThat );
800
826
}
@@ -816,7 +842,9 @@ static <ELEMENT> InstanceOfAssertFactory<Iterable, IterableAssert<ELEMENT>> iter
816
842
*
817
843
* @see #ITERATOR
818
844
*/
819
- @ SuppressWarnings ({ "rawtypes" , "unused" }) // rawtypes: using Class instance, unused: parameter needed for type inference
845
+ @ SuppressWarnings ({"rawtypes" , "unused" , "unchecked" , "RedundantSuppression" })
846
+ // rawtypes+unchecked: using Class instance, unused: parameter needed for type inference.
847
+ // IntelliJ can warn that this is redundant when it is not.
820
848
static <ELEMENT > InstanceOfAssertFactory <Iterator , IteratorAssert <ELEMENT >> iterator (Class <ELEMENT > elementType ) {
821
849
return new InstanceOfAssertFactory <>(Iterator .class , Assertions ::<ELEMENT > assertThat );
822
850
}
@@ -840,7 +868,9 @@ static <ELEMENT> InstanceOfAssertFactory<Iterator, IteratorAssert<ELEMENT>> iter
840
868
* @see #COLLECTION
841
869
* @since 3.21.0
842
870
*/
843
- @ SuppressWarnings ({ "rawtypes" , "unused" }) // rawtypes: using Class instance, unused: parameter needed for type inference
871
+ @ SuppressWarnings ({"rawtypes" , "unused" , "unchecked" , "RedundantSuppression" })
872
+ // rawtypes+unchecked: using Class instance, unused: parameter needed for type inference.
873
+ // IntelliJ can warn that this is redundant when it is not.
844
874
static <E > InstanceOfAssertFactory <Collection , AbstractCollectionAssert <?, Collection <? extends E >, E , ObjectAssert <E >>> collection (Class <E > elementType ) {
845
875
return new InstanceOfAssertFactory <>(Collection .class , Assertions ::<E > assertThat );
846
876
}
@@ -862,7 +892,9 @@ static <E> InstanceOfAssertFactory<Collection, AbstractCollectionAssert<?, Colle
862
892
*
863
893
* @see #LIST
864
894
*/
865
- @ SuppressWarnings ({ "rawtypes" , "unused" }) // rawtypes: using Class instance, unused: parameter needed for type inference
895
+ @ SuppressWarnings ({"rawtypes" , "unused" , "unchecked" , "RedundantSuppression" })
896
+ // rawtypes+unchecked: using Class instance, unused: parameter needed for type inference.
897
+ // IntelliJ can warn that this is redundant when it is not.
866
898
static <ELEMENT > InstanceOfAssertFactory <List , ListAssert <ELEMENT >> list (Class <ELEMENT > elementType ) {
867
899
return new InstanceOfAssertFactory <>(List .class , Assertions ::<ELEMENT > assertThat );
868
900
}
@@ -884,7 +916,9 @@ static <ELEMENT> InstanceOfAssertFactory<List, ListAssert<ELEMENT>> list(Class<E
884
916
*
885
917
* @see #STREAM
886
918
*/
887
- @ SuppressWarnings ({ "rawtypes" , "unused" }) // rawtypes: using Class instance, unused: parameter needed for type inference
919
+ @ SuppressWarnings ({"rawtypes" , "unused" , "unchecked" , "RedundantSuppression" })
920
+ // rawtypes+unchecked: using Class instance, unused: parameter needed for type inference.
921
+ // IntelliJ can warn that this is redundant when it is not.
888
922
static <ELEMENT > InstanceOfAssertFactory <Stream , ListAssert <ELEMENT >> stream (Class <ELEMENT > elementType ) {
889
923
return new InstanceOfAssertFactory <>(Stream .class , Assertions ::<ELEMENT > assertThat );
890
924
}
@@ -930,7 +964,9 @@ static <ELEMENT> InstanceOfAssertFactory<Stream, ListAssert<ELEMENT>> stream(Cla
930
964
*
931
965
* @see #SPLITERATOR
932
966
*/
933
- @ SuppressWarnings ({ "rawtypes" , "unused" }) // rawtypes: using Class instance, unused: parameter needed for type inference
967
+ @ SuppressWarnings ({"rawtypes" , "unused" , "unchecked" , "RedundantSuppression" })
968
+ // rawtypes+unchecked: using Class instance, unused: parameter needed for type inference.
969
+ // IntelliJ can warn that this is redundant when it is not.
934
970
static <ELEMENT > InstanceOfAssertFactory <Spliterator , SpliteratorAssert <ELEMENT >> spliterator (Class <ELEMENT > elementType ) {
935
971
return new InstanceOfAssertFactory <>(Spliterator .class , Assertions ::<ELEMENT > assertThat );
936
972
}
@@ -954,7 +990,9 @@ static <ELEMENT> InstanceOfAssertFactory<Spliterator, SpliteratorAssert<ELEMENT>
954
990
*
955
991
* @see #MAP
956
992
*/
957
- @ SuppressWarnings ({ "rawtypes" , "unused" }) // rawtypes: using Class instance, unused: parameter needed for type inference
993
+ @ SuppressWarnings ({"rawtypes" , "unused" , "unchecked" , "RedundantSuppression" })
994
+ // rawtypes+unchecked: using Class instance, unused: parameter needed for type inference.
995
+ // IntelliJ can warn that this is redundant when it is not.
958
996
static <K , V > InstanceOfAssertFactory <Map , MapAssert <K , V >> map (Class <K > keyType , Class <V > valueType ) {
959
997
return new InstanceOfAssertFactory <>(Map .class , Assertions ::<K , V > assertThat );
960
998
}
0 commit comments