Skip to content

Commit 0454719

Browse files
committed
Simplify annotations
1 parent 2b8c1af commit 0454719

29 files changed

Lines changed: 101 additions & 101 deletions

core/src/main/java/fj/Bottom.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public static <A> Error decons(final A a, final Show<A> sa) {
7272
* @param c The type being deconstructed.
7373
* @return A deconstruction failure that was non-exhaustive.
7474
*/
75-
@SuppressWarnings({"UnnecessaryFullyQualifiedName"})
75+
@SuppressWarnings("UnnecessaryFullyQualifiedName")
7676
public static <A> Error decons(final java.lang.Class<A> c) {
7777
return error("Deconstruction failure on type " + c);
7878
}

core/src/main/java/fj/Class.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public java.lang.Class<? super T> _1() {
3939
return c2;
4040
}
4141

42-
@SuppressWarnings({"unchecked"})
42+
@SuppressWarnings("unchecked")
4343
public java.lang.Class<? super T> _2() {
4444
return c2.getSuperclass();
4545
}

core/src/main/java/fj/F1Functions.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public static <A, B,C> F<F<C, A>, F<C, B>> o(final F<A, B> f) {
4949
* @param g A function with which to compose this one.
5050
* @return The composed function such that this function is applied first.
5151
*/
52-
@SuppressWarnings({"unchecked"})
52+
@SuppressWarnings("unchecked")
5353
public static <A, B, C> F<A, C> andThen(final F<A, B> f, final F<B, C> g) {
5454
return o(g, f);
5555
}
@@ -259,7 +259,7 @@ public static <A, B> F<Promise<A>, Promise<B>> mapPromise(final F<A, B> f) {
259259
*
260260
* @return This function promoted to return its result on the left side of an Either.
261261
*/
262-
@SuppressWarnings({"unchecked"})
262+
@SuppressWarnings("unchecked")
263263
public static <A, B, C> F<A, Either<B, C>> eitherLeftK(final F<A, B> f) {
264264
return o(Either.<B, C>left_(), f);
265265
}
@@ -270,7 +270,7 @@ public static <A, B, C> F<A, Either<B, C>> eitherLeftK(final F<A, B> f) {
270270
*
271271
* @return This function promoted to return its result on the right side of an Either.
272272
*/
273-
@SuppressWarnings({"unchecked"})
273+
@SuppressWarnings("unchecked")
274274
public static <A, B, C> F<A, Either<C, B>> eitherRightK(final F<A, B> f) {
275275
return o(Either.<C, B>right_(), f);
276276
}
@@ -280,7 +280,7 @@ public static <A, B, C> F<A, Either<C, B>> eitherRightK(final F<A, B> f) {
280280
*
281281
* @return This function promoted to map over the left side of an Either.
282282
*/
283-
@SuppressWarnings({"unchecked"})
283+
@SuppressWarnings("unchecked")
284284
public static <A, B, X> F<Either<A, X>, Either<B, X>> mapLeft(final F<A, B> f) {
285285
return Either.<A, X, B>leftMap_().f(f);
286286
}
@@ -290,7 +290,7 @@ public static <A, B, X> F<Either<A, X>, Either<B, X>> mapLeft(final F<A, B> f) {
290290
*
291291
* @return This function promoted to map over the right side of an Either.
292292
*/
293-
@SuppressWarnings({"unchecked"})
293+
@SuppressWarnings("unchecked")
294294
public static <A, B, X> F<Either<X, A>, Either<X, B>> mapRight(final F<A, B> f) {
295295
return Either.<X, A, B>rightMap_().f(f);
296296
}
@@ -318,7 +318,7 @@ public static <A, B> F<Either<A, B>, B> onRight(final F<A, B> f) {
318318
*
319319
* @return This function promoted to return its value in an Iterable.
320320
*/
321-
@SuppressWarnings({"unchecked"})
321+
@SuppressWarnings("unchecked")
322322
public static <A, B> F<A, IterableW<B>> iterableK(final F<A, B> f) {
323323
return IterableW.<A, B>arrow().f(f);
324324
}
@@ -328,7 +328,7 @@ public static <A, B> F<A, IterableW<B>> iterableK(final F<A, B> f) {
328328
*
329329
* @return This function promoted to map over Iterables.
330330
*/
331-
@SuppressWarnings({"unchecked"})
331+
@SuppressWarnings("unchecked")
332332
public static <A, B> F<Iterable<A>, IterableW<B>> mapIterable(final F<A, B> f) {
333333
return F1Functions.o(IterableW.<A, B>map().f(f), IterableW.<A, Iterable<A>>wrap());
334334
}
@@ -338,7 +338,7 @@ public static <A, B> F<Iterable<A>, IterableW<B>> mapIterable(final F<A, B> f) {
338338
*
339339
* @return This function promoted to return its value in a NonEmptyList.
340340
*/
341-
@SuppressWarnings({"unchecked"})
341+
@SuppressWarnings("unchecked")
342342
public static <A, B> F<A, NonEmptyList<B>> nelK(final F<A, B> f) {
343343
return o(NonEmptyList.<B>nel(), f);
344344
}
@@ -387,7 +387,7 @@ public static <A, B> F<A, Tree<B>> treeK(final F<A, B> f) {
387387
*
388388
* @return This function promoted to map over a Tree.
389389
*/
390-
@SuppressWarnings({"unchecked"})
390+
@SuppressWarnings("unchecked")
391391
public static <A, B> F<Tree<A>, Tree<B>> mapTree(final F<A, B> f) {
392392
return Tree.<A, B>fmap_().f(f);
393393
}

core/src/main/java/fj/F1W.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public <C> F1W<F<C, A>, F<C, B>> o() {
4141
* @param g A function with which to compose this one.
4242
* @return The composed function such that this function is applied first.
4343
*/
44-
@SuppressWarnings({"unchecked"})
44+
@SuppressWarnings("unchecked")
4545
public <C> F1W<A, C> andThen(final F<B, C> g) {
4646
return lift(F1Functions.andThen(this, g));
4747
}
@@ -254,7 +254,7 @@ public F1W<Promise<A>, Promise<B>> mapPromise() {
254254
*
255255
* @return This function promoted to return its result on the left side of an Either.
256256
*/
257-
@SuppressWarnings({"unchecked"})
257+
@SuppressWarnings("unchecked")
258258
public <C> F1W<A, Either<B, C>> eitherLeftK() {
259259
return lift(F1Functions.eitherLeftK(this));
260260
}
@@ -265,7 +265,7 @@ public <C> F1W<A, Either<B, C>> eitherLeftK() {
265265
*
266266
* @return This function promoted to return its result on the right side of an Either.
267267
*/
268-
@SuppressWarnings({"unchecked"})
268+
@SuppressWarnings("unchecked")
269269
public <C> F1W<A, Either<C, B>> eitherRightK() {
270270
return lift(F1Functions.eitherRightK(this));
271271
}
@@ -275,7 +275,7 @@ public <C> F1W<A, Either<C, B>> eitherRightK() {
275275
*
276276
* @return This function promoted to map over the left side of an Either.
277277
*/
278-
@SuppressWarnings({"unchecked"})
278+
@SuppressWarnings("unchecked")
279279
public <X> F1W<Either<A, X>, Either<B, X>> mapLeft() {
280280
return lift(F1Functions.mapLeft(this));
281281
}
@@ -285,7 +285,7 @@ public <X> F1W<Either<A, X>, Either<B, X>> mapLeft() {
285285
*
286286
* @return This function promoted to map over the right side of an Either.
287287
*/
288-
@SuppressWarnings({"unchecked"})
288+
@SuppressWarnings("unchecked")
289289
public <X> F1W<Either<X, A>, Either<X, B>> mapRight() {
290290
return lift(F1Functions.mapRight(this));
291291
}
@@ -313,7 +313,7 @@ public F1W<Either<A, B>, B> onRight() {
313313
*
314314
* @return This function promoted to return its value in an Iterable.
315315
*/
316-
@SuppressWarnings({"unchecked"})
316+
@SuppressWarnings("unchecked")
317317
public F1W<A, IterableW<B>> iterableK() {
318318
return lift( F1Functions.iterableK(this));
319319
}
@@ -323,7 +323,7 @@ public F1W<A, IterableW<B>> iterableK() {
323323
*
324324
* @return This function promoted to map over Iterables.
325325
*/
326-
@SuppressWarnings({"unchecked"})
326+
@SuppressWarnings("unchecked")
327327
public F1W<Iterable<A>, IterableW<B>> mapIterable() {
328328
return lift( F1Functions.mapIterable(this));
329329
}
@@ -333,7 +333,7 @@ public F1W<Iterable<A>, IterableW<B>> mapIterable() {
333333
*
334334
* @return This function promoted to return its value in a NonEmptyList.
335335
*/
336-
@SuppressWarnings({"unchecked"})
336+
@SuppressWarnings("unchecked")
337337
public F1W<A, NonEmptyList<B>> nelK() {
338338
return lift(F1Functions.nelK(this));
339339
}
@@ -381,7 +381,7 @@ public F1W<A, Tree<B>> treeK() {
381381
*
382382
* @return This function promoted to map over a Tree.
383383
*/
384-
@SuppressWarnings({"unchecked"})
384+
@SuppressWarnings("unchecked")
385385
public F1W<Tree<A>, Tree<B>> mapTree() {
386386
return lift(F1Functions.mapTree(this));
387387
}

core/src/main/java/fj/Monoid.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ public static <A> Monoid<Stream<A>> streamMonoid() {
381381
*
382382
* @return A monoid for arrays.
383383
*/
384-
@SuppressWarnings({"unchecked"})
384+
@SuppressWarnings("unchecked")
385385
public static <A> Monoid<Array<A>> arrayMonoid() {
386386
return monoid(Semigroup.<A>arraySemigroup(), Array.<A>empty());
387387
}

core/src/main/java/fj/P6.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* @version %build.number%
77
*/
8-
@SuppressWarnings({"UnnecessaryFullyQualifiedName"})
8+
@SuppressWarnings("UnnecessaryFullyQualifiedName")
99
public abstract class P6<A, B, C, D, E, F> {
1010
/**
1111
* Access the first element of the product.

core/src/main/java/fj/P7.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* @version %build.number%
77
*/
8-
@SuppressWarnings({"UnnecessaryFullyQualifiedName"})
8+
@SuppressWarnings("UnnecessaryFullyQualifiedName")
99
public abstract class P7<A, B, C, D, E, F, G> {
1010
/**
1111
* Access the first element of the product.

core/src/main/java/fj/P8.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* @version %build.number%
77
*/
8-
@SuppressWarnings({"UnnecessaryFullyQualifiedName"})
8+
@SuppressWarnings("UnnecessaryFullyQualifiedName")
99
public abstract class P8<A, B, C, D, E, F, G, H> {
1010
/**
1111
* Access the first element of the product.

core/src/main/java/fj/data/$.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* The constant arrow, for attaching a new name to an existing type. For every pair of types A and B, this type
77
* is the identity morphism from B to B.
88
*/
9-
@SuppressWarnings({"UnusedDeclaration"})
9+
@SuppressWarnings("UnusedDeclaration")
1010
public final class $<A, B> extends P1<B> {
1111

1212
private final B b;

core/src/main/java/fj/data/Array.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ public String toString() {
202202
* @param f The function to map across this array.
203203
* @return A new array after the given function has been applied to each element.
204204
*/
205-
@SuppressWarnings({"unchecked"})
205+
@SuppressWarnings("unchecked")
206206
public <B> Array<B> map(final F<A, B> f) {
207207
final Object[] bs = new Object[a.length];
208208

@@ -323,7 +323,7 @@ public <B> B foldLeft(final F2<B, A, B> f, final B b) {
323323
* @param b The beginning value to start the application from.
324324
* @return The array containing all intermediate results of the left-fold reduction.
325325
*/
326-
@SuppressWarnings({"unchecked"})
326+
@SuppressWarnings("unchecked")
327327
public <B> Array<B> scanLeft(final F<B, F<A, B>> f, final B b) {
328328
final Object[] bs = new Object[a.length];
329329
B x = b;
@@ -357,7 +357,7 @@ public <B> Array<B> scanLeft(final F2<B, A, B> f, final B b) {
357357
* @param f The function to apply on each argument pair (next array element and first array element/previous result)
358358
* @return The array containing all intermediate results of the left-fold reduction.
359359
*/
360-
@SuppressWarnings({"unchecked"})
360+
@SuppressWarnings("unchecked")
361361
public Array<A> scanLeft1(final F<A, F<A, A>> f) {
362362
final Object[] bs = new Object[a.length];
363363
A x = get(0);
@@ -392,7 +392,7 @@ public Array<A> scanLeft1(final F2<A, A, A> f) {
392392
* @param b The beginning value to start the application from.
393393
* @return The array containing all intermediate results of the right-fold reduction.
394394
*/
395-
@SuppressWarnings({"unchecked"})
395+
@SuppressWarnings("unchecked")
396396
public <B> Array<B> scanRight(final F<A, F<B, B>>f, final B b) {
397397
final Object[] bs = new Object[a.length];
398398
B x = b;
@@ -426,7 +426,7 @@ public <B> Array<B> scanRight(final F2<A, B, B> f, final B b) {
426426
* @param f The function to apply on each argument pair (previous array element and last array element/previous result)
427427
* @return The array containing all intermediate results of the right-fold reduction.
428428
*/
429-
@SuppressWarnings({"unchecked"})
429+
@SuppressWarnings("unchecked")
430430
public Array<A> scanRight1(final F<A, F<A, A>>f) {
431431
final Object[] bs = new Object[a.length];
432432
A x = get(length() - 1);
@@ -459,7 +459,7 @@ public Array<A> scanRight1(final F2<A, A, A> f) {
459459
* @param f The function to apply to each element of this array.
460460
* @return A new array after performing the map, then final join.
461461
*/
462-
@SuppressWarnings({"unchecked"})
462+
@SuppressWarnings("unchecked")
463463
public <B> Array<B> bind(final F<A, Array<B>> f) {
464464
List<Array<B>> x = List.nil();
465465
int len = 0;
@@ -849,7 +849,7 @@ public static <A> Array<A> arrayArray(final A...as) {
849849
* @param xs The array of pairs to transform.
850850
* @return An array of first components and an array of second components.
851851
*/
852-
@SuppressWarnings({"unchecked"})
852+
@SuppressWarnings("unchecked")
853853
public static <A, B> P2<Array<A>, Array<B>> unzip(final Array<P2<A, B>> xs) {
854854
final int len = xs.length();
855855
final Array<A> aa = new Array<A>(new Object[len]);
@@ -1079,7 +1079,7 @@ public static <T, U> T[] copyOf(final U[] a, final int len, final Class<? extend
10791079
return copy;
10801080
}
10811081

1082-
@SuppressWarnings({"unchecked"})
1082+
@SuppressWarnings("unchecked")
10831083
public static <T> T[] copyOf(final T[] a, final int len) {
10841084
return (T[]) copyOf(a, len, a.getClass());
10851085
}

0 commit comments

Comments
 (0)