Skip to content

Commit 79a41d8

Browse files
Finalized openrewrite stuffs
1 parent 0d792e0 commit 79a41d8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

buildSrc/src/main/kotlin/buildlogic.java-common-conventions.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -248,11 +248,11 @@ rewrite {
248248
// activeRecipe("org.openrewrite.staticanalysis.FinalClass") // maybe consider in the future
249249
activeRecipe("org.openrewrite.staticanalysis.ForLoopIncrementInUpdate")
250250
// activeRecipe("org.openrewrite.staticanalysis.UpperCaseLiteralSuffixes") // eventually maybe we can consider this
251-
// activeRecipe("org.openrewrite.staticanalysis.UseDiamondOperator") // TODO see what this does independently
251+
activeRecipe("org.openrewrite.staticanalysis.UseDiamondOperator")
252252
activeRecipe("org.openrewrite.staticanalysis.BooleanChecksNotInverted")
253253
// activeRecipe("org.openrewrite.staticanalysis.NeedBraces") // consider in the future
254254
// activeRecipe("org.openrewrite.staticanalysis.HideUtilityClassConstructor") // tries to make spring application class have private constructor
255-
// activeRecipe("org.openrewrite.staticanalysis.JavaApiBestPractices") // TODO enable
255+
activeRecipe("org.openrewrite.staticanalysis.JavaApiBestPractices")
256256
activeRecipe("org.openrewrite.staticanalysis.ModifierOrder")
257257
activeRecipe("org.openrewrite.staticanalysis.NestedEnumsAreNotStatic")
258258
activeRecipe("org.openrewrite.staticanalysis.UseJavaStyleArrayDeclarations")
@@ -283,7 +283,7 @@ rewrite {
283283
activeRecipe("org.openrewrite.staticanalysis.UnwrapRepeatableAnnotations")
284284
// activeRecipe("org.openrewrite.staticanalysis.UnwrapElseAfterReturn") // kinda annoying when I want to pick the style on a per if-else statement basis
285285
activeRecipe("org.openrewrite.staticanalysis.UsePortableNewlines")
286-
// activeRecipe("org.openrewrite.staticanalysis.UseCollectionInterfaces") // stops people from using something like an ArrayList in a return type // TODO enable
286+
activeRecipe("org.openrewrite.staticanalysis.UseCollectionInterfaces") // stops people from using something like an ArrayList in a return type // TODO enable
287287
// activeRecipe("org.openrewrite.staticanalysis.IsEmptyCallOnCollections") // eventually enable this, but first update some tests
288288
activeRecipe("org.openrewrite.staticanalysis.NoEmptyCollectionWithRawType")
289289
activeRecipe("org.openrewrite.staticanalysis.ReplaceCollectionToArrayArgWithEmptyArray")

core/src/main/java/me/retrodaredevil/solarthing/packets/collection/PacketGroups.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ public static List<FragmentedPacketGroup> mergePackets(List<? extends InstancePa
181181
fragmentIds = new ArrayList<>(fragmentIdsSet); // now this is sorted
182182
}
183183
// Create an ordered set so that whenever something is added to it, it gets ordered correctly
184-
TreeSet<FragmentedPacketGroup> packetGroups = new TreeSet<>(Comparator.comparingLong(PacketGroup::getDateMillis));
184+
NavigableSet<FragmentedPacketGroup> packetGroups = new TreeSet<>(Comparator.comparingLong(PacketGroup::getDateMillis));
185185
addToPacketGroups(
186186
maxTimeDistance, masterIdIgnoreDistance,
187187
Long.MIN_VALUE, Long.MAX_VALUE,

0 commit comments

Comments
 (0)