From 49bbec1db7f87b1d722145af643fe572f2e90a70 Mon Sep 17 00:00:00 2001 From: Werner Dietl Date: Tue, 7 Jan 2025 19:44:30 -0500 Subject: [PATCH] Spotless formatting updates --- src/main/java/org/plumelib/util/CollectionsPlume.java | 9 ++++++--- .../org/plumelib/util/IdentityMostlySingletonSet.java | 2 +- src/main/java/org/plumelib/util/MostlySingletonSet.java | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/plumelib/util/CollectionsPlume.java b/src/main/java/org/plumelib/util/CollectionsPlume.java index 93678cde..a2db4b15 100644 --- a/src/main/java/org/plumelib/util/CollectionsPlume.java +++ b/src/main/java/org/plumelib/util/CollectionsPlume.java @@ -538,7 +538,8 @@ List transform( "signedness", // problem with clone() "nullness" // generics problem }) - public static > @PolyNull C cloneElements(@PolyNull C orig) { + public static > + @PolyNull C cloneElements(@PolyNull C orig) { if (orig == null) { return null; } @@ -562,7 +563,8 @@ List transform( * @return a copy of {@code orig}, as described above */ @SuppressWarnings({"signedness", "nullness:argument"}) // problem with clone() - public static , C extends @Nullable Collection> @PolyNull C deepCopy(@PolyNull C orig) { + public static , C extends @Nullable Collection> + @PolyNull C deepCopy(@PolyNull C orig) { if (orig == null) { return null; } @@ -1791,7 +1793,8 @@ public static int mapCapacity(Map m) { * @return a copy of {@code orig}, as described above */ @SuppressWarnings({"nullness", "signedness"}) // generics problem with clone - public static , M extends @Nullable Map> @PolyNull M deepCopyValues(@PolyNull M orig) { + public static , M extends @Nullable Map> + @PolyNull M deepCopyValues(@PolyNull M orig) { if (orig == null) { return null; } diff --git a/src/main/java/org/plumelib/util/IdentityMostlySingletonSet.java b/src/main/java/org/plumelib/util/IdentityMostlySingletonSet.java index 958745b3..f8687a71 100644 --- a/src/main/java/org/plumelib/util/IdentityMostlySingletonSet.java +++ b/src/main/java/org/plumelib/util/IdentityMostlySingletonSet.java @@ -46,7 +46,7 @@ public boolean add(@GuardSatisfied IdentityMostlySingletonSet this, @FindDist return false; } makeNonSingleton(); - // fall through + // fall through case ANY: assert set != null : "@AssumeAssertion(nullness): set initialized before"; return set.add(e); diff --git a/src/main/java/org/plumelib/util/MostlySingletonSet.java b/src/main/java/org/plumelib/util/MostlySingletonSet.java index 924a7afe..0e8b6638 100644 --- a/src/main/java/org/plumelib/util/MostlySingletonSet.java +++ b/src/main/java/org/plumelib/util/MostlySingletonSet.java @@ -47,7 +47,7 @@ public boolean add(@GuardSatisfied MostlySingletonSet this, T e) { return false; } makeNonSingleton(); - // fall through + // fall through case ANY: assert set != null : "@AssumeAssertion(nullness): ANY => value != null"; return set.add(e);