8.87.0 release (2026-07-14)
Total recipe count: 4461
info
This changelog only shows what recipes have been added, removed, or changed. OpenRewrite may do releases that do not include these types of changes. To see these changes, please go to the releases page.
Corresponding CLI version
- CLI version
4.3.15
New Artifacts
- rewrite-go
New Recipes
- org.openrewrite.apache.httpclient5.InlineBasicAsyncRequestProducerLocals: Normalizes hoisted entity and request locals into the inline
new BasicAsyncRequestProducer(HttpHost.create(uri), new HttpMethod(path).setEntity(new N*Entity(...)))form so thatMigrateBasicAsyncRequestProducercan rewrite the call site. - org.openrewrite.apache.httpclient5.MigrateBasicAsyncRequestProducer: Rewrites
new BasicAsyncRequestProducer(HttpHost.create(uri), new HttpMethod(path).setEntity(new N*Entity(...)))toAsyncRequestBuilder.<verb>(uri).setEntity(AsyncEntityProducers.create(...)).build(). Sites that do not match this specific shape are left alone for later migration steps. - org.openrewrite.apache.httpclient5.MigrateHttpAsyncMethods: Rewrites
HttpAsyncMethods.createPost/createGet/createConsumerfrom Apache HttpAsyncClient 4.x to their HttpClient 5.x equivalents usingAsyncRequestBuilder,AsyncEntityProducers, andSimpleResponseConsumer. - org.openrewrite.github.IsGitHubActionDefinition: Checks if the file is a GitHub Action definition (
action.yml), such as a composite action. - org.openrewrite.golang.RegenerateGoSum: Regenerate a Go module's
go.sumfrom itsgo.modby runninggo mod download, recomputing checksums for the whole module graph, including creating it when absent. Useful after a dependency version change to bringgo.sumback in sync. Requires thegotoolchain to be installed; otherwisego.sumis left unchanged. - org.openrewrite.gradle.RemoveBomManagedDirectDependencies: Removes directly declared dependencies when they have a version that is incompatible with the version managed by an imported BOM (platform or enforcedPlatform). This is useful during framework upgrades (e.g., Spring Boot) where transitive dependencies receive major version bumps and explicitly declared older versions should be removed to use the BOM-managed versions instead. A dependency is only removed when it would still be reachable transitively through another direct dependency in every configuration where it is declared, so the BOM-managed version takes its place rather than the dependency disappearing from the classpath.
- org.openrewrite.java.jackson.ReplaceIOExceptionThrowInJacksonOverrides: In Jackson 3,
serialize()anddeserialize()methods no longer declarethrows IOException. This recipe removes thethrows IOExceptiondeclaration from overrides ofJsonSerializer.serialize,JsonSerializer.serializeWithType,JsonDeserializer.deserialize, andJsonDeserializer.deserializeWithType, and rewritesthrow new IOException(msg[, cause])inside those overrides toJsonMappingException.from(<generator|parser>, msg[, cause]). A companion type change later migratesJsonMappingExceptiontotools.jackson.databind.DatabindException. - org.openrewrite.java.jackson.UseReadTreeAsValueInDeserializer: In Jackson 3,
ObjectCodecis replaced byObjectReadContext, which does not exposetreeToValue. The equivalent method isreadTreeAsValue(JsonNode, Class)onDeserializationContext. This recipe rewritesparser.getCodec().treeToValue(node, Foo.class)toctxt.readTreeAsValue(node, Foo.class)inside methods that have aDeserializationContextparameter (typicallyJsonDeserializer.deserialize). - org.openrewrite.java.logging.slf4j.Log4j1MdcGetContextToCopyOfContextMap: Renames Log4j 1.x
org.apache.log4j.MDC.getContext()(returnsHashtable) togetCopyOfContextMap()(returnsMap) at every call site, and retypes anyHashtabledeclaration — local variable, field, method parameter, or method return type — that receives the result, whether initialized directly from the call, directly assigned it in a later statement, or returning it, toMap<String, String>, sinceMapis not assignable toHashtable. Retyping a parameter or return type changes the method's signature; overriding methods are left unchanged to avoid breaking the override, so they need a manual fix. Does not change theorg.apache.log4j.MDCtype; compose with aChangeTypeto complete the migration. - org.openrewrite.java.logging.slf4j.Log4j1ToSlf4jMdc: Migrates
org.apache.log4j.MDCtoorg.slf4j.MDC, wrapping non-Stringputvalues inString.valueOf(...)and convertinggetContext()togetCopyOfContextMap(). - org.openrewrite.java.logging.slf4j.WrapLog4j1MdcPutValueInStringValueOf: SLF4J
MDC.put(String, String)requires aStringvalue, but Log4j 1.xMDC.put(String, Object)accepts any object. Wrap non-Stringvalues inString.valueOf(...), skipping values already typedString,nullliterals, and existingString.valueOf(...)calls. Does not change theorg.apache.log4j.MDCtype; compose with aChangeTypeto complete the migration toorg.slf4j.MDC. - org.openrewrite.java.migrate.nio.file.RedundantUtf8Charset: The character based
java.nio.file.Filesmethods always default to UTF-8, so passingStandardCharsets.UTF_8explicitly is redundant and can be removed. - org.openrewrite.java.spring.ConvertAutoConfigurationExcludeToExcludeName: Rewrite a class literal in the
excludeattribute of@SpringBootApplicationor@EnableAutoConfigurationto a string literal in theexcludeNameattribute. Useful when the excluded auto-configuration is not on the compile classpath (for example because it became package-private in a newer version of its library). If the target was the last entry inexclude, that attribute is removed. IfexcludeNamealready contains the value, no duplicate is added. - org.openrewrite.java.spring.RemoveAutoConfigurationExclude: Remove a given auto-configuration class from the
excludeandexcludeNameattributes of@SpringBootApplicationand@EnableAutoConfigurationannotations. When removing the last entry, the attribute itself is removed. - org.openrewrite.maven.ExtractVersionsAsProperties: Extracts inlined dependency versions into the
<properties>section and replaces them with${property}references. - org.openrewrite.maven.RemoveBomManagedDirectDependencies: Removes directly declared dependencies when they have a version that is incompatible with the version managed by an imported BOM. This is useful during framework upgrades (e.g., Spring Boot) where transitive dependencies receive major version bumps and explicitly declared older versions should be removed to use the BOM-managed versions instead. A dependency is only removed when it would still be reachable transitively through another direct dependency, so the BOM-managed version takes its place rather than the dependency disappearing from the classpath.
- org.openrewrite.staticanalysis.UseStringCaseInsensitiveOrderRecipe: Replaces case-insensitive string comparator lambdas and method references with the JDK constant
String.CASE_INSENSITIVE_ORDER. Improves readability and removes one closure allocation per call site. - tech.picnic.errorprone.refasterrules.AssertJBigIntegerRulesRecipes$AbstractBigIntegerAssertIsEqualToOneRecipe: Prefer
isEqualTo(1)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.AssertJBigIntegerRulesRecipes$AbstractBigIntegerAssertIsEqualToZeroRecipe: Prefer
isEqualTo(0)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.AssertJBigIntegerRulesRecipes$AbstractBigIntegerAssertIsNotEqualToZeroRecipe: Prefer
isNotEqualTo(0)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.AssertJBooleanRulesRecipes$AssertThatIsFalseRecipe: Prefer
AbstractBooleanAssert#isFalse()over more contrived alternatives. - tech.picnic.errorprone.refasterrules.AssertJBooleanRulesRecipes$AssertThatIsTrueRecipe: Prefer
AbstractBooleanAssert#isTrue()over more contrived alternatives. - tech.picnic.errorprone.refasterrules.AssertJByteRulesRecipes$AbstractByteAssertIsEqualToOneRecipe: Prefer
AbstractByteAssert#isEqualTo(byte)over less explicit alternatives. - tech.picnic.errorprone.refasterrules.AssertJByteRulesRecipes$AbstractByteAssertIsEqualToZeroRecipe: Prefer
AbstractByteAssert#isEqualTo(byte)over less explicit alternatives. - tech.picnic.errorprone.refasterrules.AssertJByteRulesRecipes$AbstractByteAssertIsNotEqualToZeroRecipe: Prefer
AbstractByteAssert#isNotEqualTo(byte)over less explicit alternatives. - tech.picnic.errorprone.refasterrules.AssertJCharSequenceRulesRecipes$AssertThatHasSizeRecipe: Prefer
AbstractCharSequenceAssert#hasSize(int)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.AssertJCharSequenceRulesRecipes$AssertThatIsEmptyRecipe: Prefer
AbstractCharSequenceAssert#isEmpty()over more contrived alternatives. - tech.picnic.errorprone.refasterrules.AssertJCharSequenceRulesRecipes$AssertThatIsNotEmptyRecipe: Prefer
AbstractCharSequenceAssert#isNotEmpty()over more contrived alternatives. - tech.picnic.errorprone.refasterrules.AssertJDoubleRulesRecipes$AbstractDoubleAssertIsCloseToRecipe: Prefer
AbstractDoubleAssert#isCloseTo(double, Offset)over less explicit alternatives. - tech.picnic.errorprone.refasterrules.AssertJDoubleRulesRecipes$AbstractDoubleAssertIsEqualToOneRecipe: Prefer
AbstractDoubleAssert#isEqualTo(double)over less explicit alternatives. - tech.picnic.errorprone.refasterrules.AssertJDoubleRulesRecipes$AbstractDoubleAssertIsEqualToZeroRecipe: Prefer
AbstractDoubleAssert#isEqualTo(double)over less explicit alternatives. - tech.picnic.errorprone.refasterrules.AssertJDoubleRulesRecipes$AbstractDoubleAssertIsNotEqualToZeroRecipe: Prefer
AbstractDoubleAssert#isNotEqualTo(double)over less explicit alternatives. - tech.picnic.errorprone.refasterrules.AssertJFloatRulesRecipes$AbstractFloatAssertIsCloseToRecipe: Prefer
AbstractFloatAssert#isCloseTo(float, Offset)over less explicit alternatives. - tech.picnic.errorprone.refasterrules.AssertJFloatRulesRecipes$AbstractFloatAssertIsEqualToOneRecipe: Prefer
isEqualTo(1)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.AssertJFloatRulesRecipes$AbstractFloatAssertIsEqualToZeroRecipe: Prefer
isEqualTo(0)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.AssertJFloatRulesRecipes$AbstractFloatAssertIsNotEqualToZeroRecipe: Prefer
isNotEqualTo(0)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.AssertJIntegerRulesRecipes$AbstractIntegerAssertIsEqualToOneRecipe: Prefer
AbstractIntegerAssert#isEqualTo(int)over less explicit alternatives. - tech.picnic.errorprone.refasterrules.AssertJIntegerRulesRecipes$AbstractIntegerAssertIsEqualToZeroRecipe: Prefer
AbstractIntegerAssert#isEqualTo(int)over less explicit alternatives. - tech.picnic.errorprone.refasterrules.AssertJIntegerRulesRecipes$AbstractIntegerAssertIsNotEqualToZeroRecipe: Prefer
AbstractIntegerAssert#isNotEqualTo(int)over less explicit alternatives. - tech.picnic.errorprone.refasterrules.AssertJIterableRulesRecipes$AssertThatContainsExactlyRecipe: Prefer
assertThat(iterable).containsExactly(element)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.AssertJIterableRulesRecipes$AssertThatIsEmptyRecipe: Prefer
assertThat(iterable).isEmpty()over more contrived alternatives. - tech.picnic.errorprone.refasterrules.AssertJIterableRulesRecipes$AssertThatIsNotEmptyRecipe: Prefer
assertThat(iterable).isNotEmpty()over more contrived alternatives. - tech.picnic.errorprone.refasterrules.AssertJIterableRulesRecipes$AssertThatSizeRecipe: Prefer
assertThat(iterable).size()over non-JDK or more contrived alternatives. - tech.picnic.errorprone.refasterrules.AssertJLongRulesRecipes$AbstractLongAssertIsEqualToOneRecipe: Prefer
AbstractLongAssert#isEqualTo(long)over less explicit alternatives. - tech.picnic.errorprone.refasterrules.AssertJLongRulesRecipes$AbstractLongAssertIsEqualToZeroRecipe: Prefer
AbstractLongAssert#isEqualTo(long)over less explicit alternatives. - tech.picnic.errorprone.refasterrules.AssertJLongRulesRecipes$AbstractLongAssertIsNotEqualToZeroRecipe: Prefer
AbstractLongAssert#isNotEqualTo(long)over less explicit alternatives. - tech.picnic.errorprone.refasterrules.AssertJMapRulesRecipes$AbstractMapAssertContainsExactlyEntriesOfImmutableMapOfRecipe: Prefer
AbstractMapAssert#containsExactlyEntriesOf(Map)over less explicit alternatives. - tech.picnic.errorprone.refasterrules.AssertJMapRulesRecipes$AssertThatContainsKeyRecipe: Prefer
assertThat(map).containsKey(Object)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.AssertJMapRulesRecipes$AssertThatContainsOnlyKeysIterableRecipe: Prefer
assertThat(map).containsOnlyKeys(Iterable)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.AssertJMapRulesRecipes$AssertThatContainsOnlyKeysObjectRecipe: Prefer
assertThat(map).containsOnlyKeys(Object)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.AssertJMapRulesRecipes$AssertThatContainsValueRecipe: Prefer
assertThat(map).containsValue(Object)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.AssertJMapRulesRecipes$AssertThatDoesNotContainKeyRecipe: Prefer
assertThat(map).doesNotContainKey(Object)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.AssertJMapRulesRecipes$AssertThatDoesNotContainValueRecipe: Prefer
assertThat(map).doesNotContainValue(Object)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.AssertJMapRulesRecipes$AssertThatIsEmptyRecipe: Prefer
assertThat(map).isEmpty()over more contrived alternatives. - tech.picnic.errorprone.refasterrules.AssertJObjectRulesRecipes$AssertThatIsEqualToRecipe: <strong>Warning:</strong> this rewrite changes behavior if
actualisnull: the original code throws aNullPointerException, while the replacement handles the comparison gracefully. - tech.picnic.errorprone.refasterrules.AssertJObjectRulesRecipes$AssertThatIsInstanceOfRecipe: Prefer
ObjectAssert#isInstanceOf(Class)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.AssertJObjectRulesRecipes$AssertThatIsNotEqualToRecipe: <strong>Warning:</strong> this rewrite changes behavior if
actualisnull: the original code throws aNullPointerException, while the replacement handles the comparison gracefully. - tech.picnic.errorprone.refasterrules.AssertJOptionalRulesRecipes$AssertThatGetMatchesRecipe: Prefer
assertThat(optional).get().matches(predicate)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.AssertJOptionalRulesRecipes$AssertThatGetRecipe: Prefer
assertThat(optional).get()over more contrived alternatives. - tech.picnic.errorprone.refasterrules.AssertJOptionalRulesRecipes$AssertThatIsEmptyRecipe: Prefer
assertThat(optional).isEmpty()over more contrived alternatives. - tech.picnic.errorprone.refasterrules.AssertJOptionalRulesRecipes$AssertThatIsPresentRecipe: Prefer
assertThat(optional).isPresent()over more contrived alternatives. - tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatAcceptsRecipe: Prefer
assertThat(predicate).accepts(object)over less explicit alternatives. - tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatContainsAllRecipe: Prefer
ListAssert#containsAll(Iterable)over less efficient alternatives. - tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatContainsAnyElementsOfRecipe: Prefer
ListAssert#containsAnyElementsOf(Iterable)over less efficient alternatives. - tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatContainsAnyOfRecipe: Prefer
ListAssert#containsAnyOf(Object[])over less efficient alternatives. - tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatContainsAnyOfVarargsRecipe: Prefer
ListAssert#containsAnyOf(Object[])over less efficient alternatives. - tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatContainsEntryRecipe: <strong>Warning:</strong> this rewrite changes behavior when
valueisnullandkeyis absent from the map: the original code passes (asMap#getreturnsnullfor absent keys), whileMapAssert#containsEntry(Object, Object)requires the key to be explicitly present. - tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatContainsExactlyElementsOfListRecipe: <strong>Warning:</strong> this rewrite changes behavior if
iterableis not aList:List#equals(Object)returnsfalsefor non-Listiterables, whileListAssert#containsExactlyElementsOf(Iterable)accepts anyIterable. - tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatContainsExactlyElementsOfStreamRecipe: Prefer
ListAssert#containsExactlyElementsOf(Iterable)over less efficient alternatives. - tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatContainsExactlyInAnyOrderElementsOfMultisetRecipe: <strong>Warning:</strong> this rewrite changes behavior if
valuesis not aMultiset:Multiset#equalsreturnsfalsefor non-Multisetiterables, whileAbstractCollectionAssert#containsExactlyInAnyOrderElementsOf(Iterable)accepts anyIterable. - tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatContainsExactlyInAnyOrderElementsOfStreamRecipe: Prefer
ListAssert#containsExactlyInAnyOrderElementsOf(Iterable)over less efficient alternatives. - tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatContainsExactlyInAnyOrderRecipe: Prefer
ListAssert#containsExactlyInAnyOrder(Object[])over less efficient alternatives. - tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatContainsExactlyInAnyOrderVarargsRecipe: Prefer
ListAssert#containsExactlyInAnyOrder(Object[])over less efficient alternatives. - tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatContainsExactlySetRecipe: Prefer
assertThat(set).containsExactly(element)over less explicit alternatives. - tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatContainsExactlyStreamRecipe: Prefer
ListAssert#containsExactly(Object[])over less efficient alternatives. - tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatContainsExactlyVarargsRecipe: Prefer
ListAssert#containsExactly(Object[])over less efficient alternatives. - tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatContainsOnlyRecipe: Prefer
ListAssert#containsOnly(Object[])over less efficient alternatives. - tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatContainsOnlyVarargsRecipe: Prefer
ListAssert#containsOnly(Object[])over less efficient alternatives. - tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatContainsRecipe: Prefer
ListAssert#contains(Object[])over less efficient alternatives. - tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatContainsSequenceRecipe: Prefer
ListAssert#containsSequence(Iterable)over less efficient alternatives. - tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatContainsSequenceVarargsRecipe: Prefer
ListAssert#containsSequence(Object[])over less efficient alternatives. - tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatContainsSubsequenceRecipe: Prefer
ListAssert#containsSubsequence(Iterable)over less efficient alternatives. - tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatContainsSubsequenceVarargsRecipe: Prefer
ListAssert#containsSubsequence(Object[])over less efficient alternatives. - tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatContainsVarargsRecipe: Prefer
ListAssert#contains(Object[])over less efficient alternatives. - tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatDoesNotContainAnyElementsOfRecipe: Prefer
ListAssert#doesNotContainAnyElementsOf(Iterable)over less efficient alternatives. - tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatDoesNotContainRecipe: Prefer
ListAssert#doesNotContain(Object[])over less efficient alternatives. - tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatDoesNotContainSequenceRecipe: Prefer
ListAssert#doesNotContainSequence(Iterable)over less efficient alternatives. - tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatDoesNotContainSequenceVarargsRecipe: Prefer
ListAssert#doesNotContainSequence(Object[])over less efficient alternatives. - tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatDoesNotContainVarargsRecipe: Prefer
ListAssert#doesNotContain(Object[])over less efficient alternatives. - tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatHasSameElementsAsSetRecipe: <strong>Warning:</strong> this rewrite changes behavior when
iterablecontains duplicates:AbstractCollectionAssert#containsExactlyInAnyOrderElementsOf(Iterable)is then guaranteed to fail, whileAbstractCollectionAssert#hasSameElementsAs(Iterable)may not. - tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatHasSameElementsAsStreamRecipe: Prefer
ListAssert#hasSameElementsAs(Iterable)over less efficient alternatives. - tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatHasValueOptionalDoubleRecipe: Prefer
OptionalDoubleAssert#hasValue(double)over more fragile alternatives. - tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatHasValueOptionalIntRecipe: Prefer
OptionalIntAssert#hasValue(int)over more fragile alternatives. - tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatHasValueOptionalLongRecipe: Prefer
OptionalLongAssert#hasValue(long)over more fragile alternatives. - tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatIsSubsetOfRecipe: Prefer
ListAssert#isSubsetOf(Object[])over less efficient alternatives. - tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatIsSubsetOfVarargsRecipe: Prefer
ListAssert#isSubsetOf(Object[])over less efficient alternatives. - tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatRejectsRecipe: Prefer
assertThat(predicate).rejects(object)over less explicit alternatives. - tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$ObjectEnumerableAssertContainsRecipe: Prefer
ObjectEnumerableAssert#contains(Object[])over more contrived alternatives. - tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$ObjectEnumerableAssertDoesNotContainRecipe: Prefer
ObjectEnumerableAssert#doesNotContain(Object[])over more contrived alternatives. - tech.picnic.errorprone.refasterrules.AssertJShortRulesRecipes$AbstractShortAssertIsEqualToOneRecipe: Prefer
AbstractShortAssert#isEqualTo(short)over less explicit alternatives. - tech.picnic.errorprone.refasterrules.AssertJShortRulesRecipes$AbstractShortAssertIsEqualToZeroRecipe: Prefer
AbstractShortAssert#isEqualTo(short)over less explicit alternatives. - tech.picnic.errorprone.refasterrules.AssertJShortRulesRecipes$AbstractShortAssertIsNotEqualToZeroRecipe: Prefer
AbstractShortAssert#isNotEqualTo(short)over less explicit alternatives. - tech.picnic.errorprone.refasterrules.AssertJStreamRulesRecipes$AssertThatAllMatchRecipe: Prefer
ListAssert#allMatch(Predicate)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.AssertJStreamRulesRecipes$AssertThatRecipe: Prefer
assertThat(collection)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.AssertJStringRulesRecipes$AbstractStringAssertIsEmptyRecipe: Prefer
AbstractStringAssert#isEmpty()over less explicit alternatives. - tech.picnic.errorprone.refasterrules.AssertJStringRulesRecipes$AbstractStringAssertIsNotEmptyRecipe: Prefer
AbstractStringAssert#isNotEmpty()over less explicit alternatives. - tech.picnic.errorprone.refasterrules.AssertJStringRulesRecipes$AssertThatContainsRecipe: Prefer
AbstractStringAssert#contains(CharSequence...)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.AssertJStringRulesRecipes$AssertThatContentRecipe: Prefer
assertThat(path).content(charset)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.AssertJStringRulesRecipes$AssertThatContentUtf8Recipe: Prefer
assertThat(path).content(UTF_8)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.AssertJStringRulesRecipes$AssertThatDoesNotContainRecipe: Prefer
AbstractStringAssert#doesNotContain(CharSequence...)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.AssertJStringRulesRecipes$AssertThatDoesNotEndWithRecipe: Prefer
AbstractStringAssert#doesNotEndWith(CharSequence)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.AssertJStringRulesRecipes$AssertThatDoesNotStartWithRecipe: Prefer
AbstractStringAssert#doesNotStartWith(CharSequence)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.AssertJStringRulesRecipes$AssertThatEndsWithRecipe: Prefer
AbstractStringAssert#endsWith(CharSequence)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.AssertJStringRulesRecipes$AssertThatStartsWithRecipe: Prefer
AbstractStringAssert#startsWith(CharSequence)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIsInstanceOfHasMessageContainingRecipe: Prefer
org.assertj.core.api.Assertions#assertThatThrownByover less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIsInstanceOfHasMessageNotContainingRecipe: Prefer
org.assertj.core.api.Assertions#assertThatThrownByover less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIsInstanceOfHasMessageRecipe: Prefer
org.assertj.core.api.Assertions#assertThatThrownByover less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIsInstanceOfHasMessageStartingWithRecipe: Prefer
org.assertj.core.api.Assertions#assertThatThrownByover less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIsInstanceOfHasMessageVarargsRecipe: Prefer
org.assertj.core.api.Assertions#assertThatThrownByover less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIsInstanceOfIOExceptionClassHasMessageContainingRecipe: Prefer
org.assertj.core.api.Assertions#assertThatThrownByover less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIsInstanceOfIOExceptionClassHasMessageNotContainingRecipe: Prefer
org.assertj.core.api.Assertions#assertThatThrownByover less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIsInstanceOfIOExceptionClassHasMessageRecipe: Prefer
org.assertj.core.api.Assertions#assertThatThrownByover less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIsInstanceOfIOExceptionClassHasMessageStartingWithRecipe: Prefer
org.assertj.core.api.Assertions#assertThatThrownByover less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIsInstanceOfIOExceptionClassHasMessageVarargsRecipe: Prefer
org.assertj.core.api.Assertions#assertThatThrownByover less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIsInstanceOfIOExceptionClassRecipe: Prefer
org.assertj.core.api.Assertions#assertThatThrownByover less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIsInstanceOfIOExceptionClassRootCauseHasMessageRecipe: Prefer
org.assertj.core.api.Assertions#assertThatThrownByover less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIsInstanceOfIllegalArgumentExceptionClassHasMessageContainingRecipe: Prefer
org.assertj.core.api.Assertions#assertThatThrownByover less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIsInstanceOfIllegalArgumentExceptionClassHasMessageNotContainingAnyRecipe: Prefer
org.assertj.core.api.Assertions#assertThatThrownByover less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIsInstanceOfIllegalArgumentExceptionClassHasMessageRecipe: Prefer
org.assertj.core.api.Assertions#assertThatThrownByover less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIsInstanceOfIllegalArgumentExceptionClassHasMessageStartingWithRecipe: Prefer
org.assertj.core.api.Assertions#assertThatThrownByover less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIsInstanceOfIllegalArgumentExceptionClassHasMessageVarargsRecipe: Prefer
org.assertj.core.api.Assertions#assertThatThrownByover less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIsInstanceOfIllegalArgumentExceptionClassRecipe: Prefer
org.assertj.core.api.Assertions#assertThatThrownByover less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIsInstanceOfIllegalArgumentExceptionClassRootCauseHasMessageRecipe: Prefer
org.assertj.core.api.Assertions#assertThatThrownByover less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIsInstanceOfIllegalStateExceptionClassHasMessageContainingRecipe: Prefer
org.assertj.core.api.Assertions#assertThatThrownByover less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIsInstanceOfIllegalStateExceptionClassHasMessageNotContainingRecipe: Prefer
org.assertj.core.api.Assertions#assertThatThrownByover less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIsInstanceOfIllegalStateExceptionClassHasMessageRecipe: Prefer
org.assertj.core.api.Assertions#assertThatThrownByover less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIsInstanceOfIllegalStateExceptionClassHasMessageStartingWithRecipe: Prefer
org.assertj.core.api.Assertions#assertThatThrownByover less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIsInstanceOfIllegalStateExceptionClassHasMessageVarargsRecipe: Prefer
org.assertj.core.api.Assertions#assertThatThrownByover less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIsInstanceOfIllegalStateExceptionClassRecipe: Prefer
org.assertj.core.api.Assertions#assertThatThrownByover less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIsInstanceOfIllegalStateExceptionClassRootCauseHasMessageRecipe: Prefer
org.assertj.core.api.Assertions#assertThatThrownByover less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIsInstanceOfNullPointerExceptionClassHasMessageContainingRecipe: Prefer
org.assertj.core.api.Assertions#assertThatThrownByover less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIsInstanceOfNullPointerExceptionClassHasMessageNotContainingRecipe: Prefer
org.assertj.core.api.Assertions#assertThatThrownByover less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIsInstanceOfNullPointerExceptionClassHasMessageRecipe: Prefer
org.assertj.core.api.Assertions#assertThatThrownByover less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIsInstanceOfNullPointerExceptionClassHasMessageStartingWithRecipe: Prefer
org.assertj.core.api.Assertions#assertThatThrownByover less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIsInstanceOfNullPointerExceptionClassHasMessageVarargsRecipe: Prefer
org.assertj.core.api.Assertions#assertThatThrownByover less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIsInstanceOfNullPointerExceptionClassRecipe: Prefer
org.assertj.core.api.Assertions#assertThatThrownByover less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIsInstanceOfNullPointerExceptionClassRootCauseHasMessageRecipe: Prefer
org.assertj.core.api.Assertions#assertThatThrownByover less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIsInstanceOfRootCauseHasMessageRecipe: Prefer
org.assertj.core.api.Assertions#assertThatThrownByover less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.AssortedRulesRecipes$CheckIndexExpressionRecipe: Prefer
Objects#checkIndex(int, int)over non-JDK alternatives. - tech.picnic.errorprone.refasterrules.AssortedRulesRecipes$IterablesIsEmptyRecipe: Prefer
Iterables#isEmpty(Iterable)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.AssortedRulesRecipes$IteratorsGetNextRecipe: Prefer
Iterators#getNext(Iterator, Object)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.AssortedRulesRecipes$OrRecipe: Prefer
firstTest || secondTestover more contrived alternatives. - tech.picnic.errorprone.refasterrules.AssortedRulesRecipes$SplitterSplitToStreamRecipe: Prefer
Splitter#splitToStream(CharSequence)over less efficient alternatives. - tech.picnic.errorprone.refasterrules.AssortedRulesRecipes$StreamGenerateRecipe: Prefer
Stream#generate(java.util.function.Supplier)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.BigDecimalRulesRecipes$BigDecimalSignumEqualToZeroRecipe: Prefer a
BigDecimal#signum()comparison to 0 over less explicit alternatives. - tech.picnic.errorprone.refasterrules.ClassRulesRecipes$ClassCastRecipe: Prefer
clazz::castover more verbose alternatives. - tech.picnic.errorprone.refasterrules.ClassRulesRecipes$ClassIsInstanceWithClassAndObjectRecipe: Prefer
Class#isInstance(Object)over more contrived or more fragile alternatives. - tech.picnic.errorprone.refasterrules.ClassRulesRecipes$ClassIsInstanceWithClassRecipe: Prefer
clazz::isInstanceover more verbose alternatives. - tech.picnic.errorprone.refasterrules.CollectionRulesRecipes$CollectionAddAllExpressionRecipe: Prefer
Collection#addAll(Collection)over non-JDK alternatives. - tech.picnic.errorprone.refasterrules.CollectionRulesRecipes$CollectionRemoveAllExpressionRecipe: Prefer
Collection#removeAll(Collection)over non-JDK alternatives. - tech.picnic.errorprone.refasterrules.CollectionRulesRecipes$CollectionStreamFindFirstRecipe: Prefer
collection.stream().findFirst()over less explicit or more verbose alternatives. - tech.picnic.errorprone.refasterrules.CollectionRulesRecipes$DisjointRecipe: Prefer
Collections#disjoint(Collection, Collection)over non-JDK or less efficient alternatives. - tech.picnic.errorprone.refasterrules.CollectionRulesRecipes$ImmutableCollectionToArrayIntFunctionRecipe: Prefer
ImmutableCollection#toArray(IntFunction)over more verbose alternatives. - tech.picnic.errorprone.refasterrules.CollectionRulesRecipes$ImmutableCollectionToArrayObjectRecipe: Prefer
ImmutableCollection#toArray(Object[])over more verbose alternatives. - tech.picnic.errorprone.refasterrules.CollectionRulesRecipes$NewArrayListRecipe: Prefer
ArrayList#ArrayList(Collection)over non-JDK alternatives. - tech.picnic.errorprone.refasterrules.CollectionRulesRecipes$OptionalOfNullableNavigableSetPollFirstRecipe: Prefer
Optional#ofNullable(Object)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.CollectionRulesRecipes$SetOfRecipe: Prefer
Set#of(Object[])over less efficient alternatives. - tech.picnic.errorprone.refasterrules.ComparatorRulesRecipes$CollectionsMaxArraysAsListRecipe: Prefer
Collections#max(Collection, Comparator)over less efficient alternatives. - tech.picnic.errorprone.refasterrules.ComparatorRulesRecipes$CollectionsMaxArraysAsListVarargsRecipe: Prefer
Collections#max(Collection, Comparator)over less efficient alternatives. - tech.picnic.errorprone.refasterrules.ComparatorRulesRecipes$CollectionsMinArraysAsListRecipe: Prefer
Collections#min(Collection, Comparator)over less efficient alternatives. - tech.picnic.errorprone.refasterrules.ComparatorRulesRecipes$CollectionsMinArraysAsListVarargsRecipe: Prefer
Collections#min(Collection, Comparator)over less efficient alternatives. - tech.picnic.errorprone.refasterrules.ComparatorRulesRecipes$ComparableCompareToRecipe: Prefer
Comparable#compareTo(Object)over more verbose alternatives. - tech.picnic.errorprone.refasterrules.ComparatorRulesRecipes$ComparatorThenComparingComparatorReversedRecipe: Prefer
Comparator#thenComparing(Function, Comparator)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.ComparatorRulesRecipes$ComparatorThenComparingDoubleRecipe: Prefer
Comparator#thenComparingDouble(ToDoubleFunction)over more verbose alternatives. - tech.picnic.errorprone.refasterrules.ComparatorRulesRecipes$ComparatorThenComparingIntRecipe: Prefer
Comparator#thenComparingInt(ToIntFunction)over more verbose alternatives. - tech.picnic.errorprone.refasterrules.ComparatorRulesRecipes$ComparatorThenComparingLongRecipe: Prefer
Comparator#thenComparingLong(ToLongFunction)over more verbose alternatives. - tech.picnic.errorprone.refasterrules.ComparatorRulesRecipes$ComparatorThenComparingRecipe: Prefer
Comparator#thenComparing(Function)over more verbose alternatives. - tech.picnic.errorprone.refasterrules.ComparatorRulesRecipes$ComparatorThenComparingReverseOrderRecipe: Prefer
Comparator#thenComparing(Function, Comparator)over more verbose alternatives. - tech.picnic.errorprone.refasterrules.ComparatorRulesRecipes$ComparatorThenComparingWithComparatorRecipe: Prefer
Comparator#thenComparing(Function, Comparator)over more verbose alternatives. - tech.picnic.errorprone.refasterrules.ComparatorRulesRecipes$ComparatorsMax0Recipe: Prefer
Comparators#max(Comparable, Comparable)over more verbose alternatives. - tech.picnic.errorprone.refasterrules.ComparatorRulesRecipes$ComparatorsMin0Recipe: Prefer
Comparators#min(Comparable, Comparable)over more verbose alternatives. - tech.picnic.errorprone.refasterrules.ComparatorRulesRecipes$EnumIsLessThanOrEqualToRecipe: Prefer
Enum#compareTo(Enum)over less explicit alternatives. - tech.picnic.errorprone.refasterrules.ComparatorRulesRecipes$EnumIsLessThanRecipe: Prefer
Enum#compareTo(Enum)over less explicit alternatives. - tech.picnic.errorprone.refasterrules.DoubleStreamRulesRecipes$DoubleStreamAllMatchWithDoublePredicateRecipe: Prefer
DoubleStream#allMatch(DoublePredicate)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.DoubleStreamRulesRecipes$DoubleStreamConcatRecipe: Prefer
DoubleStream#concat(DoubleStream, DoubleStream)over non-JDK alternatives. - tech.picnic.errorprone.refasterrules.DoubleStreamRulesRecipes$DoubleStreamFindAnyIsEmptyRecipe: Prefer
DoubleStream#findAny()over less efficient alternatives. - tech.picnic.errorprone.refasterrules.DoubleStreamRulesRecipes$DoubleStreamFindAnyIsPresentRecipe: Prefer
DoubleStream#findAny()over less efficient alternatives. - tech.picnic.errorprone.refasterrules.DoubleStreamRulesRecipes$DoubleStreamIdentityRecipe: Prefer using
DoubleStreams as-is over more contrived alternatives. - tech.picnic.errorprone.refasterrules.DoubleStreamRulesRecipes$DoubleStreamNoneMatchWithDoublePredicateRecipe: Prefer
DoubleStream#noneMatch(DoublePredicate)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.EqualityRulesRecipes$BooleanIdentityRecipe: Prefer using the boolean expression as-is over more contrived alternatives.
- tech.picnic.errorprone.refasterrules.EqualityRulesRecipes$EqualToRecipe: Prefer enum
==comparison over less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.EqualityRulesRecipes$EqualToWithBooleanRecipe: Prefer
==over more contrived alternatives. - tech.picnic.errorprone.refasterrules.EqualityRulesRecipes$EqualToWithEnumRecipe: Prefer enum
==comparison over less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.EqualityRulesRecipes$NotEqualToRecipe: Prefer
!=over more contrived alternatives. - tech.picnic.errorprone.refasterrules.EqualityRulesRecipes$ObjectEqualsRecipe: Prefer
Object#equals(Object)method references over more verbose alternatives. - tech.picnic.errorprone.refasterrules.EqualityRulesRecipes$ObjectEqualsWithObjectRecipe: Prefer
Object#equals(Object)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.FileRulesRecipes$FileMkdirsOrFileExistsRecipe: Prefer this evaluation order of
File#mkdirs()andFile#exists()over more fragile alternatives. - tech.picnic.errorprone.refasterrules.FileRulesRecipes$FilesCreateTempFileFileToPathToFileRecipe: Note that
File#createTempFiletreats the given prefix as a path, and ignores all but its file name. That is, the actual prefix used is derived from all characters following the final file separator (if any). This is not the case withFiles#createTempFile, which will instead throw anIllegalArgumentExceptionif the prefix contains any file separators. - tech.picnic.errorprone.refasterrules.FileRulesRecipes$FilesNewInputStreamFileToPathRecipe: Prefer
Files#newInputStream(Path, OpenOption...)over less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.FileRulesRecipes$FilesNewOutputStreamFileToPathRecipe: Prefer
Files#newOutputStream(Path, OpenOption...)over less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.FileRulesRecipes$PathIdentityRecipe: Prefer the
Pathas-is over more contrived alternatives. - tech.picnic.errorprone.refasterrules.FileRulesRecipes$PathOfRecipe: Prefer
Path#of(URI)over less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.FileRulesRecipes$PathOfVarargsRecipe: Prefer
Path#of(String, String...)over less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.FileRulesRecipes$PathToFileMkdirsOrFilesExistsRecipe: Prefer this evaluation order of
File#mkdirs()andFiles#exists(Path, LinkOption...)over more fragile alternatives. - tech.picnic.errorprone.refasterrules.ImmutableEnumSetRulesRecipes$SetsImmutableEnumSetVarargsRecipe: Prefer
Sets#immutableEnumSet(Enum, Enum[])over less efficient alternatives. - tech.picnic.errorprone.refasterrules.ImmutableEnumSetRulesRecipes$StreamCollectToImmutableEnumSetRecipe: <strong>Warning:</strong> this rule is not completely behavior preserving: while the original code produces a set that iterates over its elements in encounter order, the replacement code iterates over the elements in enum definition order.
- tech.picnic.errorprone.refasterrules.ImmutableListMultimapRulesRecipes$BuilderPutRecipe: Prefer
ImmutableListMultimap.Builder#put(Object, Object)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.ImmutableListMultimapRulesRecipes$ImmutableListMultimapCopyOfMultimapsTransformValuesWithFunctionRecipe: Prefer an immutable copy of
Multimaps#transformValues(Multimap, com.google.common.base.Function)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.ImmutableListMultimapRulesRecipes$ImmutableListMultimapCopyOfRecipe: Prefer
ImmutableListMultimap#copyOf(Iterable)over less efficient or more contrived alternatives. - tech.picnic.errorprone.refasterrules.ImmutableListMultimapRulesRecipes$ImmutableListMultimapOf0Recipe: Prefer
ImmutableListMultimap#of()over imprecisely typed or less efficient alternatives. - tech.picnic.errorprone.refasterrules.ImmutableListMultimapRulesRecipes$ImmutableListMultimapOf2Recipe: Prefer
ImmutableListMultimap#of(Object, Object)over imprecisely typed or less efficient alternatives. - tech.picnic.errorprone.refasterrules.ImmutableListMultimapRulesRecipes$ImmutableListMultimapOfEntryGetKeyEntryGetValueRecipe: Prefer
ImmutableListMultimap#of(Object, Object)over less efficient or more contrived alternatives. - tech.picnic.errorprone.refasterrules.ImmutableListRulesRecipes$ImmutableListCopyOfRecipe: Prefer
ImmutableList#copyOf(Iterable)and variants over less efficient or more contrived alternatives. - tech.picnic.errorprone.refasterrules.ImmutableListRulesRecipes$ImmutableListOf0Recipe: Prefer
ImmutableList#of()over imprecisely typed or less efficient alternatives. - tech.picnic.errorprone.refasterrules.ImmutableListRulesRecipes$ImmutableListSortedCopyOfWithComparatorRecipe: Prefer
ImmutableList#sortedCopyOf(Comparator, Iterable)over less efficient alternatives. - tech.picnic.errorprone.refasterrules.ImmutableListRulesRecipes$StreamCollectToImmutableListRecipe: Prefer
ImmutableList#toImmutableList()over less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.ImmutableListRulesRecipes$StreamCollectToImmutableSetAsListRecipe: Prefer
stream.collect(toImmutableSet()).asList()over less efficient alternatives. - tech.picnic.errorprone.refasterrules.ImmutableMapRulesRecipes$BuilderBuildOrThrowRecipe: Prefer
ImmutableMap.Builder#buildOrThrow()over less explicit alternatives. - tech.picnic.errorprone.refasterrules.ImmutableMapRulesRecipes$BuilderPutRecipe: Prefer
ImmutableMap.Builder#put(Object, Object)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.ImmutableMapRulesRecipes$ImmutableMapCopyOfRecipe: Prefer
ImmutableMap#copyOf(Iterable)over imprecisely typed or more contrived alternatives. - tech.picnic.errorprone.refasterrules.ImmutableMapRulesRecipes$ImmutableMapOf0Recipe: Prefer
ImmutableMap#of()over more verbose or imprecisely typed alternatives. - tech.picnic.errorprone.refasterrules.ImmutableMapRulesRecipes$ImmutableMapOf10Recipe: Prefer
ImmutableMap#of(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object)over more verbose or imprecisely typed alternatives. - tech.picnic.errorprone.refasterrules.ImmutableMapRulesRecipes$ImmutableMapOf6Recipe: Prefer
ImmutableMap#of(Object, Object, Object, Object, Object, Object)over more verbose or imprecisely typed alternatives. - tech.picnic.errorprone.refasterrules.ImmutableMapRulesRecipes$ImmutableMapOf8Recipe: Prefer
ImmutableMap#of(Object, Object, Object, Object, Object, Object, Object, Object)over more verbose or imprecisely typed alternatives. - tech.picnic.errorprone.refasterrules.ImmutableMapRulesRecipes$ImmutableMapOfEntryGetKeyEntryGetValueRecipe: Prefer
ImmutableMap#of(Object, Object)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.ImmutableMultisetRulesRecipes$ImmutableMultisetCopyOfRecipe: Prefer
ImmutableMultiset#copyOf(Iterable)and variants over less efficient or more contrived alternatives. - tech.picnic.errorprone.refasterrules.ImmutableMultisetRulesRecipes$ImmutableMultisetOfRecipe: Prefer
ImmutableMultiset#of()over less efficient alternatives. - tech.picnic.errorprone.refasterrules.ImmutableMultisetRulesRecipes$StreamCollectToImmutableMultisetRecipe: Prefer
ImmutableMultiset#toImmutableMultiset()over less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSetMultimapRulesRecipes$BuilderPutRecipe: Prefer
ImmutableSetMultimap.Builder#put(Object, Object)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSetMultimapRulesRecipes$ImmutableSetMultimapCopyOfMultimapsTransformValuesWithFunctionRecipe: Prefer an immutable copy of
Multimaps#transformValues(Multimap, com.google.common.base.Function)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSetMultimapRulesRecipes$ImmutableSetMultimapCopyOfRecipe: Prefer
ImmutableSetMultimap#copyOf(Iterable)over less efficient or more contrived alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSetMultimapRulesRecipes$ImmutableSetMultimapOf0Recipe: Prefer
ImmutableSetMultimap#of()over less efficient alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSetMultimapRulesRecipes$ImmutableSetMultimapOf2Recipe: Prefer
ImmutableSetMultimap#of(Object, Object)over less efficient alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSetMultimapRulesRecipes$ImmutableSetMultimapOfEntryGetKeyEntryGetValueRecipe: Prefer
ImmutableSetMultimap#of(Object, Object)over less efficient or more contrived alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSetRulesRecipes$ImmutableSetCopyOfRecipe: Prefer
ImmutableSet#copyOf(Iterable)and variants over less efficient or more contrived alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSetRulesRecipes$ImmutableSetOf0Recipe: Prefer
ImmutableSet#of()over imprecisely typed, less efficient, or more contrived alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSetRulesRecipes$SetViewImmutableCopyRecipe: Prefer
SetView#immutableCopy()over more verbose alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSetRulesRecipes$SetsDifferenceImmutableCopyRecipe: Prefer
Sets.difference(set1, set2).immutableCopy()over less efficient alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSetRulesRecipes$SetsDifferenceMapKeySetImmutableCopyRecipe: Prefer
Sets.difference(set, map.keySet()).immutableCopy()over less efficient alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSetRulesRecipes$SetsDifferenceMultimapKeySetImmutableCopyRecipe: Prefer
Sets.difference(set, multimap.keySet()).immutableCopy()over less efficient alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSetRulesRecipes$SetsIntersectionImmutableCopyRecipe: Prefer
Sets.intersection(set1, set2).immutableCopy()over less efficient alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSetRulesRecipes$SetsIntersectionMapKeySetImmutableCopyRecipe: Prefer
Sets.intersection(set, map.keySet()).immutableCopy()over less efficient alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSetRulesRecipes$SetsIntersectionMultimapKeySetImmutableCopyRecipe: Prefer
Sets.intersection(set, multimap.keySet()).immutableCopy()over less efficient alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSetRulesRecipes$SetsUnionImmutableCopyRecipe: Prefer
Sets.union(set1, set2).immutableCopy()over less efficient alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSetRulesRecipes$StreamCollectToImmutableSetRecipe: Prefer
ImmutableSet#toImmutableSet()over less efficient or less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSortedMapRulesRecipes$ImmutableSortedMapCopyOfRecipe: Prefer
ImmutableSortedMap#copyOf(Iterable)over more verbose, less efficient, or more contrived alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSortedMapRulesRecipes$ImmutableSortedMapNaturalOrderRecipe: Prefer
ImmutableSortedMap#naturalOrder()over more verbose alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSortedMapRulesRecipes$ImmutableSortedMapOfEntryGetKeyEntryGetValueRecipe: Prefer
ImmutableSortedMap#of(Object, Object)over less efficient or more contrived alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSortedMapRulesRecipes$ImmutableSortedMapOfRecipe: Prefer
ImmutableSortedMap#of()over less efficient alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSortedMapRulesRecipes$ImmutableSortedMapOfWithComparableAndObjectRecipe: Prefer
ImmutableSortedMap#of(Object, Object)over less efficient alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSortedMapRulesRecipes$ImmutableSortedMapOrderedByRecipe: Prefer
ImmutableSortedMap#orderedBy(Comparator)over the associated constructor. - tech.picnic.errorprone.refasterrules.ImmutableSortedMapRulesRecipes$ImmutableSortedMapReverseOrderRecipe: Prefer
ImmutableSortedMap#reverseOrder()over more verbose alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSortedMapRulesRecipes$ToImmutableSortedMapRecipe: Prefer
ImmutableSortedMap#toImmutableSortedMap(Function, Function)over more verbose alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSortedMapRulesRecipes$ToImmutableSortedMapWithBinaryOperatorRecipe: Prefer
ImmutableSortedMap#toImmutableSortedMap(Function, Function, BinaryOperator)over more verbose alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSortedMultisetRulesRecipes$ImmutableSortedMultisetCopyOfRecipe: Prefer
ImmutableSortedMultiset#copyOf(Iterable)and variants over more verbose, less efficient, or more contrived alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSortedMultisetRulesRecipes$ImmutableSortedMultisetNaturalOrderRecipe: Prefer
ImmutableSortedMultiset#naturalOrder()over more verbose alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSortedMultisetRulesRecipes$ImmutableSortedMultisetOfRecipe: Prefer
ImmutableSortedMultiset#of()over less efficient or more contrived alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSortedMultisetRulesRecipes$ImmutableSortedMultisetOrderedByRecipe: Prefer
ImmutableSortedMultiset#orderedBy(Comparator)over the associated constructor. - tech.picnic.errorprone.refasterrules.ImmutableSortedMultisetRulesRecipes$ImmutableSortedMultisetReverseOrderRecipe: Prefer
ImmutableSortedMultiset#reverseOrder()over more verbose alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSortedMultisetRulesRecipes$StreamCollectToImmutableSortedMultisetNaturalOrderRecipe: Prefer
ImmutableSortedMultiset#toImmutableSortedMultiset(Comparator)over less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSortedSetRulesRecipes$ImmutableSortedSetCopyOfRecipe: Prefer
ImmutableSortedSet#copyOf(Iterable)and variants over more verbose, less efficient, or more contrived alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSortedSetRulesRecipes$ImmutableSortedSetNaturalOrderRecipe: Prefer
ImmutableSortedSet#naturalOrder()over more verbose alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSortedSetRulesRecipes$ImmutableSortedSetOfRecipe: Prefer
ImmutableSortedSet#of()over less efficient or more contrived alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSortedSetRulesRecipes$ImmutableSortedSetOrderedByRecipe: Prefer
ImmutableSortedSet#orderedBy(Comparator)over the associated constructor. - tech.picnic.errorprone.refasterrules.ImmutableSortedSetRulesRecipes$ImmutableSortedSetReverseOrderRecipe: Prefer
ImmutableSortedSet#reverseOrder()over more verbose alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSortedSetRulesRecipes$StreamCollectToImmutableSortedSetNaturalOrderRecipe: Prefer
ImmutableSortedSet#toImmutableSortedSet(Comparator)over less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.ImmutableTableRulesRecipes$BuilderBuildOrThrowRecipe: Prefer
ImmutableTable.Builder#buildOrThrow()over less explicit alternatives. - tech.picnic.errorprone.refasterrules.ImmutableTableRulesRecipes$BuilderPutRecipe: Prefer
ImmutableTable.Builder#put(Object, Object, Object)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.ImmutableTableRulesRecipes$ImmutableTableOfCellGetRowKeyCellGetColumnKeyCellGetValueRecipe: Prefer
ImmutableTable#of(Object, Object, Object)over less efficient or more contrived alternatives. - tech.picnic.errorprone.refasterrules.IntStreamRulesRecipes$IntStreamAllMatchWithIntPredicateRecipe: Prefer
IntStream#allMatch(IntPredicate)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.IntStreamRulesRecipes$IntStreamConcatRecipe: Prefer
IntStream#concat(IntStream, IntStream)over non-JDK alternatives. - tech.picnic.errorprone.refasterrules.IntStreamRulesRecipes$IntStreamFindAnyIsEmptyRecipe: Prefer
IntStream#findAny()over less efficient alternatives. - tech.picnic.errorprone.refasterrules.IntStreamRulesRecipes$IntStreamFindAnyIsPresentRecipe: Prefer
IntStream#findAny()over less efficient alternatives. - tech.picnic.errorprone.refasterrules.IntStreamRulesRecipes$IntStreamIdentityRecipe: Prefer using
IntStreams as-is over more contrived alternatives. - tech.picnic.errorprone.refasterrules.IntStreamRulesRecipes$IntStreamNoneMatchWithIntPredicateRecipe: Prefer
IntStream#noneMatch(IntPredicate)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.IntStreamRulesRecipes$IntStreamRangeRecipe: <strong>Warning:</strong> this rewrite changes behavior when
endExclusiveequalsInteger#MIN_VALUE: the subtractionendExclusive - 1overflows toInteger#MAX_VALUE, producing a semantically different stream. - tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatContainsExactlyBooleanRecipe: Prefer
assertThat(...).containsExactly(...)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatContainsExactlyByteRecipe: Prefer
assertThat(...).containsExactly(...)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatContainsExactlyCharRecipe: Prefer
assertThat(...).containsExactly(...)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatContainsExactlyDoubleRecipe: Prefer
assertThat(...).containsExactly(...)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatContainsExactlyFloatRecipe: Prefer
assertThat(...).containsExactly(...)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatContainsExactlyIntRecipe: Prefer
assertThat(...).containsExactly(...)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatContainsExactlyLongRecipe: Prefer
assertThat(...).containsExactly(...)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatContainsExactlyObjectRecipe: Prefer
assertThat(...).containsExactly(...)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatContainsExactlyOffsetDoubleRecipe: Prefer
assertThat(...).containsExactly(..., offset(...))over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatContainsExactlyOffsetFloatRecipe: Prefer
assertThat(...).containsExactly(..., offset(...))over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatContainsExactlyShortRecipe: Prefer
assertThat(...).containsExactly(...)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageContainsExactlyBooleanStringRecipe: Prefer
assertThat(...).containsExactly(...)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageContainsExactlyBooleanSupplierRecipe: Prefer
assertThat(...).containsExactly(...)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageContainsExactlyByteStringRecipe: Prefer
assertThat(...).containsExactly(...)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageContainsExactlyByteSupplierRecipe: Prefer
assertThat(...).containsExactly(...)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageContainsExactlyCharStringRecipe: Prefer
assertThat(...).containsExactly(...)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageContainsExactlyCharSupplierRecipe: Prefer
assertThat(...).containsExactly(...)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageContainsExactlyDoubleStringRecipe: Prefer
assertThat(...).containsExactly(...)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageContainsExactlyDoubleSupplierRecipe: Prefer
assertThat(...).containsExactly(...)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageContainsExactlyFloatStringRecipe: Prefer
assertThat(...).containsExactly(...)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageContainsExactlyFloatSupplierRecipe: Prefer
assertThat(...).containsExactly(...)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageContainsExactlyIntStringRecipe: Prefer
assertThat(...).containsExactly(...)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageContainsExactlyIntSupplierRecipe: Prefer
assertThat(...).containsExactly(...)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageContainsExactlyLongStringRecipe: Prefer
assertThat(...).containsExactly(...)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageContainsExactlyLongSupplierRecipe: Prefer
assertThat(...).containsExactly(...)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageContainsExactlyObjectStringRecipe: Prefer
assertThat(...).containsExactly(...)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageContainsExactlyObjectSupplierRecipe: Prefer
assertThat(...).containsExactly(...)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageContainsExactlyOffsetDoubleStringRecipe: Prefer
assertThat(...).containsExactly(..., offset(...))over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageContainsExactlyOffsetDoubleSupplierRecipe: Prefer
assertThat(...).containsExactly(..., offset(...))over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageContainsExactlyOffsetFloatStringRecipe: Prefer
assertThat(...).containsExactly(..., offset(...))over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageContainsExactlyOffsetFloatSupplierRecipe: Prefer
assertThat(...).containsExactly(..., offset(...))over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageContainsExactlyShortStringRecipe: Prefer
assertThat(...).containsExactly(...)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageContainsExactlyShortSupplierRecipe: Prefer
assertThat(...).containsExactly(...)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageIsFalseStringRecipe: Prefer
AbstractBooleanAssert#isFalse()over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageIsFalseSupplierRecipe: Prefer
AbstractBooleanAssert#isFalse()over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageIsInstanceOfStringRecipe: Prefer
AbstractAssert#isInstanceOf(Class)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageIsInstanceOfSupplierRecipe: Prefer
AbstractAssert#isInstanceOf(Class)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageIsNotNullStringRecipe: Prefer
AbstractAssert#isNotNull()over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageIsNotNullSupplierRecipe: Prefer
AbstractAssert#isNotNull()over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageIsNotSameAsStringRecipe: Prefer
AbstractAssert#isNotSameAs(Object)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageIsNotSameAsSupplierRecipe: Prefer
AbstractAssert#isNotSameAs(Object)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageIsNullStringRecipe: Prefer
AbstractAssert#isNull()over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageIsNullSupplierRecipe: Prefer
AbstractAssert#isNull()over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageIsSameAsStringRecipe: Prefer
AbstractAssert#isSameAs(Object)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageIsSameAsSupplierRecipe: Prefer
AbstractAssert#isSameAs(Object)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageIsTrueStringRecipe: Prefer
AbstractBooleanAssert#isTrue()over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageIsTrueSupplierRecipe: Prefer
AbstractBooleanAssert#isTrue()over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$FailWithStringAndThrowableRecipe: Prefer
org.assertj.core.api.Assertions#fail(String, Throwable)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$FailWithStringRecipe: Prefer
org.assertj.core.api.Assertions#fail(String)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.Jackson2RulesRecipes$ObjectMapperConvertValueClassRecipe: Prefer
ObjectMapper#convertValue(Object, Class)over less efficient alternatives. - tech.picnic.errorprone.refasterrules.Jackson2RulesRecipes$ObjectMapperConvertValueJavaTypeRecipe: Prefer
ObjectMapper#convertValue(Object, JavaType)over less efficient alternatives. - tech.picnic.errorprone.refasterrules.Jackson2RulesRecipes$ObjectMapperConvertValueTypeReferenceRecipe: Prefer
ObjectMapper#convertValue(Object, TypeReference)over less efficient alternatives. - tech.picnic.errorprone.refasterrules.Jackson3RulesRecipes$ObjectMapperConvertValueClassRecipe: Prefer
ObjectMapper#convertValue(Object, Class)over less efficient alternatives. - tech.picnic.errorprone.refasterrules.Jackson3RulesRecipes$ObjectMapperConvertValueJavaTypeRecipe: Prefer
ObjectMapper#convertValue(Object, JavaType)over less efficient alternatives. - tech.picnic.errorprone.refasterrules.Jackson3RulesRecipes$ObjectMapperConvertValueTypeReferenceRecipe: Prefer
ObjectMapper#convertValue(Object, TypeReference)over less efficient alternatives. - tech.picnic.errorprone.refasterrules.LongStreamRulesRecipes$LongStreamAllMatchWithLongPredicateRecipe: Prefer
LongStream#allMatch(LongPredicate)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.LongStreamRulesRecipes$LongStreamConcatRecipe: Prefer
LongStream#concat(LongStream, LongStream)over non-JDK alternatives. - tech.picnic.errorprone.refasterrules.LongStreamRulesRecipes$LongStreamFindAnyIsEmptyRecipe: Prefer
LongStream#findAny()over less efficient alternatives. - tech.picnic.errorprone.refasterrules.LongStreamRulesRecipes$LongStreamFindAnyIsPresentRecipe: Prefer
LongStream#findAny()over less efficient alternatives. - tech.picnic.errorprone.refasterrules.LongStreamRulesRecipes$LongStreamIdentityRecipe: Prefer the
LongStreamas-is over more contrived alternatives. - tech.picnic.errorprone.refasterrules.LongStreamRulesRecipes$LongStreamNoneMatchWithLongPredicateRecipe: Prefer
LongStream#noneMatch(LongPredicate)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.LongStreamRulesRecipes$LongStreamRangeRecipe: <strong>Warning:</strong> this rewrite changes behavior when
endExclusiveequalsLong#MIN_VALUE: the subtractionendExclusive - 1overflows toLong#MAX_VALUE, producing a semantically different stream. - tech.picnic.errorprone.refasterrules.MapEntryRulesRecipes$ComparingByKeyRecipe: Prefer
Map.Entry#comparingByKey()over more verbose alternatives. - tech.picnic.errorprone.refasterrules.MapEntryRulesRecipes$ComparingByKeyWithComparatorRecipe: Prefer
Map.Entry#comparingByKey(Comparator)over more verbose alternatives. - tech.picnic.errorprone.refasterrules.MapEntryRulesRecipes$ComparingByValueRecipe: Prefer
Map.Entry#comparingByValue()over more verbose alternatives. - tech.picnic.errorprone.refasterrules.MapEntryRulesRecipes$ComparingByValueWithComparatorRecipe: Prefer
Map.Entry#comparingByValue(Comparator)over more verbose alternatives. - tech.picnic.errorprone.refasterrules.MapRulesRecipes$MapGetRecipe: Prefer
Map#get(Object)over more verbose alternatives. - tech.picnic.errorprone.refasterrules.MapRulesRecipes$MapKeySetStreamRecipe: Prefer
map.keySet().stream()over more contrived alternatives. - tech.picnic.errorprone.refasterrules.MapRulesRecipes$MapValuesStreamRecipe: Prefer
map.values().stream()over more contrived alternatives. - tech.picnic.errorprone.refasterrules.MockitoRulesRecipes$InvocationOnMockGetArgumentRecipe: Prefer
InvocationOnMock#getArgument(int)over more verbose alternatives. - tech.picnic.errorprone.refasterrules.MockitoRulesRecipes$VerifyRecipe: Prefer
Mockito#verify(Object)over more verbose alternatives. - tech.picnic.errorprone.refasterrules.NullRulesRecipes$EqualToNullRecipe: Prefer
== nullover less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.NullRulesRecipes$NotEqualToNullRecipe: Prefer
!= nullover less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.NullRulesRecipes$ObjectsIsNullRecipe: Prefer
Objects#isNull(Object)over less idiomatic or more contrived alternatives. - tech.picnic.errorprone.refasterrules.NullRulesRecipes$ObjectsNonNullRecipe: Prefer
Objects#nonNull(Object)over less idiomatic or more contrived alternatives. - tech.picnic.errorprone.refasterrules.OptionalRulesRecipes$OptionalEqualsOptionalOfRecipe: Prefer
Optional#equals(Object)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.OptionalRulesRecipes$OptionalFilterIsPresentRecipe: Prefer
Optional#filter(Predicate)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.OptionalRulesRecipes$OptionalMapWithFunctionRecipe: Prefer
Optional#map(Function)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.OptionalRulesRecipes$OptionalOrElseThrowWithOptionalRecipe: Prefer
Optional#orElseThrow()over the less explicitOptional#get(). - tech.picnic.errorprone.refasterrules.OptionalRulesRecipes$OptionalOrOrElseThrowRecipe: Prefer
Optional#or(Supplier)combined withOptional#orElseThrow()over more contrived alternatives. - tech.picnic.errorprone.refasterrules.OptionalRulesRecipes$OptionalOrRecipe: Prefer
Optional#or(Supplier)over more verbose alternatives. - tech.picnic.errorprone.refasterrules.OptionalRulesRecipes$StreamFlatMapOptionalStreamRecipe: Prefer
Optional#stream()over more verbose or non-JDK alternatives. - tech.picnic.errorprone.refasterrules.OptionalRulesRecipes$StreamsStreamFindFirstRecipe: Prefer
Streams.stream(iterator).findFirst()over more contrived alternatives. - tech.picnic.errorprone.refasterrules.PreconditionsRulesRecipes$RequireNonNullExpressionRecipe: Prefer
Objects#requireNonNull(Object)over non-JDK alternatives. - tech.picnic.errorprone.refasterrules.PreconditionsRulesRecipes$RequireNonNullWithStringExpressionRecipe: Prefer
Objects#requireNonNull(Object, String)over non-JDK alternatives. - tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes$ArraysCompareUnsignedByteRecipe: Prefer
Arrays#compareUnsigned(byte[], byte[])over non-JDK alternatives. - tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes$ArraysCompareUnsignedIntRecipe: Prefer
Arrays#compareUnsigned(int[], int[])over non-JDK alternatives. - tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes$ArraysCompareUnsignedLongRecipe: Prefer
Arrays#compareUnsigned(long[], long[])over non-JDK alternatives. - tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes$IntegerParseUnsignedIntWithIntRecipe: Prefer
Integer#parseUnsignedInt(String, int)over non-JDK alternatives. - tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes$IntegerToUnsignedStringWithIntRecipe: Prefer
Integer#toUnsignedString(int, int)over non-JDK alternatives. - tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes$LongParseUnsignedLongWithIntRecipe: Prefer
Long#parseUnsignedLong(String, int)over non-JDK alternatives. - tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes$LongToUnsignedStringWithIntRecipe: Prefer
Long#toUnsignedString(long, int)over non-JDK alternatives. - tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes$MathToIntExactRecipe: Prefer
Math#toIntExact(long)over non-JDK alternatives. - tech.picnic.errorprone.refasterrules.RandomGeneratorRulesRecipes$RandomGeneratorNextDoublePlusRecipe: <strong>Warning:</strong> this rewrite may change the distribution of generated values; the before-template can silently yield a non-uniform domain.
- tech.picnic.errorprone.refasterrules.RandomGeneratorRulesRecipes$RandomGeneratorNextIntPlusRecipe: <strong>Warning:</strong> this rewrite may change the set of generated values; the before-template can silently yield values outside the intended domain.
- tech.picnic.errorprone.refasterrules.RandomGeneratorRulesRecipes$RandomGeneratorNextLongPlusRecipe: <strong>Warning:</strong> this rewrite may change the set of generated values; the before-template can silently yield values outside the intended domain.
- tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxAsStepVerifierCreateExpectNextRecipe: Prefer using
FirstStep#expectNext(Object)over collecting a single-elementFluxinto a list. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxAsStepVerifierCreateRecipe: Prefer
Flux#as(Function)when creating aStepVerifier. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxConcatMapIterableIdentityRecipe: Prefer
Flux#concatMapIterable(Function)over alternatives that require an additional subscription. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxConcatMapIterableIdentityWithIntRecipe: Prefer
Flux#concatMapIterable(Function, int)over alternatives that require an additional subscription. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxErrorThrowableRecipe: Prefer
Flux#error(Supplier)over unnecessarily deferringFlux#error(Throwable). - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxFromStreamRecipe: Prefer
Flux#fromStream(Supplier)overFlux#fromStream(Stream), as the former yields aFluxthat is more likely to behave as expected when subscribed to more than once. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxIdentityRecipe: Prefer using
Fluxs as-is over unnecessarily passing an empty publisher toFlux#switchIfEmpty(Publisher). - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxJustVarargsRecipe: Prefer
Flux#just(Object[])over more contrived alternatives. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxMapNotNullOptionalOrElseNullRecipe: Prefer
Flux#mapNotNull(Function)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxOnErrorCompleteWithPredicateRecipe: Prefer
Flux#onErrorComplete(Predicate)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxThenWithMonoRecipe: Prefer
Flux#then(Mono)over vacuously invokingFlux#ignoreElements(). - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxTransformMathFluxMaxSingleOrEmptyRecipe: Prefer
MathFlux#max(Publisher)over less efficient alternatives. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxTransformMathFluxMaxSingleOrEmptyWithComparatorRecipe: Prefer
MathFlux#max(Publisher, Comparator)over less efficient or more verbose alternatives. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxTransformMathFluxMinSingleOrEmptyRecipe: Prefer
MathFlux#min(Publisher)over less efficient alternatives. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxTransformMathFluxMinSingleOrEmptyWithComparatorRecipe: Prefer
MathFlux#min(Publisher, Comparator)over less efficient or more verbose alternatives. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxZipMapFunctionRecipe: Prefer
Flux#zip(Publisher, Publisher)with a chained combinator over a chainedFlux#zipWith(Publisher, BiFunction), as the former better conveys that thePublishers may be subscribed to concurrently, and generalizes to combining three or more reactive streams. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxZipWithIterableWithBiFunctionRecipe: Prefer
Flux#zipWithIterable(Iterable, BiFunction)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$LastStepVerifyCompleteRecipe: Prefer
StepVerifier.LastStep#verifyComplete()over more verbose alternatives. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$LastStepVerifyErrorMatchesRecipe: Prefer
StepVerifier.LastStep#verifyErrorMatches(Predicate)over more verbose alternatives. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$LastStepVerifyErrorMessageRecipe: Prefer
StepVerifier.LastStep#verifyErrorMessage(String)over more verbose alternatives. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$LastStepVerifyErrorRecipe: Prefer
StepVerifier.LastStep#verifyError()over more verbose alternatives. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$LastStepVerifyErrorSatisfiesAssertThatIsInstanceOfHasMessageRecipe: Prefer
StepVerifier.LastStep#verifyErrorSatisfies(Consumer)with AssertJ over more contrived alternatives. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$LastStepVerifyErrorSatisfiesRecipe: Prefer
StepVerifier.LastStep#verifyErrorSatisfies(Consumer)over more verbose alternatives. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$LastStepVerifyErrorWithClassRecipe: Prefer
StepVerifier.LastStep#verifyError(Class)over more verbose alternatives. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$LastStepVerifyTimeoutRecipe: Prefer
StepVerifier.LastStep#verifyTimeout(Duration)over more verbose alternatives. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoAsStepVerifierCreateRecipe: Prefer
Mono#as(Function)when creating aStepVerifier. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoErrorThrowableRecipe: Prefer
Mono#error(Supplier)over unnecessarily deferringMono#error(Throwable). - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoFromFutureAsyncLoadingCacheGetAllTrueRecipe: <strong>Warning:</strong> this rewrite changes cancellation propagation behavior.
- tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoFromFutureAsyncLoadingCacheGetTrueRecipe: <strong>Warning:</strong> this rewrite changes cancellation propagation behavior.
- tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoFromFutureRecipe: Prefer
Mono#fromFuture(Supplier)overMono#fromFuture(CompletableFuture), as the former may defer initiation of the asynchronous computation until subscription. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoFromFutureWithBooleanRecipe: Prefer
Mono#fromFuture(Supplier, boolean)overMono#fromFuture(CompletableFuture, boolean), as the former may defer initiation of the asynchronous computation until subscription. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoJustOrEmptySwitchIfEmptyRecipe: In particular, avoid mixing of the
OptionalandMonoAPIs. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoOnErrorCompleteWithClassRecipe: Prefer
Mono#onErrorComplete(Class)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoOnErrorCompleteWithPredicateRecipe: Prefer
Mono#onErrorComplete(Predicate)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoThenFluxRecipe: Prefer explicit invocation of
Mono#flux()over implicit conversions fromMonotoFlux. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoThenWithMonoRecipe: Prefer
Mono#then(Mono)over applying vacuous operations first. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoTimeoutMonoEmptyDurationRecipe: <strong>Warning:</strong> this rewrite changes behavior if the source can emit or propagate
a
TimeoutException: the original code suppresses any such signal, while the replacement only handles the one emitted by thetimeoutoperator itself. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoTimeoutMonoEmptyPublisherRecipe: <strong>Warning:</strong> this rewrite changes behavior if the source can emit or propagate
a
TimeoutException: the original code suppresses any such signal, while the replacement only handles the one emitted by thetimeoutoperator itself. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoTimeoutMonoJustDurationRecipe: <strong>Warning:</strong> this rewrite changes behavior if the source can emit or propagate
a
TimeoutException: the original code suppresses any such signal, while the replacement only handles the one emitted by thetimeoutoperator itself. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoTimeoutMonoJustPublisherRecipe: <strong>Warning:</strong> this rewrite changes behavior if the source can emit or propagate
a
TimeoutException: the original code suppresses any such signal, while the replacement only handles the one emitted by thetimeoutoperator itself. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoZipMapFunctionRecipe: Prefer
Mono#zip(Mono, Mono)with a chained combinator over a chainedMono#zipWith(Mono, BiFunction), as the former better conveys that theMonos may be subscribed to concurrently, and generalizes to combining three or more reactive streams. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$StepExpectNextRecipe: Prefer
StepVerifier.Step#expectNext(Object)over more verbose alternatives. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$StepVerifierVerifyWithDurationRecipe: Prefer
StepVerifier#verify(Duration)over a danglingStepVerifier#verifyThenAssertThat(Duration). - tech.picnic.errorprone.refasterrules.RxJava2AdapterRulesRecipes$CompletableAsRxJava2AdapterCompletableToMonoRecipe: Prefer
RxJava2Adapter#completableToMono(Completable)over less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.RxJava2AdapterRulesRecipes$FlowableAsRxJava2AdapterFlowableToFluxRecipe: Prefer
RxJava2Adapter#flowableToFlux(Flowable)over less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.RxJava2AdapterRulesRecipes$FluxAsRxJava2AdapterFluxToFlowableRecipe: Prefer
RxJava2Adapter#fluxToFlowable(Flux)over less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.RxJava2AdapterRulesRecipes$FluxAsRxJava2AdapterFluxToObservableRecipe: Prefer
RxJava2Adapter#fluxToObservable(Flux)over less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.RxJava2AdapterRulesRecipes$MaybeAsRxJava2AdapterMaybeToMonoRecipe: Prefer
RxJava2Adapter#maybeToMono(Maybe)over less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.RxJava2AdapterRulesRecipes$MonoAsRxJava2AdapterMonoToCompletableRecipe: Prefer
RxJava2Adapter#monoToCompletable(Mono)over less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.RxJava2AdapterRulesRecipes$MonoAsRxJava2AdapterMonoToFlowableRecipe: Prefer
RxJava2Adapter#monoToFlowable(Mono)over less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.RxJava2AdapterRulesRecipes$MonoAsRxJava2AdapterMonoToMaybeRecipe: Prefer
RxJava2Adapter#monoToMaybe(Mono)over less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.RxJava2AdapterRulesRecipes$MonoAsRxJava2AdapterMonoToSingleRecipe: Prefer
RxJava2Adapter#monoToSingle(Mono)over less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.RxJava2AdapterRulesRecipes$ObservableToFlowableAsRxJava2AdapterFlowableToFluxRecipe: Prefer chaining
Observable#toFlowable(BackpressureStrategy)withRxJava2Adapter#flowableToFlux(Flowable)over less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.RxJava2AdapterRulesRecipes$SingleAsRxJava2AdapterSingleToMonoRecipe: Prefer
RxJava2Adapter#singleToMono(Single)over less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.SpringTestRulesRecipes$BodyContentSpecJsonJsonCompareModeLenientRecipe: Prefer
BodyContentSpec#json(String, JsonCompareMode)with lenient mode over deprecated alternatives. - tech.picnic.errorprone.refasterrules.SpringTestRulesRecipes$BodyContentSpecJsonJsonCompareModeStrictRecipe: Prefer
BodyContentSpec#json(String, JsonCompareMode)with strict mode over deprecated alternatives. - tech.picnic.errorprone.refasterrules.StreamRulesRecipes$StreamConcatRecipe: Prefer
Stream#concat(Stream, Stream)over non-JDK alternatives. - tech.picnic.errorprone.refasterrules.StreamRulesRecipes$StreamFindFirstMapRecipe: Prefer
stream.findFirst().map(function)over less efficient alternatives. - tech.picnic.errorprone.refasterrules.StreamRulesRecipes$StreamIdentityRecipe: Prefer the
Streamas-is over more contrived alternatives. - tech.picnic.errorprone.refasterrules.StreamRulesRecipes$StreamMapMapGetFilterObjectsNonNullRecipe: Prefer
stream.map(map::get).filter(Objects::nonNull)over less efficient alternatives. - tech.picnic.errorprone.refasterrules.StreamRulesRecipes$StreamReduceWithObjectRecipe: Prefer
Stream#reduce(Object, BinaryOperator)over less efficient alternatives. - tech.picnic.errorprone.refasterrules.StringRulesRecipes$FormattedRecipe: Prefer
String#formatted(Object...)over less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.StringRulesRecipes$MathMaxNegativeOneStringIndexOfMinusIntRecipe: Prefer
String#indexOf(int, int)over less efficient alternatives. - tech.picnic.errorprone.refasterrules.StringRulesRecipes$MathMaxNegativeOneStringIndexOfMinusIntWithIntRecipe: Prefer
String#indexOf(int, int, int)over less efficient alternatives. - tech.picnic.errorprone.refasterrules.StringRulesRecipes$MathMaxNegativeOneStringIndexOfMinusStringRecipe: Prefer
String#indexOf(String, int)over less efficient alternatives. - tech.picnic.errorprone.refasterrules.StringRulesRecipes$MathMaxNegativeOneStringIndexOfMinusStringWithIntRecipe: Prefer
String#indexOf(String, int)over less efficient alternatives. - tech.picnic.errorprone.refasterrules.StringRulesRecipes$MathMaxNegativeOneStringLastIndexOfMinusIntRecipe: Prefer
String#lastIndexOf(int, int)over less efficient alternatives. - tech.picnic.errorprone.refasterrules.StringRulesRecipes$MathMaxNegativeOneStringLastIndexOfMinusStringRecipe: Prefer
String#lastIndexOf(String, int)over less efficient alternatives. - tech.picnic.errorprone.refasterrules.StringRulesRecipes$NewString1Recipe: Prefer
String#String(char[])over more contrived alternatives. - tech.picnic.errorprone.refasterrules.StringRulesRecipes$NewString3Recipe: Prefer
String#String(char[], int, int)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.StringRulesRecipes$NotStringIsEmptyRecipe: Prefer
not(String::isEmpty)over less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.StringRulesRecipes$OptionalFilterNotStringIsEmptyRecipe: Prefer
Optional#filter(Predicate)over non-JDK alternatives. - tech.picnic.errorprone.refasterrules.StringRulesRecipes$OptionalOfNullableFilterNotStringIsEmptyRecipe: Prefer
Optional.ofNullable(str).filter(not(String::isEmpty))over more contrived alternatives. - tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIsEmptyWithStringRecipe: Prefer
String#isEmpty()over less explicit alternatives. - tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringJoinRecipe: Prefer
String#join(CharSequence, Iterable)over non-JDK or more contrived alternatives. - tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringJoinVarargsRecipe: Prefer
String#join(CharSequence, CharSequence...)over less efficient alternatives. - tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringLastIndexOfMinusOneIntRecipe: Prefer
String#lastIndexOf(int, int)over less efficient alternatives. - tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringLastIndexOfMinusOneStringRecipe: <strong>Warning:</strong> when
str2is empty, this rewrite changes the result: the original expression returnsfromIndex, while the replacement returnsfromIndex - 1. - tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringSubstringRecipe: Prefer
String#substring(int)over more verbose alternatives. - tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringValueOfWithObjectRecipe: Prefer
String#valueOf(Object)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringsIsNullOrEmptyRecipe: Prefer
Strings#isNullOrEmpty(String)over more verbose alternatives. - tech.picnic.errorprone.refasterrules.SuggestedFixRulesRecipes$SuggestedFixReplace2Recipe: Prefer
SuggestedFix#replace(Tree, String)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.SuggestedFixRulesRecipes$SuggestedFixReplace3Recipe: Prefer
SuggestedFix#replace(int, int, String)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.SuggestedFixRulesRecipes$SuggestedFixReplace4Recipe: Prefer
SuggestedFix#replace(Tree, String, int, int)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertThatContainsExactlyElementsOfRecipe: Prefer
AbstractIterableAssert#containsExactlyElementsOf(Iterable)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertThatContainsExactlyInAnyOrderRecipe: Prefer
assertThat(...).containsExactlyInAnyOrder(...)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertThatContainsExactlyOffsetDoubleRecipe: Prefer
assertThat(...).containsExactly(..., offset(...))over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertThatContainsExactlyOffsetFloatRecipe: Prefer
assertThat(...).containsExactly(..., offset(...))over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertThatContainsExactlyRecipe: Prefer
assertThat(...).containsExactly(...)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertThatHasSameElementsAsRecipe: Prefer
AbstractIterableAssert#hasSameElementsAs(Iterable)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertThatIsCloseToOffsetDoubleRecipe: Prefer
AbstractDoubleAssert#isCloseTo(double, Offset)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertThatIsCloseToOffsetFloatRecipe: Prefer
AbstractFloatAssert#isCloseTo(float, Offset)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertThatIsEqualToRecipe: Prefer
AbstractAssert#isEqualTo(Object)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertThatIsFalseRecipe: Prefer
AbstractBooleanAssert#isFalse()over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertThatIsNotCloseToOffsetDoubleRecipe: Prefer
AbstractDoubleAssert#isNotCloseTo(double, Offset)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertThatIsNotCloseToOffsetFloatRecipe: Prefer
AbstractFloatAssert#isNotCloseTo(float, Offset)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertThatIsNotEqualToRecipe: Prefer
AbstractAssert#isNotEqualTo(Object)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertThatIsNotNullRecipe: Prefer
AbstractAssert#isNotNull()over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertThatIsNotSameAsRecipe: Prefer
AbstractAssert#isNotSameAs(Object)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertThatIsNullRecipe: Prefer
AbstractAssert#isNull()over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertThatIsSameAsRecipe: Prefer
AbstractAssert#isSameAs(Object)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertThatIsTrueRecipe: Prefer
AbstractBooleanAssert#isTrue()over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertThatToIterableContainsExactlyElementsOfImmutableListCopyOfRecipe: Prefer
assertThat(...).toIterable().containsExactlyElementsOf(...)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertThatToIterableWithFailMessageContainsExactlyElementsOfImmutableListCopyOfRecipe: Prefer
assertThat(...).toIterable().containsExactlyElementsOf(...)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertThatWithFailMessageContainsExactlyElementsOfRecipe: Prefer
AbstractIterableAssert#containsExactlyElementsOf(Iterable)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertThatWithFailMessageContainsExactlyInAnyOrderRecipe: Prefer
assertThat(...).containsExactlyInAnyOrder(...)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertThatWithFailMessageContainsExactlyOffsetDoubleRecipe: Prefer
assertThat(...).containsExactly(..., offset(...))over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertThatWithFailMessageContainsExactlyOffsetFloatRecipe: Prefer
assertThat(...).containsExactly(..., offset(...))over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertThatWithFailMessageContainsExactlyRecipe: Prefer
assertThat(...).containsExactly(...)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertThatWithFailMessageHasSameElementsAsRecipe: Prefer
AbstractIterableAssert#hasSameElementsAs(Iterable)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertThatWithFailMessageIsCloseToOffsetDoubleRecipe: Prefer
AbstractDoubleAssert#isCloseTo(double, Offset)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertThatWithFailMessageIsCloseToOffsetFloatRecipe: Prefer
AbstractFloatAssert#isCloseTo(float, Offset)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertThatWithFailMessageIsEqualToRecipe: Prefer
AbstractAssert#isEqualTo(Object)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertThatWithFailMessageIsFalseRecipe: Prefer
AbstractBooleanAssert#isFalse()over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertThatWithFailMessageIsNotCloseToOffsetDoubleRecipe: Prefer
AbstractDoubleAssert#isNotCloseTo(double, Offset)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertThatWithFailMessageIsNotCloseToOffsetFloatRecipe: Prefer
AbstractFloatAssert#isNotCloseTo(float, Offset)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertThatWithFailMessageIsNotEqualToRecipe: Prefer
AbstractAssert#isNotEqualTo(Object)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertThatWithFailMessageIsNotNullRecipe: Prefer
AbstractAssert#isNotNull()over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertThatWithFailMessageIsNotSameAsRecipe: Prefer
AbstractAssert#isNotSameAs(Object)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertThatWithFailMessageIsNullRecipe: Prefer
AbstractAssert#isNull()over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertThatWithFailMessageIsSameAsRecipe: Prefer
AbstractAssert#isSameAs(Object)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertThatWithFailMessageIsTrueRecipe: Prefer
AbstractBooleanAssert#isTrue()over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$FailWithStringAndThrowableRecipe: Prefer
Assertions#fail(String, Throwable)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$FailWithStringRecipe: Prefer
Assertions#fail(String)over non-AssertJ alternatives. - tech.picnic.errorprone.refasterrules.TimeRulesRecipes$ClockSystemUTCRecipe: Prefer
Clock#systemUTC()over more verbose alternatives. - tech.picnic.errorprone.refasterrules.TimeRulesRecipes$DurationBetweenInstantRecipe: <strong>Warning:</strong> this rewrite rule increases precision!.
- tech.picnic.errorprone.refasterrules.TimeRulesRecipes$DurationBetweenOffsetDateTimeRecipe: <strong>Warning:</strong> this rewrite rule increases precision!.
- tech.picnic.errorprone.refasterrules.TimeRulesRecipes$DurationZeroRecipe: Prefer
Duration#ZEROover less explicit alternatives. - tech.picnic.errorprone.refasterrules.TimeRulesRecipes$InstantEpochRecipe: Prefer
Instant#EPOCHover less efficient alternatives. - tech.picnic.errorprone.refasterrules.TimeRulesRecipes$InstantTruncatedToChronoUnitMillisRecipe: Note that
Instant#toEpochMilli()throws anArithmeticExceptionfor dates very far in the past or future, while the suggested alternative doesn't. - tech.picnic.errorprone.refasterrules.TimeRulesRecipes$InstantTruncatedToChronoUnitSecondsRecipe: Prefer
Instant#truncatedTo(TemporalUnit)over less efficient alternatives. - tech.picnic.errorprone.refasterrules.TimeRulesRecipes$PeriodZeroRecipe: Prefer
Period#ZEROover less explicit alternatives. - tech.picnic.errorprone.refasterrules.TimeRulesRecipes$UtcRecipe: Prefer
ZoneOffset#UTCover less explicit alternatives. - tech.picnic.errorprone.refasterrules.WebClientRulesRecipes$RequestBodySpecBodyValueRecipe: Prefer
RequestBodySpec#bodyValue(Object)over more contrived alternatives.
Removed Recipes
- org.openrewrite.staticanalysis.UseStringCaseInsensitiveOrderRecipes: Replaces case-insensitive string comparator lambdas and method references with the JDK constant
String.CASE_INSENSITIVE_ORDER. Improves readability and removes one closure allocation per call site. - org.openrewrite.staticanalysis.UseStringCaseInsensitiveOrderRecipes$FromLambdaRecipe: Replace
(a, b) -> a.compareToIgnoreCase(b)withString.CASE_INSENSITIVE_ORDERwhen used as aComparator<String>. - org.openrewrite.staticanalysis.UseStringCaseInsensitiveOrderRecipes$FromMethodReferenceRecipe: Replace the method reference
String::compareToIgnoreCasewithString.CASE_INSENSITIVE_ORDERwhen used as aComparator<String>. - tech.picnic.errorprone.refasterrules.AssertJBigIntegerRulesRecipes$AbstractBigIntegerAssertIsNotZeroRecipe: Recipe created for the following Refaster template:
static final class AbstractBigIntegerAssertIsNotZero {
@BeforeTemplate
AbstractBigIntegerAssert<?> before(AbstractBigIntegerAssert<?> bigIntegerAssert) {
return Refaster.anyOf(bigIntegerAssert.isNotZero(), bigIntegerAssert.isNotEqualTo(0L), bigIntegerAssert.isNotEqualTo(BigInteger.ZERO));
}
@AfterTemplate
AbstractBigIntegerAssert<?> after(AbstractBigIntegerAssert<?> bigIntegerAssert) {
return bigIntegerAssert.isNotEqualTo(0);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJBigIntegerRulesRecipes$AbstractBigIntegerAssertIsOneRecipe: Recipe created for the following Refaster template:
static final class AbstractBigIntegerAssertIsOne {
@BeforeTemplate
AbstractBigIntegerAssert<?> before(AbstractBigIntegerAssert<?> bigIntegerAssert) {
return Refaster.anyOf(bigIntegerAssert.isOne(), bigIntegerAssert.isEqualTo(1L), bigIntegerAssert.isEqualTo(BigInteger.ONE));
}
@AfterTemplate
AbstractBigIntegerAssert<?> after(AbstractBigIntegerAssert<?> bigIntegerAssert) {
return bigIntegerAssert.isEqualTo(1);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJBigIntegerRulesRecipes$AbstractBigIntegerAssertIsZeroRecipe: Recipe created for the following Refaster template:
static final class AbstractBigIntegerAssertIsZero {
@BeforeTemplate
AbstractBigIntegerAssert<?> before(AbstractBigIntegerAssert<?> bigIntegerAssert) {
return Refaster.anyOf(bigIntegerAssert.isZero(), bigIntegerAssert.isEqualTo(0L), bigIntegerAssert.isEqualTo(BigInteger.ZERO));
}
@AfterTemplate
AbstractBigIntegerAssert<?> after(AbstractBigIntegerAssert<?> bigIntegerAssert) {
return bigIntegerAssert.isEqualTo(0);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJBooleanRulesRecipes$AssertThatBooleanIsFalseRecipe: Recipe created for the following Refaster template:
static final class AssertThatBooleanIsFalse {
@BeforeTemplate
AbstractBooleanAssert<?> before(boolean b) {
return assertThat(!b).isTrue();
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
AbstractBooleanAssert<?> after(boolean b) {
return assertThat(b).isFalse();
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJBooleanRulesRecipes$AssertThatBooleanIsTrueRecipe: Recipe created for the following Refaster template:
static final class AssertThatBooleanIsTrue {
@BeforeTemplate
AbstractBooleanAssert<?> before(boolean b) {
return assertThat(!b).isFalse();
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
AbstractBooleanAssert<?> after(boolean b) {
return assertThat(b).isTrue();
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJByteRulesRecipes$AbstractByteAssertIsNotZeroRecipe: Recipe created for the following Refaster template:
static final class AbstractByteAssertIsNotZero {
@BeforeTemplate
AbstractByteAssert<?> before(AbstractByteAssert<?> byteAssert) {
return byteAssert.isNotZero();
}
@AfterTemplate
AbstractByteAssert<?> after(AbstractByteAssert<?> byteAssert) {
return byteAssert.isNotEqualTo((byte)0);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJByteRulesRecipes$AbstractByteAssertIsOneRecipe: Recipe created for the following Refaster template:
static final class AbstractByteAssertIsOne {
@BeforeTemplate
AbstractByteAssert<?> before(AbstractByteAssert<?> byteAssert) {
return byteAssert.isOne();
}
@AfterTemplate
AbstractByteAssert<?> after(AbstractByteAssert<?> byteAssert) {
return byteAssert.isEqualTo((byte)1);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJByteRulesRecipes$AbstractByteAssertIsZeroRecipe: Recipe created for the following Refaster template:
static final class AbstractByteAssertIsZero {
@BeforeTemplate
AbstractByteAssert<?> before(AbstractByteAssert<?> byteAssert) {
return byteAssert.isZero();
}
@AfterTemplate
AbstractByteAssert<?> after(AbstractByteAssert<?> byteAssert) {
return byteAssert.isEqualTo((byte)0);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJCharSequenceRulesRecipes$AssertThatCharSequenceHasSizeRecipe: Recipe created for the following Refaster template:
static final class AssertThatCharSequenceHasSize {
@BeforeTemplate
AbstractAssert<?, ?> before(CharSequence charSequence, int length) {
return assertThat(charSequence.length()).isEqualTo(length);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
AbstractAssert<?, ?> after(CharSequence charSequence, int length) {
return assertThat(charSequence).hasSize(length);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJCharSequenceRulesRecipes$AssertThatCharSequenceIsEmptyRecipe: Recipe created for the following Refaster template:
static final class AssertThatCharSequenceIsEmpty {
@BeforeTemplate
void before(CharSequence charSequence) {
Refaster.anyOf(assertThat(charSequence.isEmpty()).isTrue(), assertThat(charSequence.length()).isEqualTo(0L), assertThat(charSequence.length()).isNotPositive());
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(CharSequence charSequence) {
assertThat(charSequence).isEmpty();
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJCharSequenceRulesRecipes$AssertThatCharSequenceIsNotEmptyRecipe: Recipe created for the following Refaster template:
static final class AssertThatCharSequenceIsNotEmpty {
@BeforeTemplate
AbstractAssert<?, ?> before(CharSequence charSequence) {
return Refaster.anyOf(assertThat(charSequence.isEmpty()).isFalse(), assertThat(charSequence.length()).isNotEqualTo(0), assertThat(charSequence.length()).isPositive());
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
AbstractAssert<?, ?> after(CharSequence charSequence) {
return assertThat(charSequence).isNotEmpty();
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJDoubleRulesRecipes$AbstractDoubleAssertIsCloseToWithOffsetRecipe: Recipe created for the following Refaster template:
static final class AbstractDoubleAssertIsCloseToWithOffset {
@BeforeTemplate
AbstractDoubleAssert<?> before(AbstractDoubleAssert<?> doubleAssert, double n, Offset<Double> offset) {
return doubleAssert.isEqualTo(n, offset);
}
@BeforeTemplate
AbstractDoubleAssert<?> before(AbstractDoubleAssert<?> doubleAssert, Double n, Offset<Double> offset) {
return doubleAssert.isEqualTo(n, offset);
}
@AfterTemplate
AbstractDoubleAssert<?> after(AbstractDoubleAssert<?> doubleAssert, double n, Offset<Double> offset) {
return doubleAssert.isCloseTo(n, offset);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJDoubleRulesRecipes$AbstractDoubleAssertIsNotZeroRecipe: Recipe created for the following Refaster template:
static final class AbstractDoubleAssertIsNotZero {
@BeforeTemplate
AbstractDoubleAssert<?> before(AbstractDoubleAssert<?> doubleAssert) {
return doubleAssert.isNotZero();
}
@AfterTemplate
AbstractDoubleAssert<?> after(AbstractDoubleAssert<?> doubleAssert) {
return doubleAssert.isNotEqualTo(0);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJDoubleRulesRecipes$AbstractDoubleAssertIsOneRecipe: Recipe created for the following Refaster template:
static final class AbstractDoubleAssertIsOne {
@BeforeTemplate
AbstractDoubleAssert<?> before(AbstractDoubleAssert<?> doubleAssert) {
return doubleAssert.isOne();
}
@AfterTemplate
AbstractDoubleAssert<?> after(AbstractDoubleAssert<?> doubleAssert) {
return doubleAssert.isEqualTo(1);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJDoubleRulesRecipes$AbstractDoubleAssertIsZeroRecipe: Recipe created for the following Refaster template:
static final class AbstractDoubleAssertIsZero {
@BeforeTemplate
AbstractDoubleAssert<?> before(AbstractDoubleAssert<?> doubleAssert) {
return doubleAssert.isZero();
}
@AfterTemplate
AbstractDoubleAssert<?> after(AbstractDoubleAssert<?> doubleAssert) {
return doubleAssert.isEqualTo(0);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJFloatRulesRecipes$AbstractFloatAssertIsCloseToWithOffsetRecipe: Recipe created for the following Refaster template:
static final class AbstractFloatAssertIsCloseToWithOffset {
@BeforeTemplate
AbstractFloatAssert<?> before(AbstractFloatAssert<?> floatAssert, float n, Offset<Float> offset) {
return floatAssert.isEqualTo(n, offset);
}
@BeforeTemplate
AbstractFloatAssert<?> before(AbstractFloatAssert<?> floatAssert, Float n, Offset<Float> offset) {
return floatAssert.isEqualTo(n, offset);
}
@AfterTemplate
AbstractFloatAssert<?> after(AbstractFloatAssert<?> floatAssert, float n, Offset<Float> offset) {
return floatAssert.isCloseTo(n, offset);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJFloatRulesRecipes$AbstractFloatAssertIsNotZeroRecipe: Recipe created for the following Refaster template:
static final class AbstractFloatAssertIsNotZero {
@BeforeTemplate
AbstractFloatAssert<?> before(AbstractFloatAssert<?> floatAssert) {
return floatAssert.isNotZero();
}
@AfterTemplate
AbstractFloatAssert<?> after(AbstractFloatAssert<?> floatAssert) {
return floatAssert.isNotEqualTo(0);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJFloatRulesRecipes$AbstractFloatAssertIsOneRecipe: Recipe created for the following Refaster template:
static final class AbstractFloatAssertIsOne {
@BeforeTemplate
AbstractFloatAssert<?> before(AbstractFloatAssert<?> floatAssert) {
return floatAssert.isOne();
}
@AfterTemplate
AbstractFloatAssert<?> after(AbstractFloatAssert<?> floatAssert) {
return floatAssert.isEqualTo(1);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJFloatRulesRecipes$AbstractFloatAssertIsZeroRecipe: Recipe created for the following Refaster template:
static final class AbstractFloatAssertIsZero {
@BeforeTemplate
AbstractFloatAssert<?> before(AbstractFloatAssert<?> floatAssert) {
return floatAssert.isZero();
}
@AfterTemplate
AbstractFloatAssert<?> after(AbstractFloatAssert<?> floatAssert) {
return floatAssert.isEqualTo(0);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJIntegerRulesRecipes$AbstractIntegerAssertIsNotZeroRecipe: Recipe created for the following Refaster template:
static final class AbstractIntegerAssertIsNotZero {
@BeforeTemplate
AbstractIntegerAssert<?> before(AbstractIntegerAssert<?> intAssert) {
return intAssert.isNotZero();
}
@AfterTemplate
AbstractIntegerAssert<?> after(AbstractIntegerAssert<?> intAssert) {
return intAssert.isNotEqualTo(0);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJIntegerRulesRecipes$AbstractIntegerAssertIsOneRecipe: Recipe created for the following Refaster template:
static final class AbstractIntegerAssertIsOne {
@BeforeTemplate
AbstractIntegerAssert<?> before(AbstractIntegerAssert<?> intAssert) {
return intAssert.isOne();
}
@AfterTemplate
AbstractIntegerAssert<?> after(AbstractIntegerAssert<?> intAssert) {
return intAssert.isEqualTo(1);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJIntegerRulesRecipes$AbstractIntegerAssertIsZeroRecipe: Recipe created for the following Refaster template:
static final class AbstractIntegerAssertIsZero {
@BeforeTemplate
AbstractIntegerAssert<?> before(AbstractIntegerAssert<?> intAssert) {
return intAssert.isZero();
}
@AfterTemplate
AbstractIntegerAssert<?> after(AbstractIntegerAssert<?> intAssert) {
return intAssert.isEqualTo(0);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJIterableRulesRecipes$AssertThatIterableHasOneElementEqualToRecipe: Recipe created for the following Refaster template:
static final class AssertThatIterableHasOneElementEqualTo<S, E extends S> {
@BeforeTemplate
ObjectAssert<S> before(Iterable<S> iterable, E element) {
return assertThat(Iterables.getOnlyElement(iterable)).isEqualTo(element);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
IterableAssert<S> after(Iterable<S> iterable, E element) {
return assertThat(iterable).containsExactly(element);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJIterableRulesRecipes$AssertThatIterableIsEmptyRecipe: Recipe created for the following Refaster template:
static final class AssertThatIterableIsEmpty<E> {
@BeforeTemplate
void before(Iterable<E> iterable) {
assertThat(iterable.iterator()).isExhausted();
}
@BeforeTemplate
void before(Collection<E> iterable) {
assertThat(iterable.isEmpty()).isTrue();
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(Iterable<E> iterable) {
assertThat(iterable).isEmpty();
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJIterableRulesRecipes$AssertThatIterableIsNotEmptyRecipe: Recipe created for the following Refaster template:
static final class AssertThatIterableIsNotEmpty<E> {
@BeforeTemplate
AbstractAssert<?, ?> before(Iterable<E> iterable) {
return assertThat(iterable.iterator()).hasNext();
}
@BeforeTemplate
AbstractAssert<?, ?> before(Collection<E> iterable) {
return assertThat(iterable.isEmpty()).isFalse();
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
IterableAssert<E> after(Iterable<E> iterable) {
return assertThat(iterable).isNotEmpty();
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJIterableRulesRecipes$AssertThatIterableSizeRecipe: Recipe created for the following Refaster template:
static final class AssertThatIterableSize<E> {
@BeforeTemplate
AbstractIntegerAssert<?> before(Iterable<E> iterable) {
return assertThat(Iterables.size(iterable));
}
@BeforeTemplate
AbstractIntegerAssert<?> before(Collection<E> iterable) {
return assertThat(iterable.size());
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
AbstractIntegerAssert<?> after(Iterable<E> iterable) {
return assertThat(iterable).size();
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJLongRulesRecipes$AbstractLongAssertIsNotZeroRecipe: Recipe created for the following Refaster template:
static final class AbstractLongAssertIsNotZero {
@BeforeTemplate
AbstractLongAssert<?> before(AbstractLongAssert<?> longAssert) {
return longAssert.isNotZero();
}
@AfterTemplate
AbstractLongAssert<?> after(AbstractLongAssert<?> longAssert) {
return longAssert.isNotEqualTo(0);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJLongRulesRecipes$AbstractLongAssertIsOneRecipe: Recipe created for the following Refaster template:
static final class AbstractLongAssertIsOne {
@BeforeTemplate
AbstractLongAssert<?> before(AbstractLongAssert<?> longAssert) {
return longAssert.isOne();
}
@AfterTemplate
AbstractLongAssert<?> after(AbstractLongAssert<?> longAssert) {
return longAssert.isEqualTo(1);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJLongRulesRecipes$AbstractLongAssertIsZeroRecipe: Recipe created for the following Refaster template:
static final class AbstractLongAssertIsZero {
@BeforeTemplate
AbstractLongAssert<?> before(AbstractLongAssert<?> longAssert) {
return longAssert.isZero();
}
@AfterTemplate
AbstractLongAssert<?> after(AbstractLongAssert<?> longAssert) {
return longAssert.isEqualTo(0);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJMapRulesRecipes$AbstractMapAssertContainsExactlyEntriesOfRecipe: Recipe created for the following Refaster template:
static final class AbstractMapAssertContainsExactlyEntriesOf<K, V> {
@BeforeTemplate
AbstractMapAssert<?, ?, K, V> before(AbstractMapAssert<?, ?, K, V> mapAssert, K key, V value) {
return mapAssert.containsExactlyInAnyOrderEntriesOf(ImmutableMap.of(key, value));
}
@AfterTemplate
AbstractMapAssert<?, ?, K, V> after(AbstractMapAssert<?, ?, K, V> mapAssert, K key, V value) {
return mapAssert.containsExactlyEntriesOf(ImmutableMap.of(key, value));
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJMapRulesRecipes$AssertThatMapContainsKeyRecipe: Recipe created for the following Refaster template:
static final class AssertThatMapContainsKey<K, V> {
@BeforeTemplate
AbstractAssert<?, ?> before(Map<K, V> map, K key) {
return Refaster.anyOf(assertThat(map.containsKey(key)).isTrue(), assertThat(map.keySet()).contains(key));
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
MapAssert<K, V> after(Map<K, V> map, K key) {
return assertThat(map).containsKey(key);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJMapRulesRecipes$AssertThatMapContainsOnlyKeyRecipe: Recipe created for the following Refaster template:
static final class AssertThatMapContainsOnlyKey<K, V> {
@BeforeTemplate
AbstractCollectionAssert<?, Collection<? extends K>, K, ?> before(Map<K, V> map, K key) {
return assertThat(map.keySet()).containsExactly(key);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
MapAssert<K, V> after(Map<K, V> map, K key) {
return assertThat(map).containsOnlyKeys(key);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJMapRulesRecipes$AssertThatMapContainsOnlyKeysRecipe: Recipe created for the following Refaster template:
static final class AssertThatMapContainsOnlyKeys<K, V> {
@BeforeTemplate
AbstractCollectionAssert<?, Collection<? extends K>, K, ?> before(Map<K, V> map, Iterable<? extends K> keys) {
return assertThat(map.keySet()).hasSameElementsAs(keys);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
MapAssert<K, V> after(Map<K, V> map, Iterable<? extends K> keys) {
return assertThat(map).containsOnlyKeys(keys);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJMapRulesRecipes$AssertThatMapContainsValueRecipe: Recipe created for the following Refaster template:
static final class AssertThatMapContainsValue<K, V> {
@BeforeTemplate
AbstractAssert<? extends AbstractAssert<?, ?>, ? extends Object> before(Map<K, V> map, V value) {
return Refaster.anyOf(assertThat(map.containsValue(value)).isTrue(), assertThat(map.values()).contains(value));
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
MapAssert<K, V> after(Map<K, V> map, V value) {
return assertThat(map).containsValue(value);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJMapRulesRecipes$AssertThatMapDoesNotContainKeyRecipe: Recipe created for the following Refaster template:
static final class AssertThatMapDoesNotContainKey<K, V> {
@BeforeTemplate
AbstractAssert<?, ?> before(Map<K, V> map, K key) {
return Refaster.anyOf(assertThat(map.containsKey(key)).isFalse(), assertThat(map.keySet()).doesNotContain(key));
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
MapAssert<K, V> after(Map<K, V> map, K key) {
return assertThat(map).doesNotContainKey(key);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJMapRulesRecipes$AssertThatMapDoesNotContainValueRecipe: Recipe created for the following Refaster template:
static final class AssertThatMapDoesNotContainValue<K, V> {
@BeforeTemplate
AbstractAssert<?, ?> before(Map<K, V> map, V value) {
return Refaster.anyOf(assertThat(map.containsValue(value)).isFalse(), assertThat(map.values()).doesNotContain(value));
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
MapAssert<K, V> after(Map<K, V> map, V value) {
return assertThat(map).doesNotContainValue(value);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJMapRulesRecipes$AssertThatMapIsEmptyRecipe: Recipe created for the following Refaster template:
static final class AssertThatMapIsEmpty<K, V> {
@BeforeTemplate
void before(Map<K, V> map) {
Refaster.anyOf(assertThat(map).hasSize(0), assertThat(map.isEmpty()).isTrue(), assertThat(map.size()).isEqualTo(0L), assertThat(map.size()).isNotPositive());
}
@BeforeTemplate
void before2(Map<K, V> map) {
assertThat(Refaster.anyOf(map.keySet(), map.values(), map.entrySet())).isEmpty();
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(Map<K, V> map) {
assertThat(map).isEmpty();
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJObjectRulesRecipes$AssertThatIsInstanceOf2Recipe: Recipe created for the following Refaster template:
static final class AssertThatIsInstanceOf2<S, T> {
@BeforeTemplate
AbstractBooleanAssert<?> before(T object, Class<S> clazz) {
return assertThat(clazz.isInstance(object)).isTrue();
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
ObjectAssert<T> after(T object, Class<S> clazz) {
return assertThat(object).isInstanceOf(clazz);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJObjectRulesRecipes$AssertThatIsIsEqualToRecipe: Recipe created for the following Refaster template:
static final class AssertThatIsIsEqualTo<S, T> {
@BeforeTemplate
AbstractBooleanAssert<?> before(S object1, T object2) {
return assertThat(object1.equals(object2)).isTrue();
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
ObjectAssert<S> after(S object1, T object2) {
return assertThat(object1).isEqualTo(object2);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJObjectRulesRecipes$AssertThatIsIsNotEqualToRecipe: Recipe created for the following Refaster template:
static final class AssertThatIsIsNotEqualTo<S, T> {
@BeforeTemplate
AbstractBooleanAssert<?> before(S object1, T object2) {
return assertThat(object1.equals(object2)).isFalse();
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
ObjectAssert<S> after(S object1, T object2) {
return assertThat(object1).isNotEqualTo(object2);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJOptionalRulesRecipes$AssertThatOptionalHasValueMatchingRecipe: Recipe created for the following Refaster template:
static final class AssertThatOptionalHasValueMatching<T> {
@BeforeTemplate
AbstractOptionalAssert<?, T> before(Optional<T> optional, Predicate<? super T> predicate) {
return assertThat(optional.filter(predicate)).isPresent();
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
AbstractObjectAssert<?, T> after(Optional<T> optional, Predicate<? super T> predicate) {
return assertThat(optional).get().matches(predicate);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJOptionalRulesRecipes$AssertThatOptionalIsEmptyRecipe: Recipe created for the following Refaster template:
static final class AssertThatOptionalIsEmpty<T> {
@BeforeTemplate
AbstractAssert<?, ?> before(Optional<T> optional) {
return Refaster.anyOf(assertThat(optional.isEmpty()).isTrue(), assertThat(optional.isPresent()).isFalse());
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
OptionalAssert<T> after(Optional<T> optional) {
return assertThat(optional).isEmpty();
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJOptionalRulesRecipes$AssertThatOptionalIsPresentRecipe: Recipe created for the following Refaster template:
static final class AssertThatOptionalIsPresent<T> {
@BeforeTemplate
AbstractAssert<?, ?> before(Optional<T> optional) {
return Refaster.anyOf(assertThat(optional.isPresent()).isTrue(), assertThat(optional.isEmpty()).isFalse());
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
OptionalAssert<T> after(Optional<T> optional) {
return assertThat(optional).isPresent();
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJOptionalRulesRecipes$AssertThatOptionalRecipe: Recipe created for the following Refaster template:
static final class AssertThatOptional<T> {
@BeforeTemplate
ObjectAssert<T> before(Optional<T> optional) {
return assertThat(optional.orElseThrow());
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
AbstractObjectAssert<?, T> after(Optional<T> optional) {
return assertThat(optional).get();
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatListsAreEqualRecipe: Recipe created for the following Refaster template:
static final class AssertThatListsAreEqual<S, T extends S> {
@BeforeTemplate
ListAssert<S> before(List<S> list1, Iterable<T> list2) {
return assertThat(list1).isEqualTo(list2);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
ListAssert<S> after(List<S> list1, Iterable<T> list2) {
return assertThat(list1).containsExactlyElementsOf(list2);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatMapContainsEntryRecipe: Recipe created for the following Refaster template:
static final class AssertThatMapContainsEntry<K, V> {
@BeforeTemplate
ObjectAssert<V> before(Map<K, V> map, K key, V value) {
return assertThat(map.get(key)).isEqualTo(value);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
MapAssert<K, V> after(Map<K, V> map, K key, V value) {
return assertThat(map).containsEntry(key, value);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatMultisetsAreEqualRecipe: Recipe created for the following Refaster template:
static final class AssertThatMultisetsAreEqual<S, T extends S> {
@BeforeTemplate
AbstractCollectionAssert<?, ?, S, ?> before(Multiset<S> multiset1, Iterable<T> multiset2) {
return assertThat(multiset1).isEqualTo(multiset2);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
AbstractCollectionAssert<?, ?, S, ?> after(Multiset<S> multiset1, Iterable<T> multiset2) {
return assertThat(multiset1).containsExactlyInAnyOrderElementsOf(multiset2);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatOptionalDoubleRecipe: Recipe created for the following Refaster template:
static final class AssertThatOptionalDouble {
@BeforeTemplate
AbstractDoubleAssert<?> before(OptionalDouble optional, double expected) {
return assertThat(optional.getAsDouble()).isEqualTo(expected);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
OptionalDoubleAssert after(OptionalDouble optional, double expected) {
return assertThat(optional).hasValue(expected);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatOptionalIntRecipe: Recipe created for the following Refaster template:
static final class AssertThatOptionalInt {
@BeforeTemplate
AbstractIntegerAssert<?> before(OptionalInt optional, int expected) {
return assertThat(optional.getAsInt()).isEqualTo(expected);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
OptionalIntAssert after(OptionalInt optional, int expected) {
return assertThat(optional).hasValue(expected);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatOptionalLongRecipe: Recipe created for the following Refaster template:
static final class AssertThatOptionalLong {
@BeforeTemplate
AbstractLongAssert<?> before(OptionalLong optional, long expected) {
return assertThat(optional.getAsLong()).isEqualTo(expected);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
OptionalLongAssert after(OptionalLong optional, long expected) {
return assertThat(optional).hasValue(expected);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatPredicateAcceptsRecipe: Recipe created for the following Refaster template:
static final class AssertThatPredicateAccepts<T> {
@BeforeTemplate
void before(Predicate<T> predicate, T object) {
assertThat(predicate.test(object)).isTrue();
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(Predicate<T> predicate, T object) {
assertThat(predicate).accepts(object);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatPredicateRejectsRecipe: Recipe created for the following Refaster template:
static final class AssertThatPredicateRejects<T> {
@BeforeTemplate
void before(Predicate<T> predicate, T object) {
assertThat(predicate.test(object)).isFalse();
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(Predicate<T> predicate, T object) {
assertThat(predicate).rejects(object);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatSetContainsExactlyOneElementRecipe: Recipe created for the following Refaster template:
static final class AssertThatSetContainsExactlyOneElement<S, T extends S> {
@BeforeTemplate
ObjectEnumerableAssert<?, S> before(Set<S> set, T element) {
return assertThat(set).containsOnly(element);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
ObjectEnumerableAssert<?, S> after(Set<S> set, T element) {
return assertThat(set).containsExactly(element);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatSetsAreEqualRecipe: Recipe created for the following Refaster template:
static final class AssertThatSetsAreEqual<S, T extends S> {
@BeforeTemplate
AbstractCollectionAssert<?, ?, S, ?> before(Set<S> set1, Iterable<T> set2) {
return Refaster.anyOf(assertThat(set1).isEqualTo(set2), assertThat(set1).containsExactlyInAnyOrderElementsOf(set2));
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
AbstractCollectionAssert<?, ?, S, ?> after(Set<S> set1, Iterable<T> set2) {
return assertThat(set1).hasSameElementsAs(set2);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatStreamContainsAllRecipe: Recipe created for the following Refaster template:
static final class AssertThatStreamContainsAll<S, T extends S, U extends T> {
@BeforeTemplate
IterableAssert<T> before(Stream<S> stream, Iterable<U> iterable, Collector<S, ?, ? extends Iterable<T>> collector) {
return assertThat(stream.collect(collector)).containsAll(iterable);
}
@BeforeTemplate
AbstractCollectionAssert<?, Collection<? extends T>, T, ObjectAssert<T>> before2(Stream<S> stream, Iterable<U> iterable, Collector<S, ?, ? extends Collection<T>> collector) {
return assertThat(stream.collect(collector)).containsAll(iterable);
}
@BeforeTemplate
ListAssert<T> before3(Stream<S> stream, Iterable<U> iterable, Collector<S, ?, ? extends List<T>> collector) {
return assertThat(stream.collect(collector)).containsAll(iterable);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
ListAssert<S> after(Stream<S> stream, Iterable<U> iterable) {
return assertThat(stream).containsAll(iterable);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatStreamContainsAnyElementsOfRecipe: Recipe created for the following Refaster template:
static final class AssertThatStreamContainsAnyElementsOf<S, T extends S, U extends T> {
@BeforeTemplate
IterableAssert<T> before(Stream<S> stream, Iterable<U> iterable, Collector<S, ?, ? extends Iterable<T>> collector) {
return assertThat(stream.collect(collector)).containsAnyElementsOf(iterable);
}
@BeforeTemplate
AbstractCollectionAssert<?, Collection<? extends T>, T, ObjectAssert<T>> before2(Stream<S> stream, Iterable<U> iterable, Collector<S, ?, ? extends Collection<T>> collector) {
return assertThat(stream.collect(collector)).containsAnyElementsOf(iterable);
}
@BeforeTemplate
ListAssert<T> before3(Stream<S> stream, Iterable<U> iterable, Collector<S, ?, ? extends List<T>> collector) {
return assertThat(stream.collect(collector)).containsAnyElementsOf(iterable);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
ListAssert<S> after(Stream<S> stream, Iterable<U> iterable) {
return assertThat(stream).containsAnyElementsOf(iterable);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatStreamContainsAnyOfRecipe: Recipe created for the following Refaster template:
static final class AssertThatStreamContainsAnyOf<S, T extends S, U extends T> {
@BeforeTemplate
IterableAssert<T> before(Stream<S> stream, U[] array, Collector<S, ?, ? extends Iterable<T>> collector) {
return assertThat(stream.collect(collector)).containsAnyOf(array);
}
@BeforeTemplate
AbstractCollectionAssert<?, Collection<? extends T>, T, ObjectAssert<T>> before2(Stream<S> stream, U[] array, Collector<S, ?, ? extends Collection<T>> collector) {
return assertThat(stream.collect(collector)).containsAnyOf(array);
}
@BeforeTemplate
ListAssert<T> before3(Stream<S> stream, U[] array, Collector<S, ?, ? extends List<T>> collector) {
return assertThat(stream.collect(collector)).containsAnyOf(array);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
ListAssert<S> after(Stream<S> stream, U[] array) {
return assertThat(stream).containsAnyOf(array);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatStreamContainsAnyOfVarArgsRecipe: Recipe created for the following Refaster template:
static final class AssertThatStreamContainsAnyOfVarArgs<S, T extends S, U extends T> {
@BeforeTemplate
@SuppressWarnings(value = "AssertThatStreamContainsAnyOf")
IterableAssert<T> before(Stream<S> stream, @Repeated
U elements, Collector<S, ?, ? extends Iterable<T>> collector) {
return assertThat(stream.collect(collector)).containsAnyOf(Refaster.asVarargs(elements));
}
@BeforeTemplate
@SuppressWarnings(value = "AssertThatStreamContainsAnyOf")
AbstractCollectionAssert<?, Collection<? extends T>, T, ObjectAssert<T>> before2(Stream<S> stream, @Repeated
U elements, Collector<S, ?, ? extends Collection<T>> collector) {
return assertThat(stream.collect(collector)).containsAnyOf(Refaster.asVarargs(elements));
}
@BeforeTemplate
@SuppressWarnings(value = "AssertThatStreamContainsAnyOf")
ListAssert<T> before3(Stream<S> stream, @Repeated
U elements, Collector<S, ?, ? extends List<T>> collector) {
return assertThat(stream.collect(collector)).containsAnyOf(Refaster.asVarargs(elements));
}
@AfterTemplate
@SuppressWarnings(value = "ObjectEnumerableContainsOneElement")
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
ListAssert<S> after(Stream<S> stream, @Repeated
U elements) {
return assertThat(stream).containsAnyOf(elements);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatStreamContainsExactlyElementsOfRecipe: Recipe created for the following Refaster template:
static final class AssertThatStreamContainsExactlyElementsOf<S, T extends S, U extends T> {
@BeforeTemplate
ListAssert<T> before(Stream<S> stream, Iterable<U> iterable, Collector<S, ?, ? extends List<T>> collector) {
return assertThat(stream.collect(collector)).containsExactlyElementsOf(iterable);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
ListAssert<S> after(Stream<S> stream, Iterable<U> iterable) {
return assertThat(stream).containsExactlyElementsOf(iterable);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatStreamContainsExactlyInAnyOrderElementsOfRecipe: Recipe created for the following Refaster template:
static final class AssertThatStreamContainsExactlyInAnyOrderElementsOf<S, T extends S, U extends T> {
@BeforeTemplate
ListAssert<T> before(Stream<S> stream, Iterable<U> iterable, Collector<S, ?, ? extends List<T>> collector) {
return assertThat(stream.collect(collector)).containsExactlyInAnyOrderElementsOf(iterable);
}
@BeforeTemplate
AbstractCollectionAssert<?, ?, T, ?> before2(Stream<S> stream, Iterable<U> iterable, Collector<S, ?, ? extends Multiset<T>> collector) {
return assertThat(stream.collect(collector)).containsExactlyInAnyOrderElementsOf(iterable);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
ListAssert<S> after(Stream<S> stream, Iterable<U> iterable) {
return assertThat(stream).containsExactlyInAnyOrderElementsOf(iterable);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatStreamContainsExactlyInAnyOrderRecipe: Recipe created for the following Refaster template:
static final class AssertThatStreamContainsExactlyInAnyOrder<S, T extends S, U extends T> {
@BeforeTemplate
ListAssert<T> before(Stream<S> stream, U[] array, Collector<S, ?, ? extends List<T>> collector) {
return assertThat(stream.collect(collector)).containsExactlyInAnyOrder(array);
}
@BeforeTemplate
AbstractCollectionAssert<?, ?, T, ?> before2(Stream<S> stream, U[] array, Collector<S, ?, ? extends Multiset<T>> collector) {
return assertThat(stream.collect(collector)).containsExactlyInAnyOrder(array);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
ListAssert<S> after(Stream<S> stream, U[] array) {
return assertThat(stream).containsExactlyInAnyOrder(array);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatStreamContainsExactlyInAnyOrderVarArgsRecipe: Recipe created for the following Refaster template:
static final class AssertThatStreamContainsExactlyInAnyOrderVarArgs<S, T extends S, U extends T> {
@BeforeTemplate
@SuppressWarnings(value = "AssertThatStreamContainsExactlyInAnyOrder")
ListAssert<T> before(Stream<S> stream, @Repeated
U elements, Collector<S, ?, ? extends List<T>> collector) {
return assertThat(stream.collect(collector)).containsExactlyInAnyOrder(Refaster.asVarargs(elements));
}
@BeforeTemplate
@SuppressWarnings(value = "AssertThatStreamContainsExactlyInAnyOrder")
AbstractCollectionAssert<?, ?, T, ?> before2(Stream<S> stream, @Repeated
U elements, Collector<S, ?, ? extends Multiset<T>> collector) {
return assertThat(stream.collect(collector)).containsExactlyInAnyOrder(Refaster.asVarargs(elements));
}
@AfterTemplate
@SuppressWarnings(value = "ObjectEnumerableContainsExactlyOneElement")
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
ListAssert<S> after(Stream<S> stream, @Repeated
U elements) {
return assertThat(stream).containsExactlyInAnyOrder(elements);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatStreamContainsExactlyRecipe: Recipe created for the following Refaster template:
static final class AssertThatStreamContainsExactly<S, T extends S, U extends T> {
@BeforeTemplate
ListAssert<T> before(Stream<S> stream, U[] array, Collector<S, ?, ? extends List<T>> collector) {
return assertThat(stream.collect(collector)).containsExactly(array);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
ListAssert<S> after(Stream<S> stream, U[] array) {
return assertThat(stream).containsExactly(array);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatStreamContainsExactlyVarargsRecipe: Recipe created for the following Refaster template:
static final class AssertThatStreamContainsExactlyVarargs<S, T extends S, U extends T> {
@BeforeTemplate
@SuppressWarnings(value = "AssertThatStreamContainsExactly")
ListAssert<T> before(Stream<S> stream, @Repeated
U elements, Collector<S, ?, ? extends List<T>> collector) {
return assertThat(stream.collect(collector)).containsExactly(Refaster.asVarargs(elements));
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
ListAssert<S> after(Stream<S> stream, @Repeated
U elements) {
return assertThat(stream).containsExactly(elements);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatStreamContainsOnlyRecipe: Recipe created for the following Refaster template:
static final class AssertThatStreamContainsOnly<S, T extends S, U extends T> {
@BeforeTemplate
IterableAssert<T> before(Stream<S> stream, U[] array, Collector<S, ?, ? extends Iterable<T>> collector) {
return assertThat(stream.collect(collector)).containsOnly(array);
}
@BeforeTemplate
AbstractCollectionAssert<?, Collection<? extends T>, T, ObjectAssert<T>> before2(Stream<S> stream, U[] array, Collector<S, ?, ? extends Collection<T>> collector) {
return assertThat(stream.collect(collector)).containsOnly(array);
}
@BeforeTemplate
ListAssert<T> before3(Stream<S> stream, U[] array, Collector<S, ?, ? extends List<T>> collector) {
return assertThat(stream.collect(collector)).containsOnly(array);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
ListAssert<S> after(Stream<S> stream, U[] array) {
return assertThat(stream).containsOnly(array);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatStreamContainsOnlyVarArgsRecipe: Recipe created for the following Refaster template:
static final class AssertThatStreamContainsOnlyVarArgs<S, T extends S, U extends T> {
@BeforeTemplate
@SuppressWarnings(value = "AssertThatStreamContainsOnly")
IterableAssert<T> before(Stream<S> stream, @Repeated
U elements, Collector<S, ?, ? extends Iterable<T>> collector) {
return assertThat(stream.collect(collector)).containsOnly(Refaster.asVarargs(elements));
}
@BeforeTemplate
@SuppressWarnings(value = "AssertThatStreamContainsOnly")
AbstractCollectionAssert<?, Collection<? extends T>, T, ObjectAssert<T>> before2(Stream<S> stream, @Repeated
U elements, Collector<S, ?, ? extends Collection<T>> collector) {
return assertThat(stream.collect(collector)).containsOnly(Refaster.asVarargs(elements));
}
@BeforeTemplate
@SuppressWarnings(value = "AssertThatStreamContainsOnly")
ListAssert<T> before3(Stream<S> stream, @Repeated
U elements, Collector<S, ?, ? extends List<T>> collector) {
return assertThat(stream.collect(collector)).containsOnly(Refaster.asVarargs(elements));
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
ListAssert<S> after(Stream<S> stream, @Repeated
U elements) {
return assertThat(stream).containsOnly(elements);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatStreamContainsRecipe: Recipe created for the following Refaster template:
static final class AssertThatStreamContains<S, T extends S, U extends T> {
@BeforeTemplate
IterableAssert<T> before(Stream<S> stream, U[] array, Collector<S, ?, ? extends Iterable<T>> collector) {
return assertThat(stream.collect(collector)).contains(array);
}
@BeforeTemplate
AbstractCollectionAssert<?, Collection<? extends T>, T, ObjectAssert<T>> before2(Stream<S> stream, U[] array, Collector<S, ?, ? extends Collection<T>> collector) {
return assertThat(stream.collect(collector)).contains(array);
}
@BeforeTemplate
ListAssert<T> before3(Stream<S> stream, U[] array, Collector<S, ?, ? extends List<T>> collector) {
return assertThat(stream.collect(collector)).contains(array);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
ListAssert<S> after(Stream<S> stream, U[] array) {
return assertThat(stream).contains(array);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatStreamContainsSequenceRecipe: Recipe created for the following Refaster template:
static final class AssertThatStreamContainsSequence<S, T extends S, U extends T> {
@BeforeTemplate
ListAssert<T> before(Stream<S> stream, Iterable<U> iterable, Collector<S, ?, ? extends List<T>> collector) {
return assertThat(stream.collect(collector)).containsSequence(iterable);
}
@BeforeTemplate
ListAssert<T> before(Stream<S> stream, U[] iterable, Collector<S, ?, ? extends List<T>> collector) {
return assertThat(stream.collect(collector)).containsSequence(iterable);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
ListAssert<S> after(Stream<S> stream, Iterable<U> iterable) {
return assertThat(stream).containsSequence(iterable);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatStreamContainsSequenceVarArgsRecipe: Recipe created for the following Refaster template:
static final class AssertThatStreamContainsSequenceVarArgs<S, T extends S, U extends T> {
@BeforeTemplate
@SuppressWarnings(value = "AssertThatStreamContainsSequence")
ListAssert<T> before(Stream<S> stream, @Repeated
U elements, Collector<S, ?, ? extends List<T>> collector) {
return assertThat(stream.collect(collector)).containsSequence(Refaster.asVarargs(elements));
}
@AfterTemplate
@SuppressWarnings(value = "ObjectEnumerableContainsOneElement")
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
ListAssert<S> after(Stream<S> stream, @Repeated
U elements) {
return assertThat(stream).containsSequence(elements);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatStreamContainsSubsequenceRecipe: Recipe created for the following Refaster template:
static final class AssertThatStreamContainsSubsequence<S, T extends S, U extends T> {
@BeforeTemplate
ListAssert<T> before(Stream<S> stream, Iterable<U> iterable, Collector<S, ?, ? extends List<T>> collector) {
return assertThat(stream.collect(collector)).containsSubsequence(iterable);
}
@BeforeTemplate
ListAssert<T> before(Stream<S> stream, U[] iterable, Collector<S, ?, ? extends List<T>> collector) {
return assertThat(stream.collect(collector)).containsSubsequence(iterable);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
ListAssert<S> after(Stream<S> stream, Iterable<U> iterable) {
return assertThat(stream).containsSubsequence(iterable);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatStreamContainsSubsequenceVarArgsRecipe: Recipe created for the following Refaster template:
static final class AssertThatStreamContainsSubsequenceVarArgs<S, T extends S, U extends T> {
@BeforeTemplate
@SuppressWarnings(value = "AssertThatStreamContainsSubsequence")
ListAssert<T> before(Stream<S> stream, @Repeated
U elements, Collector<S, ?, ? extends List<T>> collector) {
return assertThat(stream.collect(collector)).containsSubsequence(Refaster.asVarargs(elements));
}
@AfterTemplate
@SuppressWarnings(value = "ObjectEnumerableContainsOneElement")
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
ListAssert<S> after(Stream<S> stream, @Repeated
U elements) {
return assertThat(stream).containsSubsequence(elements);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatStreamContainsVarArgsRecipe: Recipe created for the following Refaster template:
static final class AssertThatStreamContainsVarArgs<S, T extends S, U extends T> {
@BeforeTemplate
@SuppressWarnings(value = "AssertThatStreamContains")
IterableAssert<T> before(Stream<S> stream, @Repeated
U elements, Collector<S, ?, ? extends Iterable<T>> collector) {
return assertThat(stream.collect(collector)).contains(Refaster.asVarargs(elements));
}
@BeforeTemplate
@SuppressWarnings(value = "AssertThatStreamContains")
AbstractCollectionAssert<?, Collection<? extends T>, T, ObjectAssert<T>> before2(Stream<S> stream, @Repeated
U elements, Collector<S, ?, ? extends Collection<T>> collector) {
return assertThat(stream.collect(collector)).contains(Refaster.asVarargs(elements));
}
@BeforeTemplate
@SuppressWarnings(value = "AssertThatStreamContains")
ListAssert<T> before3(Stream<S> stream, @Repeated
U elements, Collector<S, ?, ? extends List<T>> collector) {
return assertThat(stream.collect(collector)).contains(Refaster.asVarargs(elements));
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
ListAssert<S> after(Stream<S> stream, @Repeated
U elements) {
return assertThat(stream).contains(elements);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatStreamDoesNotContainAnyElementsOfRecipe: Recipe created for the following Refaster template:
static final class AssertThatStreamDoesNotContainAnyElementsOf<S, T extends S, U extends T> {
@BeforeTemplate
IterableAssert<T> before(Stream<S> stream, Iterable<U> iterable, Collector<S, ?, ? extends Iterable<T>> collector) {
return assertThat(stream.collect(collector)).doesNotContainAnyElementsOf(iterable);
}
@BeforeTemplate
AbstractCollectionAssert<?, Collection<? extends T>, T, ObjectAssert<T>> before2(Stream<S> stream, Iterable<U> iterable, Collector<S, ?, ? extends Collection<T>> collector) {
return assertThat(stream.collect(collector)).doesNotContainAnyElementsOf(iterable);
}
@BeforeTemplate
ListAssert<T> before3(Stream<S> stream, Iterable<U> iterable, Collector<S, ?, ? extends List<T>> collector) {
return assertThat(stream.collect(collector)).doesNotContainAnyElementsOf(iterable);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
ListAssert<S> after(Stream<S> stream, Iterable<U> iterable) {
return assertThat(stream).doesNotContainAnyElementsOf(iterable);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatStreamDoesNotContainRecipe: Recipe created for the following Refaster template:
static final class AssertThatStreamDoesNotContain<S, T extends S, U extends T> {
@BeforeTemplate
IterableAssert<T> before(Stream<S> stream, U[] array, Collector<S, ?, ? extends Iterable<T>> collector) {
return assertThat(stream.collect(collector)).doesNotContain(array);
}
@BeforeTemplate
AbstractCollectionAssert<?, Collection<? extends T>, T, ObjectAssert<T>> before2(Stream<S> stream, U[] array, Collector<S, ?, ? extends Collection<T>> collector) {
return assertThat(stream.collect(collector)).doesNotContain(array);
}
@BeforeTemplate
ListAssert<T> before3(Stream<S> stream, U[] array, Collector<S, ?, ? extends List<T>> collector) {
return assertThat(stream.collect(collector)).doesNotContain(array);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
ListAssert<S> after(Stream<S> stream, U[] array) {
return assertThat(stream).doesNotContain(array);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatStreamDoesNotContainSequenceRecipe: Recipe created for the following Refaster template:
static final class AssertThatStreamDoesNotContainSequence<S, T extends S, U extends T> {
@BeforeTemplate
ListAssert<T> before(Stream<S> stream, Iterable<U> iterable, Collector<S, ?, ? extends List<T>> collector) {
return assertThat(stream.collect(collector)).doesNotContainSequence(iterable);
}
@BeforeTemplate
ListAssert<T> before(Stream<S> stream, U[] iterable, Collector<S, ?, ? extends List<T>> collector) {
return assertThat(stream.collect(collector)).doesNotContainSequence(iterable);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
ListAssert<S> after(Stream<S> stream, Iterable<U> iterable) {
return assertThat(stream).doesNotContainSequence(iterable);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatStreamDoesNotContainSequenceVarArgsRecipe: Recipe created for the following Refaster template:
static final class AssertThatStreamDoesNotContainSequenceVarArgs<S, T extends S, U extends T> {
@BeforeTemplate
@SuppressWarnings(value = "AssertThatStreamDoesNotContainSequence")
ListAssert<T> before(Stream<S> stream, @Repeated
U elements, Collector<S, ?, ? extends List<T>> collector) {
return assertThat(stream.collect(collector)).doesNotContainSequence(Refaster.asVarargs(elements));
}
@AfterTemplate
@SuppressWarnings(value = "ObjectEnumerableDoesNotContainOneElement")
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
ListAssert<S> after(Stream<S> stream, @Repeated
U elements) {
return assertThat(stream).doesNotContainSequence(elements);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatStreamDoesNotContainVarArgsRecipe: Recipe created for the following Refaster template:
static final class AssertThatStreamDoesNotContainVarArgs<S, T extends S, U extends T> {
@BeforeTemplate
@SuppressWarnings(value = "AssertThatStreamDoesNotContain")
IterableAssert<T> before(Stream<S> stream, @Repeated
U elements, Collector<S, ?, ? extends Iterable<T>> collector) {
return assertThat(stream.collect(collector)).doesNotContain(Refaster.asVarargs(elements));
}
@BeforeTemplate
@SuppressWarnings(value = "AssertThatStreamDoesNotContain")
AbstractCollectionAssert<?, Collection<? extends T>, T, ObjectAssert<T>> before2(Stream<S> stream, @Repeated
U elements, Collector<S, ?, ? extends Collection<T>> collector) {
return assertThat(stream.collect(collector)).doesNotContain(Refaster.asVarargs(elements));
}
@BeforeTemplate
@SuppressWarnings(value = "AssertThatStreamDoesNotContain")
ListAssert<T> before3(Stream<S> stream, @Repeated
U elements, Collector<S, ?, ? extends List<T>> collector) {
return assertThat(stream.collect(collector)).doesNotContain(Refaster.asVarargs(elements));
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
ListAssert<S> after(Stream<S> stream, @Repeated
U elements) {
return assertThat(stream).doesNotContain(elements);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatStreamHasSameElementsAsRecipe: Recipe created for the following Refaster template:
static final class AssertThatStreamHasSameElementsAs<S, T extends S, U extends T> {
@BeforeTemplate
IterableAssert<T> before(Stream<S> stream, Iterable<U> iterable, Collector<S, ?, ? extends Iterable<T>> collector) {
return assertThat(stream.collect(collector)).hasSameElementsAs(iterable);
}
@BeforeTemplate
AbstractCollectionAssert<?, Collection<? extends T>, T, ObjectAssert<T>> before2(Stream<S> stream, Iterable<U> iterable, Collector<S, ?, ? extends Collection<T>> collector) {
return assertThat(stream.collect(collector)).hasSameElementsAs(iterable);
}
@BeforeTemplate
ListAssert<T> before3(Stream<S> stream, Iterable<U> iterable, Collector<S, ?, ? extends List<T>> collector) {
return assertThat(stream.collect(collector)).hasSameElementsAs(iterable);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
ListAssert<S> after(Stream<S> stream, Iterable<U> iterable) {
return assertThat(stream).hasSameElementsAs(iterable);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatStreamIsSubsetOfRecipe: Recipe created for the following Refaster template:
static final class AssertThatStreamIsSubsetOf<S, T extends S, U extends T> {
@BeforeTemplate
IterableAssert<T> before(Stream<S> stream, Iterable<U> iterable, Collector<S, ?, ? extends Iterable<T>> collector) {
return assertThat(stream.collect(collector)).isSubsetOf(iterable);
}
@BeforeTemplate
IterableAssert<T> before(Stream<S> stream, U[] iterable, Collector<S, ?, ? extends Iterable<T>> collector) {
return assertThat(stream.collect(collector)).isSubsetOf(iterable);
}
@BeforeTemplate
AbstractCollectionAssert<?, Collection<? extends T>, T, ObjectAssert<T>> before2(Stream<S> stream, Iterable<U> iterable, Collector<S, ?, ? extends Collection<T>> collector) {
return assertThat(stream.collect(collector)).isSubsetOf(iterable);
}
@BeforeTemplate
AbstractCollectionAssert<?, Collection<? extends T>, T, ObjectAssert<T>> before2(Stream<S> stream, U[] iterable, Collector<S, ?, ? extends Collection<T>> collector) {
return assertThat(stream.collect(collector)).isSubsetOf(iterable);
}
@BeforeTemplate
ListAssert<T> before3(Stream<S> stream, Iterable<U> iterable, Collector<S, ?, ? extends List<T>> collector) {
return assertThat(stream.collect(collector)).isSubsetOf(iterable);
}
@BeforeTemplate
ListAssert<T> before3(Stream<S> stream, U[] iterable, Collector<S, ?, ? extends List<T>> collector) {
return assertThat(stream.collect(collector)).isSubsetOf(iterable);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
ListAssert<S> after(Stream<S> stream, U[] iterable) {
return assertThat(stream).isSubsetOf(iterable);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatStreamIsSubsetOfVarArgsRecipe: Recipe created for the following Refaster template:
static final class AssertThatStreamIsSubsetOfVarArgs<S, T extends S, U extends T> {
@BeforeTemplate
@SuppressWarnings(value = "AssertThatStreamIsSubsetOf")
IterableAssert<T> before(Stream<S> stream, @Repeated
U elements, Collector<S, ?, ? extends Iterable<T>> collector) {
return assertThat(stream.collect(collector)).isSubsetOf(Refaster.asVarargs(elements));
}
@BeforeTemplate
@SuppressWarnings(value = "AssertThatStreamIsSubsetOf")
AbstractCollectionAssert<?, Collection<? extends T>, T, ObjectAssert<T>> before2(Stream<S> stream, @Repeated
U elements, Collector<S, ?, ? extends Collection<T>> collector) {
return assertThat(stream.collect(collector)).isSubsetOf(Refaster.asVarargs(elements));
}
@BeforeTemplate
@SuppressWarnings(value = "AssertThatStreamIsSubsetOf")
ListAssert<T> before3(Stream<S> stream, @Repeated
U elements, Collector<S, ?, ? extends List<T>> collector) {
return assertThat(stream.collect(collector)).isSubsetOf(Refaster.asVarargs(elements));
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
ListAssert<S> after(Stream<S> stream, @Repeated
U elements) {
return assertThat(stream).isSubsetOf(elements);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$ObjectEnumerableContainsOneElementRecipe: Recipe created for the following Refaster template:
static final class ObjectEnumerableContainsOneElement<S, T extends S> {
@BeforeTemplate
@SuppressWarnings(value = "unchecked")
ObjectEnumerableAssert<?, S> before(ObjectEnumerableAssert<?, S> iterAssert, T element) {
return Refaster.anyOf(iterAssert.containsAnyOf(element), iterAssert.containsSequence(element), iterAssert.containsSubsequence(element));
}
@AfterTemplate
@SuppressWarnings(value = "unchecked")
ObjectEnumerableAssert<?, S> after(ObjectEnumerableAssert<?, S> iterAssert, T element) {
return iterAssert.contains(element);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$ObjectEnumerableDoesNotContainOneElementRecipe: Recipe created for the following Refaster template:
static final class ObjectEnumerableDoesNotContainOneElement<S, T extends S> {
@BeforeTemplate
@SuppressWarnings(value = "unchecked")
ObjectEnumerableAssert<?, S> before(ObjectEnumerableAssert<?, S> iterAssert, T element) {
return iterAssert.doesNotContainSequence(element);
}
@AfterTemplate
@SuppressWarnings(value = "unchecked")
ObjectEnumerableAssert<?, S> after(ObjectEnumerableAssert<?, S> iterAssert, T element) {
return iterAssert.doesNotContain(element);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJShortRulesRecipes$AbstractShortAssertIsNotZeroRecipe: Recipe created for the following Refaster template:
static final class AbstractShortAssertIsNotZero {
@BeforeTemplate
AbstractShortAssert<?> before(AbstractShortAssert<?> shortAssert) {
return shortAssert.isNotZero();
}
@AfterTemplate
AbstractShortAssert<?> after(AbstractShortAssert<?> shortAssert) {
return shortAssert.isNotEqualTo((short)0);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJShortRulesRecipes$AbstractShortAssertIsOneRecipe: Recipe created for the following Refaster template:
static final class AbstractShortAssertIsOne {
@BeforeTemplate
AbstractShortAssert<?> before(AbstractShortAssert<?> shortAssert) {
return shortAssert.isOne();
}
@AfterTemplate
AbstractShortAssert<?> after(AbstractShortAssert<?> shortAssert) {
return shortAssert.isEqualTo((short)1);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJShortRulesRecipes$AbstractShortAssertIsZeroRecipe: Recipe created for the following Refaster template:
static final class AbstractShortAssertIsZero {
@BeforeTemplate
AbstractShortAssert<?> before(AbstractShortAssert<?> shortAssert) {
return shortAssert.isZero();
}
@AfterTemplate
AbstractShortAssert<?> after(AbstractShortAssert<?> shortAssert) {
return shortAssert.isEqualTo((short)0);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJStreamRulesRecipes$AssertThatCollectionRecipe: Recipe created for the following Refaster template:
static final class AssertThatCollection<T> {
@BeforeTemplate
ListAssert<T> before(Collection<T> collection) {
return assertThat(collection.stream());
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
AbstractCollectionAssert<?, ?, T, ?> after(Collection<T> collection) {
return assertThat(collection);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJStringRulesRecipes$AbstractStringAssertStringIsEmptyRecipe: Recipe created for the following Refaster template:
static final class AbstractStringAssertStringIsEmpty {
@BeforeTemplate
void before(AbstractStringAssert<?> stringAssert) {
stringAssert.isEqualTo("");
}
@AfterTemplate
void after(AbstractStringAssert<?> stringAssert) {
stringAssert.isEmpty();
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJStringRulesRecipes$AbstractStringAssertStringIsNotEmptyRecipe: Recipe created for the following Refaster template:
static final class AbstractStringAssertStringIsNotEmpty {
@BeforeTemplate
AbstractStringAssert<?> before(AbstractStringAssert<?> stringAssert) {
return stringAssert.isNotEqualTo("");
}
@AfterTemplate
AbstractStringAssert<?> after(AbstractStringAssert<?> stringAssert) {
return stringAssert.isNotEmpty();
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJStringRulesRecipes$AssertThatPathContentRecipe: Recipe created for the following Refaster template:
static final class AssertThatPathContent {
@BeforeTemplate
AbstractStringAssert<?> before(Path path, Charset charset) throws IOException {
return assertThat(Files.readString(path, charset));
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
AbstractStringAssert<?> after(Path path, Charset charset) {
return assertThat(path).content(charset);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJStringRulesRecipes$AssertThatPathContentUtf8Recipe: Recipe created for the following Refaster template:
static final class AssertThatPathContentUtf8 {
@BeforeTemplate
AbstractStringAssert<?> before(Path path) throws IOException {
return assertThat(Files.readString(path));
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
AbstractStringAssert<?> after(Path path) {
return assertThat(path).content(UTF_8);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJStringRulesRecipes$AssertThatStringContainsRecipe: Recipe created for the following Refaster template:
static final class AssertThatStringContains {
@BeforeTemplate
AbstractBooleanAssert<?> before(String string, CharSequence substring) {
return assertThat(string.contains(substring)).isTrue();
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
AbstractStringAssert<?> after(String string, CharSequence substring) {
return assertThat(string).contains(substring);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJStringRulesRecipes$AssertThatStringDoesNotContainRecipe: Recipe created for the following Refaster template:
static final class AssertThatStringDoesNotContain {
@BeforeTemplate
AbstractBooleanAssert<?> before(String string, CharSequence substring) {
return assertThat(string.contains(substring)).isFalse();
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
AbstractStringAssert<?> after(String string, CharSequence substring) {
return assertThat(string).doesNotContain(substring);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJStringRulesRecipes$AssertThatStringDoesNotEndWithRecipe: Recipe created for the following Refaster template:
static final class AssertThatStringDoesNotEndWith {
@BeforeTemplate
AbstractBooleanAssert<?> before(String string, String prefix) {
return assertThat(string.endsWith(prefix)).isFalse();
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
AbstractStringAssert<?> after(String string, String prefix) {
return assertThat(string).doesNotEndWith(prefix);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJStringRulesRecipes$AssertThatStringDoesNotStartWithRecipe: Recipe created for the following Refaster template:
static final class AssertThatStringDoesNotStartWith {
@BeforeTemplate
AbstractBooleanAssert<?> before(String string, String prefix) {
return assertThat(string.startsWith(prefix)).isFalse();
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
AbstractStringAssert<?> after(String string, String prefix) {
return assertThat(string).doesNotStartWith(prefix);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJStringRulesRecipes$AssertThatStringEndsWithRecipe: Recipe created for the following Refaster template:
static final class AssertThatStringEndsWith {
@BeforeTemplate
AbstractBooleanAssert<?> before(String string, String prefix) {
return assertThat(string.endsWith(prefix)).isTrue();
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
AbstractStringAssert<?> after(String string, String prefix) {
return assertThat(string).endsWith(prefix);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJStringRulesRecipes$AssertThatStringStartsWithRecipe: Recipe created for the following Refaster template:
static final class AssertThatStringStartsWith {
@BeforeTemplate
AbstractBooleanAssert<?> before(String string, String prefix) {
return assertThat(string.startsWith(prefix)).isTrue();
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
AbstractStringAssert<?> after(String string, String prefix) {
return assertThat(string).startsWith(prefix);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByHasMessageContainingRecipe: Recipe created for the following Refaster template:
static final class AssertThatThrownByHasMessageContaining {
@BeforeTemplate
@SuppressWarnings(value = "AssertThatThrownByAsInstanceOfThrowable")
AbstractObjectAssert<?, ?> before(ThrowingCallable throwingCallable, Class<? extends Throwable> exceptionType, String message) {
return assertThatExceptionOfType(exceptionType).isThrownBy(throwingCallable).withMessageContaining(message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
AbstractObjectAssert<?, ?> after(ThrowingCallable throwingCallable, Class<? extends Throwable> exceptionType, String message) {
return assertThatThrownBy(throwingCallable).isInstanceOf(exceptionType).hasMessageContaining(message);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByHasMessageNotContainingRecipe: Recipe created for the following Refaster template:
static final class AssertThatThrownByHasMessageNotContaining {
@BeforeTemplate
@SuppressWarnings(value = "AssertThatThrownByAsInstanceOfThrowable")
AbstractObjectAssert<?, ?> before(ThrowingCallable throwingCallable, Class<? extends Throwable> exceptionType, String message) {
return assertThatExceptionOfType(exceptionType).isThrownBy(throwingCallable).withMessageNotContaining(message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
AbstractObjectAssert<?, ?> after(ThrowingCallable throwingCallable, Class<? extends Throwable> exceptionType, String message) {
return assertThatThrownBy(throwingCallable).isInstanceOf(exceptionType).hasMessageNotContaining(message);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByHasMessageParametersRecipe: Recipe created for the following Refaster template:
static final class AssertThatThrownByHasMessageParameters {
@BeforeTemplate
@SuppressWarnings(value = "AssertThatThrownByAsInstanceOfThrowable")
AbstractObjectAssert<?, ?> before(ThrowingCallable throwingCallable, Class<? extends Throwable> exceptionType, String message, @Repeated
Object parameters) {
return assertThatExceptionOfType(exceptionType).isThrownBy(throwingCallable).withMessage(message, parameters);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
AbstractObjectAssert<?, ?> after(ThrowingCallable throwingCallable, Class<? extends Throwable> exceptionType, String message, @Repeated
Object parameters) {
return assertThatThrownBy(throwingCallable).isInstanceOf(exceptionType).hasMessage(message, parameters);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByHasMessageRecipe: Recipe created for the following Refaster template:
static final class AssertThatThrownByHasMessage {
@BeforeTemplate
@SuppressWarnings(value = "AssertThatThrownByAsInstanceOfThrowable")
AbstractObjectAssert<?, ?> before(ThrowingCallable throwingCallable, Class<? extends Throwable> exceptionType, String message) {
return assertThatExceptionOfType(exceptionType).isThrownBy(throwingCallable).withMessage(message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
AbstractObjectAssert<?, ?> after(ThrowingCallable throwingCallable, Class<? extends Throwable> exceptionType, String message) {
return assertThatThrownBy(throwingCallable).isInstanceOf(exceptionType).hasMessage(message);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByHasMessageStartingWithRecipe: Recipe created for the following Refaster template:
static final class AssertThatThrownByHasMessageStartingWith {
@BeforeTemplate
@SuppressWarnings(value = "AssertThatThrownByAsInstanceOfThrowable")
AbstractObjectAssert<?, ?> before(ThrowingCallable throwingCallable, Class<? extends Throwable> exceptionType, String message) {
return assertThatExceptionOfType(exceptionType).isThrownBy(throwingCallable).withMessageStartingWith(message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
AbstractObjectAssert<?, ?> after(ThrowingCallable throwingCallable, Class<? extends Throwable> exceptionType, String message) {
return assertThatThrownBy(throwingCallable).isInstanceOf(exceptionType).hasMessageStartingWith(message);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIOExceptionHasMessageContainingRecipe: Recipe created for the following Refaster template:
static final class AssertThatThrownByIOExceptionHasMessageContaining {
@BeforeTemplate
@SuppressWarnings(value = "AssertThatThrownByIOException")
AbstractObjectAssert<?, ?> before(ThrowingCallable throwingCallable, String message) {
return assertThatIOException().isThrownBy(throwingCallable).withMessageContaining(message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
AbstractObjectAssert<?, ?> after(ThrowingCallable throwingCallable, String message) {
return assertThatThrownBy(throwingCallable).isInstanceOf(IOException.class).hasMessageContaining(message);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIOExceptionHasMessageNotContainingRecipe: Recipe created for the following Refaster template:
static final class AssertThatThrownByIOExceptionHasMessageNotContaining {
@BeforeTemplate
@SuppressWarnings(value = "AssertThatThrownByIOException")
AbstractObjectAssert<?, ?> before(ThrowingCallable throwingCallable, String message) {
return assertThatIOException().isThrownBy(throwingCallable).withMessageNotContaining(message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
AbstractObjectAssert<?, ?> after(ThrowingCallable throwingCallable, String message) {
return assertThatThrownBy(throwingCallable).isInstanceOf(IOException.class).hasMessageNotContaining(message);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIOExceptionHasMessageParametersRecipe: Recipe created for the following Refaster template:
static final class AssertThatThrownByIOExceptionHasMessageParameters {
@BeforeTemplate
@SuppressWarnings(value = "AssertThatThrownByIOException")
AbstractObjectAssert<?, ?> before(ThrowingCallable throwingCallable, String message, @Repeated
Object parameters) {
return assertThatIOException().isThrownBy(throwingCallable).withMessage(message, parameters);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
AbstractObjectAssert<?, ?> after(ThrowingCallable throwingCallable, String message, @Repeated
Object parameters) {
return assertThatThrownBy(throwingCallable).isInstanceOf(IOException.class).hasMessage(message, parameters);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIOExceptionHasMessageRecipe: Recipe created for the following Refaster template:
static final class AssertThatThrownByIOExceptionHasMessage {
@BeforeTemplate
@SuppressWarnings(value = "AssertThatThrownByIOException")
AbstractObjectAssert<?, ?> before(ThrowingCallable throwingCallable, String message) {
return assertThatIOException().isThrownBy(throwingCallable).withMessage(message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
AbstractObjectAssert<?, ?> after(ThrowingCallable throwingCallable, String message) {
return assertThatThrownBy(throwingCallable).isInstanceOf(IOException.class).hasMessage(message);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIOExceptionHasMessageStartingWithRecipe: Recipe created for the following Refaster template:
static final class AssertThatThrownByIOExceptionHasMessageStartingWith {
@BeforeTemplate
@SuppressWarnings(value = "AssertThatThrownByIOException")
AbstractObjectAssert<?, ?> before(ThrowingCallable throwingCallable, String message) {
return assertThatIOException().isThrownBy(throwingCallable).withMessageStartingWith(message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
AbstractObjectAssert<?, ?> after(ThrowingCallable throwingCallable, String message) {
return assertThatThrownBy(throwingCallable).isInstanceOf(IOException.class).hasMessageStartingWith(message);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIOExceptionRecipe: Recipe created for the following Refaster template:
static final class AssertThatThrownByIOException {
@BeforeTemplate
AbstractObjectAssert<?, ?> before(ThrowingCallable throwingCallable) {
return assertThatIOException().isThrownBy(throwingCallable);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
AbstractObjectAssert<?, ?> after(ThrowingCallable throwingCallable) {
return assertThatThrownBy(throwingCallable).isInstanceOf(IOException.class);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIOExceptionRootCauseHasMessageRecipe: Recipe created for the following Refaster template:
static final class AssertThatThrownByIOExceptionRootCauseHasMessage {
@BeforeTemplate
@SuppressWarnings(value = "AssertThatThrownByIOException")
AbstractObjectAssert<?, ?> before(ThrowingCallable throwingCallable, String message) {
return assertThatIOException().isThrownBy(throwingCallable).havingRootCause().withMessage(message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
AbstractObjectAssert<?, ?> after(ThrowingCallable throwingCallable, String message) {
return assertThatThrownBy(throwingCallable).isInstanceOf(IOException.class).rootCause().hasMessage(message);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIllegalArgumentExceptionHasMessageContainingRecipe: Recipe created for the following Refaster template:
static final class AssertThatThrownByIllegalArgumentExceptionHasMessageContaining {
@BeforeTemplate
@SuppressWarnings(value = "AssertThatThrownByIllegalArgumentException")
AbstractObjectAssert<?, ?> before(ThrowingCallable throwingCallable, String message) {
return assertThatIllegalArgumentException().isThrownBy(throwingCallable).withMessageContaining(message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
AbstractObjectAssert<?, ?> after(ThrowingCallable throwingCallable, String message) {
return assertThatThrownBy(throwingCallable).isInstanceOf(IllegalArgumentException.class).hasMessageContaining(message);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIllegalArgumentExceptionHasMessageNotContainingAnyRecipe: Recipe created for the following Refaster template:
static final class AssertThatThrownByIllegalArgumentExceptionHasMessageNotContainingAny {
@BeforeTemplate
@SuppressWarnings(value = "AssertThatThrownByIllegalArgumentException")
AbstractObjectAssert<?, ?> before(ThrowingCallable throwingCallable, @Repeated
CharSequence values) {
return assertThatIllegalArgumentException().isThrownBy(throwingCallable).withMessageNotContainingAny(values);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
AbstractObjectAssert<?, ?> after(ThrowingCallable throwingCallable, @Repeated
CharSequence values) {
return assertThatThrownBy(throwingCallable).isInstanceOf(IllegalArgumentException.class).hasMessageNotContainingAny(values);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIllegalArgumentExceptionHasMessageParametersRecipe: Recipe created for the following Refaster template:
static final class AssertThatThrownByIllegalArgumentExceptionHasMessageParameters {
@BeforeTemplate
@SuppressWarnings(value = "AssertThatThrownByIllegalArgumentException")
AbstractObjectAssert<?, ?> before(ThrowingCallable throwingCallable, String message, @Repeated
Object parameters) {
return assertThatIllegalArgumentException().isThrownBy(throwingCallable).withMessage(message, parameters);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
AbstractObjectAssert<?, ?> after(ThrowingCallable throwingCallable, String message, @Repeated
Object parameters) {
return assertThatThrownBy(throwingCallable).isInstanceOf(IllegalArgumentException.class).hasMessage(message, parameters);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIllegalArgumentExceptionHasMessageRecipe: Recipe created for the following Refaster template:
static final class AssertThatThrownByIllegalArgumentExceptionHasMessage {
@BeforeTemplate
@SuppressWarnings(value = "AssertThatThrownByIllegalArgumentException")
AbstractObjectAssert<?, ?> before(ThrowingCallable throwingCallable, String message) {
return assertThatIllegalArgumentException().isThrownBy(throwingCallable).withMessage(message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
AbstractObjectAssert<?, ?> after(ThrowingCallable throwingCallable, String message) {
return assertThatThrownBy(throwingCallable).isInstanceOf(IllegalArgumentException.class).hasMessage(message);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIllegalArgumentExceptionHasMessageStartingWithRecipe: Recipe created for the following Refaster template:
static final class AssertThatThrownByIllegalArgumentExceptionHasMessageStartingWith {
@BeforeTemplate
@SuppressWarnings(value = "AssertThatThrownByIllegalArgumentException")
AbstractObjectAssert<?, ?> before(ThrowingCallable throwingCallable, String message) {
return assertThatIllegalArgumentException().isThrownBy(throwingCallable).withMessageStartingWith(message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
AbstractObjectAssert<?, ?> after(ThrowingCallable throwingCallable, String message) {
return assertThatThrownBy(throwingCallable).isInstanceOf(IllegalArgumentException.class).hasMessageStartingWith(message);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIllegalArgumentExceptionRecipe: Recipe created for the following Refaster template:
static final class AssertThatThrownByIllegalArgumentException {
@BeforeTemplate
AbstractObjectAssert<?, ?> before(ThrowingCallable throwingCallable) {
return assertThatIllegalArgumentException().isThrownBy(throwingCallable);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
AbstractObjectAssert<?, ?> after(ThrowingCallable throwingCallable) {
return assertThatThrownBy(throwingCallable).isInstanceOf(IllegalArgumentException.class);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIllegalArgumentExceptionRootCauseHasMessageRecipe: Recipe created for the following Refaster template:
static final class AssertThatThrownByIllegalArgumentExceptionRootCauseHasMessage {
@BeforeTemplate
@SuppressWarnings(value = "AssertThatThrownByIllegalArgumentException")
AbstractObjectAssert<?, ?> before(ThrowingCallable throwingCallable, String message) {
return assertThatIllegalArgumentException().isThrownBy(throwingCallable).havingRootCause().withMessage(message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
AbstractObjectAssert<?, ?> after(ThrowingCallable throwingCallable, String message) {
return assertThatThrownBy(throwingCallable).isInstanceOf(IllegalArgumentException.class).rootCause().hasMessage(message);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIllegalStateExceptionHasMessageContainingRecipe: Recipe created for the following Refaster template:
static final class AssertThatThrownByIllegalStateExceptionHasMessageContaining {
@BeforeTemplate
@SuppressWarnings(value = "AssertThatThrownByIllegalStateException")
AbstractObjectAssert<?, ?> before(ThrowingCallable throwingCallable, String message) {
return assertThatIllegalStateException().isThrownBy(throwingCallable).withMessageContaining(message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
AbstractObjectAssert<?, ?> after(ThrowingCallable throwingCallable, String message) {
return assertThatThrownBy(throwingCallable).isInstanceOf(IllegalStateException.class).hasMessageContaining(message);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIllegalStateExceptionHasMessageNotContainingRecipe: Recipe created for the following Refaster template:
static final class AssertThatThrownByIllegalStateExceptionHasMessageNotContaining {
@BeforeTemplate
@SuppressWarnings(value = "AssertThatThrownByIllegalStateException")
AbstractObjectAssert<?, ?> before(ThrowingCallable throwingCallable, String message) {
return assertThatIllegalStateException().isThrownBy(throwingCallable).withMessageNotContaining(message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
AbstractObjectAssert<?, ?> after(ThrowingCallable throwingCallable, String message) {
return assertThatThrownBy(throwingCallable).isInstanceOf(IllegalStateException.class).hasMessageNotContaining(message);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIllegalStateExceptionHasMessageParametersRecipe: Recipe created for the following Refaster template:
static final class AssertThatThrownByIllegalStateExceptionHasMessageParameters {
@BeforeTemplate
@SuppressWarnings(value = "AssertThatThrownByIllegalStateException")
AbstractObjectAssert<?, ?> before(ThrowingCallable throwingCallable, String message, @Repeated
Object parameters) {
return assertThatIllegalStateException().isThrownBy(throwingCallable).withMessage(message, parameters);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
AbstractObjectAssert<?, ?> after(ThrowingCallable throwingCallable, String message, @Repeated
Object parameters) {
return assertThatThrownBy(throwingCallable).isInstanceOf(IllegalStateException.class).hasMessage(message, parameters);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIllegalStateExceptionHasMessageRecipe: Recipe created for the following Refaster template:
static final class AssertThatThrownByIllegalStateExceptionHasMessage {
@BeforeTemplate
@SuppressWarnings(value = "AssertThatThrownByIllegalStateException")
AbstractObjectAssert<?, ?> before(ThrowingCallable throwingCallable, String message) {
return assertThatIllegalStateException().isThrownBy(throwingCallable).withMessage(message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
AbstractObjectAssert<?, ?> after(ThrowingCallable throwingCallable, String message) {
return assertThatThrownBy(throwingCallable).isInstanceOf(IllegalStateException.class).hasMessage(message);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIllegalStateExceptionHasMessageStartingWithRecipe: Recipe created for the following Refaster template:
static final class AssertThatThrownByIllegalStateExceptionHasMessageStartingWith {
@BeforeTemplate
@SuppressWarnings(value = "AssertThatThrownByIllegalStateException")
AbstractObjectAssert<?, ?> before(ThrowingCallable throwingCallable, String message) {
return assertThatIllegalStateException().isThrownBy(throwingCallable).withMessageStartingWith(message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
AbstractObjectAssert<?, ?> after(ThrowingCallable throwingCallable, String message) {
return assertThatThrownBy(throwingCallable).isInstanceOf(IllegalStateException.class).hasMessageStartingWith(message);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIllegalStateExceptionRecipe: Recipe created for the following Refaster template:
static final class AssertThatThrownByIllegalStateException {
@BeforeTemplate
AbstractObjectAssert<?, ?> before(ThrowingCallable throwingCallable) {
return assertThatIllegalStateException().isThrownBy(throwingCallable);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
AbstractObjectAssert<?, ?> after(ThrowingCallable throwingCallable) {
return assertThatThrownBy(throwingCallable).isInstanceOf(IllegalStateException.class);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIllegalStateExceptionRootCauseHasMessageRecipe: Recipe created for the following Refaster template:
static final class AssertThatThrownByIllegalStateExceptionRootCauseHasMessage {
@BeforeTemplate
@SuppressWarnings(value = "AssertThatThrownByIllegalStateException")
AbstractObjectAssert<?, ?> before(ThrowingCallable throwingCallable, String message) {
return assertThatIllegalStateException().isThrownBy(throwingCallable).havingRootCause().withMessage(message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
AbstractObjectAssert<?, ?> after(ThrowingCallable throwingCallable, String message) {
return assertThatThrownBy(throwingCallable).isInstanceOf(IllegalStateException.class).rootCause().hasMessage(message);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByNullPointerExceptionHasMessageContainingRecipe: Recipe created for the following Refaster template:
static final class AssertThatThrownByNullPointerExceptionHasMessageContaining {
@BeforeTemplate
@SuppressWarnings(value = "AssertThatThrownByNullPointerException")
AbstractObjectAssert<?, ?> before(ThrowingCallable throwingCallable, String message) {
return assertThatNullPointerException().isThrownBy(throwingCallable).withMessageContaining(message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
AbstractObjectAssert<?, ?> after(ThrowingCallable throwingCallable, String message) {
return assertThatThrownBy(throwingCallable).isInstanceOf(NullPointerException.class).hasMessageContaining(message);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByNullPointerExceptionHasMessageNotContainingRecipe: Recipe created for the following Refaster template:
static final class AssertThatThrownByNullPointerExceptionHasMessageNotContaining {
@BeforeTemplate
@SuppressWarnings(value = "AssertThatThrownByNullPointerException")
AbstractObjectAssert<?, ?> before(ThrowingCallable throwingCallable, String message) {
return assertThatNullPointerException().isThrownBy(throwingCallable).withMessageNotContaining(message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
AbstractObjectAssert<?, ?> after(ThrowingCallable throwingCallable, String message) {
return assertThatThrownBy(throwingCallable).isInstanceOf(NullPointerException.class).hasMessageNotContaining(message);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByNullPointerExceptionHasMessageParametersRecipe: Recipe created for the following Refaster template:
static final class AssertThatThrownByNullPointerExceptionHasMessageParameters {
@BeforeTemplate
@SuppressWarnings(value = "AssertThatThrownByNullPointerException")
AbstractObjectAssert<?, ?> before(ThrowingCallable throwingCallable, String message, @Repeated
Object parameters) {
return assertThatNullPointerException().isThrownBy(throwingCallable).withMessage(message, parameters);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
AbstractObjectAssert<?, ?> after(ThrowingCallable throwingCallable, String message, @Repeated
Object parameters) {
return assertThatThrownBy(throwingCallable).isInstanceOf(NullPointerException.class).hasMessage(message, parameters);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByNullPointerExceptionHasMessageRecipe: Recipe created for the following Refaster template:
static final class AssertThatThrownByNullPointerExceptionHasMessage {
@BeforeTemplate
@SuppressWarnings(value = "AssertThatThrownByNullPointerException")
AbstractObjectAssert<?, ?> before(ThrowingCallable throwingCallable, String message) {
return assertThatNullPointerException().isThrownBy(throwingCallable).withMessage(message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
AbstractObjectAssert<?, ?> after(ThrowingCallable throwingCallable, String message) {
return assertThatThrownBy(throwingCallable).isInstanceOf(NullPointerException.class).hasMessage(message);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByNullPointerExceptionHasMessageStartingWithRecipe: Recipe created for the following Refaster template:
static final class AssertThatThrownByNullPointerExceptionHasMessageStartingWith {
@BeforeTemplate
@SuppressWarnings(value = "AssertThatThrownByNullPointerException")
AbstractObjectAssert<?, ?> before(ThrowingCallable throwingCallable, String message) {
return assertThatNullPointerException().isThrownBy(throwingCallable).withMessageStartingWith(message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
AbstractObjectAssert<?, ?> after(ThrowingCallable throwingCallable, String message) {
return assertThatThrownBy(throwingCallable).isInstanceOf(NullPointerException.class).hasMessageStartingWith(message);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByNullPointerExceptionRecipe: Recipe created for the following Refaster template:
static final class AssertThatThrownByNullPointerException {
@BeforeTemplate
AbstractObjectAssert<?, ?> before(ThrowingCallable throwingCallable) {
return assertThatNullPointerException().isThrownBy(throwingCallable);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
AbstractObjectAssert<?, ?> after(ThrowingCallable throwingCallable) {
return assertThatThrownBy(throwingCallable).isInstanceOf(NullPointerException.class);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByNullPointerExceptionRootCauseHasMessageRecipe: Recipe created for the following Refaster template:
static final class AssertThatThrownByNullPointerExceptionRootCauseHasMessage {
@BeforeTemplate
@SuppressWarnings(value = "AssertThatThrownByNullPointerException")
AbstractObjectAssert<?, ?> before(ThrowingCallable throwingCallable, String message) {
return assertThatNullPointerException().isThrownBy(throwingCallable).havingRootCause().withMessage(message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
AbstractObjectAssert<?, ?> after(ThrowingCallable throwingCallable, String message) {
return assertThatThrownBy(throwingCallable).isInstanceOf(NullPointerException.class).rootCause().hasMessage(message);
}
}
.
- tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByRootCauseHasMessageRecipe: Recipe created for the following Refaster template:
static final class AssertThatThrownByRootCauseHasMessage {
@BeforeTemplate
@SuppressWarnings(value = "AssertThatThrownByAsInstanceOfThrowable")
AbstractObjectAssert<?, ?> before(ThrowingCallable throwingCallable, Class<? extends Throwable> exceptionType, String message) {
return assertThatExceptionOfType(exceptionType).isThrownBy(throwingCallable).havingRootCause().withMessage(message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
AbstractObjectAssert<?, ?> after(ThrowingCallable throwingCallable, Class<? extends Throwable> exceptionType, String message) {
return assertThatThrownBy(throwingCallable).isInstanceOf(exceptionType).rootCause().hasMessage(message);
}
}
.
- tech.picnic.errorprone.refasterrules.AssortedRulesRecipes$CheckIndexRecipe: Prefer
Objects#checkIndex(int, int)over the Guava alternative. - tech.picnic.errorprone.refasterrules.AssortedRulesRecipes$IterableIsEmptyRecipe: Prefer
Iterables#isEmpty(Iterable)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.AssortedRulesRecipes$IteratorGetNextOrDefaultRecipe: Prefer
Iterators#getNext(Iterator, Object)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.AssortedRulesRecipes$LogicalImplicationRecipe: Don't unnecessarily repeat boolean expressions.
- tech.picnic.errorprone.refasterrules.AssortedRulesRecipes$SplitToStreamRecipe: Prefer
Splitter#splitToStream(CharSequence)over less efficient alternatives. - tech.picnic.errorprone.refasterrules.AssortedRulesRecipes$UnboundedSingleElementStreamRecipe: Prefer
Stream#generate(java.util.function.Supplier)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.BigDecimalRulesRecipes$BigDecimalSignumIsZeroRecipe: Prefer using
BigDecimal#signum()over more contrived alternatives. - tech.picnic.errorprone.refasterrules.ClassRulesRecipes$ClassIsInstanceRecipe: Prefer
Class#isInstance(Object)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.ClassRulesRecipes$ClassReferenceCastRecipe: Prefer
Class#cast(Object)method references over lambda expressions that require naming a variable. - tech.picnic.errorprone.refasterrules.ClassRulesRecipes$ClassReferenceIsInstancePredicateRecipe: Prefer
Class#isInstance(Object)method references over lambda expressions that require naming a variable. - tech.picnic.errorprone.refasterrules.CollectionRulesRecipes$CollectionAddAllToCollectionExpressionRecipe: Don't call
Iterables#addAll(Collection, Iterable)when the elements to be added are already part of aCollection. - tech.picnic.errorprone.refasterrules.CollectionRulesRecipes$CollectionRemoveAllFromCollectionExpressionRecipe: Don't call
Iterables#removeAll(Iterable, Collection)when the elements to be removed are already part of aCollection. - tech.picnic.errorprone.refasterrules.CollectionRulesRecipes$CollectionsDisjointRecipe: Prefer
Collections#disjoint(Collection, Collection)over non-JDK or less efficient alternatives. - tech.picnic.errorprone.refasterrules.CollectionRulesRecipes$ImmutableCollectionToArrayWithArrayRecipe: Don't call
ImmutableCollection#asList()if `ImmutableCollection#toArray(Object[])`` is called on the result; call it directly. - tech.picnic.errorprone.refasterrules.CollectionRulesRecipes$ImmutableCollectionToArrayWithGeneratorRecipe: Don't call
ImmutableCollection#asList()ifImmutableCollection#toArray(IntFunction)} is called on the result; call it directly. - tech.picnic.errorprone.refasterrules.CollectionRulesRecipes$NewArrayListFromCollectionRecipe: Prefer
ArrayList#ArrayList(Collection)over the Guava alternative. - tech.picnic.errorprone.refasterrules.CollectionRulesRecipes$OptionalFirstCollectionElementRecipe: Don't use the ternary operator to extract the first element of a possibly-empty
Collectionas anOptional, and (when applicable) preferStream#findFirst()overStream#findAny()to communicate that the collection's first element (if any, according to iteration order) will be returned. - tech.picnic.errorprone.refasterrules.CollectionRulesRecipes$RemoveOptionalFirstNavigableSetElementRecipe: Avoid contrived constructions when extracting the first element from a possibly empty
NavigableSet. - tech.picnic.errorprone.refasterrules.CollectionRulesRecipes$SetOfVarargsRecipe: Prefer
Set#of(Object[])over more contrived alternatives. - tech.picnic.errorprone.refasterrules.ComparatorRulesRecipes$ComparatorsMaxRecipe: Prefer a method reference to
Comparators#max(Comparable, Comparable)over callingBinaryOperator#minBy(Comparator)withComparator#naturalOrder(). - tech.picnic.errorprone.refasterrules.ComparatorRulesRecipes$ComparatorsMinRecipe: Prefer a method reference to
Comparators#min(Comparable, Comparable)over callingBinaryOperator#minBy(Comparator)withComparator#naturalOrder(). - tech.picnic.errorprone.refasterrules.ComparatorRulesRecipes$CompareToRecipe: Prefer
Comparable#compareTo(Object)} over more verbose alternatives. - tech.picnic.errorprone.refasterrules.ComparatorRulesRecipes$IsLessThanOrEqualToRecipe: Don't explicitly compare enums by their ordinal.
- tech.picnic.errorprone.refasterrules.ComparatorRulesRecipes$IsLessThanRecipe: Don't explicitly compare enums by their ordinal.
- tech.picnic.errorprone.refasterrules.ComparatorRulesRecipes$MaxOfArrayRecipe: Avoid unnecessary creation of a
Streamto determine the maximum of a known collection of values. - tech.picnic.errorprone.refasterrules.ComparatorRulesRecipes$MaxOfVarargsRecipe: Avoid unnecessary creation of a
Streamto determine the maximum of a known collection of values. - tech.picnic.errorprone.refasterrules.ComparatorRulesRecipes$MinOfArrayRecipe: Avoid unnecessary creation of a
Streamto determine the minimum of a known collection of values. - tech.picnic.errorprone.refasterrules.ComparatorRulesRecipes$MinOfVarargsRecipe: Avoid unnecessary creation of a
Streamto determine the minimum of a known collection of values. - tech.picnic.errorprone.refasterrules.ComparatorRulesRecipes$ThenComparingCustomRecipe: Don't explicitly create
Comparators unnecessarily. - tech.picnic.errorprone.refasterrules.ComparatorRulesRecipes$ThenComparingCustomReversedRecipe: Don't explicitly create
Comparators unnecessarily. - tech.picnic.errorprone.refasterrules.ComparatorRulesRecipes$ThenComparingDoubleRecipe: Don't explicitly create
Comparators unnecessarily. - tech.picnic.errorprone.refasterrules.ComparatorRulesRecipes$ThenComparingIntRecipe: Don't explicitly create
Comparators unnecessarily. - tech.picnic.errorprone.refasterrules.ComparatorRulesRecipes$ThenComparingLongRecipe: Don't explicitly create
Comparators unnecessarily. - tech.picnic.errorprone.refasterrules.ComparatorRulesRecipes$ThenComparingRecipe: Don't explicitly create
Comparators unnecessarily. - tech.picnic.errorprone.refasterrules.ComparatorRulesRecipes$ThenComparingReversedRecipe: Don't explicitly create
Comparators unnecessarily. - tech.picnic.errorprone.refasterrules.DoubleStreamRulesRecipes$ConcatOneDoubleStreamRecipe: Don't unnecessarily call
Streams#concat(DoubleStream...). - tech.picnic.errorprone.refasterrules.DoubleStreamRulesRecipes$ConcatTwoDoubleStreamsRecipe: Prefer
DoubleStream#concat(DoubleStream, DoubleStream)over the Guava alternative. - tech.picnic.errorprone.refasterrules.DoubleStreamRulesRecipes$DoubleStreamAllMatchRecipe: Recipe created for the following Refaster template:
static final class DoubleStreamAllMatch {
@BeforeTemplate
boolean before(DoubleStream stream, DoublePredicate predicate) {
return stream.noneMatch(predicate.negate());
}
@AfterTemplate
boolean after(DoubleStream stream, DoublePredicate predicate) {
return stream.allMatch(predicate);
}
}
.
- tech.picnic.errorprone.refasterrules.DoubleStreamRulesRecipes$DoubleStreamIsEmptyRecipe: In order to test whether a stream has any element, simply try to find one.
- tech.picnic.errorprone.refasterrules.DoubleStreamRulesRecipes$DoubleStreamIsNotEmptyRecipe: In order to test whether a stream has any element, simply try to find one.
- tech.picnic.errorprone.refasterrules.DoubleStreamRulesRecipes$DoubleStreamNoneMatchRecipe: Prefer
DoubleStream#noneMatch(DoublePredicate)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.EqualityRulesRecipes$DoubleNegationRecipe: Avoid double negations; this is not Javascript.
- tech.picnic.errorprone.refasterrules.EqualityRulesRecipes$EnumReferenceEqualityLambdaRecipe: Prefer reference-based equality for enums.
- tech.picnic.errorprone.refasterrules.EqualityRulesRecipes$EnumReferenceEqualityRecipe: Prefer reference-based equality for enums.
- tech.picnic.errorprone.refasterrules.EqualityRulesRecipes$EqualsPredicateRecipe: Prefer
Object#equals(Object)over the equivalent lambda function. - tech.picnic.errorprone.refasterrules.EqualityRulesRecipes$EqualsRecipe: Avoid contrived ways of handling
nullvalues during equality testing. - tech.picnic.errorprone.refasterrules.EqualityRulesRecipes$IndirectDoubleNegationRecipe: Don't negate an inequality test or use the ternary operator to compare two booleans; directly test for equality instead.
- tech.picnic.errorprone.refasterrules.EqualityRulesRecipes$NegationRecipe: Don't negate an equality test or use the ternary operator to compare two booleans; directly test for inequality instead.
- tech.picnic.errorprone.refasterrules.FileRulesRecipes$FileMkDirsFileExistsRecipe: Invoke
File#mkdirs()beforeFile#exists()to avoid concurrency issues. - tech.picnic.errorprone.refasterrules.FileRulesRecipes$FilesCreateTempFileInCustomDirectoryToFileRecipe: Note that
File#createTempFiletreats the given prefix as a path, and ignores all but its file name. That is, the actual prefix used is derived from all characters following the final file separator (if any). This is not the case withFiles#createTempFile, which will instead throw anIllegalArgumentExceptionif the prefix contains any file separators. - tech.picnic.errorprone.refasterrules.FileRulesRecipes$FilesNewInputStreamToPathRecipe: Prefer
Files#newInputStream(Path, OpenOption...)over less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.FileRulesRecipes$FilesNewOutputStreamToPathRecipe: Prefer
Files#newOutputStream(Path, OpenOption...)over less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.FileRulesRecipes$PathInstanceRecipe: Avoid redundant conversions from
PathtoFile. - tech.picnic.errorprone.refasterrules.FileRulesRecipes$PathOfStringRecipe: Prefer the more idiomatic
Path#of(String, String...)overPaths#get(String, String...). - tech.picnic.errorprone.refasterrules.FileRulesRecipes$PathOfUriRecipe: Prefer the more idiomatic
Path#of(URI)overPaths#get(URI). - tech.picnic.errorprone.refasterrules.FileRulesRecipes$PathToFileMkDirsFilesExistsRecipe: Invoke
File#mkdirs()beforeFiles#exists(Path, LinkOption...)to avoid concurrency issues. - tech.picnic.errorprone.refasterrules.ImmutableEnumSetRulesRecipes$SetsImmutableEnumSetVarArgsRecipe: Prefer
Sets#immutableEnumSet(Enum, Enum[])for enum collections to take advantage of the internally usedEnumSet. - tech.picnic.errorprone.refasterrules.ImmutableEnumSetRulesRecipes$StreamToImmutableEnumSetRecipe: <strong>Warning:</strong> this rule is not completely behavior preserving: while the original code produces a set that iterates over its elements in encounter order, the replacement code iterates over the elements in enum definition order.
- tech.picnic.errorprone.refasterrules.ImmutableListMultimapRulesRecipes$EmptyImmutableListMultimapRecipe: Prefer
ImmutableListMultimap#of()over more contrived or less-specific alternatives. - tech.picnic.errorprone.refasterrules.ImmutableListMultimapRulesRecipes$EntryToImmutableListMultimapRecipe: Prefer
ImmutableListMultimap#of(Object, Object)over more contrived or less-specific alternatives. - tech.picnic.errorprone.refasterrules.ImmutableListMultimapRulesRecipes$ImmutableListMultimapBuilderPutRecipe: Prefer
ImmutableListMultimap.Builder#put(Object, Object)over more contrived or less efficient alternatives. - tech.picnic.errorprone.refasterrules.ImmutableListMultimapRulesRecipes$IterableToImmutableListMultimapRecipe: Prefer
ImmutableListMultimap#copyOf(Iterable)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.ImmutableListMultimapRulesRecipes$PairToImmutableListMultimapRecipe: Prefer
ImmutableListMultimap#of(Object, Object)over more contrived or less-specific alternatives. - tech.picnic.errorprone.refasterrules.ImmutableListMultimapRulesRecipes$TransformMultimapValuesToImmutableListMultimap2Recipe: Prefer creating an immutable copy of the result of
Multimaps#transformValues(Multimap, com.google.common.base.Function)over creating and directly collecting a stream. - tech.picnic.errorprone.refasterrules.ImmutableListRulesRecipes$ImmutableListOfRecipe: Prefer
ImmutableList#of()over more contrived alternatives or alternatives that don't communicate the immutability of the resulting list at the type level. - tech.picnic.errorprone.refasterrules.ImmutableListRulesRecipes$ImmutableListSortedCopyOfWithCustomComparatorRecipe: Prefer
ImmutableList#sortedCopyOf(Comparator, Iterable)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.ImmutableListRulesRecipes$IterableToImmutableListRecipe: Prefer
ImmutableList#copyOf(Iterable)and variants over more contrived alternatives. - tech.picnic.errorprone.refasterrules.ImmutableListRulesRecipes$StreamToDistinctImmutableListRecipe: Collecting to an
ImmutableSetand converting the result to anImmutableListmay be more efficient than deduplicating a stream and collecting the result to anImmutableList. - tech.picnic.errorprone.refasterrules.ImmutableListRulesRecipes$StreamToImmutableListRecipe: Prefer
ImmutableList#toImmutableList()over less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.ImmutableMapRulesRecipes$EntryIterableToImmutableMapRecipe: Prefer
ImmutableMap#copyOf(Iterable)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.ImmutableMapRulesRecipes$EntryToImmutableMapRecipe: Prefer
ImmutableMap#of(Object, Object)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.ImmutableMapRulesRecipes$ImmutableMapBuilderBuildOrThrowRecipe: Prefer
ImmutableMap.Builder#buildOrThrow()over the less explicitImmutableMap.Builder#build(). - tech.picnic.errorprone.refasterrules.ImmutableMapRulesRecipes$ImmutableMapBuilderPutRecipe: Prefer
ImmutableMap.Builder#put(Object, Object)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.ImmutableMapRulesRecipes$ImmutableMapOf1Recipe: Prefer
ImmutableMap#of(Object, Object)over more contrived alternatives or alternatives that don't communicate the immutability of the resulting map at the type level. - tech.picnic.errorprone.refasterrules.ImmutableMapRulesRecipes$ImmutableMapOf3Recipe: Prefer
ImmutableMap#of(Object, Object, Object, Object, Object, Object)over alternatives that don't communicate the immutability of the resulting map at the type level. - tech.picnic.errorprone.refasterrules.ImmutableMapRulesRecipes$ImmutableMapOf5Recipe: Prefer
ImmutableMap#of(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object)over alternatives that don't communicate the immutability of the resulting map at the type level. - tech.picnic.errorprone.refasterrules.ImmutableMapRulesRecipes$ImmutableMapOfRecipe: Prefer
ImmutableMap#of()over more contrived alternatives or alternatives that don't communicate the immutability of the resulting map at the type level. - tech.picnic.errorprone.refasterrules.ImmutableMultisetRulesRecipes$EmptyImmutableMultisetRecipe: Prefer
ImmutableMultiset#of()over more contrived alternatives. - tech.picnic.errorprone.refasterrules.ImmutableMultisetRulesRecipes$IterableToImmutableMultisetRecipe: Prefer
ImmutableMultiset#copyOf(Iterable)and variants over more contrived alternatives. - tech.picnic.errorprone.refasterrules.ImmutableMultisetRulesRecipes$StreamToImmutableMultisetRecipe: Prefer
ImmutableMultiset#toImmutableMultiset()over less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSetMultimapRulesRecipes$EmptyImmutableSetMultimapRecipe: Prefer
ImmutableSetMultimap#of()over more contrived alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSetMultimapRulesRecipes$EntryToImmutableSetMultimapRecipe: Prefer
ImmutableSetMultimap#of(Object, Object)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSetMultimapRulesRecipes$ImmutableSetMultimapBuilderPutRecipe: Prefer
ImmutableSetMultimap.Builder#put(Object, Object)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSetMultimapRulesRecipes$IterableToImmutableSetMultimapRecipe: Prefer
ImmutableSetMultimap#copyOf(Iterable)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSetMultimapRulesRecipes$PairToImmutableSetMultimapRecipe: Prefer
ImmutableSetMultimap#of(Object, Object)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSetMultimapRulesRecipes$TransformMultimapValuesToImmutableSetMultimap2Recipe: Prefer creating an immutable copy of the result of
Multimaps#transformValues(Multimap, com.google.common.base.Function)over creating and directly collecting a stream. - tech.picnic.errorprone.refasterrules.ImmutableSetRulesRecipes$ImmutableSetCopyOfSetViewRecipe: Prefer
SetView#immutableCopy()over the more verbose alternative. - tech.picnic.errorprone.refasterrules.ImmutableSetRulesRecipes$ImmutableSetOfRecipe: Prefer
ImmutableSet#of()over more contrived alternatives or alternatives that don't communicate the immutability of the resulting set at the type level. - tech.picnic.errorprone.refasterrules.ImmutableSetRulesRecipes$IterableToImmutableSetRecipe: Prefer
ImmutableSet#copyOf(Iterable)and variants over more contrived alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSetRulesRecipes$SetsDifferenceMapRecipe: Prefer an immutable copy of
Sets#difference(Set, Set)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSetRulesRecipes$SetsDifferenceMultimapRecipe: Prefer an immutable copy of
Sets#difference(Set, Set)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSetRulesRecipes$SetsDifferenceRecipe: Prefer an immutable copy of
Sets#difference(Set, Set)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSetRulesRecipes$SetsIntersectionMapRecipe: Prefer an immutable copy of
Sets#intersection(Set, Set)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSetRulesRecipes$SetsIntersectionMultimapRecipe: Prefer an immutable copy of
Sets#intersection(Set, Set)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSetRulesRecipes$SetsIntersectionRecipe: Prefer an immutable copy of
Sets#intersection(Set, Set)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSetRulesRecipes$SetsUnionRecipe: Prefer an immutable copy of
Sets#union(Set, Set)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSetRulesRecipes$StreamToImmutableSetRecipe: Prefer
ImmutableSet#toImmutableSet()over less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSortedMapRulesRecipes$EmptyImmutableSortedMapRecipe: Prefer
ImmutableSortedMap#of()over more contrived alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSortedMapRulesRecipes$EntryToImmutableSortedMapRecipe: Prefer
ImmutableSortedMap#of(Object, Object)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSortedMapRulesRecipes$ImmutableSortedMapBuilderRecipe: Prefer
ImmutableSortedMap#orderedBy(Comparator)over the associated constructor. - tech.picnic.errorprone.refasterrules.ImmutableSortedMapRulesRecipes$ImmutableSortedMapNaturalOrderBuilderRecipe: Prefer
ImmutableSortedMap#naturalOrder()over the alternative that requires explicitly providing theComparator. - tech.picnic.errorprone.refasterrules.ImmutableSortedMapRulesRecipes$ImmutableSortedMapReverseOrderBuilderRecipe: Prefer
ImmutableSortedMap#reverseOrder()over the alternative that requires explicitly providing theComparator. - tech.picnic.errorprone.refasterrules.ImmutableSortedMapRulesRecipes$IterableToImmutableSortedMapRecipe: Prefer
ImmutableSortedMap#copyOf(Iterable)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSortedMapRulesRecipes$PairToImmutableSortedMapRecipe: Prefer
ImmutableSortedMap#of(Object, Object)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSortedMultisetRulesRecipes$EmptyImmutableSortedMultisetRecipe: Prefer
ImmutableSortedMultiset#of()over more contrived alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSortedMultisetRulesRecipes$ImmutableSortedMultisetBuilderRecipe: Prefer
ImmutableSortedMultiset#orderedBy(Comparator)over the associated constructor. - tech.picnic.errorprone.refasterrules.ImmutableSortedMultisetRulesRecipes$ImmutableSortedMultisetNaturalOrderBuilderRecipe: Prefer
ImmutableSortedMultiset#naturalOrder()over the alternative that requires explicitly providing theComparator. - tech.picnic.errorprone.refasterrules.ImmutableSortedMultisetRulesRecipes$ImmutableSortedMultisetReverseOrderBuilderRecipe: Prefer
ImmutableSortedMultiset#reverseOrder()over the alternative that requires explicitly providing theComparator. - tech.picnic.errorprone.refasterrules.ImmutableSortedMultisetRulesRecipes$IterableToImmutableSortedMultisetRecipe: Prefer
ImmutableSortedMultiset#copyOf(Iterable)and variants over more contrived alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSortedMultisetRulesRecipes$StreamToImmutableSortedMultisetRecipe: Prefer
ImmutableSortedMultiset#toImmutableSortedMultiset(Comparator)over less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSortedSetRulesRecipes$EmptyImmutableSortedSetRecipe: Prefer
ImmutableSortedSet#of()over more contrived alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSortedSetRulesRecipes$ImmutableSortedSetBuilderRecipe: Prefer
ImmutableSortedSet#orderedBy(Comparator)over the associated constructor. - tech.picnic.errorprone.refasterrules.ImmutableSortedSetRulesRecipes$ImmutableSortedSetNaturalOrderBuilderRecipe: Prefer
ImmutableSortedSet#naturalOrder()over the alternative that requires explicitly providing theComparator. - tech.picnic.errorprone.refasterrules.ImmutableSortedSetRulesRecipes$ImmutableSortedSetReverseOrderBuilderRecipe: Prefer
ImmutableSortedSet#reverseOrder()over the alternative that requires explicitly providing theComparator. - tech.picnic.errorprone.refasterrules.ImmutableSortedSetRulesRecipes$IterableToImmutableSortedSetRecipe: Prefer
ImmutableSortedSet#copyOf(Iterable)and variants over more contrived alternatives. - tech.picnic.errorprone.refasterrules.ImmutableSortedSetRulesRecipes$StreamToImmutableSortedSetRecipe: Prefer
ImmutableSortedSet#toImmutableSortedSet(Comparator)over less idiomatic alternatives. - tech.picnic.errorprone.refasterrules.ImmutableTableRulesRecipes$CellToImmutableTableRecipe: Prefer
ImmutableTable#of(Object, Object, Object)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.ImmutableTableRulesRecipes$ImmutableTableBuilderBuildOrThrowRecipe: Prefer
ImmutableTable.Builder#buildOrThrow()over the less explicitImmutableTable.Builder#build(). - tech.picnic.errorprone.refasterrules.ImmutableTableRulesRecipes$ImmutableTableBuilderPutRecipe: Prefer
ImmutableTable.Builder#put(Object, Object, Object)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.IntStreamRulesRecipes$ConcatOneIntStreamRecipe: Don't unnecessarily call
Streams#concat(IntStream...). - tech.picnic.errorprone.refasterrules.IntStreamRulesRecipes$ConcatTwoIntStreamsRecipe: Prefer
IntStream#concat(IntStream, IntStream)over the Guava alternative. - tech.picnic.errorprone.refasterrules.IntStreamRulesRecipes$IntStreamAllMatchRecipe: Recipe created for the following Refaster template:
static final class IntStreamAllMatch {
@BeforeTemplate
boolean before(IntStream stream, IntPredicate predicate) {
return stream.noneMatch(predicate.negate());
}
@AfterTemplate
boolean after(IntStream stream, IntPredicate predicate) {
return stream.allMatch(predicate);
}
}
.
- tech.picnic.errorprone.refasterrules.IntStreamRulesRecipes$IntStreamClosedOpenRangeRecipe: Prefer
IntStream#range(int, int)over the more contrived alternative. - tech.picnic.errorprone.refasterrules.IntStreamRulesRecipes$IntStreamIsEmptyRecipe: In order to test whether a stream has any element, simply try to find one.
- tech.picnic.errorprone.refasterrules.IntStreamRulesRecipes$IntStreamIsNotEmptyRecipe: In order to test whether a stream has any element, simply try to find one.
- tech.picnic.errorprone.refasterrules.IntStreamRulesRecipes$IntStreamNoneMatchRecipe: Prefer
IntStream#noneMatch(IntPredicate)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatBooleanArrayContainsExactlyRecipe: Recipe created for the following Refaster template:
static final class AssertThatBooleanArrayContainsExactly {
@BeforeTemplate
void before(boolean[] actual, boolean[] expected) {
assertArrayEquals(expected, actual);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(boolean[] actual, boolean[] expected) {
assertThat(actual).containsExactly(expected);
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatBooleanArrayWithFailMessageContainsExactlyRecipe: Recipe created for the following Refaster template:
static final class AssertThatBooleanArrayWithFailMessageContainsExactly {
@BeforeTemplate
void before(boolean[] actual, String message, boolean[] expected) {
assertArrayEquals(expected, actual, message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(boolean[] actual, String message, boolean[] expected) {
assertThat(actual).withFailMessage(message).containsExactly(expected);
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatBooleanArrayWithFailMessageSupplierContainsExactlyRecipe: Recipe created for the following Refaster template:
static final class AssertThatBooleanArrayWithFailMessageSupplierContainsExactly {
@BeforeTemplate
@SuppressWarnings(value = "java:S4449")
void before(boolean[] actual, Supplier<@Nullable String> message, boolean[] expected) {
assertArrayEquals(expected, actual, message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(boolean[] actual, Supplier<@Nullable String> message, boolean[] expected) {
assertThat(actual).withFailMessage(message).containsExactly(expected);
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatByteArrayContainsExactlyRecipe: Recipe created for the following Refaster template:
static final class AssertThatByteArrayContainsExactly {
@BeforeTemplate
void before(byte[] actual, byte[] expected) {
assertArrayEquals(expected, actual);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(byte[] actual, byte[] expected) {
assertThat(actual).containsExactly(expected);
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatByteArrayWithFailMessageContainsExactlyRecipe: Recipe created for the following Refaster template:
static final class AssertThatByteArrayWithFailMessageContainsExactly {
@BeforeTemplate
void before(byte[] actual, String message, byte[] expected) {
assertArrayEquals(expected, actual, message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(byte[] actual, String message, byte[] expected) {
assertThat(actual).withFailMessage(message).containsExactly(expected);
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatByteArrayWithFailMessageSupplierContainsExactlyRecipe: Recipe created for the following Refaster template:
static final class AssertThatByteArrayWithFailMessageSupplierContainsExactly {
@BeforeTemplate
@SuppressWarnings(value = "java:S4449")
void before(byte[] actual, Supplier<@Nullable String> message, byte[] expected) {
assertArrayEquals(expected, actual, message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(byte[] actual, Supplier<@Nullable String> message, byte[] expected) {
assertThat(actual).withFailMessage(message).containsExactly(expected);
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatCharArrayContainsExactlyRecipe: Recipe created for the following Refaster template:
static final class AssertThatCharArrayContainsExactly {
@BeforeTemplate
void before(char[] actual, char[] expected) {
assertArrayEquals(expected, actual);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(char[] actual, char[] expected) {
assertThat(actual).containsExactly(expected);
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatCharArrayWithFailMessageContainsExactlyRecipe: Recipe created for the following Refaster template:
static final class AssertThatCharArrayWithFailMessageContainsExactly {
@BeforeTemplate
void before(char[] actual, String message, char[] expected) {
assertArrayEquals(expected, actual, message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(char[] actual, String message, char[] expected) {
assertThat(actual).withFailMessage(message).containsExactly(expected);
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatCharArrayWithFailMessageSupplierContainsExactlyRecipe: Recipe created for the following Refaster template:
static final class AssertThatCharArrayWithFailMessageSupplierContainsExactly {
@BeforeTemplate
@SuppressWarnings(value = "java:S4449")
void before(char[] actual, Supplier<@Nullable String> message, char[] expected) {
assertArrayEquals(expected, actual, message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(char[] actual, Supplier<@Nullable String> message, char[] expected) {
assertThat(actual).withFailMessage(message).containsExactly(expected);
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatCodeDoesNotThrowAnyExceptionRecipe: Recipe created for the following Refaster template:
static final class AssertThatCodeDoesNotThrowAnyException {
@BeforeTemplate
void before(Executable throwingCallable) {
assertDoesNotThrow(throwingCallable);
}
@BeforeTemplate
void before(ThrowingSupplier<?> throwingCallable) {
assertDoesNotThrow(throwingCallable);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(ThrowingCallable throwingCallable) {
assertThatCode(throwingCallable).doesNotThrowAnyException();
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatCodeWithFailMessageStringDoesNotThrowAnyExceptionRecipe: Recipe created for the following Refaster template:
static final class AssertThatCodeWithFailMessageStringDoesNotThrowAnyException {
@BeforeTemplate
void before(Executable throwingCallable, String message) {
assertDoesNotThrow(throwingCallable, message);
}
@BeforeTemplate
void before(ThrowingSupplier<?> throwingCallable, String message) {
assertDoesNotThrow(throwingCallable, message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(ThrowingCallable throwingCallable, String message) {
assertThatCode(throwingCallable).withFailMessage(message).doesNotThrowAnyException();
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatCodeWithFailMessageSupplierDoesNotThrowAnyExceptionRecipe: Recipe created for the following Refaster template:
static final class AssertThatCodeWithFailMessageSupplierDoesNotThrowAnyException {
@BeforeTemplate
@SuppressWarnings(value = "java:S4449")
void before(Executable throwingCallable, Supplier<@Nullable String> supplier) {
assertDoesNotThrow(throwingCallable, supplier);
}
@BeforeTemplate
@SuppressWarnings(value = "java:S4449")
void before(ThrowingSupplier<?> throwingCallable, Supplier<@Nullable String> supplier) {
assertDoesNotThrow(throwingCallable, supplier);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(ThrowingCallable throwingCallable, Supplier<@Nullable String> supplier) {
assertThatCode(throwingCallable).withFailMessage(supplier).doesNotThrowAnyException();
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatDoubleArrayContainsExactlyRecipe: Recipe created for the following Refaster template:
static final class AssertThatDoubleArrayContainsExactly {
@BeforeTemplate
void before(double[] actual, double[] expected) {
assertArrayEquals(expected, actual);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(double[] actual, double[] expected) {
assertThat(actual).containsExactly(expected);
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatDoubleArrayContainsExactlyWithOffsetRecipe: Recipe created for the following Refaster template:
static final class AssertThatDoubleArrayContainsExactlyWithOffset {
@BeforeTemplate
void before(double[] actual, double[] expected, double delta) {
assertArrayEquals(expected, actual, delta);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(double[] actual, double[] expected, double delta) {
assertThat(actual).containsExactly(expected, offset(delta));
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatDoubleArrayWithFailMessageContainsExactlyRecipe: Recipe created for the following Refaster template:
static final class AssertThatDoubleArrayWithFailMessageContainsExactly {
@BeforeTemplate
void before(double[] actual, String message, double[] expected) {
assertArrayEquals(expected, actual, message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(double[] actual, String message, double[] expected) {
assertThat(actual).withFailMessage(message).containsExactly(expected);
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatDoubleArrayWithFailMessageContainsExactlyWithOffsetRecipe: Recipe created for the following Refaster template:
static final class AssertThatDoubleArrayWithFailMessageContainsExactlyWithOffset {
@BeforeTemplate
void before(double[] actual, String message, double[] expected, double delta) {
assertArrayEquals(expected, actual, delta, message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(double[] actual, String message, double[] expected, double delta) {
assertThat(actual).withFailMessage(message).containsExactly(expected, offset(delta));
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatDoubleArrayWithFailMessageSupplierContainsExactlyRecipe: Recipe created for the following Refaster template:
static final class AssertThatDoubleArrayWithFailMessageSupplierContainsExactly {
@BeforeTemplate
@SuppressWarnings(value = "java:S4449")
void before(double[] actual, Supplier<@Nullable String> message, double[] expected) {
assertArrayEquals(expected, actual, message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(double[] actual, Supplier<@Nullable String> message, double[] expected) {
assertThat(actual).withFailMessage(message).containsExactly(expected);
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatDoubleArrayWithFailMessageSupplierContainsExactlyWithOffsetRecipe: Recipe created for the following Refaster template:
static final class AssertThatDoubleArrayWithFailMessageSupplierContainsExactlyWithOffset {
@BeforeTemplate
@SuppressWarnings(value = "java:S4449")
void before(double[] actual, Supplier<@Nullable String> messageSupplier, double[] expected, double delta) {
assertArrayEquals(expected, actual, delta, messageSupplier);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(double[] actual, Supplier<@Nullable String> messageSupplier, double[] expected, double delta) {
assertThat(actual).withFailMessage(messageSupplier).containsExactly(expected, offset(delta));
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatFloatArrayContainsExactlyRecipe: Recipe created for the following Refaster template:
static final class AssertThatFloatArrayContainsExactly {
@BeforeTemplate
void before(float[] actual, float[] expected) {
assertArrayEquals(expected, actual);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(float[] actual, float[] expected) {
assertThat(actual).containsExactly(expected);
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatFloatArrayContainsExactlyWithOffsetRecipe: Recipe created for the following Refaster template:
static final class AssertThatFloatArrayContainsExactlyWithOffset {
@BeforeTemplate
void before(float[] actual, float[] expected, float delta) {
assertArrayEquals(expected, actual, delta);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(float[] actual, float[] expected, float delta) {
assertThat(actual).containsExactly(expected, offset(delta));
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatFloatArrayWithFailMessageContainsExactlyRecipe: Recipe created for the following Refaster template:
static final class AssertThatFloatArrayWithFailMessageContainsExactly {
@BeforeTemplate
void before(float[] actual, String message, float[] expected) {
assertArrayEquals(expected, actual, message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(float[] actual, String message, float[] expected) {
assertThat(actual).withFailMessage(message).containsExactly(expected);
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatFloatArrayWithFailMessageContainsExactlyWithOffsetRecipe: Recipe created for the following Refaster template:
static final class AssertThatFloatArrayWithFailMessageContainsExactlyWithOffset {
@BeforeTemplate
void before(float[] actual, String message, float[] expected, float delta) {
assertArrayEquals(expected, actual, delta, message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(float[] actual, String message, float[] expected, float delta) {
assertThat(actual).withFailMessage(message).containsExactly(expected, offset(delta));
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatFloatArrayWithFailMessageSupplierContainsExactlyRecipe: Recipe created for the following Refaster template:
static final class AssertThatFloatArrayWithFailMessageSupplierContainsExactly {
@BeforeTemplate
@SuppressWarnings(value = "java:S4449")
void before(float[] actual, Supplier<@Nullable String> message, float[] expected) {
assertArrayEquals(expected, actual, message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(float[] actual, Supplier<@Nullable String> message, float[] expected) {
assertThat(actual).withFailMessage(message).containsExactly(expected);
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatFloatArrayWithFailMessageSupplierContainsExactlyWithOffsetRecipe: Recipe created for the following Refaster template:
static final class AssertThatFloatArrayWithFailMessageSupplierContainsExactlyWithOffset {
@BeforeTemplate
@SuppressWarnings(value = "java:S4449")
void before(float[] actual, Supplier<@Nullable String> message, float[] expected, float delta) {
assertArrayEquals(expected, actual, delta, message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(float[] actual, Supplier<@Nullable String> message, float[] expected, float delta) {
assertThat(actual).withFailMessage(message).containsExactly(expected, offset(delta));
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatIntArrayContainsExactlyRecipe: Recipe created for the following Refaster template:
static final class AssertThatIntArrayContainsExactly {
@BeforeTemplate
void before(int[] actual, int[] expected) {
assertArrayEquals(expected, actual);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(int[] actual, int[] expected) {
assertThat(actual).containsExactly(expected);
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatIntArrayWithFailMessageContainsExactlyRecipe: Recipe created for the following Refaster template:
static final class AssertThatIntArrayWithFailMessageContainsExactly {
@BeforeTemplate
void before(int[] actual, String message, int[] expected) {
assertArrayEquals(expected, actual, message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(int[] actual, String message, int[] expected) {
assertThat(actual).withFailMessage(message).containsExactly(expected);
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatIntArrayWithFailMessageSupplierContainsExactlyRecipe: Recipe created for the following Refaster template:
static final class AssertThatIntArrayWithFailMessageSupplierContainsExactly {
@BeforeTemplate
@SuppressWarnings(value = "java:S4449")
void before(int[] actual, Supplier<@Nullable String> message, int[] expected) {
assertArrayEquals(expected, actual, message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(int[] actual, Supplier<@Nullable String> message, int[] expected) {
assertThat(actual).withFailMessage(message).containsExactly(expected);
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatLongArrayContainsExactlyRecipe: Recipe created for the following Refaster template:
static final class AssertThatLongArrayContainsExactly {
@BeforeTemplate
void before(long[] actual, long[] expected) {
assertArrayEquals(expected, actual);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(long[] actual, long[] expected) {
assertThat(actual).containsExactly(expected);
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatLongArrayWithFailMessageContainsExactlyRecipe: Recipe created for the following Refaster template:
static final class AssertThatLongArrayWithFailMessageContainsExactly {
@BeforeTemplate
void before(long[] actual, String message, long[] expected) {
assertArrayEquals(expected, actual, message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(long[] actual, String message, long[] expected) {
assertThat(actual).withFailMessage(message).containsExactly(expected);
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatLongArrayWithFailMessageSupplierContainsExactlyRecipe: Recipe created for the following Refaster template:
static final class AssertThatLongArrayWithFailMessageSupplierContainsExactly {
@BeforeTemplate
@SuppressWarnings(value = "java:S4449")
void before(long[] actual, Supplier<@Nullable String> message, long[] expected) {
assertArrayEquals(expected, actual, message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(long[] actual, Supplier<@Nullable String> message, long[] expected) {
assertThat(actual).withFailMessage(message).containsExactly(expected);
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatObjectArrayContainsExactlyRecipe: Recipe created for the following Refaster template:
static final class AssertThatObjectArrayContainsExactly {
@BeforeTemplate
void before(Object[] actual, Object[] expected) {
assertArrayEquals(expected, actual);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(Object[] actual, Object[] expected) {
assertThat(actual).containsExactly(expected);
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatObjectArrayWithFailMessageContainsExactlyRecipe: Recipe created for the following Refaster template:
static final class AssertThatObjectArrayWithFailMessageContainsExactly {
@BeforeTemplate
void before(Object[] actual, String message, Object[] expected) {
assertArrayEquals(expected, actual, message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(Object[] actual, String message, Object[] expected) {
assertThat(actual).withFailMessage(message).containsExactly(expected);
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatObjectArrayWithFailMessageSupplierContainsExactlyRecipe: Recipe created for the following Refaster template:
static final class AssertThatObjectArrayWithFailMessageSupplierContainsExactly {
@BeforeTemplate
@SuppressWarnings(value = "java:S4449")
void before(Object[] actual, Supplier<@Nullable String> message, Object[] expected) {
assertArrayEquals(expected, actual, message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(Object[] actual, Supplier<@Nullable String> message, Object[] expected) {
assertThat(actual).withFailMessage(message).containsExactly(expected);
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatShortArrayContainsExactlyRecipe: Recipe created for the following Refaster template:
static final class AssertThatShortArrayContainsExactly {
@BeforeTemplate
void before(short[] actual, short[] expected) {
assertArrayEquals(expected, actual);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(short[] actual, short[] expected) {
assertThat(actual).containsExactly(expected);
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatShortArrayWithFailMessageContainsExactlyRecipe: Recipe created for the following Refaster template:
static final class AssertThatShortArrayWithFailMessageContainsExactly {
@BeforeTemplate
void before(short[] actual, String message, short[] expected) {
assertArrayEquals(expected, actual, message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(short[] actual, String message, short[] expected) {
assertThat(actual).withFailMessage(message).containsExactly(expected);
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatShortArrayWithFailMessageSupplierContainsExactlyRecipe: Recipe created for the following Refaster template:
static final class AssertThatShortArrayWithFailMessageSupplierContainsExactly {
@BeforeTemplate
@SuppressWarnings(value = "java:S4449")
void before(short[] actual, Supplier<@Nullable String> message, short[] expected) {
assertArrayEquals(expected, actual, message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(short[] actual, Supplier<@Nullable String> message, short[] expected) {
assertThat(actual).withFailMessage(message).containsExactly(expected);
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatThrownByIsExactlyInstanceOfRecipe: Recipe created for the following Refaster template:
static final class AssertThatThrownByIsExactlyInstanceOf<T extends Throwable> {
@BeforeTemplate
void before(Executable throwingCallable, Class<T> clazz) {
assertThrowsExactly(clazz, throwingCallable);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(ThrowingCallable throwingCallable, Class<T> clazz) {
assertThatThrownBy(throwingCallable).isExactlyInstanceOf(clazz);
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatThrownByIsInstanceOfRecipe: Recipe created for the following Refaster template:
static final class AssertThatThrownByIsInstanceOf<T extends Throwable> {
@BeforeTemplate
void before(Executable throwingCallable, Class<T> clazz) {
assertThrows(clazz, throwingCallable);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(ThrowingCallable throwingCallable, Class<T> clazz) {
assertThatThrownBy(throwingCallable).isInstanceOf(clazz);
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatThrownByWithFailMessageStringIsExactlyInstanceOfRecipe: Recipe created for the following Refaster template:
static final class AssertThatThrownByWithFailMessageStringIsExactlyInstanceOf<T extends Throwable> {
@BeforeTemplate
void before(Executable throwingCallable, String message, Class<T> clazz) {
assertThrowsExactly(clazz, throwingCallable, message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(ThrowingCallable throwingCallable, String message, Class<T> clazz) {
assertThatThrownBy(throwingCallable).withFailMessage(message).isExactlyInstanceOf(clazz);
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatThrownByWithFailMessageStringIsInstanceOfRecipe: Recipe created for the following Refaster template:
static final class AssertThatThrownByWithFailMessageStringIsInstanceOf<T extends Throwable> {
@BeforeTemplate
void before(Executable throwingCallable, String message, Class<T> clazz) {
assertThrows(clazz, throwingCallable, message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(ThrowingCallable throwingCallable, String message, Class<T> clazz) {
assertThatThrownBy(throwingCallable).withFailMessage(message).isInstanceOf(clazz);
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatThrownByWithFailMessageSupplierIsExactlyInstanceOfRecipe: Recipe created for the following Refaster template:
static final class AssertThatThrownByWithFailMessageSupplierIsExactlyInstanceOf<T extends Throwable> {
@BeforeTemplate
@SuppressWarnings(value = "java:S4449")
void before(Executable throwingCallable, Supplier<@Nullable String> supplier, Class<T> clazz) {
assertThrowsExactly(clazz, throwingCallable, supplier);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(ThrowingCallable throwingCallable, Supplier<@Nullable String> supplier, Class<T> clazz) {
assertThatThrownBy(throwingCallable).withFailMessage(supplier).isExactlyInstanceOf(clazz);
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatThrownByWithFailMessageSupplierIsInstanceOfRecipe: Recipe created for the following Refaster template:
static final class AssertThatThrownByWithFailMessageSupplierIsInstanceOf<T extends Throwable> {
@BeforeTemplate
@SuppressWarnings(value = "java:S4449")
void before(Executable throwingCallable, Supplier<@Nullable String> supplier, Class<T> clazz) {
assertThrows(clazz, throwingCallable, supplier);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(ThrowingCallable throwingCallable, Supplier<@Nullable String> supplier, Class<T> clazz) {
assertThatThrownBy(throwingCallable).withFailMessage(supplier).isInstanceOf(clazz);
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageStringIsFalseRecipe: Recipe created for the following Refaster template:
static final class AssertThatWithFailMessageStringIsFalse {
@BeforeTemplate
void before(boolean actual, String message) {
assertFalse(actual, message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(boolean actual, String message) {
assertThat(actual).withFailMessage(message).isFalse();
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageStringIsInstanceOfRecipe: Recipe created for the following Refaster template:
static final class AssertThatWithFailMessageStringIsInstanceOf<T> {
@BeforeTemplate
void before(Object actual, String message, Class<T> clazz) {
assertInstanceOf(clazz, actual, message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(Object actual, String message, Class<T> clazz) {
assertThat(actual).withFailMessage(message).isInstanceOf(clazz);
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageStringIsNotNullRecipe: Recipe created for the following Refaster template:
static final class AssertThatWithFailMessageStringIsNotNull {
@BeforeTemplate
void before(Object actual, String message) {
assertNotNull(actual, message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(Object actual, String message) {
assertThat(actual).withFailMessage(message).isNotNull();
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageStringIsNotSameAsRecipe: Recipe created for the following Refaster template:
static final class AssertThatWithFailMessageStringIsNotSameAs {
@BeforeTemplate
void before(Object actual, String message, Object expected) {
assertNotSame(expected, actual, message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(Object actual, String message, Object expected) {
assertThat(actual).withFailMessage(message).isNotSameAs(expected);
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageStringIsNullRecipe: Recipe created for the following Refaster template:
static final class AssertThatWithFailMessageStringIsNull {
@BeforeTemplate
void before(Object actual, String message) {
assertNull(actual, message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(Object actual, String message) {
assertThat(actual).withFailMessage(message).isNull();
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageStringIsSameAsRecipe: Recipe created for the following Refaster template:
static final class AssertThatWithFailMessageStringIsSameAs {
@BeforeTemplate
void before(Object actual, String message, Object expected) {
assertSame(expected, actual, message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(Object actual, String message, Object expected) {
assertThat(actual).withFailMessage(message).isSameAs(expected);
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageStringIsTrueRecipe: Recipe created for the following Refaster template:
static final class AssertThatWithFailMessageStringIsTrue {
@BeforeTemplate
void before(boolean actual, String message) {
assertTrue(actual, message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(boolean actual, String message) {
assertThat(actual).withFailMessage(message).isTrue();
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageSupplierIsFalseRecipe: Recipe created for the following Refaster template:
static final class AssertThatWithFailMessageSupplierIsFalse {
@BeforeTemplate
@SuppressWarnings(value = "java:S4449")
void before(boolean actual, Supplier<@Nullable String> supplier) {
assertFalse(actual, supplier);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(boolean actual, Supplier<@Nullable String> supplier) {
assertThat(actual).withFailMessage(supplier).isFalse();
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageSupplierIsInstanceOfRecipe: Recipe created for the following Refaster template:
static final class AssertThatWithFailMessageSupplierIsInstanceOf<T> {
@BeforeTemplate
@SuppressWarnings(value = "java:S4449")
void before(Object actual, Supplier<@Nullable String> supplier, Class<T> clazz) {
assertInstanceOf(clazz, actual, supplier);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(Object actual, Supplier<@Nullable String> supplier, Class<T> clazz) {
assertThat(actual).withFailMessage(supplier).isInstanceOf(clazz);
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageSupplierIsNotNullRecipe: Recipe created for the following Refaster template:
static final class AssertThatWithFailMessageSupplierIsNotNull {
@BeforeTemplate
@SuppressWarnings(value = "java:S4449")
void before(Object actual, Supplier<@Nullable String> supplier) {
assertNotNull(actual, supplier);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(Object actual, Supplier<@Nullable String> supplier) {
assertThat(actual).withFailMessage(supplier).isNotNull();
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageSupplierIsNotSameAsRecipe: Recipe created for the following Refaster template:
static final class AssertThatWithFailMessageSupplierIsNotSameAs {
@BeforeTemplate
@SuppressWarnings(value = "java:S4449")
void before(Object actual, Supplier<@Nullable String> supplier, Object expected) {
assertNotSame(expected, actual, supplier);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(Object actual, Supplier<@Nullable String> supplier, Object expected) {
assertThat(actual).withFailMessage(supplier).isNotSameAs(expected);
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageSupplierIsNullRecipe: Recipe created for the following Refaster template:
static final class AssertThatWithFailMessageSupplierIsNull {
@BeforeTemplate
@SuppressWarnings(value = "java:S4449")
void before(Object actual, Supplier<@Nullable String> supplier) {
assertNull(actual, supplier);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(Object actual, Supplier<@Nullable String> supplier) {
assertThat(actual).withFailMessage(supplier).isNull();
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageSupplierIsSameAsRecipe: Recipe created for the following Refaster template:
static final class AssertThatWithFailMessageSupplierIsSameAs {
@BeforeTemplate
@SuppressWarnings(value = "java:S4449")
void before(Object actual, Supplier<@Nullable String> supplier, Object expected) {
assertSame(expected, actual, supplier);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(Object actual, Supplier<@Nullable String> supplier, Object expected) {
assertThat(actual).withFailMessage(supplier).isSameAs(expected);
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageSupplierIsTrueRecipe: Recipe created for the following Refaster template:
static final class AssertThatWithFailMessageSupplierIsTrue {
@BeforeTemplate
@SuppressWarnings(value = "java:S4449")
void before(boolean actual, Supplier<@Nullable String> supplier) {
assertTrue(actual, supplier);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(boolean actual, Supplier<@Nullable String> supplier) {
assertThat(actual).withFailMessage(supplier).isTrue();
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$FailWithMessageAndThrowableRecipe: Recipe created for the following Refaster template:
static final class FailWithMessageAndThrowable<T> {
@BeforeTemplate
T before(String message, Throwable throwable) {
return Assertions.fail(message, throwable);
}
@AfterTemplate
T after(String message, Throwable throwable) {
return fail(message, throwable);
}
}
.
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$FailWithMessageRecipe: Recipe created for the following Refaster template:
static final class FailWithMessage<T> {
@BeforeTemplate
T before(String message) {
return Assertions.fail(message);
}
@AfterTemplate
T after(String message) {
return fail(message);
}
}
.
- tech.picnic.errorprone.refasterrules.Jackson2RulesRecipes$ObjectMapperConvertValueWithClassRecipe: Prefer
ObjectMapper#convertValue(Object, Class)over more contrived and less efficient alternatives. - tech.picnic.errorprone.refasterrules.Jackson2RulesRecipes$ObjectMapperConvertValueWithJavaTypeRecipe: Prefer
ObjectMapper#convertValue(Object, JavaType)over more contrived and less efficient alternatives. - tech.picnic.errorprone.refasterrules.Jackson2RulesRecipes$ObjectMapperConvertValueWithTypeReferenceRecipe: Prefer
ObjectMapper#convertValue(Object, TypeReference)over more contrived and less efficient alternatives. - tech.picnic.errorprone.refasterrules.Jackson3RulesRecipes$ObjectMapperConvertValueWithClassRecipe: Prefer
ObjectMapper#convertValue(Object, Class)over more contrived and less efficient alternatives. - tech.picnic.errorprone.refasterrules.Jackson3RulesRecipes$ObjectMapperConvertValueWithJavaTypeRecipe: Prefer
ObjectMapper#convertValue(Object, JavaType)over more contrived and less efficient alternatives. - tech.picnic.errorprone.refasterrules.Jackson3RulesRecipes$ObjectMapperConvertValueWithTypeReferenceRecipe: Prefer
ObjectMapper#convertValue(Object, TypeReference)over more contrived and less efficient alternatives. - tech.picnic.errorprone.refasterrules.LongStreamRulesRecipes$ConcatOneLongStreamRecipe: Don't unnecessarily call
Streams#concat(LongStream...). - tech.picnic.errorprone.refasterrules.LongStreamRulesRecipes$ConcatTwoLongStreamsRecipe: Prefer
LongStream#concat(LongStream, LongStream)over the Guava alternative. - tech.picnic.errorprone.refasterrules.LongStreamRulesRecipes$LongStreamAllMatchRecipe: Recipe created for the following Refaster template:
static final class LongStreamAllMatch {
@BeforeTemplate
boolean before(LongStream stream, LongPredicate predicate) {
return stream.noneMatch(predicate.negate());
}
@AfterTemplate
boolean after(LongStream stream, LongPredicate predicate) {
return stream.allMatch(predicate);
}
}
.
- tech.picnic.errorprone.refasterrules.LongStreamRulesRecipes$LongStreamClosedOpenRangeRecipe: Prefer
LongStream#range(long, long)over the more contrived alternative. - tech.picnic.errorprone.refasterrules.LongStreamRulesRecipes$LongStreamIsEmptyRecipe: In order to test whether a stream has any element, simply try to find one.
- tech.picnic.errorprone.refasterrules.LongStreamRulesRecipes$LongStreamIsNotEmptyRecipe: In order to test whether a stream has any element, simply try to find one.
- tech.picnic.errorprone.refasterrules.LongStreamRulesRecipes$LongStreamNoneMatchRecipe: Prefer
LongStream#noneMatch(LongPredicate)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.MapEntryRulesRecipes$MapEntryComparingByKeyRecipe: Prefer
Map.Entry#comparingByKey()over more verbose alternatives. - tech.picnic.errorprone.refasterrules.MapEntryRulesRecipes$MapEntryComparingByKeyWithCustomComparatorRecipe: Prefer
Map.Entry#comparingByKey(Comparator)over more verbose alternatives. - tech.picnic.errorprone.refasterrules.MapEntryRulesRecipes$MapEntryComparingByValueRecipe: Prefer
Map.Entry#comparingByValue()over more verbose alternatives. - tech.picnic.errorprone.refasterrules.MapEntryRulesRecipes$MapEntryComparingByValueWithCustomComparatorRecipe: Prefer
Map.Entry#comparingByValue(Comparator)over more verbose alternatives. - tech.picnic.errorprone.refasterrules.MapRulesRecipes$MapGetOrNullRecipe: Recipe created for the following Refaster template:
static final class MapGetOrNull<K, V, T> {
@BeforeTemplate
@Nullable
V before(Map<K, V> map, T key) {
return map.getOrDefault(key, null);
}
@AfterTemplate
@Nullable
V after(Map<K, V> map, T key) {
return map.get(key);
}
}
.
- tech.picnic.errorprone.refasterrules.MapRulesRecipes$MapKeyStreamRecipe: Don't unnecessarily use
Map#entrySet(). - tech.picnic.errorprone.refasterrules.MapRulesRecipes$MapValueStreamRecipe: Don't unnecessarily use
Map#entrySet(). - tech.picnic.errorprone.refasterrules.MockitoRulesRecipes$InvocationOnMockGetArgumentsRecipe: Recipe created for the following Refaster template:
static final class InvocationOnMockGetArguments {
@BeforeTemplate
Object before(InvocationOnMock invocation, int i) {
return invocation.getArguments()[i];
}
@AfterTemplate
Object after(InvocationOnMock invocation, int i) {
return invocation.getArgument(i);
}
}
.
- tech.picnic.errorprone.refasterrules.MockitoRulesRecipes$VerifyOnceRecipe: Prefer
Mockito#verify(Object)over explicitly specifying that the associated invocation must happen precisely once; this is the default behavior. - tech.picnic.errorprone.refasterrules.NullRulesRecipes$IsNotNullRecipe: Prefer the
!=operator (withnullas the second operand) overObjects#nonNull(Object). - tech.picnic.errorprone.refasterrules.NullRulesRecipes$IsNullFunctionRecipe: Prefer
Objects#isNull(Object)over the equivalent lambda function or more contrived alternatives. - tech.picnic.errorprone.refasterrules.NullRulesRecipes$IsNullRecipe: Prefer the
==operator (withnullas the second operand) overObjects#isNull(Object). - tech.picnic.errorprone.refasterrules.NullRulesRecipes$NonNullFunctionRecipe: Prefer
Objects#nonNull(Object)over the equivalent lambda function or more contrived alternatives. - tech.picnic.errorprone.refasterrules.OptionalRulesRecipes$MapOptionalToBooleanRecipe: Prefer
Optional#filter(Predicate)overOptional#map(Function)when converting anOptionalto a boolean. - tech.picnic.errorprone.refasterrules.OptionalRulesRecipes$OptionalEqualsOptionalRecipe: Prefer
Optional#equals(Object)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.OptionalRulesRecipes$OptionalFirstIteratorElementRecipe: Don't use the ternary operator to extract the first element of a possibly-empty
Iteratoras anOptional. - tech.picnic.errorprone.refasterrules.OptionalRulesRecipes$OptionalMapRecipe: Avoid unnecessary
OptionaltoStreamconversion when mapping a value of the former type. - tech.picnic.errorprone.refasterrules.OptionalRulesRecipes$OptionalOrElseThrowMethodReferenceRecipe: Prefer
Optional#orElseThrow()over the less explicitOptional#get(). - tech.picnic.errorprone.refasterrules.OptionalRulesRecipes$OptionalOrOtherOptionalRecipe: Prefer
Optional#or(Supplier)over more verbose alternatives. - tech.picnic.errorprone.refasterrules.OptionalRulesRecipes$OrOrElseThrowRecipe: Recipe created for the following Refaster template:
static final class OrOrElseThrow<T> {
@BeforeTemplate
T before(Optional<T> o1, Optional<T> o2) {
return o1.orElseGet(()->o2.orElseThrow());
}
@AfterTemplate
T after(Optional<T> o1, Optional<T> o2) {
return o1.or(()->o2).orElseThrow();
}
}
.
- tech.picnic.errorprone.refasterrules.OptionalRulesRecipes$StreamFlatMapOptionalRecipe: Flatten a stream of
Optionals usingOptional#stream(), rather than using one of the more verbose alternatives. - tech.picnic.errorprone.refasterrules.PreconditionsRulesRecipes$RequireNonNullRecipe: Prefer
Objects#requireNonNull(Object)over non-JDK alternatives. - tech.picnic.errorprone.refasterrules.PreconditionsRulesRecipes$RequireNonNullWithMessageRecipe: Prefer
Objects#requireNonNull(Object, String)over non-JDK alternatives. - tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes$ArraysCompareUnsignedBytesRecipe: Prefer JDK's
Arrays#compareUnsigned(byte[], byte[])over third-party alternatives. - tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes$ArraysCompareUnsignedIntsRecipe: Prefer JDK's
Arrays#compareUnsigned(int[], int[])over third-party alternatives. - tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes$ArraysCompareUnsignedLongsRecipe: Prefer JDK's
Arrays#compareUnsigned(long[], long[])over third-party alternatives. - tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes$IntegerParseUnsignedIntWithRadixRecipe: Prefer JDK's
Integer#parseUnsignedInt(String, int)over third-party alternatives. - tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes$IntegerToUnsignedStringWithRadixRecipe: Prefer JDK's
Integer#toUnsignedString(int,int)over third-party alternatives. - tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes$LongParseUnsignedLongWithRadixRecipe: Prefer JDK's
Long#parseUnsignedLong(String, int)over third-party alternatives. - tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes$LongToIntExactRecipe: Prefer
Math#toIntExact(long)over the Guava alternative. - tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes$LongToUnsignedStringWithRadixRecipe: Prefer JDK's
Long#toUnsignedString(long,int)over third-party alternatives. - tech.picnic.errorprone.refasterrules.RandomGeneratorRulesRecipes$RandomGeneratorNextDoubleWithOriginRecipe: Prefer
RandomGenerator#nextDouble(double origin, double bound)over alternatives that may silently yield an ununiform domain of values. - tech.picnic.errorprone.refasterrules.RandomGeneratorRulesRecipes$RandomGeneratorNextIntWithOriginRecipe: Prefer
RandomGenerator#nextInt(int origin, int bound)over alternatives that may silently yield values outside the intended domain. - tech.picnic.errorprone.refasterrules.RandomGeneratorRulesRecipes$RandomGeneratorNextLongWithOriginRecipe: Prefer
RandomGenerator#nextLong(long origin, long bound)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$ConcatMapIterableIdentityRecipe: Prefer
Flux#concatMapIterable(Function)over alternatives that require an additional subscription. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$ConcatMapIterableIdentityWithPrefetchRecipe: Prefer
Flux#concatMapIterable(Function, int)over alternatives that require an additional subscription. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxAsStepVerifierExpectNextRecipe: Avoid list collection when verifying that a
Fluxemits exactly one value. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxDeferredErrorRecipe: Don't unnecessarily defer
Flux#error(Throwable). - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxFromStreamSupplierRecipe: Prefer
Flux#fromStream(Supplier)overFlux#fromStream(Stream), as the former yields aFluxthat is more likely to behave as expected when subscribed to more than once. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxJustArrayRecipe: Prefer
Flux#just(Object[])over more contrived alternatives. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxMapNotNullOrElseRecipe: Prefer
Flux#mapNotNull(Function)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxOnErrorCompletePredicateRecipe: Prefer
Flux#onErrorComplete(Predicate)} over more contrived alternatives. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxSwitchIfEmptyOfEmptyPublisherRecipe: Don't unnecessarily pass an empty publisher to
Flux#switchIfEmpty(Publisher). - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxThenMonoRecipe: Avoid vacuous invocations of
Flux#ignoreElements(). - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxTransformMaxRecipe: Prefer
MathFlux#max(Publisher)over less efficient alternatives. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxTransformMaxWithComparatorRecipe: Prefer
MathFlux#max(Publisher, Comparator)over less efficient or more verbose alternatives. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxTransformMinRecipe: Prefer
MathFlux#min(Publisher)over less efficient alternatives. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxTransformMinWithComparatorRecipe: Prefer
MathFlux#min(Publisher, Comparator)over less efficient or more verbose alternatives. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxZipWithCombinatorRecipe: Prefer
Flux#zip(Publisher, Publisher)with a chained combinator over a chainedFlux#zipWith(Publisher, BiFunction), as the former better conveys that thePublishers may be subscribed to concurrently, and generalizes to combining three or more reactive streams. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxZipWithIterableBiFunctionRecipe: Prefer
Flux#zipWithIterable(Iterable, BiFunction)over more contrived alternatives. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoDeferredErrorRecipe: Don't unnecessarily defer
Mono#error(Throwable). - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoFromFutureAsyncLoadingCacheGetAllRecipe: Don't propagate
Monocancellations to upstream cache value computations, as completion of such computations may benefit concurrent or subsequent cache usages. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoFromFutureAsyncLoadingCacheGetRecipe: Don't propagate
Monocancellations to an upstream cache value computation, as completion of such computations may benefit concurrent or subsequent cache usages. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoFromFutureSupplierBooleanRecipe: Prefer
Mono#fromFuture(Supplier, boolean)overMono#fromFuture(CompletableFuture, boolean), as the former may defer initiation of the asynchronous computation until subscription. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoFromFutureSupplierRecipe: Prefer
Mono#fromFuture(Supplier)overMono#fromFuture(CompletableFuture), as the former may defer initiation of the asynchronous computation until subscription. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoFromOptionalSwitchIfEmptyRecipe: In particular, avoid mixing of the
OptionalandMonoAPIs. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoOnErrorCompleteClassRecipe: Prefer
Mono#onErrorComplete(Class)} over more contrived alternatives. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoOnErrorCompletePredicateRecipe: Prefer
Mono#onErrorComplete(Predicate)} over more contrived alternatives. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoThenMonoFluxRecipe: Prefer explicit invocation of
Mono#flux()over implicit conversions fromMonotoFlux. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoThenMonoRecipe: Avoid vacuous operations prior to invocation of
Mono#then(Mono). - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoTimeoutDurationMonoEmptyRecipe: Prefer
Mono#timeout(Duration, Mono)over more contrived or less performant alternatives. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoTimeoutDurationMonoJustRecipe: Prefer
Mono#timeout(Duration, Mono)over more contrived or less performant alternatives. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoTimeoutPublisherMonoEmptyRecipe: Prefer
Mono#timeout(Publisher, Mono)over more contrived or less performant alternatives. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoTimeoutPublisherMonoJustRecipe: Prefer
Mono#timeout(Publisher, Mono)over more contrived or less performant alternatives. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoZipWithCombinatorRecipe: Prefer
Mono#zip(Mono, Mono)with a chained combinator over a chainedMono#zipWith(Mono, BiFunction), as the former better conveys that theMonos may be subscribed to concurrently, and generalizes to combining three or more reactive streams. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$StepVerifierFromFluxRecipe: Prefer
Flux#as(Function)when creating aStepVerifier. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$StepVerifierFromMonoRecipe: Prefer
Mono#as(Function)when creating aStepVerifier. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$StepVerifierLastStepVerifyCompleteRecipe: Prefer
StepVerifier.LastStep#verifyComplete()over more verbose alternatives. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$StepVerifierLastStepVerifyErrorClassRecipe: Prefer
StepVerifier.LastStep#verifyError(Class)over more verbose alternatives. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$StepVerifierLastStepVerifyErrorMatchesRecipe: Prefer
StepVerifier.LastStep#verifyErrorMatches(Predicate)over more verbose alternatives. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$StepVerifierLastStepVerifyErrorMessageRecipe: Prefer
StepVerifier.LastStep#verifyErrorMessage(String)over more verbose alternatives. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$StepVerifierLastStepVerifyErrorRecipe: Prefer
StepVerifier.LastStep#verifyError()over more verbose alternatives. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$StepVerifierLastStepVerifyErrorSatisfiesAssertJRecipe: Prefer
StepVerifier.LastStep#verifyErrorSatisfies(Consumer)with AssertJ over more contrived alternatives. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$StepVerifierLastStepVerifyErrorSatisfiesRecipe: Prefer
StepVerifier.LastStep#verifyErrorSatisfies(Consumer)over more verbose alternatives. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$StepVerifierLastStepVerifyTimeoutRecipe: Prefer
StepVerifier.LastStep#verifyTimeout(Duration)over more verbose alternatives. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$StepVerifierStepExpectNextRecipe: Prefer
StepVerifier.Step#expectNext(Object)over more verbose alternatives. - tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$StepVerifierVerifyDurationRecipe: Prefer
StepVerifier#verify(Duration)over a danglingStepVerifier#verifyThenAssertThat(Duration). - tech.picnic.errorprone.refasterrules.RxJava2AdapterRulesRecipes$CompletableToMonoRecipe: Use the fluent API style when using
RxJava2Adapter#completableToMono. - tech.picnic.errorprone.refasterrules.RxJava2AdapterRulesRecipes$FlowableToFluxRecipe: Use
RxJava2Adapter#flowableToFluxto convert aFlowableto aFlux, and do so using the fluent API style. - tech.picnic.errorprone.refasterrules.RxJava2AdapterRulesRecipes$FluxToFlowableRecipe: Use
RxJava2Adapter#fluxToFlowableto convert aFluxto aFlowable, and do so using the fluent API style. - tech.picnic.errorprone.refasterrules.RxJava2AdapterRulesRecipes$FluxToObservableRecipe: Use
RxJava2Adapter#fluxToObservableto convert aFluxto aObservable, and do so using the fluent API style. - tech.picnic.errorprone.refasterrules.RxJava2AdapterRulesRecipes$MaybeToMonoRecipe: Use the fluent API style when using
RxJava2Adapter#maybeToMono. - tech.picnic.errorprone.refasterrules.RxJava2AdapterRulesRecipes$MonoToCompletableRecipe: Use
RxJava2Adapter#monoToCompletableto convert aMonoto aCompletable, and do so using the fluent API style. - tech.picnic.errorprone.refasterrules.RxJava2AdapterRulesRecipes$MonoToFlowableRecipe: Use
RxJava2Adapter#monoToFlowableto convert aMonoto aFlowable, and do so using the fluent API style. - tech.picnic.errorprone.refasterrules.RxJava2AdapterRulesRecipes$MonoToMaybeRecipe: Use the fluent API style when using
RxJava2Adapter#monoToMaybe. - tech.picnic.errorprone.refasterrules.RxJava2AdapterRulesRecipes$MonoToSingleRecipe: Use
RxJava2Adapter#monoToSingleto convert aMonoto aSingle, and do so using the fluent API style. - tech.picnic.errorprone.refasterrules.RxJava2AdapterRulesRecipes$ObservableToFluxRecipe: Use the fluent API style when using
RxJava2Adapter#observableToFlux. - tech.picnic.errorprone.refasterrules.RxJava2AdapterRulesRecipes$SingleToMonoRecipe: Use the fluent API style when using
RxJava2Adapter#singleToMono. - tech.picnic.errorprone.refasterrules.SpringTestRulesRecipes$BodyContentSpecJsonLenientRecipe: Prefer
BodyContentSpec#json(String, JsonCompareMode)over alternatives that implicitly perform aJsonCompareMode#LENIENT lenientcomparison or are deprecated. - tech.picnic.errorprone.refasterrules.SpringTestRulesRecipes$BodyContentSpecJsonStrictRecipe: Prefer
BodyContentSpec#json(String, JsonCompareMode)over the deprecated alternative. - tech.picnic.errorprone.refasterrules.StreamRulesRecipes$ConcatOneStreamRecipe: Don't unnecessarily call
Streams#concat(Stream...). - tech.picnic.errorprone.refasterrules.StreamRulesRecipes$ConcatTwoStreamsRecipe: Prefer
Stream#concat(Stream, Stream)over the Guava alternative. - tech.picnic.errorprone.refasterrules.StreamRulesRecipes$StreamMapFilterRecipe: Prefer an unconditional
Map#get(Object)call followed by anullcheck over a call toMap#containsKey(Object), as the former avoids a second lookup operation. - tech.picnic.errorprone.refasterrules.StreamRulesRecipes$StreamMapFirstRecipe: Where possible, clarify that a mapping operation will be applied only to a single stream element.
- tech.picnic.errorprone.refasterrules.StreamRulesRecipes$StreamReduceWithIdentityRecipe: Recipe created for the following Refaster template:
static final class StreamReduceWithIdentity<T> {
@BeforeTemplate
@SuppressWarnings(value = "java:S4266")
T before(Stream<T> stream, T identity, BinaryOperator<T> accumulator) {
return stream.collect(reducing(identity, accumulator));
}
@AfterTemplate
T after(Stream<T> stream, T identity, BinaryOperator<T> accumulator) {
return stream.reduce(identity, accumulator);
}
}
.
- tech.picnic.errorprone.refasterrules.StringRulesRecipes$FilterEmptyStringRecipe: Recipe created for the following Refaster template:
static final class FilterEmptyString {
@BeforeTemplate
Optional<String> before(Optional<String> optional) {
return optional.map(Strings::emptyToNull);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
Optional<String> after(Optional<String> optional) {
return optional.filter(not(String::isEmpty));
}
}
.
- tech.picnic.errorprone.refasterrules.StringRulesRecipes$JoinStringsRecipe: Prefer
String#join(CharSequence, Iterable)and variants over the Guava alternative. - tech.picnic.errorprone.refasterrules.StringRulesRecipes$NewStringFromCharArrayRecipe: Prefer direct invocation of
String#String(char[])over the indirection introduced by alternatives. - tech.picnic.errorprone.refasterrules.StringRulesRecipes$NewStringFromCharArraySubSequenceRecipe: Prefer direct invocation of
String#String(char[], int, int)over the indirection introduced by alternatives. - tech.picnic.errorprone.refasterrules.StringRulesRecipes$OptionalNonEmptyStringRecipe: Don't use the ternary operator to create an optionally-absent string.
- tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringFormattedRecipe: Prefer
String#formatted(Object...)overString#format(String, Object...), as the former works more nicely with text blocks, while the latter does not appear advantageous in any circumstance (assuming one targets JDK 15+). - tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIndexOfCharBetweenIndicesRecipe: Prefer
String#indexOf(int, int, int)over less efficient alternatives. - tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIndexOfCharFromIndexRecipe: Prefer
String#indexOf(int, int)over less efficient alternatives. - tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIndexOfStringBetweenIndicesRecipe: Prefer
String#indexOf(String, int)over less efficient alternatives. - tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIndexOfStringFromIndexRecipe: Prefer
String#indexOf(String, int)over less efficient alternatives. - tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIsEmptyPredicateRecipe: Prefer a method reference to
String#isEmpty()over the equivalent lambda function. - tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIsNotEmptyPredicateRecipe: Prefer a method reference to
String#isEmpty()over the equivalent lambda function. - tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIsNullOrEmptyRecipe: Prefer
Strings#isNullOrEmpty(String)over the more verbose alternative. - tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringJoinDelimiterVarargsRecipe: Prefer
String#join(CharSequence, CharSequence...)over less efficient alternatives. - tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringLastIndexOfCharRecipe: Prefer
String#lastIndexOf(int, int)over less efficient alternatives. - tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringLastIndexOfCharWithIndexRecipe: Prefer
String#lastIndexOf(int, int)over less efficient alternatives. - tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringLastIndexOfStringRecipe: Prefer
String#lastIndexOf(String, int)over less efficient alternatives. - tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringLastIndexOfStringWithIndexRecipe: Prefer
String#lastIndexOf(String, int)over less efficient alternatives. - tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringValueOfMethodReferenceRecipe: Prefer direct delegation to
String#valueOf(Object)over the indirection introduced byObjects#toString(Object). - tech.picnic.errorprone.refasterrules.StringRulesRecipes$SubstringRemainderRecipe: Don't unnecessarily use the two-argument
String#substring(int, int). - tech.picnic.errorprone.refasterrules.SuggestedFixRulesRecipes$SuggestedFixReplaceStartEndRecipe: Prefer
SuggestedFix#replace(int, int, String)} over more contrived alternatives. - tech.picnic.errorprone.refasterrules.SuggestedFixRulesRecipes$SuggestedFixReplaceTreeRecipe: Prefer
SuggestedFix#replace(Tree, String)} over more contrived alternatives. - tech.picnic.errorprone.refasterrules.SuggestedFixRulesRecipes$SuggestedFixReplaceTreeStartEndRecipe: Prefer
SuggestedFix#replace(Tree, String, int, int)} over more contrived alternatives. - tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertEqualArrayIterationOrderRecipe: Recipe created for the following Refaster template:
static final class AssertEqualArrayIterationOrder {
@BeforeTemplate
void before(boolean[] actual, boolean[] expected) {
assertEquals(actual, expected);
}
@BeforeTemplate
void before(byte[] actual, byte[] expected) {
assertEquals(actual, expected);
}
@BeforeTemplate
void before(char[] actual, char[] expected) {
assertEquals(actual, expected);
}
@BeforeTemplate
void before(short[] actual, short[] expected) {
assertEquals(actual, expected);
}
@BeforeTemplate
void before(int[] actual, int[] expected) {
assertEquals(actual, expected);
}
@BeforeTemplate
void before(long[] actual, long[] expected) {
assertEquals(actual, expected);
}
@BeforeTemplate
void before(float[] actual, float[] expected) {
assertEquals(actual, expected);
}
@BeforeTemplate
void before(double[] actual, double[] expected) {
assertEquals(actual, expected);
}
@BeforeTemplate
void before(Object[] actual, Object[] expected) {
assertEquals(actual, expected);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(Object[] actual, Object[] expected) {
assertThat(actual).containsExactly(expected);
}
}
.
- tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertEqualArrayIterationOrderWithMessageRecipe: Recipe created for the following Refaster template:
static final class AssertEqualArrayIterationOrderWithMessage {
@BeforeTemplate
void before(boolean[] actual, String message, boolean[] expected) {
assertEquals(actual, expected, message);
}
@BeforeTemplate
void before(byte[] actual, String message, byte[] expected) {
assertEquals(actual, expected, message);
}
@BeforeTemplate
void before(char[] actual, String message, char[] expected) {
assertEquals(actual, expected, message);
}
@BeforeTemplate
void before(short[] actual, String message, short[] expected) {
assertEquals(actual, expected, message);
}
@BeforeTemplate
void before(int[] actual, String message, int[] expected) {
assertEquals(actual, expected, message);
}
@BeforeTemplate
void before(long[] actual, String message, long[] expected) {
assertEquals(actual, expected, message);
}
@BeforeTemplate
void before(float[] actual, String message, float[] expected) {
assertEquals(actual, expected, message);
}
@BeforeTemplate
void before(double[] actual, String message, double[] expected) {
assertEquals(actual, expected, message);
}
@BeforeTemplate
void before(Object[] actual, String message, Object[] expected) {
assertEquals(actual, expected, message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(Object[] actual, String message, Object[] expected) {
assertThat(actual).withFailMessage(message).containsExactly(expected);
}
}
.
- tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertEqualArraysIrrespectiveOfOrderRecipe: Recipe created for the following Refaster template:
static final class AssertEqualArraysIrrespectiveOfOrder {
@BeforeTemplate
void before(Object[] actual, Object[] expected) {
assertEqualsNoOrder(actual, expected);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(Object[] actual, Object[] expected) {
assertThat(actual).containsExactlyInAnyOrder(expected);
}
}
.
- tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertEqualArraysIrrespectiveOfOrderWithMessageRecipe: Recipe created for the following Refaster template:
static final class AssertEqualArraysIrrespectiveOfOrderWithMessage {
@BeforeTemplate
void before(Object[] actual, String message, Object[] expected) {
assertEqualsNoOrder(actual, expected, message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(Object[] actual, String message, Object[] expected) {
assertThat(actual).withFailMessage(message).containsExactlyInAnyOrder(expected);
}
}
.
- tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertEqualDoubleArraysWithDeltaRecipe: Recipe created for the following Refaster template:
static final class AssertEqualDoubleArraysWithDelta {
@BeforeTemplate
void before(double[] actual, double[] expected, double delta) {
assertEquals(actual, expected, delta);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(double[] actual, double[] expected, double delta) {
assertThat(actual).containsExactly(expected, offset(delta));
}
}
.
- tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertEqualDoubleArraysWithDeltaWithMessageRecipe: Recipe created for the following Refaster template:
static final class AssertEqualDoubleArraysWithDeltaWithMessage {
@BeforeTemplate
void before(double[] actual, String message, double[] expected, double delta) {
assertEquals(actual, expected, delta, message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(double[] actual, String message, double[] expected, double delta) {
assertThat(actual).withFailMessage(message).containsExactly(expected, offset(delta));
}
}
.
- tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertEqualDoublesWithDeltaRecipe: Recipe created for the following Refaster template:
static final class AssertEqualDoublesWithDelta {
@BeforeTemplate
void before(double actual, double expected, double delta) {
assertEquals(actual, expected, delta);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(double actual, double expected, double delta) {
assertThat(actual).isCloseTo(expected, offset(delta));
}
}
.
- tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertEqualDoublesWithDeltaWithMessageRecipe: Recipe created for the following Refaster template:
static final class AssertEqualDoublesWithDeltaWithMessage {
@BeforeTemplate
void before(double actual, String message, double expected, double delta) {
assertEquals(actual, expected, delta, message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(double actual, String message, double expected, double delta) {
assertThat(actual).withFailMessage(message).isCloseTo(expected, offset(delta));
}
}
.
- tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertEqualFloatArraysWithDeltaRecipe: Recipe created for the following Refaster template:
static final class AssertEqualFloatArraysWithDelta {
@BeforeTemplate
void before(float[] actual, float[] expected, float delta) {
assertEquals(actual, expected, delta);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(float[] actual, float[] expected, float delta) {
assertThat(actual).containsExactly(expected, offset(delta));
}
}
.
- tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertEqualFloatArraysWithDeltaWithMessageRecipe: Recipe created for the following Refaster template:
static final class AssertEqualFloatArraysWithDeltaWithMessage {
@BeforeTemplate
void before(float[] actual, String message, float[] expected, float delta) {
assertEquals(actual, expected, delta, message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(float[] actual, String message, float[] expected, float delta) {
assertThat(actual).withFailMessage(message).containsExactly(expected, offset(delta));
}
}
.
- tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertEqualFloatsWithDeltaRecipe: Recipe created for the following Refaster template:
static final class AssertEqualFloatsWithDelta {
@BeforeTemplate
void before(float actual, float expected, float delta) {
assertEquals(actual, expected, delta);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(Float actual, float expected, float delta) {
assertThat(actual).isCloseTo(expected, offset(delta));
}
}
.
- tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertEqualFloatsWithDeltaWithMessageRecipe: Recipe created for the following Refaster template:
static final class AssertEqualFloatsWithDeltaWithMessage {
@BeforeTemplate
void before(float actual, String message, float expected, float delta) {
assertEquals(actual, expected, delta, message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(float actual, String message, float expected, float delta) {
assertThat(actual).withFailMessage(message).isCloseTo(expected, offset(delta));
}
}
.
- tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertEqualIterableIterationOrderRecipe: Recipe created for the following Refaster template:
static final class AssertEqualIterableIterationOrder<S, T extends S> {
@BeforeTemplate
void before(Iterable<S> actual, Iterable<T> expected) {
assertEquals(actual, expected);
}
@BeforeTemplate
void before(Collection<S> actual, Collection<T> expected) {
assertEquals(actual, expected);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(Iterable<S> actual, Iterable<T> expected) {
assertThat(actual).containsExactlyElementsOf(expected);
}
}
.
- tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertEqualIterableIterationOrderWithMessageRecipe: Recipe created for the following Refaster template:
static final class AssertEqualIterableIterationOrderWithMessage<S, T extends S> {
@BeforeTemplate
void before(Iterable<S> actual, String message, Iterable<T> expected) {
assertEquals(actual, expected, message);
}
@BeforeTemplate
void before(Collection<S> actual, String message, Collection<T> expected) {
assertEquals(actual, expected, message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(Iterable<S> actual, String message, Iterable<T> expected) {
assertThat(actual).withFailMessage(message).containsExactlyElementsOf(expected);
}
}
.
- tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertEqualIteratorIterationOrderRecipe: Recipe created for the following Refaster template:
static final class AssertEqualIteratorIterationOrder<S, T extends S> {
@BeforeTemplate
void before(Iterator<S> actual, Iterator<T> expected) {
assertEquals(actual, expected);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(Iterator<S> actual, Iterator<T> expected) {
assertThat(actual).toIterable().containsExactlyElementsOf(ImmutableList.copyOf(expected));
}
}
.
- tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertEqualIteratorIterationOrderWithMessageRecipe: Recipe created for the following Refaster template:
static final class AssertEqualIteratorIterationOrderWithMessage<S, T extends S> {
@BeforeTemplate
void before(Iterator<S> actual, String message, Iterator<T> expected) {
assertEquals(actual, expected, message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(Iterator<S> actual, String message, Iterator<T> expected) {
assertThat(actual).toIterable().withFailMessage(message).containsExactlyElementsOf(ImmutableList.copyOf(expected));
}
}
.
- tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertEqualRecipe: Recipe created for the following Refaster template:
@SuppressWarnings(value = "java:S1448")
static final class AssertEqual {
@BeforeTemplate
void before(boolean actual, boolean expected) {
assertEquals(actual, expected);
}
@BeforeTemplate
void before(boolean actual, Boolean expected) {
assertEquals(actual, expected);
}
@BeforeTemplate
void before(Boolean actual, boolean expected) {
assertEquals(actual, expected);
}
@BeforeTemplate
void before(Boolean actual, Boolean expected) {
assertEquals(actual, expected);
}
@BeforeTemplate
void before(byte actual, byte expected) {
assertEquals(actual, expected);
}
@BeforeTemplate
void before(byte actual, Byte expected) {
assertEquals(actual, expected);
}
@BeforeTemplate
void before(Byte actual, byte expected) {
assertEquals(actual, expected);
}
@BeforeTemplate
void before(Byte actual, Byte expected) {
assertEquals(actual, expected);
}
@BeforeTemplate
void before(char actual, char expected) {
assertEquals(actual, expected);
}
@BeforeTemplate
void before(char actual, Character expected) {
assertEquals(actual, expected);
}
@BeforeTemplate
void before(Character actual, char expected) {
assertEquals(actual, expected);
}
@BeforeTemplate
void before(Character actual, Character expected) {
assertEquals(actual, expected);
}
@BeforeTemplate
void before(short actual, short expected) {
assertEquals(actual, expected);
}
@BeforeTemplate
void before(short actual, Short expected) {
assertEquals(actual, expected);
}
@BeforeTemplate
void before(Short actual, short expected) {
assertEquals(actual, expected);
}
@BeforeTemplate
void before(Short actual, Short expected) {
assertEquals(actual, expected);
}
@BeforeTemplate
void before(int actual, int expected) {
assertEquals(actual, expected);
}
@BeforeTemplate
void before(int actual, Integer expected) {
assertEquals(actual, expected);
}
@BeforeTemplate
void before(Integer actual, int expected) {
assertEquals(actual, expected);
}
@BeforeTemplate
void before(Integer actual, Integer expected) {
assertEquals(actual, expected);
}
@BeforeTemplate
void before(long actual, long expected) {
assertEquals(actual, expected);
}
@BeforeTemplate
void before(long actual, Long expected) {
assertEquals(actual, expected);
}
@BeforeTemplate
void before(Long actual, long expected) {
assertEquals(actual, expected);
}
@BeforeTemplate
void before(Long actual, Long expected) {
assertEquals(actual, expected);
}
@BeforeTemplate
void before(float actual, float expected) {
assertEquals(actual, expected);
}
@BeforeTemplate
void before(float actual, Float expected) {
assertEquals(actual, expected);
}
@BeforeTemplate
void before(Float actual, float expected) {
assertEquals(actual, expected);
}
@BeforeTemplate
void before(Float actual, Float expected) {
assertEquals(actual, expected);
}
@BeforeTemplate
void before(double actual, double expected) {
assertEquals(actual, expected);
}
@BeforeTemplate
void before(double actual, Double expected) {
assertEquals(actual, expected);
}
@BeforeTemplate
void before(Double actual, double expected) {
assertEquals(actual, expected);
}
@BeforeTemplate
void before(Double actual, Double expected) {
assertEquals(actual, expected);
}
@BeforeTemplate
void before(Object actual, Object expected) {
assertEquals(actual, expected);
}
@BeforeTemplate
void before(String actual, String expected) {
assertEquals(actual, expected);
}
@BeforeTemplate
void before(Map<?, ?> actual, Map<?, ?> expected) {
assertEquals(actual, expected);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(Object actual, Object expected) {
assertThat(actual).isEqualTo(expected);
}
}
.
- tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertEqualSetsRecipe: Recipe created for the following Refaster template:
static final class AssertEqualSets<S, T extends S> {
@BeforeTemplate
void before(Set<S> actual, Set<T> expected) {
assertEquals(actual, expected);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(Set<S> actual, Set<T> expected) {
assertThat(actual).hasSameElementsAs(expected);
}
}
.
- tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertEqualSetsWithMessageRecipe: Recipe created for the following Refaster template:
static final class AssertEqualSetsWithMessage<S, T extends S> {
@BeforeTemplate
void before(Set<S> actual, String message, Set<T> expected) {
assertEquals(actual, expected, message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(Set<S> actual, String message, Set<T> expected) {
assertThat(actual).withFailMessage(message).hasSameElementsAs(expected);
}
}
.
- tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertEqualWithMessageRecipe: Recipe created for the following Refaster template:
@SuppressWarnings(value = "java:S1448")
static final class AssertEqualWithMessage {
@BeforeTemplate
void before(boolean actual, String message, boolean expected) {
assertEquals(actual, expected, message);
}
@BeforeTemplate
void before(boolean actual, String message, Boolean expected) {
assertEquals(actual, expected, message);
}
@BeforeTemplate
void before(Boolean actual, String message, boolean expected) {
assertEquals(actual, expected, message);
}
@BeforeTemplate
void before(Boolean actual, String message, Boolean expected) {
assertEquals(actual, expected, message);
}
@BeforeTemplate
void before(byte actual, String message, byte expected) {
assertEquals(actual, expected, message);
}
@BeforeTemplate
void before(byte actual, String message, Byte expected) {
assertEquals(actual, expected, message);
}
@BeforeTemplate
void before(Byte actual, String message, byte expected) {
assertEquals(actual, expected, message);
}
@BeforeTemplate
void before(Byte actual, String message, Byte expected) {
assertEquals(actual, expected, message);
}
@BeforeTemplate
void before(char actual, String message, char expected) {
assertEquals(actual, expected, message);
}
@BeforeTemplate
void before(char actual, String message, Character expected) {
assertEquals(actual, expected, message);
}
@BeforeTemplate
void before(Character actual, String message, char expected) {
assertEquals(actual, expected, message);
}
@BeforeTemplate
void before(Character actual, String message, Character expected) {
assertEquals(actual, expected, message);
}
@BeforeTemplate
void before(short actual, String message, short expected) {
assertEquals(actual, expected, message);
}
@BeforeTemplate
void before(short actual, String message, Short expected) {
assertEquals(actual, expected, message);
}
@BeforeTemplate
void before(Short actual, String message, short expected) {
assertEquals(actual, expected, message);
}
@BeforeTemplate
void before(Short actual, String message, Short expected) {
assertEquals(actual, expected, message);
}
@BeforeTemplate
void before(int actual, String message, int expected) {
assertEquals(actual, expected, message);
}
@BeforeTemplate
void before(int actual, String message, Integer expected) {
assertEquals(actual, expected, message);
}
@BeforeTemplate
void before(Integer actual, String message, int expected) {
assertEquals(actual, expected, message);
}
@BeforeTemplate
void before(Integer actual, String message, Integer expected) {
assertEquals(actual, expected, message);
}
@BeforeTemplate
void before(long actual, String message, long expected) {
assertEquals(actual, expected, message);
}
@BeforeTemplate
void before(long actual, String message, Long expected) {
assertEquals(actual, expected, message);
}
@BeforeTemplate
void before(Long actual, String message, long expected) {
assertEquals(actual, expected, message);
}
@BeforeTemplate
void before(Long actual, String message, Long expected) {
assertEquals(actual, expected, message);
}
@BeforeTemplate
void before(float actual, String message, float expected) {
assertEquals(actual, expected, message);
}
@BeforeTemplate
void before(float actual, String message, Float expected) {
assertEquals(actual, expected, message);
}
@BeforeTemplate
void before(Float actual, String message, float expected) {
assertEquals(actual, expected, message);
}
@BeforeTemplate
void before(Float actual, String message, Float expected) {
assertEquals(actual, expected, message);
}
@BeforeTemplate
void before(double actual, String message, double expected) {
assertEquals(actual, expected, message);
}
@BeforeTemplate
void before(double actual, String message, Double expected) {
assertEquals(actual, expected, message);
}
@BeforeTemplate
void before(Double actual, String message, double expected) {
assertEquals(actual, expected, message);
}
@BeforeTemplate
void before(Double actual, String message, Double expected) {
assertEquals(actual, expected, message);
}
@BeforeTemplate
void before(Object actual, String message, Object expected) {
assertEquals(actual, expected, message);
}
@BeforeTemplate
void before(String actual, String message, String expected) {
assertEquals(actual, expected, message);
}
@BeforeTemplate
void before(Map<?, ?> actual, String message, Map<?, ?> expected) {
assertEquals(actual, expected, message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(Object actual, String message, Object expected) {
assertThat(actual).withFailMessage(message).isEqualTo(expected);
}
}
.
- tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertFalseRecipe: Recipe created for the following Refaster template:
static final class AssertFalse {
@BeforeTemplate
void before(boolean condition) {
assertFalse(condition);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(boolean condition) {
assertThat(condition).isFalse();
}
}
.
- tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertFalseWithMessageRecipe: Recipe created for the following Refaster template:
static final class AssertFalseWithMessage {
@BeforeTemplate
void before(boolean condition, String message) {
assertFalse(condition, message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(boolean condition, String message) {
assertThat(condition).withFailMessage(message).isFalse();
}
}
.
- tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertNotNullRecipe: Recipe created for the following Refaster template:
static final class AssertNotNull {
@BeforeTemplate
void before(Object object) {
assertNotNull(object);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(Object object) {
assertThat(object).isNotNull();
}
}
.
- tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertNotNullWithMessageRecipe: Recipe created for the following Refaster template:
static final class AssertNotNullWithMessage {
@BeforeTemplate
void before(Object object, String message) {
assertNotNull(object, message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(Object object, String message) {
assertThat(object).withFailMessage(message).isNotNull();
}
}
.
- tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertNotSameRecipe: Recipe created for the following Refaster template:
static final class AssertNotSame {
@BeforeTemplate
void before(Object actual, Object expected) {
assertNotSame(actual, expected);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(Object actual, Object expected) {
assertThat(actual).isNotSameAs(expected);
}
}
.
- tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertNotSameWithMessageRecipe: Recipe created for the following Refaster template:
static final class AssertNotSameWithMessage {
@BeforeTemplate
void before(Object actual, String message, Object expected) {
assertNotSame(actual, expected, message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(Object actual, String message, Object expected) {
assertThat(actual).withFailMessage(message).isNotSameAs(expected);
}
}
.
- tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertNullRecipe: Recipe created for the following Refaster template:
static final class AssertNull {
@BeforeTemplate
void before(Object object) {
assertNull(object);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(Object object) {
assertThat(object).isNull();
}
}
.
- tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertNullWithMessageRecipe: Recipe created for the following Refaster template:
static final class AssertNullWithMessage {
@BeforeTemplate
void before(Object object, String message) {
assertNull(object, message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(Object object, String message) {
assertThat(object).withFailMessage(message).isNull();
}
}
.
- tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertSameRecipe: Recipe created for the following Refaster template:
static final class AssertSame {
@BeforeTemplate
void before(Object actual, Object expected) {
assertSame(actual, expected);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(Object actual, Object expected) {
assertThat(actual).isSameAs(expected);
}
}
.
- tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertSameWithMessageRecipe: Recipe created for the following Refaster template:
static final class AssertSameWithMessage {
@BeforeTemplate
void before(Object actual, String message, Object expected) {
assertSame(actual, expected, message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(Object actual, String message, Object expected) {
assertThat(actual).withFailMessage(message).isSameAs(expected);
}
}
.
- tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertThrowsRecipe: Recipe created for the following Refaster template:
static final class AssertThrows {
@BeforeTemplate
void before(ThrowingRunnable runnable) {
assertThrows(runnable);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(ThrowingCallable runnable) {
assertThatThrownBy(runnable);
}
}
.
- tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertThrowsWithTypeRecipe: Recipe created for the following Refaster template:
static final class AssertThrowsWithType<T extends Throwable> {
@BeforeTemplate
void before(ThrowingRunnable runnable, Class<T> clazz) {
assertThrows(clazz, runnable);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(ThrowingCallable runnable, Class<T> clazz) {
assertThatThrownBy(runnable).isInstanceOf(clazz);
}
}
.
- tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertTrueRecipe: Recipe created for the following Refaster template:
static final class AssertTrue {
@BeforeTemplate
void before(boolean condition) {
assertTrue(condition);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(boolean condition) {
assertThat(condition).isTrue();
}
}
.
- tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertTrueWithMessageRecipe: Recipe created for the following Refaster template:
static final class AssertTrueWithMessage {
@BeforeTemplate
void before(boolean condition, String message) {
assertTrue(condition, message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(boolean condition, String message) {
assertThat(condition).withFailMessage(message).isTrue();
}
}
.
- tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertUnequalDoublesWithDeltaRecipe: Recipe created for the following Refaster template:
static final class AssertUnequalDoublesWithDelta {
@BeforeTemplate
void before(double actual, double expected, double delta) {
assertNotEquals(actual, expected, delta);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(double actual, double expected, double delta) {
assertThat(actual).isNotCloseTo(expected, offset(delta));
}
}
.
- tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertUnequalDoublesWithDeltaWithMessageRecipe: Recipe created for the following Refaster template:
static final class AssertUnequalDoublesWithDeltaWithMessage {
@BeforeTemplate
void before(double actual, String message, double expected, double delta) {
assertNotEquals(actual, expected, delta, message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(double actual, String message, double expected, double delta) {
assertThat(actual).withFailMessage(message).isNotCloseTo(expected, offset(delta));
}
}
.
- tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertUnequalFloatsWithDeltaRecipe: Recipe created for the following Refaster template:
static final class AssertUnequalFloatsWithDelta {
@BeforeTemplate
void before(float actual, float expected, float delta) {
assertNotEquals(actual, expected, delta);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(float actual, float expected, float delta) {
assertThat(actual).isNotCloseTo(expected, offset(delta));
}
}
.
- tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertUnequalFloatsWithDeltaWithMessageRecipe: Recipe created for the following Refaster template:
static final class AssertUnequalFloatsWithDeltaWithMessage {
@BeforeTemplate
void before(float actual, String message, float expected, float delta) {
assertNotEquals(actual, expected, delta, message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(float actual, String message, float expected, float delta) {
assertThat(actual).withFailMessage(message).isNotCloseTo(expected, offset(delta));
}
}
.
- tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertUnequalRecipe: Recipe created for the following Refaster template:
static final class AssertUnequal {
@BeforeTemplate
void before(boolean actual, boolean expected) {
assertNotEquals(actual, expected);
}
@BeforeTemplate
void before(byte actual, byte expected) {
assertNotEquals(actual, expected);
}
@BeforeTemplate
void before(char actual, char expected) {
assertNotEquals(actual, expected);
}
@BeforeTemplate
void before(short actual, short expected) {
assertNotEquals(actual, expected);
}
@BeforeTemplate
void before(int actual, int expected) {
assertNotEquals(actual, expected);
}
@BeforeTemplate
void before(long actual, long expected) {
assertNotEquals(actual, expected);
}
@BeforeTemplate
void before(float actual, float expected) {
assertNotEquals(actual, expected);
}
@BeforeTemplate
void before(double actual, double expected) {
assertNotEquals(actual, expected);
}
@BeforeTemplate
void before(Object actual, Object expected) {
assertNotEquals(actual, expected);
}
@BeforeTemplate
void before(String actual, String expected) {
assertNotEquals(actual, expected);
}
@BeforeTemplate
void before(Set<?> actual, Set<?> expected) {
assertNotEquals(actual, expected);
}
@BeforeTemplate
void before(Map<?, ?> actual, Map<?, ?> expected) {
assertNotEquals(actual, expected);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(Object actual, Object expected) {
assertThat(actual).isNotEqualTo(expected);
}
}
.
- tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertUnequalWithMessageRecipe: Recipe created for the following Refaster template:
static final class AssertUnequalWithMessage {
@BeforeTemplate
void before(boolean actual, String message, boolean expected) {
assertNotEquals(actual, expected, message);
}
@BeforeTemplate
void before(byte actual, String message, byte expected) {
assertNotEquals(actual, expected, message);
}
@BeforeTemplate
void before(char actual, String message, char expected) {
assertNotEquals(actual, expected, message);
}
@BeforeTemplate
void before(short actual, String message, short expected) {
assertNotEquals(actual, expected, message);
}
@BeforeTemplate
void before(int actual, String message, int expected) {
assertNotEquals(actual, expected, message);
}
@BeforeTemplate
void before(long actual, String message, long expected) {
assertNotEquals(actual, expected, message);
}
@BeforeTemplate
void before(float actual, String message, float expected) {
assertNotEquals(actual, expected, message);
}
@BeforeTemplate
void before(double actual, String message, double expected) {
assertNotEquals(actual, expected, message);
}
@BeforeTemplate
void before(Object actual, String message, Object expected) {
assertNotEquals(actual, expected, message);
}
@BeforeTemplate
void before(String actual, String message, String expected) {
assertNotEquals(actual, expected, message);
}
@BeforeTemplate
void before(Set<?> actual, String message, Set<?> expected) {
assertNotEquals(actual, expected, message);
}
@BeforeTemplate
void before(Map<?, ?> actual, String message, Map<?, ?> expected) {
assertNotEquals(actual, expected, message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(Object actual, String message, Object expected) {
assertThat(actual).withFailMessage(message).isNotEqualTo(expected);
}
}
.
- tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$FailWithMessageAndThrowableRecipe: Recipe created for the following Refaster template:
static final class FailWithMessageAndThrowable {
@BeforeTemplate
void before(String message, Throwable throwable) {
Assert.fail(message, throwable);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(String message, Throwable throwable) {
fail(message, throwable);
}
}
.
- tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$FailWithMessageRecipe: Recipe created for the following Refaster template:
static final class FailWithMessage {
@BeforeTemplate
void before(String message) {
Assert.fail(message);
}
@AfterTemplate
@UseImportPolicy(value = STATIC_IMPORT_ALWAYS)
void after(String message) {
fail(message);
}
}
.
- tech.picnic.errorprone.refasterrules.TimeRulesRecipes$DurationBetweenInstantsRecipe: Don't unnecessarily convert to and from milliseconds. (This way nanosecond precision is retained.) <strong>Warning:</strong> this rewrite rule increases precision!.
- tech.picnic.errorprone.refasterrules.TimeRulesRecipes$DurationBetweenOffsetDateTimesRecipe: Don't unnecessarily convert to and from milliseconds. (This way nanosecond precision is retained.) <strong>Warning:</strong> this rewrite rule increases precision!.
- tech.picnic.errorprone.refasterrules.TimeRulesRecipes$EpochInstantRecipe: Prefer
Instant#EPOCHover alternative representations. - tech.picnic.errorprone.refasterrules.TimeRulesRecipes$InstantTruncatedToMillisecondsRecipe: Note that
Instant#toEpochMilli()throws anArithmeticExceptionfor dates very far in the past or future, while the suggested alternative doesn't. - tech.picnic.errorprone.refasterrules.TimeRulesRecipes$InstantTruncatedToSecondsRecipe: Prefer
Instant#truncatedTo(TemporalUnit)over less obvious alternatives. - tech.picnic.errorprone.refasterrules.TimeRulesRecipes$UtcClockRecipe: Use
Clock#systemUTC()when possible. - tech.picnic.errorprone.refasterrules.TimeRulesRecipes$UtcConstantRecipe: Use
ZoneOffset#UTCwhen possible. - tech.picnic.errorprone.refasterrules.TimeRulesRecipes$ZeroDurationRecipe: Recipe created for the following Refaster template:
static final class ZeroDuration {
@BeforeTemplate
Duration before(TemporalUnit temporalUnit) {
return Refaster.anyOf(Duration.ofNanos(0), Duration.ofMillis(0), Duration.ofSeconds(0), Duration.ofSeconds(0, 0), Duration.ofMinutes(0), Duration.ofHours(0), Duration.ofDays(0), Duration.of(0, temporalUnit));
}
@AfterTemplate
Duration after() {
return Duration.ZERO;
}
}
.
- tech.picnic.errorprone.refasterrules.TimeRulesRecipes$ZeroPeriodRecipe: Recipe created for the following Refaster template:
static final class ZeroPeriod {
@BeforeTemplate
Period before() {
return Refaster.anyOf(Period.ofDays(0), Period.ofWeeks(0), Period.ofMonths(0), Period.ofYears(0), Period.of(0, 0, 0));
}
@AfterTemplate
Period after() {
return Period.ZERO;
}
}
.
- tech.picnic.errorprone.refasterrules.WebClientRulesRecipes$BodyValueRecipe: Prefer
RequestBodySpec#bodyValue(Object)over more contrived alternatives.
Changed Recipes
- org.openrewrite.prethink.UpdateAgentConfig was changed:
- Old Options:
targetConfigFile: { type: String, required: false }
- New Options:
targetConfigFiles: { type: List, required: false }template: { type: String, required: false }
- Old Options:
- org.openrewrite.prethink.UpdatePrethinkContext was changed:
- Old Options:
targetConfigFile: { type: String, required: false }
- New Options:
targetConfigFiles: { type: List, required: false }template: { type: String, required: false }
- Old Options:
- org.openrewrite.java.spring.CommentOutSpringPropertyKey was changed:
- Old Options:
comment: { type: String, required: true }propertyKey: { type: String, required: true }
- New Options:
comment: { type: String, required: true }commentOutProperty: { type: Boolean, required: false }propertyKey: { type: String, required: true }
- Old Options: