Skip to main content

Recipes with Data Tables

This doc contains all of the recipes with unique data tables that have been explicitly added by the recipe author. If a recipe contains only the default data tables, it won't be included in this list.

Find AI agents configuration files

io.moderne.ai.FindAgentsInUse

Scans codebases to identify usage of AI agents by looking at the agent configuration files present in the repository.

Data tables:

  • org.openrewrite.table.SourcesFiles: Source files that matched some criteria.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find AI libraries in use

io.moderne.ai.FindLibrariesInUse

Scans codebases to identify usage of AI services. Detects AI libraries across Java dependencies. Useful for auditing and understanding AI integration patterns.

Data tables:

  • org.openrewrite.maven.table.DependenciesInUse: Direct and transitive dependencies in use.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find AI models in use

io.moderne.ai.FindModelsInUse

Scans codebases to identify usage of Large Language Models (LLMs). Detects model references and configuration patterns across Java classes, properties files, YAML configs... Useful for identifying model usage.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.table.TextMatches: Lines matching simple text search.

Find Angular component

org.openrewrite.angular.search.FindAngularComponent

Locates usages of Angular components across the codebase including template elements and other references. If componentName is null, finds all Angular components.

Data tables:

  • org.openrewrite.angular.table.AngularComponentUses: Usage locations of Angular components across the codebase.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find RSA key generation parameters

io.moderne.cryptography.FindRSAKeyGenParameters

Finds RSAKeyGenParameterSpec instantiations and extracts their parameter values into a data table.

Data tables:

  • io.moderne.cryptography.table.RSAKeyGenParametersTable: RSAKeyGenParameterSpec instantiations and their configured parameters including key size, public exponent, and optional parameters.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find SSL socket configuration parameters

io.moderne.cryptography.FindSSLSocketParameters

Finds SSLSocket setter method invocations and extracts their parameter values into a data table.

Data tables:

  • io.moderne.cryptography.table.SSLSocketParametersTable: SSLSocket setter method invocations and their configured parameters including cipher suites, protocols, and other SSL/TLS settings.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find Security class modifications

io.moderne.cryptography.FindSecurityModifications

Finds invocations of java.security.Security methods that modify security configuration such as removeProvider, addProvider, insertProviderAt, setProperty, and removeProperty.

Data tables:

  • io.moderne.cryptography.table.SecurityModificationTable: Security class method invocations that modify the Java security configuration including provider management and property settings.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find Security.setProperty(..) calls for certain properties

io.moderne.cryptography.FindSecuritySetProperties

There is a defined set of properties that should not be set using Security.setProperty(..) as they can lead to security vulnerabilities.

Data tables:

  • io.moderne.cryptography.table.InsecureSetProperties: An itemization of the properties used in such calls
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Post quantum cryptography

io.moderne.cryptography.PostQuantumCryptography

This recipe searches for instances in code that may be impacted by post quantum cryptography. Applications may need to support larger key sizes, different algorithms, or use crypto agility to handle the migration. The recipe includes detection of hardcoded values that affect behavior in a post-quantum world, programmatic configuration that may prevent algorithm changes, and general cryptographic usage patterns that should be reviewed.

Data tables:

  • org.openrewrite.analysis.java.taint.table.TaintFlowTable: Records taint flows from sources to sinks with their taint types.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • io.moderne.cryptography.table.InsecureSetProperties: An itemization of the properties used in such calls
  • io.moderne.devcenter.table.SecurityIssues: Security issues in the repository.

Vulnerabilities status

io.moderne.devcenter.DependencyVulnerabilityCheck

Determine the current state of a repository relative to its vulnerabilities.

Data tables:

  • io.moderne.devcenter.table.UpgradesAndMigrations: Progress towards organizational objectives on library or language migrations and upgrades.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Move to JUnit 6

io.moderne.devcenter.JUnitJupiterUpgrade

Move to JUnit Jupiter.

Data tables:

  • io.moderne.devcenter.table.UpgradesAndMigrations: Progress towards organizational objectives on library or language migrations and upgrades.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Move to a later Java version

io.moderne.devcenter.JavaVersionUpgrade

Determine the current state of a repository relative to a desired Java version upgrade.

Data tables:

  • io.moderne.devcenter.table.UpgradesAndMigrations: Progress towards organizational objectives on library or language migrations and upgrades.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Library upgrade

io.moderne.devcenter.LibraryUpgrade

Determine the current state of a repository relative to a desired library upgrade.

Data tables:

  • io.moderne.devcenter.table.UpgradesAndMigrations: Progress towards organizational objectives on library or language migrations and upgrades.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Parent POM upgrade

io.moderne.devcenter.ParentPomUpgrade

Determine the current state of a repository relative to a desired parent POM upgrade.

Data tables:

  • io.moderne.devcenter.table.UpgradesAndMigrations: Progress towards organizational objectives on library or language migrations and upgrades.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Report as security issues

io.moderne.devcenter.ReportAsSecurityIssues

Look for results produced by recipes in the same recipe list that this recipe is part of, and report them as security issues in DevCenter.

Data tables:

  • io.moderne.devcenter.table.SecurityIssues: Security issues in the repository.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

DevCenter for Apache

io.moderne.devcenter.ApacheDevCenter

A DevCenter that tracks the latest Apache Maven parent POM versions and applies best practices.

Data tables:

  • io.moderne.devcenter.table.UpgradesAndMigrations: Progress towards organizational objectives on library or language migrations and upgrades.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.java.table.MethodCalls: The text of matching method invocations.
  • io.moderne.devcenter.table.SecurityIssues: Security issues in the repository.

DevCenter for Apache Maven

io.moderne.devcenter.ApacheMavenDevCenter

A DevCenter that tracks the latest Apache Maven parent POM versions and applies best practices. This DevCenter includes recipes to upgrade the parent POMs of Apache Maven, as well as a collection of best practices for Maven POMs.

Data tables:

  • io.moderne.devcenter.table.UpgradesAndMigrations: Progress towards organizational objectives on library or language migrations and upgrades.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • io.moderne.devcenter.table.SecurityIssues: Security issues in the repository.

Upgrade Apache Parent POM

io.moderne.devcenter.UpgradeApacheParent

Upgrades the Apache parent POM to the latest version.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade Apache Maven Parent

io.moderne.devcenter.UpgradeMavenParent

Upgrades the Apache Maven parent POM to the latest version.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade Maven Plugins Parent

io.moderne.devcenter.UpgradeMavenPluginsParent

Upgrades the Apache Maven parent POM to the latest version.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade Maven Shared Parent

io.moderne.devcenter.UpgradeMavenSharedParent

Upgrades the Apache Maven parent POM to the latest version.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Apache Maven best practices

io.moderne.devcenter.ApacheMavenBestPractices

A collection of recipes that apply best practices to Maven POMs. Some of these recipes affect build stability, so they are reported as security issues in the DevCenter card.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • io.moderne.devcenter.table.SecurityIssues: Security issues in the repository.

DevCenter

io.moderne.devcenter.DevCenterStarter

This is a default DevCenter configuration that can be used as a starting point for your own DevCenter configuration. It includes a combination of upgrades, migrations, and security fixes. You can customize this configuration to suit your needs. For more information on how to customize your DevCenter configuration, see the DevCenter documentation.

Data tables:

  • io.moderne.devcenter.table.UpgradesAndMigrations: Progress towards organizational objectives on library or language migrations and upgrades.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.java.table.MethodCalls: The text of matching method invocations.
  • io.moderne.devcenter.table.SecurityIssues: Security issues in the repository.

OWASP top ten

io.moderne.devcenter.SecurityStarter

This recipe is a starter card to reveal common OWASP Top 10 issues in your source code. You can customize this configuration to suit your needs. For more information on how to customize your DevCenter configuration, see the DevCenter documentation.

Data tables:

  • org.openrewrite.java.table.MethodCalls: The text of matching method invocations.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • io.moderne.devcenter.table.SecurityIssues: Security issues in the repository.

DevCenter for Quarkus

io.moderne.devcenter.QuarkusDevCenter

A DevCenter that tracks the latest Quarkus framework versions and applies best practices. This DevCenter includes recipes to upgrade Quarkus versions, migrate from deprecated APIs, and ensure compatibility with the latest Java versions and testing frameworks.

Data tables:

  • io.moderne.devcenter.table.UpgradesAndMigrations: Progress towards organizational objectives on library or language migrations and upgrades.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.java.table.MethodCalls: The text of matching method invocations.
  • io.moderne.devcenter.table.SecurityIssues: Security issues in the repository.

Upgrade to Quarkus 3.26

io.moderne.devcenter.UpgradeQuarkus3_x

Upgrades Quarkus dependencies to version 3.26.x, including core, extensions, and tooling.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Upgrade Quarkus Universe BOM

io.moderne.devcenter.UpgradeQuarkusUniverseBom

Upgrades the Quarkus Universe BOM parent to the latest version.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change numeric field type with conversion

io.moderne.elastic.elastic9.ChangeApiNumericFieldType

Adds conversion methods with null checks for numeric type changes in Elasticsearch 9 API

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate DenseVectorProperty.elementType from String to DenseVectorElementType enum

io.moderne.elastic.elastic9.MigrateDenseVectorElementType

In Elasticsearch 9, DenseVectorProperty.elementType() returns DenseVectorElementType enum instead of String, and the builder method elementType(String) now accepts the enum type. This recipe handles both builder calls and getter calls.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate DenseVectorProperty.similarity from String to DenseVectorSimilarity enum

io.moderne.elastic.elastic9.MigrateDenseVectorSimilarity

In Elasticsearch 9, DenseVectorProperty.similarity() returns DenseVectorSimilarity enum instead of String, and the builder method similarity(String) now accepts the enum type. This recipe handles both builder calls and getter calls.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate matchedQueries from List to Map

io.moderne.elastic.elastic9.MigrateMatchedQueries

In Elasticsearch Java Client 9.0, Hit.matchedQueries() changed from returning List<String> to Map<String, Double>. This recipe migrates the usage by adding .keySet() for iterations and using new ArrayList<>(result.keySet()) for assignments.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate script source from String to Script/ScriptSource

io.moderne.elastic.elastic9.MigrateScriptSource

Migrates Script.source(String) calls to use ScriptSource.scriptString(String) wrapper in Elasticsearch Java client 9.x.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate SpanTermQuery.value() from String to FieldValue

io.moderne.elastic.elastic9.MigrateSpanTermQueryValue

In Elasticsearch 9, SpanTermQuery.value() returns a FieldValue instead of String. This recipe updates calls to handle the new return type by checking if it's a string and extracting the string value.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Rename Elasticsearch valueBody() methods

io.moderne.elastic.elastic9.RenameApiField

In Elasticsearch Java Client 9.0, the generic valueBody() method and valueBody(...) builder methods have been replaced with specific getter and setter methods that better reflect the type of data being returned. Similarly, for GetRepositoryResponse, the result field also got altered to repositories.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use NamedValue parameters instead of Map

io.moderne.elastic.elastic9.UseNamedValueParameters

Migrates indicesBoost and dynamicTemplates parameters from Map to NamedValue in Elasticsearch Java client 9.x.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate from Elasticsearch 8 to 9

io.moderne.elastic.elastic9.MigrateToElasticsearch9

This recipe performs a comprehensive migration from Elasticsearch 8 to Elasticsearch 9, addressing breaking changes, API removals, deprecations, and required code modifications.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Rename API fields for Elasticsearch 9

io.moderne.elastic.elastic9.RenameApiFields

Renames various API response fields from valueBody to align with Elasticsearch 9 specifications.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change numeric field types for Elasticsearch 9

io.moderne.elastic.elastic9.ChangeApiNumericFieldTypes

Handles changes between different numeric types (Long to Integer, int to Long...) in Elasticsearch 9 API responses by adding appropriate conversion methods with null checks.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find JPQL definitions (Moderne Edition)

io.moderne.hibernate.search.FindJPQLDefinitions

Find Java Persistence Query Language definitions in the codebase.

Data tables:

  • io.moderne.hibernate.search.JPQLQueries: Shows matching JPQL queries.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Fix conflicting class type annotation Hibernate 6.6 (Moderne Edition)

io.moderne.hibernate.update66.FixConflictingClassTypeAnnotations

Since Hibernate 6.6 a mapped class can have either @MappedSuperclass or @Embeddable, or @Entity. This recipe removes @Entity from classes annotated with @MappedSuperclass or @Embeddable. For the moment die combination of @MappedSuperclass or @Embeddable is advised to migrate to Single Table Inheritance but still accepted and therefore stays.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate implicit cascade=PERSIST for @Id and @MapsId associations (Moderne Edition)

io.moderne.hibernate.update70.AddCascadePersistToIdMappedAssociations

Hibernate used to automatically enable cascade=PERSIST for association fields annotated @Id or @MapsId. This was undocumented and unexpected behavior, and no longer supported in Hibernate 7. Existing code which relies on this behavior will be modified by addition of explicit cascade=PERSIST to the association fields.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove leaking of SessionFactoryImplementor from org.hibernate.usertype.CompositeUserType invocations and implementations (Moderne Edition)

io.moderne.hibernate.update70.CompositeUserTypeSessionFactoryImplementor

Remove leaking of SessionFactoryImplementor from org.hibernate.usertype.CompositeUserType invocations and implementations.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Configurable.configure() to use GeneratorCreationContext (Moderne Edition)

io.moderne.hibernate.update70.MigrateConfigurableToGeneratorCreationContext

In Hibernate 7.0, Configurable.configure() now takes a GeneratorCreationContext parameter instead of ServiceRegistry. This recipe migrates method signatures and call sites.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Hibernate Integrator#integrate method (Moderne Edition)

io.moderne.hibernate.update70.MigrateIntegratorMethod

Migrate Hibernate Integrator#integrate method from deprecated signature to Hibernate 7 compatible signature. Changes integrate(Metadata, SessionFactoryImplementor, SessionFactoryServiceRegistry) to integrate(Metadata, BootstrapContext, SessionFactoryImplementor).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate @JdbcType to @JdbcTypeCode (Moderne Edition)

io.moderne.hibernate.update70.MigrateJdbcTypeToJdbcTypeCode

In Hibernate 7.0, various JDBC types were moved to internal packages. Use @JdbcTypeCode with SqlTypes constants instead of @JdbcType with specific classes.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate LockOptions to direct parameters (Moderne Edition)

io.moderne.hibernate.update70.MigrateLockOptionsToDirectParameters

Migrates deprecated LockOptions usage to direct parameters in method calls. As of JPA 3.2 and Hibernate 7, LockMode, Timeout, and PessimisticLockScope are passed directly to find(), refresh(), and lock() methods instead of being wrapped in a LockOptions object.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate MetamodelImplementor to Hibernate 7.0 (Moderne Edition)

io.moderne.hibernate.update70.MigrateMetamodelImplementor

In Hibernate 7.0, MetamodelImplementor has been split into MappingMetamodel for ORM-specific operations and JpaMetamodel for JPA-standard operations. This recipe migrates the usage based on which methods are called.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate NaturalIdLoadAccess method calls (Moderne Edition)

io.moderne.hibernate.update70.MigrateNaturalIdLoadAccess

Migrates NaturalIdLoadAccess#using(Object...) to using(Map.of(...)) variants for Hibernate 7.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate NaturalIdMultiLoadAccess method calls (Moderne Edition)

io.moderne.hibernate.update70.MigrateNaturalIdMultiLoadAccess

Migrates NaturalIdMultiLoadAccess#compoundValue(Object...) to Map.of(...) variants for Hibernate 7.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Session interface method calls (Moderne Edition)

io.moderne.hibernate.update70.MigrateSessionInterface

Migrates code using deprecated Session interface methods to their Hibernate 7.0 replacements.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Session save/update/delete method calls (Moderne Edition)

io.moderne.hibernate.update70.MigrateSessionToDeferToJPA

Migrates code using deprecated Session load/get/refresh/save/update/delete methods to their Hibernate 7.0 replacements.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate setFlushMode() to setQueryFlushMode() (Moderne Edition)

io.moderne.hibernate.update70.MigrateSetFlushModeToSetQueryFlushMode

In Hibernate 7.0, CommonQueryContract.setFlushMode(FlushModeType) has been replaced with setQueryFlushMode(QueryFlushMode). This recipe migrates the method call and converts FlushModeType parameters to their QueryFlushMode equivalents.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to @TargetEmbeddable (Moderne Edition)

io.moderne.hibernate.update70.MigrateToTargetEmbeddable

Migrates code using removed @Target to to Hibernate 7.0's @TargetEmbeddable equivalent. Removes misused @Target annotations.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove unnecessary cast to Session for SessionFactory.createEntityManager() (Moderne Edition)

io.moderne.hibernate.update70.RemoveUnnecessaryCastToSession

In Hibernate 7.0, SessionFactory.createEntityManager() explicitly returns Session, making casts to Session unnecessary.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace hibernate annotations with Jakarta variants (Moderne Edition)

io.moderne.hibernate.update70.ReplaceHibernateWithJakartaAnnotations

Tries to replaces annotations that have been removed in Hibernate 7.0 with its Jakarta equivalent, such as Table, @Where, @OrderBy, etc. If a annotation is used with arguments that do not have a direct replacement, the annotation is not replaced at all.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace Session.buildLockRequest with LockOptions (Moderne Edition)

io.moderne.hibernate.update70.ReplaceSessionLockRequest

Migrates Session.buildLockRequest(LockOptions.X) calls to use session.lock(entity, new LockOptions(LockMode.X)) in Hibernate 7.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Null safe Transaction#getTimeout() (Moderne Edition)

io.moderne.hibernate.update70.UnboxingTransactionTimeout

JPA 3.2 adds #getTimeout but uses Integer whereas Hibernate has historically used int. Note that this raises the possibility of a NullPointerException during migration if, e.g., performing direct comparisons on the timeout value against an in (auto unboxing). This recipe adds ternary operators where Transaction#getTimeout() is used and a negative value will be used if the getTimeout() resulted in a null value.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove leaking of SharedSessionContractImplementor from org.hibernate.usertype.UserType invocations (Moderne Edition)

io.moderne.hibernate.update70.UserTypeNullSafeGetSharedSessionContractImplementorRecipe

Remove leaking of SharedSessionContractImplementor from org.hibernate.usertype.UserType invocations.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove leaking of SharedSessionContractImplementor from org.hibernate.usertype.UserType implementations (Moderne Edition)

io.moderne.hibernate.update70.UserTypeSharedSessionContractImplementor

Remove leaking of SharedSessionContractImplementor from org.hibernate.usertype.UserType implementations.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove table from single table inherited entity (Moderne Edition)

io.moderne.hibernate.update66.RemoveTableFromInheritedEntity

For Single Table Inherited Entities Hibernate ignores the @Table annotation on child entities. From Version 6.6 it is considered an error.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Hibernate 6.6.x (Moderne Edition)

io.moderne.hibernate.MigrateToHibernate66

This recipe will apply changes commonly needed when migrating to Hibernate 6.6.x.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Hibernate CascadeType constants (Moderne Edition)

io.moderne.hibernate.update66.MigrateCascadeTypes

Moving away from deprecated Hibernate CascadeType constants. CascadeType.SAVE_UPDATE -> CascadeType.PERSIST and/or CascadeType.MERGE, CascadeType.DELETE -> CascadeType.REMOVE.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Hibernate 7.0.x (Moderne Edition)

io.moderne.hibernate.MigrateToHibernate70

This recipe will apply changes commonly needed when migrating to Hibernate 7.0.x.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Hibernate 7 JFR APIs (Moderne Edition)

io.moderne.hibernate.update70.MigrateToHibernate7JFR

Migrates deprecated JFR integration APIs to their Hibernate 7 replacements. EventManager becomes EventMonitor and HibernateMonitoringEvent becomes DiagnosticEvent.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Hibernate 7.1.x (Moderne Edition)

io.moderne.hibernate.MigrateToHibernate71

This recipe will apply changes commonly needed when migrating to Hibernate 7.0.x.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate JasperReports exporter setParameter to new API

io.moderne.jasperreports.v5.MigrateExporterSetParameter

Migrates deprecated setParameter calls on JasperReports exporters to the new API using setExporterInput and setExporterOutput.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to JasperReports 5.6.x

io.moderne.jasperreports.UpgradeToJasperReports5

Migrates JasperReports from 4.6.0 to 5.6.x. This recipe includes minimal breaking changes, allowing teams to test and validate the migration before proceeding to version 6.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to JasperReports 6

io.moderne.jasperreports.UpgradeToJasperReports6

Migrates JasperReports from 5.x to 6.x with the new exporter API, XLS to XLSX move, and removal of Spring JasperReports views.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate JRXlsExporter to JRXlsxExporter

io.moderne.jasperreports.MigrateXlsToXlsxExporter

Migrates the deprecated JRXlsExporter to the new JRXlsxExporter class in JasperReports 6. Also updates related configuration classes from XLS to XLSX variants.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update JasperReports exporter configuration

io.moderne.jasperreports.MigrateExporterConfigToJasper6

Updates deprecated exporter parameter imports to the new configuration classes introduced in JasperReports 6. This includes migrating from parameter classes to configuration classes for PDF, HTML, CSV, and other exporters.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate AdminClient.alterConfigs() to incrementalAlterConfigs()

io.moderne.kafka.MigrateAlterConfigsToIncrementalAlterConfigs

Migrates the removed AdminClient.alterConfigs() method to incrementalAlterConfigs() for Kafka 4.0 compatibility.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate KafkaConsumer.committed(TopicPartition) to committed(Set<TopicPartition>)

io.moderne.kafka.MigrateConsumerCommittedToSet

Migrates from the removed KafkaConsumer.committed(TopicPartition) to committed(Set<TopicPartition>) for Kafka 4.0 compatibility. Converts single TopicPartition arguments to Collections.singleton() calls.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate KafkaConsumer.poll(long) to poll(Duration)

io.moderne.kafka.MigrateConsumerPollToDuration

Migrates from the deprecated KafkaConsumer.poll(long) to poll(Duration) for Kafka 4.0 compatibility. Converts millisecond timeout values to Duration.ofMillis() calls.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated sendOffsetsToTransaction to use ConsumerGroupMetadata

io.moderne.kafka.MigrateSendOffsetsToTransaction

Migrates from the deprecated KafkaProducer.sendOffsetsToTransaction(Map, String) to sendOffsetsToTransaction(Map, ConsumerGroupMetadata) for Kafka 4.0 compatibility. This recipe uses a conservative approach with new ConsumerGroupMetadata(groupId).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove deprecated Kafka property

io.moderne.kafka.RemoveDeprecatedKafkaProperties

Removes a specific Kafka property that is no longer supported in Kafka 4.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate KStream to KTable conversion to use toTable() method

io.moderne.kafka.streams.MigrateKStreamToTable

In Kafka Streams 2.5, a new toTable() method was added to simplify converting a KStream to a KTable. This recipe replaces the manual aggregation pattern .groupByKey().reduce((oldVal, newVal) -> newVal) with the more concise .toTable() method.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated KafkaStreams#store method

io.moderne.kafka.streams.MigrateKafkaStreamsStoreMethod

In Kafka Streams 2.5, the method KafkaStreams#store(String storeName, QueryableStoreType<T> storeType) was deprecated. It only allowed querying active stores and did not support any additional query options. Use the new StoreQueryParameters API instead.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated retry configuration to task timeout

io.moderne.kafka.streams.MigrateRetryConfiguration

In Kafka 2.7, RETRIES_CONFIG and RETRY_BACKOFF_MS_CONFIG were deprecated in favor of TASK_TIMEOUT_MS_CONFIG. This recipe migrates the old retry configuration to the new task timeout configuration, attempting to preserve the retry budget by multiplying retries × backoff time. If only one config is present, it falls back to 60000ms (1 minute).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to StreamsUncaughtExceptionHandler API

io.moderne.kafka.streams.MigrateStreamsUncaughtExceptionHandler

Migrates from the JVM-level Thread.UncaughtExceptionHandler to Kafka Streams' StreamsUncaughtExceptionHandler API introduced in version 2.8. This new API provides explicit control over how the Streams client should respond to uncaught exceptions (REPLACE_THREAD, SHUTDOWN_CLIENT, or SHUTDOWN_APPLICATION).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate TaskMetadata.taskId() to return TaskId

io.moderne.kafka.streams.MigrateTaskMetadataTaskId

In Kafka Streams 3.0, TaskMetadata.taskId() changed its return type from String to TaskId. This recipe adds .toString() calls where necessary to maintain String compatibility.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate WindowStore.put() to include timestamp

io.moderne.kafka.streams.MigrateWindowStorePutMethod

In Kafka Streams 2.4, WindowStore.put() requires a timestamp parameter. This recipe adds context.timestamp() as the third parameter.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove PartitionGrouper configuration

io.moderne.kafka.streams.RemovePartitionGrouperConfiguration

Starting with Kafka Streams 2.4, the PartitionGrouper API was deprecated and partition grouping is now fully handled internally by the library. This recipe removes the deprecated PARTITION_GROUPER_CLASS_CONFIG configuration.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Kafka 2.3

io.moderne.kafka.MigrateToKafka23

Migrate applications to the latest Kafka 2.3 release.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Joined.named() to Joined.as()

io.moderne.kafka.streams.MigrateJoinedNameMethod

In Kafka Streams 2.3, Joined.named() was deprecated in favor of Joined.as(). Additionally, the name() method was deprecated for removal and should not be used.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Kafka 2.4

io.moderne.kafka.MigrateToKafka24

Migrate applications to the latest Kafka 2.4 release.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Kafka 2.5

io.moderne.kafka.MigrateToKafka25

Migrate applications to the latest Kafka 2.5 release.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Kafka 2.6

io.moderne.kafka.MigrateToKafka26

Migrate applications to the latest Kafka 2.6 release.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate exactly_once to exactly_once_beta

io.moderne.kafka.streams.ProcessingGuaranteeExactlyOnceToBeta

Kafka Streams 2.6 introduces the exactly-once semantics v2, which is a more efficient implementation with improved internal handling. Though it is beta, it’s fully backward-compatible from the API standpoint, but internally it uses a different transaction/commit protocol. Starting from 3.0, it becomes the default "exactly_once_v2".

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Kafka 2.7

io.moderne.kafka.MigrateToKafka27

Migrate applications to the latest Kafka 2.7 release.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Kafka 2.8

io.moderne.kafka.MigrateToKafka28

Migrate applications to the latest Kafka 2.8 release.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Kafka 3.0

io.moderne.kafka.MigrateToKafka30

Migrate applications to the latest Kafka 3.0 release.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate exactly_once and exactly_once_beta to exactly_once_v2

io.moderne.kafka.streams.ProcessingGuaranteeExactlyOnceToV2

Kafka Streams 2.6 introduces the exactly-once semantics v2, which is a more efficient implementation with improved internal handling. Starting from 3.0, it becomes the default "exactly_once_v2".

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate TaskMetadata and ThreadMetadata

io.moderne.kafka.streams.MigrateTaskAndThreadMetadata

Migrates TaskMetadata and ThreadMetadata from org.apache.kafka.streams.processor package to org.apache.kafka.streams package, and updates TaskMetadata.taskId() calls to include .toString() for String compatibility.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Kafka 3.1

io.moderne.kafka.MigrateToKafka31

Migrate applications to the latest Kafka 3.1 release.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Kafka 3.2

io.moderne.kafka.MigrateToKafka32

Migrate applications to the latest Kafka 3.2 release.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Kafka 3.3

io.moderne.kafka.MigrateToKafka33

Migrate applications to the latest Kafka 3.3 release.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Kafka 4.0

io.moderne.kafka.MigrateToKafka40

Migrate applications to the latest Kafka 4.0 release. This includes updating dependencies to 4.0.x, ensuring Java 11+ for clients and Java 17+ for brokers/tools, and handling changes.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade Java to 11+ for Kafka clients

io.moderne.kafka.UpgradeJavaForKafkaClients

Ensures Java 11 or higher is used when Kafka client libraries are present.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade Java to 17+ for Kafka broker/tools

io.moderne.kafka.UpgradeJavaForKafkaBroker

Ensures Java 17 or higher is used when Kafka broker or tools dependencies are present.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate ConsumerGroupState to GroupState

io.moderne.kafka.MigrateConsumerGroupStateToGroupState

Migrates from the deprecated ConsumerGroupState to GroupState for Kafka 4.0 compatibility. ConsumerGroupState was deprecated in favor of GroupState which supports both consumer groups and share groups.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Kafka 4.1

io.moderne.kafka.MigrateToKafka41

Migrate applications to the latest Kafka 4.1 release. This includes updating dependencies to 4.1.x, migrating deprecated Admin API methods, updating Streams configuration properties, and removing deprecated broker properties.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Admin.listConsumerGroups() to listGroups()

io.moderne.kafka.MigrateAdminListConsumerGroups

Migrates the deprecated Admin.listConsumerGroups() method to listGroups() and updates related types for Kafka 4.1 compatibility.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find null pointer issues

org.openrewrite.analysis.java.FindNullPointerIssues

Detects potential null pointer dereferences using path-sensitive analysis to distinguish between definite NPEs, possible NPEs, and safe dereferences.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find unused variable definitions

org.openrewrite.analysis.java.controlflow.FindUnusedDefinitions

Identifies variable assignments whose values are never used before being overwritten.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find cyclomatic complexity

org.openrewrite.analysis.java.controlflow.search.FindCyclomaticComplexity

Calculates the cyclomatic complexity of methods and produces a data table containing the class name, method name, argument types, complexity value, and complexity threshold.

Data tables:

  • org.openrewrite.analysis.java.controlflow.table.ComplexityTable: A table of methods and their cyclomatic complexity values.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find unreachable code

org.openrewrite.analysis.java.controlflow.search.FindUnreachableCode

Uses control flow analysis to identify statements that can never be executed.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find dead stores

org.openrewrite.analysis.java.dataflow.FindDeadStores

Identifies variable assignments whose values are never used before being overwritten or going out of scope.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find security vulnerabilities using taint analysis

org.openrewrite.analysis.java.security.FindSecurityVulnerabilities

Identifies potential security vulnerabilities where untrusted data from sources flows to sensitive sinks without proper sanitization.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Track data lineage

org.openrewrite.analysis.java.datalineage.TrackDataLineage

Tracks the flow of data from database sources (JDBC queries, JPA entities) to API sinks (REST endpoints, GraphQL mutations) to understand data dependencies and support compliance requirements.

Data tables:

  • org.openrewrite.analysis.java.taint.table.TaintFlowTable: Records taint flows from sources to sinks with their taint types.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find PII exposure in logs and external APIs

org.openrewrite.analysis.java.privacy.FindPiiExposure

Detects when Personally Identifiable Information (PII) is exposed through logging statements or sent to external APIs without proper sanitization. This helps prevent data leaks and ensures compliance with privacy regulations like GDPR and CCPA.

Data tables:

  • org.openrewrite.analysis.java.taint.table.TaintFlowTable: Records taint flows from sources to sinks with their taint types.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find command injection vulnerabilities

org.openrewrite.analysis.java.security.FindCommandInjection

Detects when user-controlled input flows into system command execution methods like Runtime.exec() or ProcessBuilder, which could allow attackers to execute arbitrary commands.

Data tables:

  • org.openrewrite.analysis.java.taint.table.TaintFlowTable: Records taint flows from sources to sinks with their taint types.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find LDAP injection vulnerabilities

org.openrewrite.analysis.java.security.FindLdapInjection

Finds LDAP injection vulnerabilities by tracking tainted data flow from user input to LDAP queries.

Data tables:

  • org.openrewrite.analysis.java.taint.table.TaintFlowTable: Records taint flows from sources to sinks with their taint types.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find path traversal vulnerabilities

org.openrewrite.analysis.java.security.FindPathTraversal

Detects potential path traversal vulnerabilities where user input flows to file system operations without proper validation.

Data tables:

  • org.openrewrite.analysis.java.taint.table.TaintFlowTable: Records taint flows from sources to sinks with their taint types.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find SQL injection vulnerabilities

org.openrewrite.analysis.java.security.FindSqlInjection

Detects potential SQL injection vulnerabilities where user input flows to SQL execution methods without proper sanitization.

Data tables:

  • org.openrewrite.analysis.java.taint.table.TaintFlowTable: Records taint flows from sources to sinks with their taint types.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find unencrypted PII storage

org.openrewrite.analysis.java.security.FindUnencryptedPiiStorage

Identifies when personally identifiable information (PII) is stored in databases, files, or other persistent storage without encryption.

Data tables:

  • org.openrewrite.analysis.java.taint.table.TaintFlowTable: Records taint flows from sources to sinks with their taint types.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find XSS vulnerabilities

org.openrewrite.analysis.java.security.FindXssVulnerability

Detects potential cross-site scripting vulnerabilities where user input flows to output methods without proper sanitization.

Data tables:

  • org.openrewrite.analysis.java.taint.table.TaintFlowTable: Records taint flows from sources to sinks with their taint types.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find XXE vulnerabilities

org.openrewrite.analysis.java.security.FindXxeVulnerability

Locates XML parsers that are not configured to prevent XML External Entity (XXE) attacks.

Data tables:

  • org.openrewrite.analysis.java.taint.table.TaintFlowTable: Records taint flows from sources to sinks with their taint types.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find React prop usage

org.openrewrite.react.search.FindPropUsage

Locates usages of a specific prop of a React component.

Data tables:

  • org.openrewrite.react.table.PropUsages: Information about how specific component props are used.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find React component

org.openrewrite.react.search.FindReactComponent

Locates usages of React components across the codebase including JSX elements and other references. If componentName is null, finds all React components.

Data tables:

  • org.openrewrite.react.table.ReactComponentUses: Information about React component usages including imports, JSX tags, and other references.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Convert field injection to constructor injection

io.moderne.java.spring.boot.FieldToConstructorInjection

Converts @Autowired field injection to constructor injection pattern. For non-final classes, adds both a no-args constructor and the autowired constructor to maintain compatibility with extending classes. Moves @Qualifier annotations to constructor parameters.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add @Valid annotation to fields

io.moderne.java.spring.boot3.AddValidToConfigurationPropertiesFields

In Spring Boot 3.4, validation of @ConfigurationProperties classes annotated with @Validated now follows the Bean Validation specification, only cascading to nested properties if the corresponding field is annotated with @Valid. The recipe will add a @Valid annotation to each field which has a type that has a field which is annotated with a jakarta.validation.constraints.* annotation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Comment on @MockitoSpyBean and @MockitoBean in @Configuration

io.moderne.java.spring.boot3.CommentOnMockAndSpyBeansInConfigSpring34

As stated in Spring Docs @MockitoSpyBean and @MockitoBean will only work in tests, explicitly not in @Configuration annotated classes.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate ConditionalOnAvailableEndpoint for Spring Boot 3.4

io.moderne.java.spring.boot3.ConditionalOnAvailableEndpointMigrationSpring34

Migrate @ConditionalOnAvailableEndpoint(EndpointExposure.CLOUD_FOUNDRY) to @ConditionalOnAvailableEndpoint(EndpointExposure.WEB) for Spring Boot 3.4.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate AbstractDiscoveredEndpoint deprecated constructor

io.moderne.java.spring.boot3.MigrateAbstractDiscoveredEndpointConstructor

The boolean-parameter constructor of AbstractDiscoveredEndpoint has been deprecated in Spring Boot 3.4. This recipe transforms it to use the new constructor with an Access parameter.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate AbstractExposableEndpoint deprecated constructor

io.moderne.java.spring.boot3.MigrateAbstractExposableEndpointConstructor

The boolean-parameter constructor of AbstractExposableEndpoint has been deprecated in Spring Boot 3.4. This recipe transforms it to use the new constructor with an Access parameter instead of boolean enableByDefault.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate @Endpoints defaultAccess value

io.moderne.java.spring.boot3.MigrateEndpointAnnotationAccessValueSpring34

Since Spring Boot 3.4 the @Endpoint access configuration values are no longer true|false but none|read-only|unrestricted.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate EndpointDiscoverer deprecated constructor

io.moderne.java.spring.boot3.MigrateEndpointDiscovererConstructor

The 4-parameter constructor of EndpointDiscoverer has been deprecated in Spring Boot 3.4. This recipe transforms it to use the new 5-parameter constructor with an additional Collection parameter.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate EntityManagerFactoryBuilder deprecated constructor

io.moderne.java.spring.boot3.MigrateEntityManagerFactoryBuilderConstructor

The constructors of EntityManagerFactoryBuilder have been deprecated in Spring Boot 3.4. This recipe transforms them to use the new constructor with a Function parameter for property mapping.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate JmxEndpointDiscoverer deprecated constructor

io.moderne.java.spring.boot3.MigrateJmxEndpointDiscovererConstructor

The 4-parameter constructor of JmxEndpointDiscoverer has been deprecated in Spring Boot 3.4. This recipe transforms it to use the new 5-parameter constructor with an additional Collection parameter.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate WebEndpointDiscoverer 6-parameter constructor to 8-parameter

io.moderne.java.spring.boot3.MigrateWebEndpointDiscovererConstructor

The 6-parameter constructor of WebEndpointDiscoverer has been deprecated in Spring Boot 3.3. This recipe adds two new parameters (AdditionalPathsMapper and OperationFilter<WebOperation>) to the constructor and updates the Bean method signature to inject them as ObjectProvider types.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove Spring Boot 3.5 deprecated conditions

io.moderne.java.spring.boot3.RemoveDeprecatedConditions

Replace Spring Boot 3.5 deprecated condition classes with their corresponding conditional annotations.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove Replace.NONE from @AutoConfigureTestDatabase

io.moderne.java.spring.boot3.RemoveReplaceNoneFromAutoConfigureTestDatabase

Replace.NONE is the default value for @AutoConfigureTestDatabase since Spring Boot 3.4.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove TestRestTemplate.HttpClientOption.ENABLE_REDIRECTS option

io.moderne.java.spring.boot3.RemoveTestRestTemplateEnableRedirectsOptionRecipe

The TestRestTemplate now uses the same follow redirects settings as the regular RestTemplate. The HttpOption.ENABLE_REDIRECTS option has also been deprecated. This recipe removes the option from the TestRestTemplate constructor arguments.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace ConditionOutcome.inverse() with constructor

io.moderne.java.spring.boot3.ReplaceConditionalOutcomeInverse

Replace deprecated ConditionOutcome.inverse(ConditionOutcome outcome) calls with new ConditionOutcome(!outcome.isMatch(), outcome.getConditionMessage()).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace deprecated KafkaConnectionDetails bootstrap server methods

io.moderne.java.spring.boot3.ReplaceDeprecatedKafkaConnectionDetailsBootstrapServerGetters

Replace deprecated KafkaConnectionDetails bootstrap server methods with chained calls. For example, getProducerBootstrapServers() becomes getProducer().getBootstrapServers().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace deprecated ThreadPoolTaskSchedulerBuilder 5-argument constructor

io.moderne.java.spring.boot3.ReplaceDeprecatedThreadPoolTaskSchedulerConstructor

The 5-parameter constructor of ThreadPoolTaskSchedulerBuilder has been deprecated in Spring Boot 3.5. This recipe transforms it to use the builder pattern instead, omitting null values and defaults.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use kafkaAwareTransactionManager setter

io.moderne.java.spring.boot3.ReplaceKafkaTransactionManagerSetter

Replace deprecated ContainerProperties#setTransactionManager(org.springframework.transaction.PlatformTransactionManager) method with ContainerProperties#setKafkaAwareTransactionManager(org.springframework.kafka.transaction.KafkaAwareTransactionManager). The method will be replaced only if its argument has the type KafkaAwareTransactionManager.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace taskExecutor with applicationTaskExecutor

io.moderne.java.spring.boot3.ResolveTaskExecutorFromContext

Use bean name applicationTaskExecutor instead of taskExecutor when resolving TaskExecutor Bean from application context.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add @AutoConfigureMockMvc to @SpringBootTest classes using MockMvc

io.moderne.java.spring.boot4.AddAutoConfigureMockMvc

Adds @AutoConfigureMockMvc annotation to classes annotated with @SpringBootTest that use MockMvc.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate spring-retry to Spring Framework resilience

io.moderne.java.spring.boot4.MigrateSpringRetryToSpringFramework7

Migrate spring-retrys @Retryable and @Backoff annotation to Spring Framework 7 Resilience annotations.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove loaderImplementation from Gradle

io.moderne.java.spring.boot4.RemoveGradleUberJarLoaderImplementationConfig

Removes the Spring Boot Uber-Jar loaderImplementation configuration from Gradle build files.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace deprecated org.springframework.boot.autoconfigure.mongo API

io.moderne.java.spring.boot4.ReplaceDeprecatedAutoconfigureMongoApi

Replace deprecated org.springframework.boot.autoconfigure.mongo API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace deprecated DockerApi

io.moderne.java.spring.boot4.ReplaceDeprecatedDockerApi

Replaces deprecated DockerApi constructors and configuration methods with their modern equivalents.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace deprecated RequestMatcherProvider with new API

io.moderne.java.spring.boot4.ReplaceDeprecatedRequestMatcherProvider

Replaces the deprecated org.springframework.boot.autoconfigure.security.servlet.RequestMatcherProvider with org.springframework.boot.security.autoconfigure.actuate.web.servlet.RequestMatcherProvider. The new interface adds an HttpMethod parameter to the getRequestMatcher method.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace deprecated ThreadPoolTaskSchedulerBuilder constructor

io.moderne.java.spring.boot4.ReplaceDeprecatedThreadPoolTaskSchedulerBuilderApi

Replaces the deprecated 5-argument constructor of ThreadPoolTaskSchedulerBuilder with the builder pattern.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Convert JAX-RS annotations to Spring Web

io.moderne.java.spring.framework.JaxRsToSpringWeb

Converts JAX-RS annotations such as @Path, @GET, @POST, etc., to their Spring Web equivalents like @RestController, @RequestMapping, @GetMapping, etc.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add @Nullable to optional Spring web parameters

io.moderne.java.spring.framework.NullableSpringWebParameters

In Spring Boot 4, JSpecify's @Nullable annotation should be used to indicate that a parameter can be null. This recipe adds @Nullable to parameters annotated with @PathVariable(required = false) or @RequestParam(required = false) and removes the now-redundant required = false attribute.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate HibernateDaoSupport#getSession() usage

io.moderne.java.spring.hibernate.MigrateDaoSupportGetSession

Migrate HibernateDaoSupport#getSession() usage to HibernateDaoSupport#getSessionFactory()#getCurrentSession() and annotate the methods with @Transactional.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate HibernateDaoSupport#getHibernateTemplate#saveOrUpdateAll

io.moderne.java.spring.hibernate.MigrateSaveOrUpdateAll

Migrate removed HibernateDaoSupport#getHibernateTemplate#.saveOrUpdateAll to an iterative HibernateDaoSupport#getHibernateTemplate#.saveOrUpdate.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate antPathRequestMatcher to pathPatternRequestMatcher

io.moderne.java.spring.security6.MigrateAntPathRequestMatcher

In Spring Security 6.5, AntPathRequestMatcher is deprecated in favor of PathPatternRequestMatcher. This recipe migrates static method calls and constructor usage to the new pattern.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add @SpringBootApplication class

io.moderne.java.spring.boot.AddSpringBootApplication

Adds a @SpringBootApplication class containing a main method to bootify your Spring Framework application.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Is likely not a Spring Boot project

io.moderne.java.spring.boot.IsLikelyNotSpringBoot

Marks the project if it's likely not a Spring Boot project.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Is likely a Spring Boot project

io.moderne.java.spring.boot.IsLikelySpringBoot

Marks the project if it's likely a Spring Boot project.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Spring Framework dependencies to Spring Boot

io.moderne.java.spring.boot.MigrateSpringFrameworkDependenciesToSpringBoot

Migrate Spring Framework dependencies to Spring Boot.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Is likely a Spring Framework project

io.moderne.java.spring.framework.IsLikelySpringFramework

Marks the project if it's likely a Spring Framework project.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate beans.xml to Spring Framework configuration class

io.moderne.java.spring.framework.beansxml.BeansXmlToConfiguration

Converts Java/Jakarta EE beans.xml configuration files to Spring Framework @Configuration classes.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate web.xml to WebApplicationInitializer

io.moderne.java.spring.framework.webxml.WebXmlToWebApplicationInitializer

Migrate web.xml to WebApplicationInitializer for Spring applications. This allows for programmatic configuration of the web application context, replacing the need for XML-based configuration. This recipe only picks up web.xml files located in the src/main/webapp/WEB-INF directory to avoid inference with tests. It creates a WebXmlWebAppInitializer class in src/main/java with respect to submodules if they contain java files. If it finds an existing WebXmlWebAppInitializer, it skips the creation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Spring Boot 3.5 best practices

io.moderne.java.spring.boot3.SpringBoot3BestPractices

Applies best practices to Spring Boot 3.5+ applications.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Migrate to Spring Boot 2.0

io.moderne.java.spring.boot2.UpgradeSpringBoot_2_0

Migrate applications to the latest Spring Boot 2.0 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions. This recipe will also chain additional framework migrations (Spring Framework, Spring Data, etc) that are required as part of the migration to Spring Boot 2.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Resolve Deprecations in Spring Boot 3.3

io.moderne.java.spring.boot3.ResolveDeprecationsSpringBoot_3_3

Migrates Deprecations in the Spring Boot 3.3 Release. Contains: - Removal of DefaultJmsListenerContainerFactoryConfigurer.setObservationRegistry - New parameter of WebEndpointDiscoverer constructor

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Spring Boot 3.4 deprecated classes and methods

io.moderne.java.spring.boot3.SpringBoot34Deprecations

Migrate deprecated classes and methods that have been marked for removal in Spring Boot 4.0. This includes constructor changes for EntityManagerFactoryBuilder, HikariCheckpointRestoreLifecycle, and various actuator endpoint discovery classes.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate @Endpoint Security properties to 3.4

io.moderne.java.spring.boot3.SpringBootProperties_3_4

Migrate the settings for Spring Boot Management Endpoint Security from true|false to read-only|none.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Spring Boot 3.4 (Moderne Edition)

io.moderne.java.spring.boot3.UpgradeSpringBoot_3_4

Migrate applications to the latest Spring Boot 3.4 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions. This recipe will also chain additional framework migrations (Spring Framework, Spring Data, etc) that are required as part of the migration to Spring Boot 3.4.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Comment deprecated methods in Spring 3.4

io.moderne.java.spring.boot3.CommentDeprecations

Spring Boot 3.4 deprecates methods that are not commonly used or need manual interaction.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade Gradle to 7.6.4+ for Spring Boot 3.4

io.moderne.java.spring.boot3.UpgradeGradle7Spring34

Spring Boot 3.4 requires Gradle 7.6.4.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade Gradle 8 to 8.4+ for Spring Boot 3.4

io.moderne.java.spring.boot3.UpgradeGradle8Spring34

Spring Boot 3.4 requires Gradle 8.4+.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade MyBatis to Spring Boot 3.4

io.moderne.java.spring.boot3.UpgradeMyBatisToSpringBoot_3_4

Upgrade MyBatis Spring modules to a version corresponding to Spring Boot 3.4.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade Spring Cloud AWS to Spring Boot 3.4 compatible version

io.moderne.java.spring.boot3.UpgradeSpringCloudAWSToSpringBoot_3_4

Upgrade the Spring Cloud AWS dependency to a version compatible with Spring Boot 3.4.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Spring Boot 3.5 deprecated classes and methods

io.moderne.java.spring.boot3.SpringBoot35Deprecations

Migrate deprecated classes and methods that have been marked for removal in Spring Boot 3.5.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update OpenTelemetry resource attributes

io.moderne.java.spring.boot3.UpdateOpenTelemetryResourceAttributes

The service.group resource attribute has been deprecated for OpenTelemetry in Spring Boot 3.5. Consider using alternative attributes or remove the deprecated attribute.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Spring Boot 3.5 (Moderne Edition)

io.moderne.java.spring.boot3.UpgradeSpringBoot_3_5

Migrate applications to the latest Spring Boot 3.5 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions. This recipe will also chain additional framework migrations (Spring Framework, Spring Data, etc) that are required as part of the migration to Spring Boot 3.5.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Use bean name applicationTaskExecutor instead of taskExecutor

io.moderne.java.spring.boot3.ReplaceTaskExecutorNameByApplicationTaskExecutorName

Spring Boot 3.5 removed the bean name taskExecutor. Where this bean name is used, the recipe replaces the bean name to applicationTaskExecutor. This also includes instances where the developer provided their own bean named taskExecutor. This also includes scenarios where JSR-250's @Resource annotation is used.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Spring Boot 4.0 Module Starter Relocations

io.moderne.java.spring.boot4.ModuleStarterRelocations

Relocate types and packages for Spring Boot 4.0 modular starters.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Spring Boot 4.0 modular starters

io.moderne.java.spring.boot4.MigrateToModularStarters

Removes monolithic starters and adds the necessary Spring Boot 4.0 starter dependencies based on package usage. Spring Boot 4.0 has a modular design requiring explicit starters for each feature. This recipe detects feature usage via package imports and adds the appropriate starters. Note: Higher-level starters (like data-jpa) include lower-level ones (like jdbc) transitively, so only the highest-level detected starter is added for each technology.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Spring Boot 4.0 (Moderne Edition)

io.moderne.java.spring.boot4.UpgradeSpringBoot_4_0

Migrate applications to the latest Spring Boot 4.0 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions. This recipe will also chain additional framework migrations (Spring Framework, Spring Data, etc) that are required as part of the migration to Spring Boot 4.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Add Jackson2 for Jersey using JSON

io.moderne.java.spring.boot4.AddJackson2ForJerseyJson

Check whether a module uses Jersey on combination with JSON and adds the needed spring-boot-jackson dependency and conditionally spring-boot-jackson2 dependency.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add MongoDB representation properties for UUID and BigDecimal

io.moderne.java.spring.boot4.AddMongoDbRepresentationProperties

Adds the 'spring.mongodb.representation.uuid' property with value 'standard' and the 'spring.data.mongodb.representation.big-decimal' property with the value 'decimal128' to Spring configuration files when a MongoDB dependency is detected.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Spring Retry to Spring Resilience

io.moderne.java.spring.boot4.MigrateSpringRetry

Handle spring-retry not longer managed by Spring Boot and the possible migration to Spring Core Resilience.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Adopt jackson 3

io.moderne.java.spring.boot4.AdoptJackson3

Adopt Jackson 3 which is supported by Spring Boot 4 and Jackson 2 support is deprecated.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate DefaultResponseErrorHandler.handleError method signature

io.moderne.java.spring.framework.MigrateDefaultResponseErrorHandler

Migrates overridden handleError(ClientHttpResponse response) methods to the new signature handleError(URI url, HttpMethod method, ClientHttpResponse response) in classes extending DefaultResponseErrorHandler. The old single-argument method was removed in Spring Framework 7.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Spring Cloud properties to 2020

io.moderne.java.spring.cloud2020.SpringCloudProperties_2020

Migrate properties found in application.properties and application.yml.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Spring Cloud properties to 2021

io.moderne.java.spring.cloud2021.SpringCloudProperties_2021

Migrate properties found in application.properties and application.yml.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Spring Cloud properties to 2022

io.moderne.java.spring.cloud2022.SpringCloudProperties_2022

Migrate properties found in application.properties and application.yml.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Spring Cloud properties to 2023

io.moderne.java.spring.cloud2023.SpringCloudProperties_2023

Migrate properties found in application.properties and application.yml.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Spring Cloud properties to 2024

io.moderne.java.spring.cloud2024.SpringCloudProperties_2024

Migrate properties found in application.properties and application.yml.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Spring Cloud properties to 2025

io.moderne.java.spring.cloud2025.SpringCloudProperties_2025

Migrate properties found in application.properties and application.yml.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add Spring Framework modular dependencies

io.moderne.java.spring.framework.ModularSpringFrameworkDependencies

Adds Spring Framework modular dependencies based on package usage, replacing legacy monolithic org.springframework:spring.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Spring Kafka 3.3

io.moderne.java.spring.boot3.UpgradeSpringKafka_3_3

Migrate applications to the latest Spring Kafka 3.3 release.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Spring ORM to 5

io.moderne.java.spring.orm.SpringORM5

Migrate applications using Spring ORM Hibernate Support to Hibernate 5 compatible version. This will enable a further migration by the Spring Framework migration past 5.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Spring Security 6.5

io.moderne.java.spring.security6.UpgradeSpringSecurity_6_5

Migrate applications to the latest Spring Security 6.5 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Spring Framework to Spring Boot

io.moderne.java.spring.boot.SpringToSpringBoot

Migrate non Spring Boot applications to the latest compatible Spring Boot release. This recipe will modify an application's build files introducing Maven dependency management for Spring Boot, or adding the Gradle Spring Boot build plugin.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use VulnCheck Exploit Intelligence to fix vulnerabilities

io.moderne.vulncheck.FixVulnCheckVulnerabilities

This software composition analysis (SCA) tool detects and upgrades dependencies with publicly disclosed vulnerabilities. This recipe both generates a report of vulnerable dependencies and upgrades to newer versions with fixes. This recipe by default only upgrades to the latest patch version. If a minor or major upgrade is required to reach the fixed version, this can be controlled using the maximumUpgradeDelta option. Vulnerability information comes from VulnCheck Vulnerability Intelligence. The recipe has an option to limit fixes to only those vulnerabilities that have evidence of exploitation at various levels of severity.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.java.dependencies.table.VulnerabilityReport: A vulnerability report that includes detailed information about the affected artifact and the corresponding CVEs.
  • io.moderne.vulncheck.table.VulnerabilityReportWithExploits: A vulnerability report that includes detailed information about the affected artifact and the corresponding CVEs and enriched by VulnCheck exploit data.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add entries to .gitignore

org.openrewrite.AddToGitignore

Adds entries to the project's .gitignore file. If no .gitignore file exists, one will be created. Existing entries that match will not be duplicated.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Delete files

org.openrewrite.DeleteSourceFiles

Delete files by source path.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove ignoral of files or directories from .gitignore

org.openrewrite.ExcludeFileFromGitignore

This recipe will remove a file or directory from the .gitignore file. If the file or directory is already in the .gitignore file, it will be removed or negated. If the file or directory is not in the .gitignore file, no action will be taken.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find colliding source files

org.openrewrite.FindCollidingSourceFiles

Finds source files which share a path with another source file. There should always be exactly one source file per path within a repository. This is a diagnostic for finding problems in OpenRewrite parsers/build plugins.

Data tables:

  • org.openrewrite.table.CollidingSourceFiles: Source files that have the same relative path.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find deserialization errors

org.openrewrite.FindDeserializationErrors

Produces a data table collecting all deserialization errors of serialized LSTs.

Data tables:

  • org.openrewrite.table.DeserializationErrorTable: Table collecting any LST deserialization errors.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Show Git source control metadata

org.openrewrite.FindGitProvenance

List out the contents of each unique GitProvenance marker in the set of source files. When everything is working correctly, exactly one such marker should be printed as all source files are expected to come from the same repository / branch / commit hash.

Data tables:

  • org.openrewrite.table.DistinctGitProvenance: List out the contents of each unique GitProvenance marker in the set of source files. When everything is working correctly, exactly one such marker should be printed as all source files are expected to come from the same repository / branch / commit hash.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find LST provenance

org.openrewrite.FindLstProvenance

Produces a data table showing what versions of OpenRewrite/Moderne tooling was used to produce a given LST.

Data tables:

  • org.openrewrite.table.LstProvenanceTable: Table showing which tools were used to produce LSTs.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find source files with ParseExceptionResult markers

org.openrewrite.FindParseFailures

This recipe explores parse failures after an LST is produced for classifying the types of failures that can occur and prioritizing fixes according to the most common problems.

Data tables:

  • org.openrewrite.table.ParseFailures: A list of files that failed to parse along with stack traces of their failures.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find instances of type Quark

org.openrewrite.FindQuarks

Quark source files are pointers to the existence of a file without capturing any of the contents of the file.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find files

org.openrewrite.FindSourceFiles

Find files by source path. Paths are always interpreted as relative to the repository root.

Data tables:

  • org.openrewrite.table.SourcesFiles: Source files that matched some criteria.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Is in repository

org.openrewrite.IsInRepository

A search recipe which marks files that are in a repository with one of the supplied names. Intended for use as a precondition for other recipes being run over many different repositories.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

List runtime classpath

org.openrewrite.ListRuntimeClasspath

A diagnostic utility which emits the runtime classpath to a data table.

Data tables:

  • org.openrewrite.table.ClasspathReport: Contains a report of the runtime classpath and any other jars found inside each classpath entry.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Move a file

org.openrewrite.MoveFile

Move a file to a different directory. The file name will remain the same.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Rename a file

org.openrewrite.RenameFile

Rename a file while keeping it in the same directory.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Set file permission attributes

org.openrewrite.SetFilePermissions

Set a file's read, write and executable permission attributes.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find build metadata

org.openrewrite.search.FindBuildMetadata

Find source files with matching build metadata.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find committers on repositories

org.openrewrite.search.FindCommitters

List the committers on a repository.

Data tables:

  • org.openrewrite.table.DistinctCommitters: The distinct set of committers per repository.
  • org.openrewrite.table.CommitsByDay: The commit activity by day by committer.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find parse to print inequality

org.openrewrite.search.FindParseToPrintInequality

OpenRewrite Parser implementations should produce SourceFile objects whose printAll() method should be byte-for-byte equivalent with the original source file. When this isn't true, recipes can still run on the SourceFile and even produce diffs, but the diffs would fail to apply as a patch to the original source file. Most Parser use Parser#requirePrintEqualsInput to produce a ParseError when they fail to produce a SourceFile that is print idempotent.

Data tables:

  • org.openrewrite.table.ParseToPrintInequalities: A list of files that parsers produced SourceFile which, when printed, didn't match the original source code.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Repository contains file

org.openrewrite.search.RepositoryContainsFile

Intended to be used primarily as a precondition for other recipes, this recipe checks if a repository contains a specific file or files matching a pattern. If present all files in the repository are marked with a SearchResult marker. If you want to get only the matching file as a search result, use FindSourceFiles instead.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Append to text file

org.openrewrite.text.AppendToTextFile

Appends or replaces content of an existing plain text file, or creates a new one if it doesn't already exist. Please note that this recipes requires existing plain text files' format to be successfully parsable by OpenRewrite. If a file is left unchanged, it might be parsed as a Quark rather than plain text. In such case, use the plainTextMask option. See the Gradle or Maven plugin configuration page.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change text

org.openrewrite.text.ChangeText

Completely replaces the contents of the text file with other text. Use together with a FindSourceFiles precondition to limit which files are changed.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Create text file

org.openrewrite.text.CreateTextFile

Creates a new plain text file.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

End of Line @ End of File (EOL @ EOF)

org.openrewrite.text.EndOfLineAtEndOfFile

Ensure that the file ends with the newline character. Note: If this recipe modifies a file, it converts the file into plain text. As such, this recipe should be run after any recipe that modifies the language-specific LST.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find text

org.openrewrite.text.Find

Textual search, optionally using Regular Expression (regex) to query.

Data tables:

  • org.openrewrite.table.TextMatches: Lines matching simple text search.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find and replace

org.openrewrite.text.FindAndReplace

Textual find and replace, optionally interpreting the search query as a Regular Expression (regex). When operating on source files that are language-specific Lossless Semantic Tree, such as Java or XML, this operation converts the source file to plain text for the rest of the recipe run. So if you are combining this recipe with language-specific recipes in a single recipe run put all the language-specific recipes before this recipe.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Experimental find text with multiselect

org.openrewrite.text.FindMultiselect

Search for text, treating all textual sources as plain text. This version of the recipe exists to experiment with multiselect recipe options.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove byte order mark (BOM)

org.openrewrite.text.RemoveByteOrderMark

Removes UTF-8 byte order marks from the beginning of files. The BOM character (U+FEFF) is generally unnecessary in UTF-8 files and can cause issues with some tools.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Abstract types should not have public or internal constructors

org.openrewrite.csharp.recipes.meziantou.analyzer.AbstractTypesShouldNotHaveConstructorsMA0017

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use nameof operator in ArgumentException

org.openrewrite.csharp.recipes.meziantou.analyzer.ArgumentExceptionShouldSpecifyArgumentNameMA0043

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Avoid comparison with bool constant

org.openrewrite.csharp.recipes.meziantou.analyzer.AvoidComparisonWithBoolConstantMA0073

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Avoid using redundant else

org.openrewrite.csharp.recipes.meziantou.analyzer.AvoidUsingRedundantElseMA0071

The 'if' block contains a jump statement (break, continue, goto, return, throw, yield break). Using 'else' is redundant and needlessly maintains a higher nesting level.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Make class sealed

org.openrewrite.csharp.recipes.meziantou.analyzer.ClassMustBeSealedMA0053

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add a comma after the last value

org.openrewrite.csharp.recipes.meziantou.analyzer.CommaMA0007

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer rethrowing an exception implicitly

org.openrewrite.csharp.recipes.meziantou.analyzer.DoNotRemoveOriginalExceptionFromThrowStatementMA0027

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Do not use blocking calls in an async method

org.openrewrite.csharp.recipes.meziantou.analyzer.DoNotUseBlockingCallInAsyncContextMA0042

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Do not use blocking calls in a sync method (need to make calling method async)

org.openrewrite.csharp.recipes.meziantou.analyzer.DoNotUseBlockingCallInAsyncContextMA0045

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use an explicit StringComparer when possible

org.openrewrite.csharp.recipes.meziantou.analyzer.DoNotUseEqualityComparerDefaultOfStringMA0024

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use SequenceEqual instead of equality operator

org.openrewrite.csharp.recipes.meziantou.analyzer.DoNotUseEqualityOperatorsForSpanOfCharMA0103

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use StringComparer.GetHashCode instead of string.GetHashCode

org.openrewrite.csharp.recipes.meziantou.analyzer.DoNotUseStringGetHashCodeMA0021

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

A class that provides Equals(T) should implement IEquatable<T>

org.openrewrite.csharp.recipes.meziantou.analyzer.EqualityShouldBeCorrectlyImplementedMA0077

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Sender should be 'this' for instance events

org.openrewrite.csharp.recipes.meziantou.analyzer.EventsShouldHaveProperArgumentsMA0091

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Make class static

org.openrewrite.csharp.recipes.meziantou.analyzer.MakeClassStaticMA0036

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Make interpolated string

org.openrewrite.csharp.recipes.meziantou.analyzer.MakeInterpolatedStringMA0165

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Make member readonly

org.openrewrite.csharp.recipes.meziantou.analyzer.MakeMemberReadOnlyMA0102

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Make method static (deprecated, use CA1822 instead)

org.openrewrite.csharp.recipes.meziantou.analyzer.MakeMethodStaticMA0038

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Make property static (deprecated, use CA1822 instead)

org.openrewrite.csharp.recipes.meziantou.analyzer.MakeMethodStaticMA0041

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Mark attributes with AttributeUsageAttribute

org.openrewrite.csharp.recipes.meziantou.analyzer.MarkAttributesWithAttributeUsageAttributeMA0010

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Method overrides should not change default values

org.openrewrite.csharp.recipes.meziantou.analyzer.MethodOverridesShouldNotChangeParameterDefaultsMA0061

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add parameter name to improve readability

org.openrewrite.csharp.recipes.meziantou.analyzer.NamedParameterMA0003

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use parentheses to make not pattern clearer

org.openrewrite.csharp.recipes.meziantou.analyzer.NotPatternShouldBeParenthesizedCodeMA0164

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use direct methods instead of LINQ methods

org.openrewrite.csharp.recipes.meziantou.analyzer.OptimizeLinqUsageMA0020

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Combine LINQ methods

org.openrewrite.csharp.recipes.meziantou.analyzer.OptimizeLinqUsageMA0029

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove useless OrderBy call

org.openrewrite.csharp.recipes.meziantou.analyzer.OptimizeLinqUsageMA0030

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Optimize Enumerable.Count() usage

org.openrewrite.csharp.recipes.meziantou.analyzer.OptimizeLinqUsageMA0031

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use 'Cast' instead of 'Select' to cast

org.openrewrite.csharp.recipes.meziantou.analyzer.OptimizeLinqUsageMA0078

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use indexer instead of LINQ methods

org.openrewrite.csharp.recipes.meziantou.analyzer.OptimizeLinqUsageMA0098

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use 'Order' instead of 'OrderBy'

org.openrewrite.csharp.recipes.meziantou.analyzer.OptimizeLinqUsageMA0159

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Optimize string method usage

org.openrewrite.csharp.recipes.meziantou.analyzer.OptimizeStartsWithMA0089

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Optimize StringBuilder usage

org.openrewrite.csharp.recipes.meziantou.analyzer.OptimizeStringBuilderUsageMA0028

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Parameters with [SupplyParameterFromQuery] attributes should also be marked as [Parameter]

org.openrewrite.csharp.recipes.meziantou.analyzer.ParameterAttributeForRazorComponentMA0116

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Parameters with [EditorRequired] attributes should also be marked as [Parameter]

org.openrewrite.csharp.recipes.meziantou.analyzer.ParameterAttributeForRazorComponentMA0117

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Method overrides should not omit params keyword

org.openrewrite.csharp.recipes.meziantou.analyzer.PreserveParamsOnOverrideMA0081

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove empty statement

org.openrewrite.csharp.recipes.meziantou.analyzer.RemoveEmptyStatementMA0037

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove useless ToString call

org.openrewrite.csharp.recipes.meziantou.analyzer.RemoveUselessToStringMA0044

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace constant Enum.ToString with nameof

org.openrewrite.csharp.recipes.meziantou.analyzer.ReplaceEnumToStringWithNameofMA0052

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Return Task.FromResult instead of returning null

org.openrewrite.csharp.recipes.meziantou.analyzer.ReturnTaskFromResultInsteadOfReturningNullMA0022

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove redundant argument value

org.openrewrite.csharp.recipes.meziantou.analyzer.SimplifyCallerArgumentExpressionMA0108

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

String contains an implicit end of line character

org.openrewrite.csharp.recipes.meziantou.analyzer.StringShouldNotContainsNonDeterministicEndOfLineMA0101

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Forward the CancellationToken parameter to methods that take one

org.openrewrite.csharp.recipes.meziantou.analyzer.UseAnOverloadThatHasCancellationTokenFixer_ArgumentMA0040

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Forward the CancellationToken using .WithCancellation()

org.openrewrite.csharp.recipes.meziantou.analyzer.UseAnOverloadThatHasCancellationTokenFixer_AwaitForEachMA0079

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Forward the TimeProvider to methods that take one

org.openrewrite.csharp.recipes.meziantou.analyzer.UseAnOverloadThatHasTimeProviderMA0166

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use Array.Empty<T>()

org.openrewrite.csharp.recipes.meziantou.analyzer.UseArrayEmptyMA0005

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use Task.ConfigureAwait

org.openrewrite.csharp.recipes.meziantou.analyzer.UseConfigureAwaitMA0004

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use DateTime.UnixEpoch

org.openrewrite.csharp.recipes.meziantou.analyzer.UseDateTimeUnixEpochMA0113

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use DateTimeOffset.UnixEpoch

org.openrewrite.csharp.recipes.meziantou.analyzer.UseDateTimeUnixEpochMA0114

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use EventArgs.Empty

org.openrewrite.csharp.recipes.meziantou.analyzer.UseEventArgsEmptyMA0019

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

EventArgs should not be null

org.openrewrite.csharp.recipes.meziantou.analyzer.UseEventArgsEmptyMA0093

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use Guid.Empty

org.openrewrite.csharp.recipes.meziantou.analyzer.UseGuidEmptyMA0067

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use 'is' operator instead of SequenceEqual

org.openrewrite.csharp.recipes.meziantou.analyzer.UseIsPatternInsteadOfSequenceEqualMA0128

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use InvokeVoidAsync when the returned value is not used

org.openrewrite.csharp.recipes.meziantou.analyzer.UseJSRuntimeInvokeVoidAsyncWhenReturnValueIsNotUsedMA0120

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use langword in XML comment

org.openrewrite.csharp.recipes.meziantou.analyzer.UseLangwordInXmlCommentMA0154

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use pattern matching instead of inequality operators for null check

org.openrewrite.csharp.recipes.meziantou.analyzer.UsePatternMatchingForEqualityComparisonsMA0141

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use pattern matching instead of equality operators for null check

org.openrewrite.csharp.recipes.meziantou.analyzer.UsePatternMatchingForEqualityComparisonsMA0142

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use pattern matching instead of equality operators for discrete value

org.openrewrite.csharp.recipes.meziantou.analyzer.UsePatternMatchingForEqualityComparisonsMA0148

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use pattern matching instead of inequality operators for discrete value

org.openrewrite.csharp.recipes.meziantou.analyzer.UsePatternMatchingForEqualityComparisonsMA0149

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use the Regex source generator

org.openrewrite.csharp.recipes.meziantou.analyzer.UseRegexSourceGeneratorMA0110

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

IEqualityComparer<string> or IComparer<string> is missing

org.openrewrite.csharp.recipes.meziantou.analyzer.UseStringComparerMA0002

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

StringComparison is missing

org.openrewrite.csharp.recipes.meziantou.analyzer.UseStringComparisonMA0001

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Avoid implicit culture-sensitive methods

org.openrewrite.csharp.recipes.meziantou.analyzer.UseStringComparisonMA0074

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use string.Create instead of FormattableString

org.openrewrite.csharp.recipes.meziantou.analyzer.UseStringCreateInsteadOfFormattableStringMA0111

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use String.Equals instead of equality operator

org.openrewrite.csharp.recipes.meziantou.analyzer.UseStringEqualsMA0006

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add StructLayoutAttribute

org.openrewrite.csharp.recipes.meziantou.analyzer.UseStructLayoutAttributeMA0008

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Validate arguments correctly in iterator methods

org.openrewrite.csharp.recipes.meziantou.analyzer.ValidateArgumentsCorrectlyMA0050

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Abstract types should not have public constructors

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.AbstractTypesShouldNotHaveConstructorsCA1012

Constructors on abstract types can be called only by derived types. Because public constructors create instances of a type, and you cannot create instances of an abstract type, an abstract type that has a public constructor is incorrectly designed.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Avoid constant arrays as arguments

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.AvoidConstArraysCA1861

Constant arrays passed as arguments are not reused when called repeatedly, which implies a new array is created each time. Consider extracting them to 'static readonly' fields to improve performance if the passed array is not mutated within the called method.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Avoid redundant length argument

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.AvoidLengthCalculationWhenSlicingToEndCA1514

An explicit length calculation can be error-prone and can be avoided when slicing to end of the buffer.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Avoid inexact read with 'Stream.Read'

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.AvoidUnreliableStreamReadCA2022

A call to 'Stream.Read' may return fewer bytes than requested, resulting in unreliable code if the return value is not checked.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Avoid unsealed attributes

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.AvoidUnsealedAttributesCA1813

The .NET Framework class library provides methods for retrieving custom attributes. By default, these methods search the attribute inheritance hierarchy. Sealing the attribute eliminates the search through the inheritance hierarchy and can improve performance.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Avoid unused private fields

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.AvoidUnusedPrivateFieldsCA1823

Private fields were detected that do not appear to be accessed in the assembly.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Avoid zero-length array allocations

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.AvoidZeroLengthArrayAllocationsCA1825

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Do not duplicate indexed element initializations

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.CSharpAvoidDuplicateElementInitializationCA2244

Indexed elements in objects initializers must initialize unique elements. A duplicate index might overwrite a previous element initialization.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

This method uses runtime marshalling even when the 'DisableRuntimeMarshallingAttribute' is applied

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.CSharpDisableRuntimeMarshallingCA1421

This method uses runtime marshalling even when runtime marshalling is disabled, which can cause unexpected behavior differences at runtime due to different expectations of a type's native layout.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Dispose methods should call base class dispose

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.CSharpDisposeMethodsShouldCallBaseClassDisposeCA2215

A type that implements System.IDisposable inherits from a type that also implements IDisposable. The Dispose method of the inheriting type does not call the Dispose method of the parent type. To fix a violation of this rule, call base.Dispose in your Dispose method.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Do not compare Span<T> to 'null' or 'default'

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.CSharpDoNotCompareSpanToNullCA2265

Comparing a span to 'null' or 'default' might not do what you intended. 'default' and the 'null' literal are implicitly converted to 'Span<T>.Empty'. Remove the redundant comparison or make the code more explicit by using 'IsEmpty'.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Unnecessary call to 'Dictionary.ContainsKey(key)'

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.CSharpDoNotGuardCallCA1853

Do not guard 'Dictionary.Remove(key)' with 'Dictionary.ContainsKey(key)'. The former already checks whether the key exists, and will not throw if it does not.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Unnecessary call to 'Contains(item)'

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.CSharpDoNotGuardCallCA1868

Do not guard 'Add(item)' or 'Remove(item)' with 'Contains(item)' for the set. The former two already check whether the item exists and will return if it was added or removed.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Do not initialize unnecessarily

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.CSharpDoNotInitializeUnnecessarilyCA1805

The .NET runtime initializes all fields of reference types to their default values before running the constructor. In most cases, explicitly initializing a field to its default value in a constructor is redundant, adding maintenance costs and potentially degrading performance (such as with increased assembly size), and the explicit initialization can be removed. In some cases, such as with static readonly fields that permanently retain their default value, consider instead changing them to be constants or properties.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Do not pass a nullable struct to 'ArgumentNullException.ThrowIfNull'

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.CSharpDoNotPassNonNullableValueToArgumentNullExceptionThrowIfNullCA1871

'ArgumentNullException.ThrowIfNull' accepts an 'object', so passing a nullable struct may cause the value to be boxed.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Do not pass a non-nullable value to 'ArgumentNullException.ThrowIfNull'

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.CSharpDoNotPassNonNullableValueToArgumentNullExceptionThrowIfNullCA2264

'ArgumentNullException.ThrowIfNull' throws when the passed argument is 'null'. Certain constructs like non-nullable structs, 'nameof()' and 'new' expressions are known to never be null, so 'ArgumentNullException.ThrowIfNull' will never throw.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Do not use Count() or LongCount() when Any() can be used

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.CSharpDoNotUseCountWhenAnyCanBeUsedCA1827

For non-empty collections, Count() and LongCount() enumerate the entire sequence, while Any() stops at the first item or the first item that satisfies a condition.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Do not use CountAsync() or LongCountAsync() when AnyAsync() can be used

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.CSharpDoNotUseCountWhenAnyCanBeUsedCA1828

For non-empty collections, CountAsync() and LongCountAsync() enumerate the entire sequence, while AnyAsync() stops at the first item or the first item that satisfies a condition.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Do not use Enumerable methods on indexable collections

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.CSharpDoNotUseEnumerableMethodsOnIndexableCollectionsInsteadUseTheCollectionDirectlyCA1826

This collection is directly indexable. Going through LINQ here causes unnecessary allocations and CPU work.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

All members declared in parent interfaces must have an implementation in a DynamicInterfaceCastableImplementation-attributed interface

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.CSharpDynamicInterfaceCastableImplementationCA2256

Types attributed with 'DynamicInterfaceCastableImplementationAttribute' act as an interface implementation for a type that implements the 'IDynamicInterfaceCastable' type. As a result, it must provide an implementation of all of the members defined in the inherited interfaces, because the type that implements 'IDynamicInterfaceCastable' will not provide them otherwise.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Members defined on an interface with the 'DynamicInterfaceCastableImplementationAttribute' should be 'static'

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.CSharpDynamicInterfaceCastableImplementationCA2257

Since a type that implements 'IDynamicInterfaceCastable' may not implement a dynamic interface in metadata, calls to an instance interface member that is not an explicit implementation defined on this type are likely to fail at runtime. Mark new interface members 'static' to avoid runtime errors.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enum Storage should be Int32

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.CSharpEnumStorageShouldBeInt32CA1028

An enumeration is a value type that defines a set of related named constants. By default, the System.Int32 data type is used to store the constant value. Although you can change this underlying type, it is not required or recommended for most scenarios.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enums should have zero value

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.CSharpEnumsShouldHaveZeroValueCA1008

The default value of an uninitialized enumeration, just as other value types, is zero. A nonflags-attributed enumeration should define a member by using the value of zero so that the default value is a valid value of the enumeration. If an enumeration that has the FlagsAttribute attribute applied defines a zero-valued member, its name should be ""None"" to indicate that no values have been set in the enumeration.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Forward the 'CancellationToken' parameter to methods

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.CSharpForwardCancellationTokenToInvocationsCA2016

Forward the 'CancellationToken' parameter to methods to ensure the operation cancellation notifications gets properly propagated, or pass in 'CancellationToken.None' explicitly to indicate intentionally not propagating the token.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Identifiers should not contain underscores

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.CSharpIdentifiersShouldNotContainUnderscoresCA1707

By convention, identifier names do not contain the underscore (_) character. This rule checks namespaces, types, members, and parameters.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Consider making public types internal

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.CSharpMakeTypesInternalCA1515

Unlike a class library, an application's API isn't typically referenced publicly, so types can be marked internal.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Mark all non-serializable fields

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.CSharpMarkAllNonSerializableFieldsCA2235

An instance field of a type that is not serializable is declared in a type that is serializable.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Mark members as static

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.CSharpMarkMembersAsStaticCA1822

Members that do not access instance data or call instance methods can be marked as static. After you mark the methods as static, the compiler will emit nonvirtual call sites to these members. This can give you a measurable performance gain for performance-sensitive code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Override equals and operator equals on value types

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.CSharpOverrideEqualsAndOperatorEqualsOnValueTypesCA1815

For value types, the inherited implementation of Equals uses the Reflection library and compares the contents of all fields. Reflection is computationally expensive, and comparing every field for equality might be unnecessary. If you expect users to compare or sort instances, or to use instances as hash table keys, your value type should implement Equals.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer 'AsSpan' over 'Substring'

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.CSharpPreferAsSpanOverSubstringCA1846

'AsSpan' is more efficient than 'Substring'. 'Substring' performs an O(n) string copy, while 'AsSpan' does not and has a constant cost.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Dictionary.Contains methods

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.CSharpPreferDictionaryContainsMethodsCA1841

'ContainsKey' is usually O(1), while 'Keys.Contains' may be O(n) in some cases. Additionally, many dictionary implementations lazily initialize the Keys collection to cut back on allocations.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer the 'IDictionary.TryGetValue(TKey, out TValue)' method

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.CSharpPreferDictionaryTryMethodsOverContainsKeyGuardCA1854

Prefer a 'TryGetValue' call over a Dictionary indexer access guarded by a 'ContainsKey' check. 'ContainsKey' and the indexer both would lookup the key under the hood, so using 'TryGetValue' removes the extra lookup.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer the 'IDictionary.TryAdd(TKey, TValue)' method

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.CSharpPreferDictionaryTryMethodsOverContainsKeyGuardCA1864

Prefer a 'TryAdd' call over an 'Add' call guarded by a 'ContainsKey' check. 'TryAdd' behaves the same as 'Add', except that when the specified key already exists, it returns 'false' instead of throwing an exception.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer generic overload when type is known

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.CSharpPreferGenericOverloadsCA2263

Using a generic overload is preferable to the 'System.Type' overload when the type is known, promoting cleaner and more type-safe code with improved compile-time checks.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer static 'HashData' method over 'ComputeHash'

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.CSharpPreferHashDataOverComputeHashCA1850

It is more efficient to use the static 'HashData' method over creating and managing a HashAlgorithm instance to call 'ComputeHash'.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer IsEmpty over Count

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.CSharpPreferIsEmptyOverCountCA1836

For determining whether the object contains or not any items, prefer using 'IsEmpty' property rather than retrieving the number of items from the 'Count' property and comparing it to 0 or 1.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Avoid using 'Enumerable.Any()' extension method

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.CSharpPreferLengthCountIsEmptyOverAnyCA1860

Prefer using 'IsEmpty', 'Count' or 'Length' properties whichever available, rather than calling 'Enumerable.Any()'. The intent is clearer and it is more performant than using 'Enumerable.Any()' extension method.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer the 'Memory'-based overloads for 'ReadAsync' and 'WriteAsync'

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.CSharpPreferStreamAsyncMemoryOverloadsCA1835

'Stream' has a 'ReadAsync' overload that takes a 'Memory<Byte>' as the first argument, and a 'WriteAsync' overload that takes a 'ReadOnlyMemory<Byte>' as the first argument. Prefer calling the memory based overloads, which are more efficient.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use the 'StringComparison' method overloads to perform case-insensitive string comparisons

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.CSharpRecommendCaseInsensitiveStringComparisonCA1862

Avoid calling 'ToLower', 'ToUpper', 'ToLowerInvariant' and 'ToUpperInvariant' to perform case-insensitive string comparisons because they lead to an allocation. Instead, prefer calling the method overloads of 'Contains', 'IndexOf' and 'StartsWith' that take a 'StringComparison' enum value to perform case-insensitive comparisons. Switching to using an overload that takes a 'StringComparison' might cause subtle changes in behavior, so it's important to conduct thorough testing after applying the suggestion. Additionally, if a culturally sensitive comparison is not required, consider using 'StringComparison.OrdinalIgnoreCase'.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Specify a culture or use an invariant version

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.CSharpSpecifyCultureForToLowerAndToUpperCA1311

Specify culture to help avoid accidental implicit dependency on current culture. Using an invariant version yields consistent results regardless of the culture of an application.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Specify marshaling for P/Invoke string arguments

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.CSharpSpecifyMarshalingForPInvokeStringArgumentsCA2101

A platform invoke member allows partially trusted callers, has a string parameter, and does not explicitly marshal the string. This can cause a potential security vulnerability.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Static holder types should be Static or NotInheritable

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.CSharpStaticHolderTypesCA1052

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Test for empty strings using string length

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.CSharpTestForEmptyStringsUsingStringLengthCA1820

Comparing strings by using the String.Length property or the String.IsNullOrEmpty method is significantly faster than using Equals.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Test for NaN correctly

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.CSharpTestForNaNCorrectlyCA2242

This expression tests a value against Single.Nan or Double.Nan. Use Single.IsNan(Single) or Double.IsNan(Double) to test the value.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use AsSpan or AsMemory instead of Range-based indexers when appropriate

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.CSharpUseAsSpanInsteadOfRangeIndexerCA1831

The Range-based indexer on string values produces a copy of requested portion of the string. This copy is usually unnecessary when it is implicitly used as a ReadOnlySpan or ReadOnlyMemory value. Use the AsSpan method to avoid the unnecessary copy.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use AsSpan or AsMemory instead of Range-based indexers when appropriate

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.CSharpUseAsSpanInsteadOfRangeIndexerCA1832

The Range-based indexer on array values produces a copy of requested portion of the array. This copy is usually unnecessary when it is implicitly used as a ReadOnlySpan or ReadOnlyMemory value. Use the AsSpan method to avoid the unnecessary copy.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use AsSpan or AsMemory instead of Range-based indexers when appropriate

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.CSharpUseAsSpanInsteadOfRangeIndexerCA1833

The Range-based indexer on array values produces a copy of requested portion of the array. This copy is often unwanted when it is implicitly used as a Span or Memory value. Use the AsSpan method to avoid the copy.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use literals where appropriate

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.CSharpUseLiteralsWhereAppropriateCA1802

A field is declared static and read-only (Shared and ReadOnly in Visual Basic), and is initialized by using a value that is computable at compile time. Because the value that is assigned to the targeted field is computable at compile time, change the declaration to a const (Const in Visual Basic) field so that the value is computed at compile time instead of at runtime.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use ordinal string comparison

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.CSharpUseOrdinalStringComparisonCA1309

A string comparison operation that is nonlinguistic does not set the StringComparison parameter to either Ordinal or OrdinalIgnoreCase. By explicitly setting the parameter to either StringComparison.Ordinal or StringComparison.OrdinalIgnoreCase, your code often gains speed, becomes more correct, and becomes more reliable.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use Length/Count property instead of Count() when available

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.CSharpUsePropertyInsteadOfCountMethodWhenAvailableCA1829

Enumerable.Count() potentially enumerates the sequence while a Length/Count property is a direct access.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use a cached 'SearchValues' instance

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.CSharpUseSearchValuesCA1870

Using a cached 'SearchValues' instance is more efficient than passing values to 'IndexOfAny'/'ContainsAny' directly.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use span-based 'string.Concat'

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.CSharpUseSpanBasedStringConcatCA1845

It is more efficient to use 'AsSpan' and 'string.Concat', instead of 'Substring' and a concatenation operator.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer 'Clear' over 'Fill'

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.CSharpUseSpanClearInsteadOfFillCA1855

It is more efficient to use 'Clear', instead of 'Fill' with default value.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use 'StartsWith' instead of 'IndexOf'

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.CSharpUseStartsWithInsteadOfIndexOfComparisonWithZeroCodeFixCA1858

It is both clearer and faster to use 'StartsWith' instead of comparing the result of 'IndexOf' to zero.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use char literal for a single character lookup

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.CSharpUseStringContainsCharOverloadWithSingleCharactersCA1847

'string.Contains(char)' is available as a better performing overload for single char lookup.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use char overload

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.CSharpUseStringMethodCharOverloadWithSingleCharactersCA1865

The char overload is a better performing overload than a string with a single char.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Define accessors for attribute arguments

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.DefineAccessorsForAttributeArgumentsCA1019

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Do not call ToImmutableCollection on an ImmutableCollection value

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.DoNotCallToImmutableCollectionOnAnImmutableCollectionValueCA2009

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Argument passed to TaskCompletionSource constructor should be TaskCreationOptions enum instead of TaskContinuationOptions enum

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.DoNotCreateTaskCompletionSourceWithWrongArgumentsCA2247

TaskCompletionSource has constructors that take TaskCreationOptions that control the underlying Task, and constructors that take object state that's stored in the task. Accidentally passing a TaskContinuationOptions instead of a TaskCreationOptions will result in the call treating the options as state.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Consider calling ConfigureAwait on the awaited task

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.DoNotDirectlyAwaitATaskCA2007

When an asynchronous method awaits a Task directly, continuation occurs in the same thread that created the task. Consider calling Task.ConfigureAwait(Boolean) to signal your intention for continuation. Call ConfigureAwait(false) on the task to schedule continuations to the thread pool, thereby avoiding a deadlock on the UI thread. Passing false is a good option for app-independent libraries. Calling ConfigureAwait(true) on the task has the same behavior as not explicitly calling ConfigureAwait. By explicitly calling this method, you're letting readers know you intentionally want to perform the continuation on the original synchronization context.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Do not use 'WhenAll' with a single task

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.DoNotUseWhenAllOrWaitAllWithSingleArgumentCA1842

Using 'WhenAll' with a single task may result in performance loss, await or return the task instead.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Do not use 'WaitAll' with a single task

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.DoNotUseWhenAllOrWaitAllWithSingleArgumentCA1843

Using 'WaitAll' with a single task may result in performance loss, await or return the task instead.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Mark enums with FlagsAttribute

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.EnumWithFlagsAttributeCA1027

An enumeration is a value type that defines a set of related named constants. Apply FlagsAttribute to an enumeration when its named constants can be meaningfully combined.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Do not mark enums with FlagsAttribute

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.EnumWithFlagsAttributeCA2217

An externally visible enumeration is marked by using FlagsAttribute, and it has one or more values that are not powers of two or a combination of the other defined values on the enumeration.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Implement IEquatable when overriding Object.Equals

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.EquatableCA1066

When a type T overrides Object.Equals(object), the implementation must cast the object argument to the correct type T before performing the comparison. If the type implements IEquatable<T>, and therefore offers the method T.Equals(T), and if the argument is known at compile time to be of type T, then the compiler can call IEquatable<T>.Equals(T) instead of Object.Equals(object), and no cast is necessary, improving performance.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Override Object.Equals(object) when implementing IEquatable<T>

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.EquatableCA1067

When a type T implements the interface IEquatable<T>, it suggests to a user who sees a call to the Equals method in source code that an instance of the type can be equated with an instance of any other type. The user might be confused if their attempt to equate the type with an instance of another type fails to compile. This violates the "principle of least surprise".

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Exceptions should be public

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.ExceptionsShouldBePublicCA1064

An internal exception is visible only inside its own internal scope. After the exception falls outside the internal scope, only the base exception can be used to catch the exception. If the internal exception is inherited from T:System.Exception, T:System.SystemException, or T:System.ApplicationException, the external code will not have sufficient information to know what to do with the exception.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Implement standard exception constructors

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.ImplementStandardExceptionConstructorsCA1032

Failure to provide the full set of constructors can make it difficult to correctly handle exceptions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Instantiate argument exceptions correctly

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.InstantiateArgumentExceptionsCorrectlyCA2208

A call is made to the default (parameterless) constructor of an exception type that is or derives from ArgumentException, or an incorrect string argument is passed to a parameterized constructor of an exception type that is or derives from ArgumentException.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Interface methods should be callable by child types

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.InterfaceMethodsShouldBeCallableByChildTypesCA1033

An unsealed externally visible type provides an explicit method implementation of a public interface and does not provide an alternative externally visible method that has the same name.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Mark attributes with AttributeUsageAttribute

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.MarkAttributesWithAttributeUsageCA1018

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Mark ISerializable types with serializable

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.MarkTypesWithSerializableCA2237

To be recognized by the common language runtime as serializable, types must be marked by using the SerializableAttribute attribute even when the type uses a custom serialization routine through implementation of the ISerializable interface.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Operator overloads have named alternates

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.OperatorOverloadsHaveNamedAlternatesCA2225

An operator overload was detected, and the expected named alternative method was not found. The named alternative member provides access to the same functionality as the operator and is provided for developers who program in languages that do not support overloaded operators.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Operators should have symmetrical overloads

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.OperatorsShouldHaveSymmetricalOverloadsCA2226

A type implements the equality or inequality operator and does not implement the opposite operator.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Overload operator equals on overriding value type Equals

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.OverloadOperatorEqualsOnOverridingValueTypeEqualsCA2231

In most programming languages there is no default implementation of the equality operator (==) for value types. If your programming language supports operator overloads, you should consider implementing the equality operator. Its behavior should be identical to that of Equals.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Override methods on comparable types

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.OverrideMethodsOnComparableTypesCA1036

A public or protected type implements the System.IComparable interface. It does not override Object.Equals nor does it overload the language-specific operator for equality, inequality, less than, less than or equal, greater than or greater than or equal.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Parameter names should match base declaration

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.ParameterNamesShouldMatchBaseDeclarationCA1725

Consistent naming of parameters in an override hierarchy increases the usability of the method overrides. A parameter name in a derived method that differs from the name in the base declaration can cause confusion about whether the method is an override of the base method or a new overload of the method.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Consider using 'StringBuilder.Append(char)' when applicable

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.PreferConstCharOverConstUnitStringCA1834

'StringBuilder.Append(char)' is more efficient than 'StringBuilder.Append(string)' when the string is a single character. When calling 'Append' with a constant, prefer using a constant char rather than a constant string containing one character.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer 'Convert.ToHexString' and 'Convert.ToHexStringLower' over call chains based on 'BitConverter.ToString'

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.PreferConvertToHexStringOverBitConverterCA1872

Use 'Convert.ToHexString' or 'Convert.ToHexStringLower' when encoding bytes to a hexadecimal string representation. These methods are more efficient and allocation-friendly than using 'BitConverter.ToString' in combination with 'String.Replace' to replace dashes and 'String.ToLower'.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Consider using 'string.Contains' instead of 'string.IndexOf'

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.PreferStringContainsOverIndexOfCA2249

Calls to 'string.IndexOf' where the result is used to check for the presence/absence of a substring can be replaced by 'string.Contains'.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer strongly-typed Append and Insert method overloads on StringBuilder

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.PreferTypedStringBuilderAppendOverloadsCA1830

StringBuilder.Append and StringBuilder.Insert provide overloads for multiple types beyond System.String. When possible, prefer the strongly-typed overloads over using ToString() and the string-based overload.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Provide a parameterless constructor that is as visible as the containing type for concrete types derived from 'System.Runtime.InteropServices.SafeHandle'

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.ProvidePublicParameterlessSafeHandleConstructorCA1419

Providing a parameterless constructor that is as visible as the containing type for a type derived from 'System.Runtime.InteropServices.SafeHandle' enables better performance and usage with source-generated interop solutions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove empty Finalizers

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.RemoveEmptyFinalizersCA1821

Finalizers should be avoided where possible, to avoid the additional performance overhead involved in tracking object lifetime.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Rethrow to preserve stack details

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.RethrowToPreserveStackDetailsCA2200

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Seal internal types

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.SealInternalTypesCA1852

When a type is not accessible outside its assembly and has no subtypes within its containing assembly, it can be safely sealed. Sealing types can improve performance.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Seal methods that satisfy private interfaces

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.SealMethodsThatSatisfyPrivateInterfacesCA2119

An inheritable public type provides an overridable method implementation of an internal (Friend in Visual Basic) interface. To fix a violation of this rule, prevent the method from being overridden outside the assembly.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Types that own disposable fields should be disposable

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.TypesThatOwnDisposableFieldsShouldBeDisposableCA1001

A class declares and implements an instance field that is a System.IDisposable type, and the class does not implement IDisposable. A class that declares an IDisposable field indirectly owns an unmanaged resource and should implement the IDisposable interface.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

URI-like parameters should not be strings

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.UriParametersShouldNotBeStringsCA1054

This rule assumes that the parameter represents a Uniform Resource Identifier (URI). A string representation or a URI is prone to parsing and encoding errors, and can lead to security vulnerabilities. 'System.Uri' class provides these services in a safe and secure manner.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use 'ThrowIfCancellationRequested'

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.UseCancellationTokenThrowIfCancellationRequestedCA2250

'ThrowIfCancellationRequested' automatically checks whether the token has been canceled, and throws an 'OperationCanceledException' if it has.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use 'Environment.ProcessId'

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.UseEnvironmentMembersCA1837

'Environment.ProcessId' is simpler and faster than 'Process.GetCurrentProcess().Id'.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use 'Environment.ProcessPath'

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.UseEnvironmentMembersCA1839

'Environment.ProcessPath' is simpler and faster than 'Process.GetCurrentProcess().MainModule.FileName'.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use 'Environment.CurrentManagedThreadId'

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.UseEnvironmentMembersCA1840

'Environment.CurrentManagedThreadId' is simpler and faster than 'Thread.CurrentThread.ManagedThreadId'.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use ArgumentNullException throw helper

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.UseExceptionThrowHelpersCA1510

Throw helpers are simpler and more efficient than an if block constructing a new exception instance.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use ArgumentException throw helper

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.UseExceptionThrowHelpersCA1511

Throw helpers are simpler and more efficient than an if block constructing a new exception instance.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use ArgumentOutOfRangeException throw helper

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.UseExceptionThrowHelpersCA1512

Throw helpers are simpler and more efficient than an if block constructing a new exception instance.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use ObjectDisposedException throw helper

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.UseExceptionThrowHelpersCA1513

Throw helpers are simpler and more efficient than an if block constructing a new exception instance.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use nameof to express symbol names

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.UseNameOfInPlaceOfStringCA1507

Using nameof helps keep your code valid when refactoring.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use 'string.Equals'

org.openrewrite.csharp.recipes.microsoft.codeanalysis.netanalyzers.UseStringEqualsOverStringCompareCA2251

It is both clearer and likely faster to use 'string.Equals' instead of comparing the result of 'string.Compare' to zero.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add braces (when expression spans over multiple lines)

org.openrewrite.csharp.recipes.roslynator.analyzers.AddBracesRCS1001

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add braces

org.openrewrite.csharp.recipes.roslynator.analyzers.AddBracesRCS1007

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add braces to if-else

org.openrewrite.csharp.recipes.roslynator.analyzers.AddBracesRCS1126

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add braces to if-else (when expression spans over multiple lines)

org.openrewrite.csharp.recipes.roslynator.analyzers.AddBracesToIfElseRCS1003

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add exception to documentation comment

org.openrewrite.csharp.recipes.roslynator.analyzers.AddExceptionToDocumentationCommentRCS1140

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Include/omit parentheses when creating new object

org.openrewrite.csharp.recipes.roslynator.analyzers.AddOrRemoveParenthesesWhenCreatingNewObjectRCS1050

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add/remove trailing comma

org.openrewrite.csharp.recipes.roslynator.analyzers.AddOrRemoveTrailingCommaRCS1260

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add paragraph to documentation comment

org.openrewrite.csharp.recipes.roslynator.analyzers.AddParagraphToDocumentationCommentRCS1226

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add parentheses when necessary

org.openrewrite.csharp.recipes.roslynator.analyzers.AddParenthesesWhenNecessaryRCS1123

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use lambda expression instead of anonymous method

org.openrewrite.csharp.recipes.roslynator.analyzers.AnonymousMethodRCS1048

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use --/++ operator instead of assignment

org.openrewrite.csharp.recipes.roslynator.analyzers.AssignmentExpressionRCS1089

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove redundant delegate creation

org.openrewrite.csharp.recipes.roslynator.analyzers.AssignmentExpressionRCS1114

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove argument list from attribute

org.openrewrite.csharp.recipes.roslynator.analyzers.AttributeArgumentListRCS1039

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Avoid unnecessary boxing of value type

org.openrewrite.csharp.recipes.roslynator.analyzers.AvoidBoxingOfValueTypeRCS1198

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Avoid NullReferenceException

org.openrewrite.csharp.recipes.roslynator.analyzers.AvoidNullReferenceExceptionRCS1202

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add/remove 'ConfigureAwait(false)' call

org.openrewrite.csharp.recipes.roslynator.analyzers.AwaitExpressionRCS1090

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Order named arguments according to the order of parameters

org.openrewrite.csharp.recipes.roslynator.analyzers.BaseArgumentListRCS1205

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove redundant base interface

org.openrewrite.csharp.recipes.roslynator.analyzers.BaseTypeRCS1182

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Constant values should be placed on right side of comparisons

org.openrewrite.csharp.recipes.roslynator.analyzers.BinaryExpressionRCS1098

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use 'string.IsNullOrEmpty' method

org.openrewrite.csharp.recipes.roslynator.analyzers.BinaryExpressionRCS1113

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Simplify coalesce expression

org.openrewrite.csharp.recipes.roslynator.analyzers.BinaryExpressionRCS1143

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove redundant 'as' operator

org.openrewrite.csharp.recipes.roslynator.analyzers.BinaryExpressionRCS1145

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use string.Length instead of comparison with empty string

org.openrewrite.csharp.recipes.roslynator.analyzers.BinaryExpressionRCS1156

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Unconstrained type parameter checked for null

org.openrewrite.csharp.recipes.roslynator.analyzers.BinaryExpressionRCS1165

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Value type object is never equal to null

org.openrewrite.csharp.recipes.roslynator.analyzers.BinaryExpressionRCS1166

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Join string expressions

org.openrewrite.csharp.recipes.roslynator.analyzers.BinaryExpressionRCS1190

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use ^ operator

org.openrewrite.csharp.recipes.roslynator.analyzers.BinaryExpressionRCS1195

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Unnecessary null check

org.openrewrite.csharp.recipes.roslynator.analyzers.BinaryExpressionRCS1199

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use short-circuiting operator

org.openrewrite.csharp.recipes.roslynator.analyzers.BinaryExpressionRCS1233

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Operator is unnecessary

org.openrewrite.csharp.recipes.roslynator.analyzers.BinaryExpressionRCS1240

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Simplify numeric comparison

org.openrewrite.csharp.recipes.roslynator.analyzers.BinaryExpressionRCS1268

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove unnecessary braces in switch section

org.openrewrite.csharp.recipes.roslynator.analyzers.BlockRCS1031

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Simplify lazy initialization

org.openrewrite.csharp.recipes.roslynator.analyzers.BlockRCS1171

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove unnecessary case label

org.openrewrite.csharp.recipes.roslynator.analyzers.CaseSwitchLabelRCS1069

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use enum field explicitly

org.openrewrite.csharp.recipes.roslynator.analyzers.CastExpressionRCS1257

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Make class static

org.openrewrite.csharp.recipes.roslynator.analyzers.ClassDeclarationRCS1102

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add 'static' modifier to all partial class declarations

org.openrewrite.csharp.recipes.roslynator.analyzers.ClassDeclarationRCS1108

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Implement exception constructors

org.openrewrite.csharp.recipes.roslynator.analyzers.ClassDeclarationRCS1194

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use AttributeUsageAttribute

org.openrewrite.csharp.recipes.roslynator.analyzers.ClassDeclarationRCS1203

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Make class sealed

org.openrewrite.csharp.recipes.roslynator.analyzers.ClassDeclarationRCS1225

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Composite enum value contains undefined flag

org.openrewrite.csharp.recipes.roslynator.analyzers.CompositeEnumValueContainsUndefinedFlagRCS1157

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use coalesce expression instead of conditional expression

org.openrewrite.csharp.recipes.roslynator.analyzers.ConditionalExpressionRCS1084

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Simplify conditional expression

org.openrewrite.csharp.recipes.roslynator.analyzers.ConditionalExpressionRCS1104

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use conditional access instead of conditional expression

org.openrewrite.csharp.recipes.roslynator.analyzers.ConditionalExpressionRCS1206

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Avoid nested ?: operators

org.openrewrite.csharp.recipes.roslynator.analyzers.ConditionalExpressionRCS1238

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove redundant base constructor call

org.openrewrite.csharp.recipes.roslynator.analyzers.ConstructorDeclarationRCS1071

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove redundant constructor

org.openrewrite.csharp.recipes.roslynator.analyzers.ConstructorDeclarationRCS1074

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Abstract type should not have public constructors

org.openrewrite.csharp.recipes.roslynator.analyzers.ConstructorDeclarationRCS1160

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Convert lambda expression body to expression body

org.openrewrite.csharp.recipes.roslynator.analyzers.ConvertLambdaExpressionBodyToExpressionBodyRCS1021

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Declare each attribute separately

org.openrewrite.csharp.recipes.roslynator.analyzers.DeclareEachAttributeSeparatelyRCS1052

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Declare enum member with zero value (when enum has FlagsAttribute)

org.openrewrite.csharp.recipes.roslynator.analyzers.DeclareEnumMemberWithZeroValueRCS1135

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Declare type inside namespace

org.openrewrite.csharp.recipes.roslynator.analyzers.DeclareTypeInsideNamespaceRCS1110

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Simplify 'default' expression

org.openrewrite.csharp.recipes.roslynator.analyzers.DefaultExpressionRCS1244

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

[deprecated] Remove empty destructor

org.openrewrite.csharp.recipes.roslynator.analyzers.DestructorDeclarationRCS1106

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Merge preprocessor directives

org.openrewrite.csharp.recipes.roslynator.analyzers.DirectiveTriviaRCS1222

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Resource can be disposed asynchronously

org.openrewrite.csharp.recipes.roslynator.analyzers.DisposeResourceAsynchronouslyRCS1261

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

[deprecated] Avoid usage of do statement to create an infinite loop

org.openrewrite.csharp.recipes.roslynator.analyzers.DoStatementRCS1063

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

File contains no code

org.openrewrite.csharp.recipes.roslynator.analyzers.DocumentRCS1093

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add summary element to documentation comment

org.openrewrite.csharp.recipes.roslynator.analyzers.DocumentationCommentRCS1139

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Duplicate word in a comment

org.openrewrite.csharp.recipes.roslynator.analyzers.DuplicateWordInCommentRCS1243

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Merge 'else' with nested 'if'

org.openrewrite.csharp.recipes.roslynator.analyzers.ElseClauseRCS1006

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

[deprecated] Remove empty 'else' clause

org.openrewrite.csharp.recipes.roslynator.analyzers.ElseClauseRCS1040

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

[deprecated] Remove empty statement

org.openrewrite.csharp.recipes.roslynator.analyzers.EmptyStatementRCS1038

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add or remove region name

org.openrewrite.csharp.recipes.roslynator.analyzers.EndRegionDirectiveTriviaRCS1189

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Sort enum members

org.openrewrite.csharp.recipes.roslynator.analyzers.EnumDeclarationRCS1154

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enum should declare explicit values

org.openrewrite.csharp.recipes.roslynator.analyzers.EnumDeclarationRCS1161

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

[deprecated] Use bit shift operator

org.openrewrite.csharp.recipes.roslynator.analyzers.EnumDeclarationRCS1237

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Declare enum value as combination of names

org.openrewrite.csharp.recipes.roslynator.analyzers.EnumMemberDeclarationRCS1191

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Duplicate enum value

org.openrewrite.csharp.recipes.roslynator.analyzers.EnumMemberDeclarationRCS1234

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Normalize format of enum flag value

org.openrewrite.csharp.recipes.roslynator.analyzers.EnumMemberDeclarationRCS1254

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add/remove parentheses from condition in conditional operator

org.openrewrite.csharp.recipes.roslynator.analyzers.ExpressionRCS1051

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Expression is always equal to true/false

org.openrewrite.csharp.recipes.roslynator.analyzers.ExpressionRCS1215

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Declare each type in separate file

org.openrewrite.csharp.recipes.roslynator.analyzers.ExtractMemberToNewDocumentRCS1060

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

[deprecated] Remove empty 'finally' clause

org.openrewrite.csharp.recipes.roslynator.analyzers.FinallyClauseRCS1066

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

[deprecated] Avoid usage of for statement to create an infinite loop

org.openrewrite.csharp.recipes.roslynator.analyzers.ForStatementRCS1064

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Merge 'if' with nested 'if'

org.openrewrite.csharp.recipes.roslynator.analyzers.IfStatementRCS1061

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Convert 'if' to 'return' statement

org.openrewrite.csharp.recipes.roslynator.analyzers.IfStatementRCS1073

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Convert 'if' to assignment

org.openrewrite.csharp.recipes.roslynator.analyzers.IfStatementRCS1103

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use coalesce expression instead of 'if'

org.openrewrite.csharp.recipes.roslynator.analyzers.IfStatementRCS1173

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Reduce 'if' nesting

org.openrewrite.csharp.recipes.roslynator.analyzers.IfStatementRCS1208

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use exception filter

org.openrewrite.csharp.recipes.roslynator.analyzers.IfStatementRCS1236

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Simplify argument null check

org.openrewrite.csharp.recipes.roslynator.analyzers.IfStatementRCS1255

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Implement non-generic counterpart

org.openrewrite.csharp.recipes.roslynator.analyzers.ImplementNonGenericCounterpartRCS1241

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

[deprecated] Remove redundant comma in initializer

org.openrewrite.csharp.recipes.roslynator.analyzers.InitializerRCS1035

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Unnecessary interpolated string

org.openrewrite.csharp.recipes.roslynator.analyzers.InterpolatedStringRCS1214

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Convert interpolated string to concatenation

org.openrewrite.csharp.recipes.roslynator.analyzers.InterpolatedStringRCS1217

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Unnecessary interpolation

org.openrewrite.csharp.recipes.roslynator.analyzers.InterpolationRCS1105

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Invalid argument null check

org.openrewrite.csharp.recipes.roslynator.analyzers.InvalidArgumentNullCheckRCS1256

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use 'Count/Length' property instead of 'Any' method

org.openrewrite.csharp.recipes.roslynator.analyzers.InvocationExpressionRCS1080

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove redundant 'ToString' call

org.openrewrite.csharp.recipes.roslynator.analyzers.InvocationExpressionRCS1097

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove redundant 'ToCharArray' call

org.openrewrite.csharp.recipes.roslynator.analyzers.InvocationExpressionRCS1107

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Combine 'Enumerable.Where' method chain

org.openrewrite.csharp.recipes.roslynator.analyzers.InvocationExpressionRCS1112

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Call extension method as instance method

org.openrewrite.csharp.recipes.roslynator.analyzers.InvocationExpressionRCS1196

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Call 'Enumerable.ThenBy' instead of 'Enumerable.OrderBy'

org.openrewrite.csharp.recipes.roslynator.analyzers.InvocationExpressionRCS1200

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use string interpolation instead of 'string.Concat'

org.openrewrite.csharp.recipes.roslynator.analyzers.InvocationExpressionRCS1267

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Inline local variable

org.openrewrite.csharp.recipes.roslynator.analyzers.LocalDeclarationStatementRCS1124

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Avoid locking on publicly accessible instance

org.openrewrite.csharp.recipes.roslynator.analyzers.LockStatementRCS1059

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Mark local variable as const

org.openrewrite.csharp.recipes.roslynator.analyzers.MarkLocalVariableAsConstRCS1118

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Mark publicly visible type with DebuggerDisplay attribute

org.openrewrite.csharp.recipes.roslynator.analyzers.MarkTypeWithDebuggerDisplayAttributeRCS1223

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add/remove accessibility modifiers

org.openrewrite.csharp.recipes.roslynator.analyzers.MemberDeclarationRCS1018

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Order modifiers

org.openrewrite.csharp.recipes.roslynator.analyzers.MemberDeclarationRCS1019

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove redundant 'sealed' modifier

org.openrewrite.csharp.recipes.roslynator.analyzers.MemberDeclarationRCS1034

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Unnecessary semicolon at the end of declaration

org.openrewrite.csharp.recipes.roslynator.analyzers.MemberDeclarationRCS1055

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove redundant overriding member

org.openrewrite.csharp.recipes.roslynator.analyzers.MemberDeclarationRCS1132

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Make field read-only

org.openrewrite.csharp.recipes.roslynator.analyzers.MemberDeclarationRCS1169

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use read-only auto-implemented property

org.openrewrite.csharp.recipes.roslynator.analyzers.MemberDeclarationRCS1170

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Convert comment to documentation comment

org.openrewrite.csharp.recipes.roslynator.analyzers.MemberDeclarationRCS1181

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use constant instead of field

org.openrewrite.csharp.recipes.roslynator.analyzers.MemberDeclarationRCS1187

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Make method an extension method

org.openrewrite.csharp.recipes.roslynator.analyzers.MemberDeclarationRCS1224

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

[deprecated] Remove empty namespace declaration

org.openrewrite.csharp.recipes.roslynator.analyzers.NamespaceDeclarationRCS1072

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Declare using directive on top level

org.openrewrite.csharp.recipes.roslynator.analyzers.NamespaceDeclarationRCS1094

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Normalize null check

org.openrewrite.csharp.recipes.roslynator.analyzers.NormalizeNullCheckProviderRCS1248

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Normalize usage of infinite loop

org.openrewrite.csharp.recipes.roslynator.analyzers.NormalizeUsageOfInfiniteLoopRCS1252

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use EventArgs.Empty

org.openrewrite.csharp.recipes.roslynator.analyzers.ObjectCreationExpressionRCS1204

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Optimize LINQ method call

org.openrewrite.csharp.recipes.roslynator.analyzers.OptimizeLinqMethodCallRCS1077

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use element access

org.openrewrite.csharp.recipes.roslynator.analyzers.OptimizeLinqMethodCallRCS1246

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Optimize method call

org.openrewrite.csharp.recipes.roslynator.analyzers.OptimizeMethodCallRCS1235

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Optimize StringBuilder.Append/AppendLine call

org.openrewrite.csharp.recipes.roslynator.analyzers.OptimizeStringBuilderAppendCallRCS1197

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Order elements in documentation comment

org.openrewrite.csharp.recipes.roslynator.analyzers.OrderElementsInDocumentationCommentRCS1232

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Order type parameter constraints

org.openrewrite.csharp.recipes.roslynator.analyzers.OrderTypeParameterConstraintsRCS1209

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Parameter name differs from base name

org.openrewrite.csharp.recipes.roslynator.analyzers.ParameterNameDiffersFromBaseRCS1168

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Overriding member should not change 'params' modifier

org.openrewrite.csharp.recipes.roslynator.analyzers.ParameterRCS1193

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Make parameter ref read-only

org.openrewrite.csharp.recipes.roslynator.analyzers.ParameterRCS1231

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Do not pass non-read-only struct by read-only reference

org.openrewrite.csharp.recipes.roslynator.analyzers.ParameterRCS1242

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove redundant parentheses

org.openrewrite.csharp.recipes.roslynator.analyzers.ParenthesizedExpressionRCS1032

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove redundant auto-property initialization

org.openrewrite.csharp.recipes.roslynator.analyzers.PropertyDeclarationRCS1188

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Unnecessary raw string literal

org.openrewrite.csharp.recipes.roslynator.analyzers.RawStringLiteralRCS1262

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use raw string literal

org.openrewrite.csharp.recipes.roslynator.analyzers.RawStringLiteralRCS1266

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

[deprecated] Remove empty region

org.openrewrite.csharp.recipes.roslynator.analyzers.RegionDirectiveTriviaRCS1091

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove braces from if-else

org.openrewrite.csharp.recipes.roslynator.analyzers.RemoveBracesFromIfElseRCS1004

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove braces

org.openrewrite.csharp.recipes.roslynator.analyzers.RemoveBracesRCS1002

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Unused element in a documentation comment

org.openrewrite.csharp.recipes.roslynator.analyzers.RemoveElementInDocumentationCommentRCS1228

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Invalid reference in a documentation comment

org.openrewrite.csharp.recipes.roslynator.analyzers.RemoveElementInDocumentationCommentRCS1263

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

[deprecated] Remove empty initializer

org.openrewrite.csharp.recipes.roslynator.analyzers.RemoveEmptyInitializerRCS1041

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove empty syntax

org.openrewrite.csharp.recipes.roslynator.analyzers.RemoveEmptySyntaxRCS1259

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove enum default underlying type

org.openrewrite.csharp.recipes.roslynator.analyzers.RemoveEnumDefaultBaseTypeRCS1042

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove original exception from throw statement

org.openrewrite.csharp.recipes.roslynator.analyzers.RemoveOriginalExceptionRCS1044

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove 'partial' modifier from type with a single part

org.openrewrite.csharp.recipes.roslynator.analyzers.RemovePartialModifierFromTypeWithSinglePartRCS1043

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove redundant assignment

org.openrewrite.csharp.recipes.roslynator.analyzers.RemoveRedundantAssignmentRCS1212

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove redundant async/await

org.openrewrite.csharp.recipes.roslynator.analyzers.RemoveRedundantAsyncAwaitRCS1174

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove redundant boolean literal

org.openrewrite.csharp.recipes.roslynator.analyzers.RemoveRedundantBooleanLiteralRCS1033

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove redundant cast

org.openrewrite.csharp.recipes.roslynator.analyzers.RemoveRedundantCastRCS1151

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove redundant catch block

org.openrewrite.csharp.recipes.roslynator.analyzers.RemoveRedundantCatchBlockRCS1265

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove unnecessary braces from record declaration

org.openrewrite.csharp.recipes.roslynator.analyzers.RemoveUnnecessaryBracesRCS1251

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove unnecessary 'else'

org.openrewrite.csharp.recipes.roslynator.analyzers.RemoveUnnecessaryElseRCS1211

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Return completed task instead of returning null

org.openrewrite.csharp.recipes.roslynator.analyzers.ReturnCompletedTaskInsteadOfNullRCS1210

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Simplify boolean comparison

org.openrewrite.csharp.recipes.roslynator.analyzers.SimplifyBooleanComparisonRCS1049

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Simplify code branching

org.openrewrite.csharp.recipes.roslynator.analyzers.SimplifyCodeBranchingRCS1218

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Simplify logical negation

org.openrewrite.csharp.recipes.roslynator.analyzers.SimplifyLogicalNegationRCS1068

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Simplify nested using statement

org.openrewrite.csharp.recipes.roslynator.analyzers.SimplifyNestedUsingStatementRCS1005

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Simplify Nullable<T> to T?

org.openrewrite.csharp.recipes.roslynator.analyzers.SimplifyNullableOfTRCS1020

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

[deprecated] Format documentation summary on a single line

org.openrewrite.csharp.recipes.roslynator.analyzers.SingleLineDocumentationCommentTriviaRCS1100

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

[deprecated] Format documentation summary on multiple lines

org.openrewrite.csharp.recipes.roslynator.analyzers.SingleLineDocumentationCommentTriviaRCS1101

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add 'param' element to documentation comment

org.openrewrite.csharp.recipes.roslynator.analyzers.SingleLineDocumentationCommentTriviaRCS1141

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add 'typeparam' element to documentation comment

org.openrewrite.csharp.recipes.roslynator.analyzers.SingleLineDocumentationCommentTriviaRCS1142

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Format documentation comment summary

org.openrewrite.csharp.recipes.roslynator.analyzers.SingleLineDocumentationCommentTriviaRCS1253

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove redundant Dispose/Close call

org.openrewrite.csharp.recipes.roslynator.analyzers.StatementRCS1133

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove redundant statement

org.openrewrite.csharp.recipes.roslynator.analyzers.StatementRCS1134

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Inline lazy initialization

org.openrewrite.csharp.recipes.roslynator.analyzers.StatementRCS1180

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use method chaining

org.openrewrite.csharp.recipes.roslynator.analyzers.StatementRCS1201

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove redundant default switch section

org.openrewrite.csharp.recipes.roslynator.analyzers.SwitchSectionRCS1070

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Default label should be the last label in a switch section

org.openrewrite.csharp.recipes.roslynator.analyzers.SwitchSectionRCS1099

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add braces to switch section with multiple statements

org.openrewrite.csharp.recipes.roslynator.analyzers.SwitchSectionRCS1111

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Merge switch sections with equivalent content

org.openrewrite.csharp.recipes.roslynator.analyzers.SwitchSectionRCS1136

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Unnecessary null-forgiving operator

org.openrewrite.csharp.recipes.roslynator.analyzers.TokenRCS1249

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Unused type parameter

org.openrewrite.csharp.recipes.roslynator.analyzers.TypeParameterRCS1164

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use EventHandler<T>

org.openrewrite.csharp.recipes.roslynator.analyzers.TypeRCS1159

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Unnecessary assignment

org.openrewrite.csharp.recipes.roslynator.analyzers.UnnecessaryAssignmentRCS1179

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Unnecessary enum flag

org.openrewrite.csharp.recipes.roslynator.analyzers.UnnecessaryEnumFlagRCS1258

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Unnecessary explicit use of enumerator

org.openrewrite.csharp.recipes.roslynator.analyzers.UnnecessaryExplicitUseOfEnumeratorRCS1230

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Unnecessary unsafe context

org.openrewrite.csharp.recipes.roslynator.analyzers.UnnecessaryUnsafeContextRCS1216

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Unnecessary usage of verbatim string literal

org.openrewrite.csharp.recipes.roslynator.analyzers.UnnecessaryUsageOfVerbatimStringLiteralRCS1192

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove unused member declaration

org.openrewrite.csharp.recipes.roslynator.analyzers.UnusedMemberRCS1213

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Unused parameter

org.openrewrite.csharp.recipes.roslynator.analyzers.UnusedParameterRCS1163

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use anonymous function or method group

org.openrewrite.csharp.recipes.roslynator.analyzers.UseAnonymousFunctionOrMethodGroupRCS1207

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use async/await when necessary

org.openrewrite.csharp.recipes.roslynator.analyzers.UseAsyncAwaitRCS1229

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use auto-implemented property

org.openrewrite.csharp.recipes.roslynator.analyzers.UseAutoPropertyRCS1085

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use block body or expression body

org.openrewrite.csharp.recipes.roslynator.analyzers.UseBlockBodyOrExpressionBodyRCS1016

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use coalesce expression

org.openrewrite.csharp.recipes.roslynator.analyzers.UseCoalesceExpressionRCS1128

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use compound assignment

org.openrewrite.csharp.recipes.roslynator.analyzers.UseCompoundAssignmentRCS1058

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use conditional access

org.openrewrite.csharp.recipes.roslynator.analyzers.UseConditionalAccessRCS1146

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use "" or 'string.Empty'

org.openrewrite.csharp.recipes.roslynator.analyzers.UseEmptyStringLiteralOrStringEmptyRCS1078

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

[deprecated] Use explicit type instead of 'var' (foreach variable)

org.openrewrite.csharp.recipes.roslynator.analyzers.UseExplicitTypeInsteadOfVarInForEachRCS1009

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

[deprecated] Use explicit type instead of 'var' (when the type is not obvious)

org.openrewrite.csharp.recipes.roslynator.analyzers.UseExplicitTypeInsteadOfVarRCS1008

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

[deprecated] Use explicit type instead of 'var' (when the type is obvious)

org.openrewrite.csharp.recipes.roslynator.analyzers.UseExplicitTypeInsteadOfVarRCS1012

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use explicitly/implicitly typed array

org.openrewrite.csharp.recipes.roslynator.analyzers.UseExplicitlyOrImplicitlyTypedArrayRCS1014

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use 'HasFlag' method or bitwise operator

org.openrewrite.csharp.recipes.roslynator.analyzers.UseHasFlagMethodOrBitwiseOperatorRCS1096

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use implicit/explicit object creation

org.openrewrite.csharp.recipes.roslynator.analyzers.UseImplicitOrExplicitObjectCreationRCS1250

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use 'is' operator instead of 'as' operator

org.openrewrite.csharp.recipes.roslynator.analyzers.UseIsOperatorInsteadOfAsOperatorRCS1172

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use nameof operator

org.openrewrite.csharp.recipes.roslynator.analyzers.UseNameOfOperatorRCS1015

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use pattern matching instead of combination of 'as' operator and null check

org.openrewrite.csharp.recipes.roslynator.analyzers.UsePatternMatchingInsteadOfAsAndNullCheckRCS1221

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use pattern matching instead of combination of 'is' operator and cast operator

org.openrewrite.csharp.recipes.roslynator.analyzers.UsePatternMatchingInsteadOfIsAndCastRCS1220

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use predefined type

org.openrewrite.csharp.recipes.roslynator.analyzers.UsePredefinedTypeRCS1013

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use Regex instance instead of static method

org.openrewrite.csharp.recipes.roslynator.analyzers.UseRegexInstanceInsteadOfStaticMethodRCS1186

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use StringComparison when comparing strings

org.openrewrite.csharp.recipes.roslynator.analyzers.UseStringComparisonRCS1155

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

[deprecated] Use 'var' instead of explicit type (when the type is obvious)

org.openrewrite.csharp.recipes.roslynator.analyzers.UseVarInsteadOfExplicitTypeRCS1010

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

[deprecated] Use 'var' instead of explicit type (when the type is not obvious)

org.openrewrite.csharp.recipes.roslynator.analyzers.UseVarInsteadOfExplicitTypeRCS1176

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

[deprecated] Use 'var' instead of explicit type (in foreach)

org.openrewrite.csharp.recipes.roslynator.analyzers.UseVarInsteadOfExplicitTypeRCS1177

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use 'var' or explicit type

org.openrewrite.csharp.recipes.roslynator.analyzers.UseVarOrExplicitTypeRCS1264

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Avoid usage of using alias directive

org.openrewrite.csharp.recipes.roslynator.analyzers.UsingDirectiveRCS1056

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Validate arguments correctly

org.openrewrite.csharp.recipes.roslynator.analyzers.ValidateArgumentsCorrectlyRCS1227

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Split variable declaration

org.openrewrite.csharp.recipes.roslynator.analyzers.VariableDeclarationRCS1081

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove redundant field initialization

org.openrewrite.csharp.recipes.roslynator.analyzers.VariableDeclaratorRCS1129

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

[deprecated] Avoid usage of while statement to create an infinite loop

org.openrewrite.csharp.recipes.roslynator.analyzers.WhileStatementRCS1065

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use 'for' statement instead of 'while' statement

org.openrewrite.csharp.recipes.roslynator.analyzers.WhileStatementRCS1239

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

[deprecated] Remove unnecessary blank line

org.openrewrite.csharp.recipes.roslynator.analyzers.WhitespaceTriviaRCS1036

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove trailing white-space

org.openrewrite.csharp.recipes.roslynator.analyzers.WhitespaceTriviaRCS1037

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Fix documentation comment tag

org.openrewrite.csharp.recipes.roslynator.analyzers.XmlNodeRCS1247

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Elements should have the same indentation

org.openrewrite.csharp.recipes.stylecop.analyzers.IndentationSA1137

Elements at the same level in the syntax tree should have the same indentation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Property summary documentation should match accessors

org.openrewrite.csharp.recipes.stylecop.analyzers.PropertySummaryDocumentationSA1623

The documentation text within a C# property’s <summary> tag does not match the accessors within the property.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Property summary documentation should omit accessor with restricted access

org.openrewrite.csharp.recipes.stylecop.analyzers.PropertySummaryDocumentationSA1624

The documentation text within a C# property’s <summary> tag takes into account all of the accessors within the property, but one of the accessors has limited access.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Do not place regions within elements

org.openrewrite.csharp.recipes.stylecop.analyzers.RemoveRegionSA1123

The C# code contains a region within the body of a code element.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Do not use regions

org.openrewrite.csharp.recipes.stylecop.analyzers.RemoveRegionSA1124

The C# code contains a region.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Field names should begin with lower-case letter

org.openrewrite.csharp.recipes.stylecop.analyzers.RenameToLowerCaseSA1306

The name of a field in C# does not begin with a lower-case letter.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Variable names should begin with lower-case letter

org.openrewrite.csharp.recipes.stylecop.analyzers.RenameToLowerCaseSA1312

The name of a variable in C# does not begin with a lower-case letter.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Parameter names should begin with lower-case letter

org.openrewrite.csharp.recipes.stylecop.analyzers.RenameToLowerCaseSA1313

The name of a parameter in C# does not begin with a lower-case letter.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Element should begin with upper-case letter

org.openrewrite.csharp.recipes.stylecop.analyzers.RenameToUpperCaseSA1300

The name of a C# element does not begin with an upper-case letter.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Const field names should begin with upper-case letter

org.openrewrite.csharp.recipes.stylecop.analyzers.RenameToUpperCaseSA1303

The name of a constant C# field should begin with an upper-case letter.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Non-private readonly fields should begin with upper-case letter

org.openrewrite.csharp.recipes.stylecop.analyzers.RenameToUpperCaseSA1304

The name of a non-private readonly C# field should being with an upper-case letter.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Accessible fields should begin with upper-case letter

org.openrewrite.csharp.recipes.stylecop.analyzers.RenameToUpperCaseSA1307

The name of a public or internal field in C# does not begin with an upper-case letter.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Static readonly fields should begin with upper-case letter

org.openrewrite.csharp.recipes.stylecop.analyzers.RenameToUpperCaseSA1311

The name of a static readonly field does not begin with an upper-case letter.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Symbols should be spaced correctly

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1003SA1003

The spacing around an operator symbol is incorrect, within a C# code file.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Documentation lines should begin with single space

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1004SA1004

A line within a documentation header above a C# element does not begin with a single space.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Single line comments should begin with single space

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1005SA1005

A single-line comment within a C# code file does not begin with a single space.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Nullable type symbols should be spaced correctly

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1018SA1018

A nullable type symbol within a C# element is not spaced correctly.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Code should not contain multiple whitespace in a row

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1025SA1025

The code contains multiple whitespace characters in a row.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use tabs correctly

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1027SA1027

The code contains a tab or space character which is not consistent with the current project settings.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Code should not contain trailing whitespace

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1028SA1028

There should not be any whitespace at the end of a line of code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Do not prefix calls with base unless local implementation exists

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1100SA1100

A call to a member from an inherited class begins with 'base.', and the local class does not contain an override or implementation of the member.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefix local calls with this

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1101SA1101

A call to an instance member of the local class or a base class is not prefixed with 'this.', within a C# code file.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Query clause should follow previous clause

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1102SA1102

A C# query clause does not begin on the same line as the previous clause, or on the next line.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Query clauses should be on separate lines or all on one line

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1103SA1103

The clauses within a C# query expression are not all placed on the same line, and each clause is not placed on its own line.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Query clause should begin on new line when previous clause spans multiple lines

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1104SA1105SA1104

A clause within a C# query expression begins on the same line as the previous clause, when the previous clause spans across multiple lines.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Query clauses spanning multiple lines should begin on own line

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1104SA1105SA1105

A clause within a C# query expression spans across multiple lines, and does not begin on its own line.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Code should not contain empty statements

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1106SA1106

The C# code contains an extra semicolon.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Code should not contain multiple statements on one line

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1107SA1107

The C# code contains more than one statement on a single line.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Split parameters should start on line after declaration

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1116SA1116

The parameters to a C# method or indexer call or declaration span across multiple lines, but the first parameter does not start on the line after the opening bracket.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Statement should not use unnecessary parenthesis

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1119SA1119

A C# statement contains parenthesis which are unnecessary and should be removed.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Statement should not use unnecessary parenthesis

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1119SA1119_p

A C# statement contains parenthesis which are unnecessary and should be removed.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Comments should contain text

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1120SA1120

The C# comment does not contain any comment text.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use built-in type alias

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1121SA1121

The code uses one of the basic C# types, but does not use the built-in alias for the type.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use string.Empty for empty strings

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1122SA1122

The C# code includes an empty string, written as "".

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Generic type constraints should be on their own line

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1127SA1127

Each type constraint clause for a generic type parameter should be listed on a line of code by itself.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Put constructor initializers on their own line

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1128SA1128

A constructor initializer, including the colon character, should be on its own line.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Do not use default value type constructor

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1129SA1129

When creating a new instance of a value type T, the syntax 'default(T)' is functionally equivalent to the syntax 'new T()'. To avoid confusion regarding the behavior of the resulting instance, the first form is preferred.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use lambda syntax

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1130SA1130

Lambda expressions are more succinct and easier to read than anonymous methods, so they should are preferred whenever the two are functionally equivalent.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use readable conditions

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1131SA1131

When a comparison is made between a variable and a literal, the variable should be placed on the left-hand-side to maximize readability.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Do not combine fields

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1132SA1132

Each field should be declared on its own line, in order to clearly see each field of a type and allow for proper documentation of the behavior of each field.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Do not combine attributes

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1133SA1133

Each attribute usage should be placed in its own set of square brackets for maximum readability.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Attributes should not share line

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1134SA1134

Each attribute should be placed on its own line of code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Using directives should be qualified

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1135SA1135

All using directives should be qualified.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enum values should be on separate lines

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1136SA1136

Enum values should be placed on their own lines for maximum readability.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use literal suffix notation instead of casting

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1139SA1139

Use literal suffix notation instead of casting, in order to improve readability, avoid bugs related to illegal casts and ensure that optimal IL is produced.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Partial elements should declare access

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1205SA1205

The partial element does not have an access modifier defined.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Declaration keywords should follow order

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1206SA1206

The keywords within the declaration of an element do not follow a standard ordering scheme.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Protected should come before internal

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1207SA1207

The keyword '0' is positioned after the keyword '1' within the declaration of a 0 1 C# element.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Property accessors should follow order

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1212SA1213SA1212

A get accessor appears after a set accessor within a property or indexer.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Event accessors should follow order

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1212SA1213SA1213

An add accessor appears after a remove accessor within an event.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Interface names should begin with I

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1302SA1302

The name of a C# interface does not begin with the capital letter I.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Variable names should not be prefixed

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1308SA1308

A field name in C# is prefixed with 'm_', 's_', or 't_'.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Field names should not begin with underscore

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1309SA1309

A field name in C# begins with an underscore.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Field names should not contain underscore

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1310SA1310

A field name in C# contains an underscore.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Type parameter names should begin with T

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1314SA1314

The name of a C# type parameter does not begin with the capital letter T.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Access modifier should be declared

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1400SA1400

The access modifier for a C# element has not been explicitly defined.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

File may only contain a single type

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1402SA1402

A C# code file contains more than one unique type.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Code analysis suppression should have justification

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1404SA1404

A Code Analysis SuppressMessage attribute does not include a justification.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Arithmetic expressions should declare precedence

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1407SA1408SA1407

A C# statement contains a complex arithmetic expression which omits parenthesis around operators.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Conditional expressions should declare precedence

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1407SA1408SA1408

A C# statement contains a complex conditional expression which omits parenthesis around operators.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove delegate parenthesis when possible

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1410SA1411SA1410

A call to a C# anonymous method does not contain any method parameters, yet the statement still includes parenthesis.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Attribute constructor should not use unnecessary parenthesis

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1410SA1411SA1411

TODO.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Store files as UTF-8 with byte order mark

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1412SA1412

Source files should be saved using the UTF-8 encoding with a byte order mark

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use trailing comma in multi-line initializers

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1413SA1413

A multi-line initializer in a C# code file should use a comma on the last line.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Braces for multi-line statements should not share line

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1500SA1500

The opening or closing brace within a C# statement, element, or expression is not placed on its own line.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Statement should not be on a single line

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1501SA1501

A C# statement containing opening and closing braces is written completely on a single line.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Element should not be on a single line

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1502SA1502

A C# element containing opening and closing braces is written completely on a single line.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Braces should not be omitted

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1503SA1503

The opening and closing braces for a C# statement have been omitted.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Braces should not be omitted from multi-line child statement

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1503SA1519

The opening and closing braces for a multi-line C# statement have been omitted.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use braces consistently

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1503SA1520

The opening and closing braces of a chained if/else if/else construct were included for some clauses, but omitted for others.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

All accessors should be single-line or multi-line

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1504SA1504

Within a C# property, indexer or event, at least one of the child accessors is written on a single line, and at least one of the child accessors is written across multiple lines.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Opening braces should not be followed by blank line

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1505SA1505

An opening brace within a C# element, statement, or expression is followed by a blank line.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Element documentation headers should not be followed by blank line

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1506SA1506

An element documentation header above a C# element is followed by a blank line.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Code should not contain multiple blank lines in a row

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1507SA1507

The C# code contains multiple blank lines in a row.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Closing braces should not be preceded by blank line

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1508SA1508

A closing brace within a C# element, statement, or expression is preceded by a blank line.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Opening braces should not be preceded by blank line

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1509SA1509

An opening brace within a C# element, statement, or expression is preceded by a blank line.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Chained statement blocks should not be preceded by blank line

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1510SA1510

Chained C# statements are separated by a blank line.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1511SA1511

The while footer at the bottom of a do-while statement is separated from the statement by a blank line.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Single-line comments should not be followed by blank line

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1512SA1512

A single-line comment within C# code is followed by a blank line.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Closing brace should be followed by blank line

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1513SA1513

A closing brace within a C# element, statement, or expression is not followed by a blank line.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Element documentation header should be preceded by blank line

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1514SA1514

An element documentation header above a C# element is not preceded by a blank line.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Single-line comment should be preceded by blank line

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1515SA1515

A single-line comment within C# code is not preceded by a blank line.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Elements should be separated by blank line

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1516SA1516

Adjacent C# elements are not separated by a blank line.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Code should not contain blank lines at start of file

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1517SA1517

The code file has blank lines at the start.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use line endings correctly at end of file

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1518SA1518

Code should not contain blank lines at the end of the file

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Property documentation should have value

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1609SA1610SA1609

The XML header documentation for a C# property does not contain a <value> tag.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Property documentation should have value text

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1609SA1610SA1610

The XML header documentation for a C# property contains an empty <value> tag.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Element return value should be documented

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1615SA1616SA1615

A C# element is missing documentation for its return value.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Element return value documentation should have text

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1615SA1616SA1616

The <returns> tag within a C# element's documentation header is empty.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Void return value should not be documented

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1617SA1617

A C# code element does not contain a return value, or returns void, but the documentation header for the element contains a <returns> tag.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Single-line comments should not use documentation style slashes

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1626SA1626

The C# code contains a single-line comment which begins with three forward slashes in a row.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Documentation text should end with a period

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1629SA1629

A section of the XML header documentation for a C# element does not end with a period.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Constructor summary documentation should begin with standard text

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1642SA1643SA1642

The XML documentation header for a C# constructor does not contain the appropriate summary text.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Destructor summary documentation should begin with standard text

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1642SA1643SA1643

The XML documentation header for a C# finalizer does not contain the appropriate summary text.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Do not use placeholder elements

org.openrewrite.csharp.recipes.stylecop.analyzers.SA1651SA1651

The element documentation contains a <placeholder> element.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Do not prefix local calls with 'this.'

org.openrewrite.csharp.recipes.stylecop.analyzers.SX1101SX1101

A call to an instance member of the local class or a base class is prefixed with this..

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Field names should begin with underscore

org.openrewrite.csharp.recipes.stylecop.analyzers.SX1309SX1309

A field name in C# does not begin with an underscore.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Static field names should begin with underscore

org.openrewrite.csharp.recipes.stylecop.analyzers.SX1309SX1309S

A static field name in C# does not begin with an underscore.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Elements should be documented

org.openrewrite.csharp.recipes.stylecop.analyzers.SettingsFileSA1600

A C# code element is missing a documentation header.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Partial elements should be documented

org.openrewrite.csharp.recipes.stylecop.analyzers.SettingsFileSA1601

A C# partial element is missing a documentation header.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enumeration items should be documented

org.openrewrite.csharp.recipes.stylecop.analyzers.SettingsFileSA1602

An item within a C# enumeration is missing an Xml documentation header.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

File should have header

org.openrewrite.csharp.recipes.stylecop.analyzers.SettingsFileSA1633

A C# code file is missing a standard file header.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

org.openrewrite.csharp.recipes.stylecop.analyzers.SettingsFileSA1634

The file header at the top of a C# code file is missing a copyright tag.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

org.openrewrite.csharp.recipes.stylecop.analyzers.SettingsFileSA1635

The file header at the top of a C# code file is missing copyright text.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

org.openrewrite.csharp.recipes.stylecop.analyzers.SettingsFileSA1636

The file header at the top of a C# code file does not contain the appropriate copyright text.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

File header should contain file name

org.openrewrite.csharp.recipes.stylecop.analyzers.SettingsFileSA1637

The file header at the top of a C# code file is missing the file name.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

File header file name documentation should match file name

org.openrewrite.csharp.recipes.stylecop.analyzers.SettingsFileSA1638

The file attribute within copyright tag of the file header at the top of a C# code file does not contain the name of the file.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

File header should have summary

org.openrewrite.csharp.recipes.stylecop.analyzers.SettingsFileSA1639

The file header at the top of a C# code file does not contain a filled-in summary tag.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

File header should have valid company text

org.openrewrite.csharp.recipes.stylecop.analyzers.SettingsFileSA1640

The file header at the top of a C# code file does not contain company name text.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

File header company name text should match

org.openrewrite.csharp.recipes.stylecop.analyzers.SettingsFileSA1641

The file header at the top of a C# code file does not contain the appropriate company name text.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

File name should match first type name

org.openrewrite.csharp.recipes.stylecop.analyzers.SettingsFileSA1649

The file name of a C# code file does not match the first type declared in the file.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Keywords should be spaced correctly

org.openrewrite.csharp.recipes.stylecop.analyzers.TokenSpacingSA1000

The spacing around a C# keyword is incorrect.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Commas should be spaced correctly

org.openrewrite.csharp.recipes.stylecop.analyzers.TokenSpacingSA1001

The spacing around a comma is incorrect, within a C# code file.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Semicolons should be spaced correctly

org.openrewrite.csharp.recipes.stylecop.analyzers.TokenSpacingSA1002

The spacing around a semicolon is incorrect, within a C# code file.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Preprocessor keywords should not be preceded by space

org.openrewrite.csharp.recipes.stylecop.analyzers.TokenSpacingSA1006

A C# preprocessor-type keyword is preceded by space.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Operator keyword should be followed by space

org.openrewrite.csharp.recipes.stylecop.analyzers.TokenSpacingSA1007

The operator keyword within a C# operator overload method is not followed by any whitespace.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Opening parenthesis should be spaced correctly

org.openrewrite.csharp.recipes.stylecop.analyzers.TokenSpacingSA1008

An opening parenthesis within a C# statement is not spaced correctly.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Closing parenthesis should be spaced correctly

org.openrewrite.csharp.recipes.stylecop.analyzers.TokenSpacingSA1009

A closing parenthesis within a C# statement is not spaced correctly.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Opening square brackets should be spaced correctly

org.openrewrite.csharp.recipes.stylecop.analyzers.TokenSpacingSA1010

An opening square bracket within a C# statement is not spaced correctly.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Closing square brackets should be spaced correctly

org.openrewrite.csharp.recipes.stylecop.analyzers.TokenSpacingSA1011

A closing square bracket within a C# statement is not spaced correctly.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Opening braces should be spaced correctly

org.openrewrite.csharp.recipes.stylecop.analyzers.TokenSpacingSA1012

An opening brace within a C# element is not spaced correctly.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Closing braces should be spaced correctly

org.openrewrite.csharp.recipes.stylecop.analyzers.TokenSpacingSA1013

A closing brace within a C# element is not spaced correctly.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Opening generic brackets should be spaced correctly

org.openrewrite.csharp.recipes.stylecop.analyzers.TokenSpacingSA1014

An opening generic bracket within a C# element is not spaced correctly.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Closing generic brackets should be spaced correctly

org.openrewrite.csharp.recipes.stylecop.analyzers.TokenSpacingSA1015

A closing generic bracket within a C# element is not spaced correctly.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Opening attribute brackets should be spaced correctly

org.openrewrite.csharp.recipes.stylecop.analyzers.TokenSpacingSA1016

An opening attribute bracket within a C# element is not spaced correctly.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Closing attribute brackets should be spaced correctly

org.openrewrite.csharp.recipes.stylecop.analyzers.TokenSpacingSA1017

A closing attribute bracket within a C# element is not spaced correctly.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Member access symbols should be spaced correctly

org.openrewrite.csharp.recipes.stylecop.analyzers.TokenSpacingSA1019

The spacing around a member access symbol is incorrect, within a C# code file.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Increment decrement symbols should be spaced correctly

org.openrewrite.csharp.recipes.stylecop.analyzers.TokenSpacingSA1020

An increment or decrement symbol within a C# element is not spaced correctly.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Negative signs should be spaced correctly

org.openrewrite.csharp.recipes.stylecop.analyzers.TokenSpacingSA1021

A negative sign within a C# element is not spaced correctly.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Positive signs should be spaced correctly

org.openrewrite.csharp.recipes.stylecop.analyzers.TokenSpacingSA1022

A positive sign within a C# element is not spaced correctly.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Dereference and access of symbols should be spaced correctly

org.openrewrite.csharp.recipes.stylecop.analyzers.TokenSpacingSA1023

A dereference symbol or an access-of symbol within a C# element is not spaced correctly.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Colons Should Be Spaced Correctly

org.openrewrite.csharp.recipes.stylecop.analyzers.TokenSpacingSA1024

A colon within a C# element is not spaced correctly.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Code should not contain space after new or stackalloc keyword in implicitly typed array allocation

org.openrewrite.csharp.recipes.stylecop.analyzers.TokenSpacingSA1026

An implicitly typed array allocation within a C# code file is not spaced correctly.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Opening parenthesis or bracket should be on declaration line

org.openrewrite.csharp.recipes.stylecop.analyzers.TokenSpacingSA1110

The opening parenthesis or bracket is not placed on the same line as the method/indexer/attribute/array name.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Closing parenthesis should be on line of last parameter

org.openrewrite.csharp.recipes.stylecop.analyzers.TokenSpacingSA1111

The closing parenthesis or bracket in a call to or declaration of a C# method/indexer/attribute/array/constructor/delegate is not placed on the same line as the last parameter.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Closing parenthesis should be on line of opening parenthesis

org.openrewrite.csharp.recipes.stylecop.analyzers.TokenSpacingSA1112

The closing parenthesis or bracket in a call to a C# method or indexer, or the declaration of a method or indexer, is not placed on the same line as the opening bracket when the element does not take any parameters.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Comma should be on the same line as previous parameter

org.openrewrite.csharp.recipes.stylecop.analyzers.TokenSpacingSA1113

A comma between two parameters in a call to a C# method or indexer, or in the declaration of a method or indexer, is not placed on the same line as the previous parameter.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Using directives should be placed correctly

org.openrewrite.csharp.recipes.stylecop.analyzers.UsingSA1200

A C# using directive is placed outside of a namespace element.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

System using directives should be placed before other using directives

org.openrewrite.csharp.recipes.stylecop.analyzers.UsingSA1208

A using directive which declares a member of the 'System' namespace appears after a using directive which declares a member of a different namespace, within a C# code file.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Using alias directives should be placed after other using directives

org.openrewrite.csharp.recipes.stylecop.analyzers.UsingSA1209

A using-alias directive is positioned before a regular using directive.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Using directives should be ordered alphabetically by namespace

org.openrewrite.csharp.recipes.stylecop.analyzers.UsingSA1210

The using directives within a C# code file are not sorted alphabetically by namespace.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Using alias directives should be ordered alphabetically by alias name

org.openrewrite.csharp.recipes.stylecop.analyzers.UsingSA1211

The using-alias directives within a C# code file are not sorted alphabetically by alias name.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Using static directives should be placed at the correct location.

org.openrewrite.csharp.recipes.stylecop.analyzers.UsingSA1216

A using static directive is positioned before a regular or after an alias using directive.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Using static directives should be ordered alphabetically

org.openrewrite.csharp.recipes.stylecop.analyzers.UsingSA1217

All using static directives should be ordered alphabetically.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add [TemplatePart] to the type

org.openrewrite.csharp.recipes.wpfanalyzers.AddAttributeListFixWPF0130

Add [TemplatePart] to the type.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

StyleTypedProperty is missing

org.openrewrite.csharp.recipes.wpfanalyzers.AddAttributeListFixWPF0176

StyleTypedProperty is missing.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add default field to converter

org.openrewrite.csharp.recipes.wpfanalyzers.AddDefaultMemberFixWPF0070

Add default field to converter.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use correct argument for [AttachedPropertyBrowsableForType]

org.openrewrite.csharp.recipes.wpfanalyzers.AttachedPropertyBrowsableForTypeArgumentFixWPF0034

Use correct argument for [AttachedPropertyBrowsableForType].

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add [AttachedPropertyBrowsableForType]

org.openrewrite.csharp.recipes.wpfanalyzers.AttachedPropertyBrowsableForTypeAttributeFixWPF0033

Add [AttachedPropertyBrowsableForType].

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add ValueConversion attribute

org.openrewrite.csharp.recipes.wpfanalyzers.AttachedPropertyBrowsableForTypeAttributeFixWPF0071

Add ValueConversion attribute.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Cast sender to correct type

org.openrewrite.csharp.recipes.wpfanalyzers.CastFixWPF0019

Cast sender to correct type.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Cast value to correct type

org.openrewrite.csharp.recipes.wpfanalyzers.CastFixWPF0020

Cast value to correct type.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Cast sender to containing type

org.openrewrite.csharp.recipes.wpfanalyzers.CastFixWPF0021

Cast sender to correct type.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Cast value to correct type

org.openrewrite.csharp.recipes.wpfanalyzers.CastFixWPF0022

Cast value to correct type.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

MarkupExtensionReturnType must use correct return type

org.openrewrite.csharp.recipes.wpfanalyzers.ChangeTypeofFixWPF0081

MarkupExtensionReturnType must use correct return type.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use containing type when creating a ComponentResourceKey

org.openrewrite.csharp.recipes.wpfanalyzers.ComponentResourceKeyFixWPF0140

Use containing type when creating a ComponentResourceKey.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use containing member as key when creating a ComponentResourceKey

org.openrewrite.csharp.recipes.wpfanalyzers.ComponentResourceKeyFixWPF0141

Use containing member as key when creating a ComponentResourceKey.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

[ConstructorArgument] must match

org.openrewrite.csharp.recipes.wpfanalyzers.ConstructorArgumentAttributeArgumentFixWPF0082

[ConstructorArgument] must match the name of the constructor parameter.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add [ConstructorArgument]

org.openrewrite.csharp.recipes.wpfanalyzers.ConstructorArgumentAttributeFixWPF0083

Add [ConstructorArgument] for the property.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

The callback is trivial, convert to lambda

org.openrewrite.csharp.recipes.wpfanalyzers.ConvertToLambdaFixWPF0023

The callback is trivial, convert to lambda for better locality.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Backing member for DependencyProperty should have standard documentation text

org.openrewrite.csharp.recipes.wpfanalyzers.DocumentationFixWPF0060

Backing member for DependencyProperty should have standard documentation text.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Accessor method for attached property should have standard documentation text

org.openrewrite.csharp.recipes.wpfanalyzers.DocumentationFixWPF0061

Accessor method for attached property should have standard documentation text.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Property changed callback should have standard documentation text

org.openrewrite.csharp.recipes.wpfanalyzers.DocumentationFixWPF0062

Property changed callback should have standard documentation text.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Backing member for RoutedEvent should have standard documentation text

org.openrewrite.csharp.recipes.wpfanalyzers.DocumentationFixWPF0108

Backing member for RoutedEvent should have standard documentation text.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Backing field for a DependencyProperty should be static and readonly

org.openrewrite.csharp.recipes.wpfanalyzers.MakeFieldStaticReadonlyFixWPF0030

Backing field for a DependencyProperty should be static and readonly.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Backing member for a RoutedEvent should be static and readonly

org.openrewrite.csharp.recipes.wpfanalyzers.MakeFieldStaticReadonlyFixWPF0107

Backing member for a RoutedEvent should be static and readonly.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Backing field for a RoutedCommand should be static and readonly

org.openrewrite.csharp.recipes.wpfanalyzers.MakeFieldStaticReadonlyFixWPF0123

Backing field for a RoutedCommand should be static and readonly.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Parameter type should be nullable

org.openrewrite.csharp.recipes.wpfanalyzers.MakeNullableFixWPF0024

Parameter type should be nullable.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add MarkupExtensionReturnType attribute

org.openrewrite.csharp.recipes.wpfanalyzers.MarkupExtensionReturnTypeAttributeFixWPF0080

Add MarkupExtensionReturnType attribute.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

DependencyPropertyKey member must be declared before DependencyProperty member

org.openrewrite.csharp.recipes.wpfanalyzers.MoveFixWPF0031

DependencyPropertyKey member must be declared before DependencyProperty member.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Register name and owning type for routed command

org.openrewrite.csharp.recipes.wpfanalyzers.RegisterRoutedCommandFixWPF0122

Register containing type as owner for routed command.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Backing field for a DependencyProperty should match registered name

org.openrewrite.csharp.recipes.wpfanalyzers.RenameMemberFixWPF0001

A dependency property's backing field should be named with the name it is registered with suffixed by 'Property'. This is the convention in the framework.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Backing field for a DependencyPropertyKey should match registered name

org.openrewrite.csharp.recipes.wpfanalyzers.RenameMemberFixWPF0002

A DependencyPropertyKey's backing field must be named with the name it is registered with suffixed by 'PropertyKey'.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

CLR property for a DependencyProperty should match registered name

org.openrewrite.csharp.recipes.wpfanalyzers.RenameMemberFixWPF0003

A CLR property accessor for a DependencyProperty must have the same name as the DependencyProperty is registered with.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

CLR method for a DependencyProperty must match registered name

org.openrewrite.csharp.recipes.wpfanalyzers.RenameMemberFixWPF0004

CLR methods for accessing a DependencyProperty must have names matching the name the DependencyProperty is registered with.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Name of PropertyChangedCallback should match registered name

org.openrewrite.csharp.recipes.wpfanalyzers.RenameMemberFixWPF0005

Name of PropertyChangedCallback should match registered name.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Name of CoerceValueCallback should match registered name

org.openrewrite.csharp.recipes.wpfanalyzers.RenameMemberFixWPF0006

Name of CoerceValueCallback should match registered name.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Name of ValidateValueCallback should match registered name

org.openrewrite.csharp.recipes.wpfanalyzers.RenameMemberFixWPF0007

Name of ValidateValueCallback should match registered name.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Name the invoked method OnEventName

org.openrewrite.csharp.recipes.wpfanalyzers.RenameMemberFixWPF0090

Name the invoked method OnEventName.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Name the invoked method OnEventName

org.openrewrite.csharp.recipes.wpfanalyzers.RenameMemberFixWPF0091

Name the invoked method OnEventName.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Backing field for a RoutedEvent should match registered name

org.openrewrite.csharp.recipes.wpfanalyzers.RenameMemberFixWPF0100

A routed event's backing field should be named with the name it is registered with suffixed by 'Event'.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Name of the event should match registered name

org.openrewrite.csharp.recipes.wpfanalyzers.RenameMemberFixWPF0102

Name of the event should match registered name.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Containing type should be used as registered owner

org.openrewrite.csharp.recipes.wpfanalyzers.UseContainingTypeFixWPF0011

When registering a DependencyProperty register containing type as owner type.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Containing type should be used as registered owner

org.openrewrite.csharp.recipes.wpfanalyzers.UseContainingTypeFixWPF0101

When registering a RoutedEvent register containing type as owner type.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Register containing type as owner for routed command

org.openrewrite.csharp.recipes.wpfanalyzers.UseContainingTypeFixWPF0121

Register containing type as owner for routed command.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use correct handler type

org.openrewrite.csharp.recipes.wpfanalyzers.UseCorrectDelegateFixWPF0092

Use correct handler type.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

A readonly DependencyProperty must be set with DependencyPropertyKey

org.openrewrite.csharp.recipes.wpfanalyzers.UseDependencyPropertyKeyFixWPF0040

A readonly DependencyProperty must be set with DependencyPropertyKey.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Register containing member name as name for routed command

org.openrewrite.csharp.recipes.wpfanalyzers.UseNameofFixWPF0120

Register containing member name as name for routed command.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use nameof() instead of literal

org.openrewrite.csharp.recipes.wpfanalyzers.UseNameofFixWPF0150

Use nameof() as it is less fragile than string literal.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use nameof() instead of constant

org.openrewrite.csharp.recipes.wpfanalyzers.UseNameofFixWPF0151

Use nameof() as it is less fragile than constant.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

CLR property type should match registered type

org.openrewrite.csharp.recipes.wpfanalyzers.UseRegisteredTypeFixWPF0012

CLR property type should match registered type.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

CLR accessor for attached property must match registered type

org.openrewrite.csharp.recipes.wpfanalyzers.UseRegisteredTypeFixWPF0013

CLR accessor for attached property must match registered type.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Set mutable dependency properties using SetCurrentValue

org.openrewrite.csharp.recipes.wpfanalyzers.UseSetCurrentValueFixWPF0041

Prefer setting mutable dependency properties using SetCurrentValue.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use SetValue in setter

org.openrewrite.csharp.recipes.wpfanalyzers.UseSetValueFixWPF0035

Use SetValue in setter.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Don't set DataContext and Style using SetCurrentValue

org.openrewrite.csharp.recipes.wpfanalyzers.UseSetValueFixWPF0043

Set DataContext and Style using SetValue.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

ValueConversion must use correct types

org.openrewrite.csharp.recipes.wpfanalyzers.ValueConversionAttributeArgumentFixWPF0072

ValueConversion must use correct types.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add ValueConversion attribute (unknown types)

org.openrewrite.csharp.recipes.wpfanalyzers.ValueConversionAttributeFixWPF0073

Add ValueConversion attribute (unknown types).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

XmlnsDefinitions does not map all namespaces with public types

org.openrewrite.csharp.recipes.wpfanalyzers.XmlnsDefinitionFixWPF0052

XmlnsDefinitions does not map all namespaces with public types.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change Gradle dependency

org.openrewrite.gradle.ChangeDependency

Change a Gradle dependency coordinates. The newGroupId or newArtifactId MUST be different from before.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change Gradle dependency artifact

org.openrewrite.gradle.ChangeDependencyArtifactId

Change the artifact of a specified Gradle dependency.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change a Gradle dependency classifier

org.openrewrite.gradle.ChangeDependencyClassifier

Changes classifier of an existing dependency declared in build.gradle files.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change a Gradle dependency configuration

org.openrewrite.gradle.ChangeDependencyConfiguration

A common example is the need to change compile to api/implementation as part of the move to Gradle 7.x and later.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change a Gradle dependency extension

org.openrewrite.gradle.ChangeDependencyExtension

Changes extension of an existing dependency declared in build.gradle files.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change Gradle dependency group

org.openrewrite.gradle.ChangeDependencyGroupId

Change the group of a specified Gradle dependency.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change Extra Property

org.openrewrite.gradle.ChangeExtraProperty

Gradle's ExtraPropertiesExtension is a commonly used mechanism for setting arbitrary key/value pairs on a project. This recipe will change the value of a property with the given key name if that key can be found. It assumes that the value being set is a String literal. Does not add the value if it does not already exist.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change Gradle managed dependency

org.openrewrite.gradle.ChangeManagedDependency

Change a Gradle managed dependency coordinates. The newGroupId or newArtifactId MUST be different from before. For now, only Spring Dependency Management Plugin entries are supported and no other forms of managed dependencies (yet).

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Dependency constraint to resolution rule

org.openrewrite.gradle.DependencyConstraintToRule

Gradle dependency constraints are useful for managing the versions of transitive dependencies. Some plugins, such as the Spring Dependency Management plugin, do not respect these constraints. This recipe converts constraints into resolution rules, which can achieve similar effects to constraints but are harder for plugins to ignore.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use Map notation for Gradle dependency declarations

org.openrewrite.gradle.DependencyUseMapNotation

In Gradle, dependencies can be expressed as a String like &quot;groupId:artifactId:version&quot;, or equivalently as a Map like group: 'groupId', name: 'artifactId', version: 'version' (groovy) or group = &quot;groupId&quot;, name = &quot;artifactId&quot;, version = &quot;version&quot; (kotlin). This recipe replaces dependencies represented as Strings with an equivalent dependency represented as a Map.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use String notation for Gradle dependency declarations

org.openrewrite.gradle.DependencyUseStringNotation

In Gradle, dependencies can be expressed as a String like &quot;groupId:artifactId:version&quot;, or equivalently as a Map like group: 'groupId', name: 'artifactId', version: 'version'. This recipe replaces dependencies represented as Maps with an equivalent dependency represented as a String, as recommended per the Gradle best practices for dependencies to use a single GAV.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enable Develocity build cache

org.openrewrite.gradle.EnableDevelocityBuildCache

Adds buildCache configuration to develocity where not yet present.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove a Gradle dependency

org.openrewrite.gradle.RemoveDependency

Removes a single dependency from the dependencies section of the build.gradle.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove an enabled Gradle preview feature

org.openrewrite.gradle.RemoveEnableFeaturePreview

Remove an enabled Gradle preview feature from settings.gradle.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove build extension by name

org.openrewrite.gradle.RemoveExtension

Remove a Gradle build extension from settings.gradle(.kts) or build.gradle(.kts) files.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove redundant explicit dependencies and versions

org.openrewrite.gradle.RemoveRedundantDependencyVersions

Remove explicitly-specified dependency versions that are managed by a Gradle platform, enforcedPlatform or the io.spring.dependency-management plugin. Also removes redundant direct dependencies and dependency constraints that are already satisfied by transitive dependencies.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove repository

org.openrewrite.gradle.RemoveRepository

Removes a repository from Gradle build scripts. Named repositories include "jcenter", "mavenCentral", "mavenLocal", and "google".

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update Gradle project Java compatibility

org.openrewrite.gradle.UpdateJavaCompatibility

Find and updates the Java compatibility for the Gradle project.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace Gradle 8 introduced deprecations in JaCoCo report task

org.openrewrite.gradle.gradle8.JacocoReportDeprecations

Set the enabled to required and the destination to outputLocation for Reports deprecations that were removed in gradle 8. See the gradle docs on this topic.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add Gradle plugin

org.openrewrite.gradle.plugins.AddBuildPlugin

Add a build plugin to a Gradle build file's plugins block.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add the Develocity Gradle plugin

org.openrewrite.gradle.plugins.AddDevelocityGradlePlugin

Add the Develocity Gradle plugin to settings.gradle files.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add Gradle settings plugin

org.openrewrite.gradle.plugins.AddSettingsPlugin

Add plugin to Gradle settings file plugins block by id.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add a Gradle settings repository

org.openrewrite.gradle.plugins.AddSettingsPluginRepository

Add a Gradle settings repository to settings.gradle(.kts).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change a Gradle plugin

org.openrewrite.gradle.plugins.ChangePlugin

Changes the selected Gradle plugin to the new plugin.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change a Gradle plugin version by id

org.openrewrite.gradle.plugins.ChangePluginVersion

Change a Gradle plugin by id to a later version.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate from Gradle Enterprise to Develocity

org.openrewrite.gradle.plugins.MigrateGradleEnterpriseToDevelocity

Migrate from the Gradle Enterprise Gradle plugin to the Develocity Gradle plugin.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove Gradle plugin

org.openrewrite.gradle.plugins.RemoveBuildPlugin

Remove plugin from Gradle plugins block by its id. Does not remove plugins from the buildscript block.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove Develocity configuration

org.openrewrite.gradle.plugins.RemoveDevelocityConfiguration

Remove Develocity configuration from a Gradle build.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove Gradle settings plugin

org.openrewrite.gradle.plugins.RemoveSettingsPlugin

Remove plugin from Gradle settings file plugins block by id.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Gradle dependency insight

org.openrewrite.gradle.search.DependencyInsight

Find direct and transitive dependencies matching a group, artifact, resolved version, and optionally a configuration name. Results include dependencies that either directly match or transitively include a matching dependency.

Data tables:

  • org.openrewrite.maven.table.DependenciesInUse: Direct and transitive dependencies in use.
  • org.openrewrite.maven.table.ExplainDependenciesInUse: A dependency graph explainer similar to that shown by gradle dependencyInsight for each matching dependency. This table will contain a row per matching dependency per configuration per (sub)project.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Does not include Gradle dependency

org.openrewrite.gradle.search.DoesNotIncludeDependency

A precondition which returns false if visiting a Gradle file which includes the specified dependency in the classpath of some scope. For compatibility with multimodule projects, this should most often be applied as a precondition.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

List effective Gradle plugin repositories

org.openrewrite.gradle.search.EffectiveGradlePluginRepositories

Lists the Gradle plugin repositories that would be used for plugin resolution, in order of precedence. This includes Maven repositories defined in the settings.gradle pluginManagement section and build.gradle buildscript repositories as determined when the LST was produced.

Data tables:

  • org.openrewrite.maven.search.EffectiveMavenRepositoriesTable: Table showing which Maven repositories were used in dependency resolution for this POM.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

List effective Gradle project repositories

org.openrewrite.gradle.search.EffectiveGradleRepositories

Lists the Gradle project repositories that would be used for dependency resolution, in order of precedence. This includes Maven repositories defined in the Gradle build files and settings as determined when the LST was produced.

Data tables:

  • org.openrewrite.maven.search.EffectiveMavenRepositoriesTable: Table showing which Maven repositories were used in dependency resolution for this POM.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find Gradle dependency

org.openrewrite.gradle.search.FindDependency

Finds dependencies declared in gradle build files. See the reference on Gradle configurations or the diagram below for a description of what configuration to use. A project's compile and runtime classpath is based on these configurations. <img alt="Gradle compile classpath" src="https://docs.gradle.org/current/userguide/img/java-library-ignore-deprecated-main.png" width="200px"/> A project's test classpath is based on these configurations. <img alt="Gradle test classpath" src="https://docs.gradle.org/current/userguide/img/java-library-ignore-deprecated-test.png" width="200px"/>.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find Gradle dependencies blocks

org.openrewrite.gradle.search.FindDependencyHandler

Find the dependency handler containing any number of dependency definitions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find Gradle projects

org.openrewrite.gradle.search.FindGradleProject

Gradle projects are those with build.gradle or build.gradle.kts files.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find Gradle wrappers

org.openrewrite.gradle.search.FindGradleWrapper

Find Gradle wrappers.

Data tables:

  • org.openrewrite.gradle.table.GradleWrappersInUse: Gradle wrappers in use.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find Gradle JVMTestSuite plugin configuration

org.openrewrite.gradle.search.FindJVMTestSuites

Find Gradle JVMTestSuite plugin configurations and produce a data table.

Data tables:

  • org.openrewrite.gradle.table.JVMTestSuitesDefined: The Gradle JVMTestSuites that are configured in a build.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find Gradle plugin

org.openrewrite.gradle.search.FindPlugins

Find a Gradle plugin by id and/or class name. For best results both should be specified, as one cannot automatically be used to infer the other.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find Gradle repository

org.openrewrite.gradle.search.FindRepository

Find a Gradle repository by url.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use HTTPS for repositories

org.openrewrite.gradle.security.UseHttpsForRepositories

Use HTTPS for repository URLs.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add Gradle dependency

org.openrewrite.gradle.AddDependency

Add a gradle dependency to a build.gradle file in the correct configuration based on where it is used.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add Gradle platform dependency

org.openrewrite.gradle.AddPlatformDependency

Add a gradle platform dependency to a build.gradle file in the correct configuration based on where it is used.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add Gradle property

org.openrewrite.gradle.AddProperty

Add a property to the gradle.properties file.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Gradle project dependencies to version catalog

org.openrewrite.gradle.MigrateDependenciesToVersionCatalog

Migrates Gradle project dependencies to use the version catalog feature. Supports migrating dependency declarations of various forms: * String notation: &quot;group:artifact:version&quot; * Map notation: group: 'group', name: 'artifact', version: 'version' * Property references: &quot;group:artifact:$version&quot; or &quot;group:artifact:${version}&quot; The recipe will: * Create a gradle/libs.versions.toml file with version declarations * Replace dependency declarations with catalog references (e.g., libs.springCore) * Migrate version properties from gradle.properties to the version catalog * Preserve project dependencies unchanged Note: If a version catalog already exists, the recipe will not modify it.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update Gradle wrapper

org.openrewrite.gradle.UpdateGradleWrapper

Update the version of Gradle used in an existing Gradle wrapper. Queries services.gradle.org to determine the available releases, but prefers the artifact repository URL which already exists within the wrapper properties file. If your artifact repository does not contain the same Gradle distributions as services.gradle.org, then the recipe may suggest a version which is not available in your artifact repository.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade Gradle dependency versions

org.openrewrite.gradle.UpgradeDependencyVersion

Upgrade the version of a dependency in a build.gradle file. Supports updating dependency declarations of various forms: * String notation: &quot;group:artifact:version&quot; * Map notation: group: 'group', name: 'artifact', version: 'version' Can update version numbers which are defined earlier in the same file in variable declarations.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade transitive Gradle dependencies

org.openrewrite.gradle.UpgradeTransitiveDependencyVersion

Upgrades the version of a transitive dependency in a Gradle build file. There are many ways to do this in Gradle, so the mechanism for upgrading a transitive dependency must be considered carefully depending on your style of dependency management.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update a Gradle plugin by id

org.openrewrite.gradle.plugins.UpgradePluginVersion

Update a Gradle plugin by id to a later version defined by the plugins DSL. To upgrade a plugin dependency defined by buildscript.dependencies, use the UpgradeDependencyVersion recipe instead.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Module has dependency

org.openrewrite.gradle.search.ModuleHasDependency

Searches for Gradle Projects (modules) that have a dependency matching the specified id or implementing class. Places a SearchResult marker on all sources within a project with a matching dependency. This recipe is intended to be used as a precondition for other recipes. For example this could be used to limit the application of a spring boot migration to only projects that use spring-boot-starter, limiting unnecessary upgrading. If the search result you want is instead just the build.gradle(.kts) file that use the dependency, use the FindDependency recipe instead.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Module has plugin

org.openrewrite.gradle.search.ModuleHasPlugin

Searches for Gradle Projects (modules) that have a plugin matching the specified id or implementing class. Places a SearchResult marker on all sources within a project with a matching plugin. This recipe is intended to be used as a precondition for other recipes. For example this could be used to limit the application of a spring boot migration to only projects that apply the spring dependency management plugin, limiting unnecessary upgrading. If the search result you want is instead just the build.gradle(.kts) file applying the plugin, use the FindPlugins recipe instead.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Gradle 5 from Gradle 4

org.openrewrite.gradle.MigrateToGradle5

Migrate to version 5.x. See the Gradle upgrade guide from version 4.x to 5.0 for more information.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Gradle 6 from Gradle 5

org.openrewrite.gradle.MigrateToGradle6

Migrate to version 6.x. See the Gradle upgrade guide from version 5.x to 6.0 for more information.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Gradle 7 from Gradle 6

org.openrewrite.gradle.MigrateToGradle7

Migrate to version 7.x. See the Gradle upgrade guide from version 6.x to 7.0 for more information.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Gradle 8 from Gradle 7

org.openrewrite.gradle.MigrateToGradle8

Migrate to version 8.x. See the Gradle upgrade guide from version 7.x to 8.0 and version 8.x to latest for more information.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Add JUnit Platform Launcher

org.openrewrite.gradle.AddJUnitPlatformLauncher

Add the JUnit Platform Launcher to the buildscript dependencies.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Gradle 9 from Gradle 8

org.openrewrite.gradle.MigrateToGradle9

Migrate to version 9.x. See the Gradle upgrade guide from version 8.x to 9.0 for more information.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Apply Gradle best practices

org.openrewrite.gradle.GradleBestPractices

Apply a set of Gradle best practices to the build files, for more efficient and ideomatic builds.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Enable Gradle build cache

org.openrewrite.gradle.EnableGradleBuildCache

Enable the Gradle build cache. By enabling build cache the build outputs are stored externally and fetched from the cache when it is determined that those inputs have no changed, avoiding the expensive work of regenerating them. See the Gradle Build Cache for more information.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enable Gradle parallel execution

org.openrewrite.gradle.EnableGradleParallelExecution

Most builds consist of more than one project and some of those projects are usually independent of one another. Yet Gradle will only run one task at a time by default, regardless of the project structure. By using the --parallel switch, you can force Gradle to execute tasks in parallel as long as those tasks are in different projects. See the Gradle performance documentation for more information.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove Develocity

org.openrewrite.gradle.plugins.RemoveDevelocity

Remove the Develocity plugin and configuration from the Gradle build and settings files.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Format Groovy code

org.openrewrite.groovy.format.AutoFormat

Format Groovy code using a standard comprehensive set of Groovy formatting recipes.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Groovy GString curly braces

org.openrewrite.groovy.format.GStringCurlyBraces

In Groovy GStrings, curly braces are optional for single variable expressions. This recipe adds them, so that the expression is always surrounded by curly braces.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Move a closure which is the last argument of a method invocation out of parentheses

org.openrewrite.groovy.format.OmitParenthesesForLastArgumentLambda

Groovy allows a shorthand syntax that allows a closure to be placed outside of parentheses.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Stylize Groovy code to omit parentheses

org.openrewrite.groovy.format.OmitParenthesesFormat

Omit parentheses for last argument lambdas in Groovy code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Delete content

org.openrewrite.hcl.DeleteContent

Delete HCL content by path.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace legacy attribute index syntax

org.openrewrite.hcl.ReplaceLegacyAttributeIndexSyntax

Replace legacy attribute index syntax (.0) with the new syntax ([0]).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Format HCL code

org.openrewrite.hcl.format.AutoFormat

Format HCL code using a standard comprehensive set of HCL formatting recipes.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Blank lines

org.openrewrite.hcl.format.BlankLines

Add and/or remove blank lines.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Normalize format

org.openrewrite.hcl.format.NormalizeFormat

Move whitespace to the outermost LST element possible.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove trailing whitespace

org.openrewrite.hcl.format.RemoveTrailingWhitespace

Remove any extra trailing whitespace from the end of each line.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Spaces

org.openrewrite.hcl.format.Spaces

Format whitespace in HCL code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Tabs and indents

org.openrewrite.hcl.format.TabsAndIndents

Format tabs and indents in HCL code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find and replace literals in HCL files

org.openrewrite.hcl.search.FindAndReplaceLiteral

Find and replace literal values in HCL files. This recipe parses the source files on which it runs as HCL, meaning you can execute HCL language-specific recipes before and after this recipe in a single recipe run.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find content

org.openrewrite.hcl.search.FindContent

Find HCL content by path.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Move content to another file

org.openrewrite.hcl.MoveContentToFile

Move content to another HCL file, deleting it in the original file.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add comment to import statement

org.openrewrite.java.AddCommentToImport

Add a comment to an import statement in a Java source file.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add comment to method declarations

org.openrewrite.java.AddCommentToMethod

Add a comment to method declarations in a Java source file.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add comment to method invocations

org.openrewrite.java.AddCommentToMethodInvocations

Add a comment to method invocations in a Java source file.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add license header

org.openrewrite.java.AddLicenseHeader

Adds license headers to Java source files when missing. Does not override existing license headers.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add a literal method argument

org.openrewrite.java.AddLiteralMethodArgument

Add a literal String or primitive argument to method invocations.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add method parameter to a method declaration

org.openrewrite.java.AddMethodParameter

Adds a new method parameter to an existing method declaration.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add a null method argument

org.openrewrite.java.AddNullMethodArgument

Add a null argument to method invocations.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add or update annotation attribute

org.openrewrite.java.AddOrUpdateAnnotationAttribute

Some annotations accept arguments. This recipe sets an existing argument to the specified value, or adds the argument if it is not already set.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change annotation attribute name

org.openrewrite.java.ChangeAnnotationAttributeName

Some annotations accept arguments. This recipe renames an existing attribute.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change method access level

org.openrewrite.java.ChangeMethodAccessLevel

Change the access level (public, protected, private, package private) of a method.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change method invocation return type

org.openrewrite.java.ChangeMethodInvocationReturnType

Changes the return type of a method invocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change method name

org.openrewrite.java.ChangeMethodName

Rename a method.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change method target to static

org.openrewrite.java.ChangeMethodTargetToStatic

Change method invocations to static method calls.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change method target to variable

org.openrewrite.java.ChangeMethodTargetToVariable

Change method invocations to method calls on a variable.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Rename package name

org.openrewrite.java.ChangePackage

A recipe that will rename a package name in package statements, imports, and fully-qualified types.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Rename package name in String literals

org.openrewrite.java.ChangePackageInStringLiteral

A recipe that will rename a package name in String literals.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change static field access to static method access

org.openrewrite.java.ChangeStaticFieldToMethod

Migrate accesses to a static field to invocations of a static method.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change type

org.openrewrite.java.ChangeType

Change a given type to another.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change type in String literals

org.openrewrite.java.ChangeTypeInStringLiteral

Change a given type to another when used in a String literal.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Delete method argument

org.openrewrite.java.DeleteMethodArgument

Delete an argument from method invocations.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Inline method calls

org.openrewrite.java.InlineMethodCalls

Inline method calls using a template replacement pattern. Supports both method invocations and constructor calls, with optional imports.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove static import

org.openrewrite.java.NoStaticImport

Removes static imports and replaces them with qualified references. For example, emptyList() becomes Collections.emptyList().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Order imports

org.openrewrite.java.OrderImports

Groups and orders import statements. If a style has been defined, this recipe will order the imports according to that style. If no style is detected, this recipe will default to ordering imports in the same way that IntelliJ IDEA does.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Randomize tree IDs

org.openrewrite.java.RandomizeId

Scramble the IDs. This was intended as a utility to test en masse different techniques for UUID generation and compare their relative performance outside a microbenchmark.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Demonstrate rendering of Markup markers

org.openrewrite.java.RecipeMarkupDemonstration

Tooling may decide to elide or display differently markup of different levels.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove annotation

org.openrewrite.java.RemoveAnnotation

Remove matching annotations wherever they occur.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove annotation attribute

org.openrewrite.java.RemoveAnnotationAttribute

Some annotations accept arguments. This recipe removes an existing attribute.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove interface implementations

org.openrewrite.java.RemoveImplements

Removes implements clauses from classes implementing the specified interface. Removes @Overrides annotations from methods which no longer override anything.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove method invocations

org.openrewrite.java.RemoveMethodInvocations

Remove method invocations if syntactically safe.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove elements from a method declaration throws clause

org.openrewrite.java.RemoveMethodThrows

Remove specific, or all exceptions from a method declaration throws clause.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Transform calls to Objects.isNull(..) and Objects.nonNull(..)

org.openrewrite.java.RemoveObjectsIsNull

Replace calls to Objects.isNull(..) and Objects.nonNull(..) with a simple null check. Using these methods outside of stream predicates is not idiomatic.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove unused imports

org.openrewrite.java.RemoveUnusedImports

Remove imports for types that are not referenced. As a precaution against incorrect changes no imports will be removed from any source where unknown types are referenced. The most common cause of unknown types is the use of annotation processors not supported by OpenRewrite, such as lombok.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Reorder method arguments

org.openrewrite.java.ReorderMethodArguments

Reorder method arguments into the specified order.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace annotation

org.openrewrite.java.ReplaceAnnotation

Replace an Annotation with another one if the annotation pattern matches. Only fixed parameters can be set in the replacement.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace constant with literal value

org.openrewrite.java.ReplaceConstant

Replace a named constant with a literal value when you wish to remove the old constant. A String literal must include escaped quotes.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace constant with another constant

org.openrewrite.java.ReplaceConstantWithAnotherConstant

Replace a constant with another constant, adding/removing import on class if needed.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace method invocation with constant

org.openrewrite.java.ReplaceMethodInvocationWithConstant

Replace all method invocations matching the method pattern with the specified constant.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace String literal

org.openrewrite.java.ReplaceStringLiteralValue

Replace the value of a complete String literal.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace String literal with constant

org.openrewrite.java.ReplaceStringLiteralWithConstant

Replace String literal with constant, adding import on class if needed.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add imports for fully qualified references to types

org.openrewrite.java.ShortenFullyQualifiedTypeReferences

Any fully qualified references to Java types will be replaced with corresponding simple names and import statements, provided that it doesn't result in any conflicts with other imports or types declared in the local compilation unit.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Simplify a call chain

org.openrewrite.java.SimplifyMethodChain

Simplify a.b().c() to a.d().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Simplify single-element annotation

org.openrewrite.java.SimplifySingleElementAnnotation

This recipe will remove the attribute value on single-element annotations. According to JLS, a single-element annotation, is a shorthand designed for use with single-element annotation types.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update source positions

org.openrewrite.java.UpdateSourcePositions

Calculate start position and length for every LST element.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use static import

org.openrewrite.java.UseStaticImport

Removes unnecessary receiver types from static method invocations. For example, Collections.emptyList() becomes emptyList().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Calculate token length of classes

org.openrewrite.java.ai.ClassDefinitionLength

Locates class definitions and predicts the number of token in each.

Data tables:

  • org.openrewrite.java.table.TokenCount: The number of tokens from a code snippet
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Calculate token length of method definitions

org.openrewrite.java.ai.MethodDefinitionLength

Locates method definitions and predicts the number of token in each.

Data tables:

  • org.openrewrite.java.table.TokenCount: The number of tokens from a code snippet
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Format Java code

org.openrewrite.java.format.AutoFormat

Format Java code using a standard comprehensive set of Java formatting recipes.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Blank lines

org.openrewrite.java.format.BlankLines

Add and/or remove blank lines.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

End files with a single newline

org.openrewrite.java.format.EmptyNewlineAtEndOfFile

Some tools work better when files end with an empty line.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Method parameter padding

org.openrewrite.java.format.MethodParamPad

Fixes whitespace padding between the identifier of a method definition or method invocation and the left parenthesis of the parameter list. For example, when configured to remove spacing, someMethodInvocation (x); becomes someMethodInvocation(x).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

No whitespace after

org.openrewrite.java.format.NoWhitespaceAfter

Removes unnecessary whitespace appearing after a token. A linebreak after a token is allowed unless allowLineBreaks is set to false, in which case it will be removed.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

No whitespace before

org.openrewrite.java.format.NoWhitespaceBefore

Removes unnecessary whitespace preceding a token. A linebreak before a token will be removed unless allowLineBreaks is set to true.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Normalize format

org.openrewrite.java.format.NormalizeFormat

Move whitespace to the outermost LST element possible.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Normalize line breaks

org.openrewrite.java.format.NormalizeLineBreaks

Consistently use either Windows style (CRLF) or Linux style (LF) line breaks. If no GeneralFormatStyle is specified this will use whichever style of line endings are more common.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Normalize to tabs or spaces

org.openrewrite.java.format.NormalizeTabsOrSpaces

Consistently use either tabs or spaces in indentation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Pad empty for loop components

org.openrewrite.java.format.PadEmptyForLoopComponents

Fixes padding on empty for loop iterators and initializers to match Checkstyle policies.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove trailing whitespace

org.openrewrite.java.format.RemoveTrailingWhitespace

Remove any extra trailing whitespace from the end of each line.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Single line comments begin with a whitespace

org.openrewrite.java.format.SingleLineComments

Write // hi instead of //hi.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Spaces

org.openrewrite.java.format.Spaces

Format whitespace in Java code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Tabs and indents

org.openrewrite.java.format.TabsAndIndents

Format tabs and indents in Java code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Typecast parentheses padding

org.openrewrite.java.format.TypecastParenPad

Fixes whitespace padding between a typecast type identifier and the enclosing left and right parenthesis. For example, when configured to remove spacing, ( int ) 0L; becomes (int) 0L;.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Wrapping and braces

org.openrewrite.java.format.WrappingAndBraces

Format line wraps and braces in Java code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Check whether a type is not in use

org.openrewrite.java.search.DoesNotUseType

Useful as a precondition to skip over compilation units using the argument type.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find annotations

org.openrewrite.java.search.FindAnnotations

Find all annotations matching the annotation pattern.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find class hierarchy

org.openrewrite.java.search.FindClassHierarchy

Discovers all class declarations within a project, recording which files they appear in, their superclasses, and interfaces. That information is then recorded in a data table.

Data tables:

  • org.openrewrite.java.table.ClassHierarchy: Record the classes
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find within comments and literals

org.openrewrite.java.search.FindComments

Find regular expression matches within comments and literals. "Literals" includes string literals, character literals, and numeric literals.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find compile errors

org.openrewrite.java.search.FindCompileErrors

Compile errors result in a particular LST structure that can be searched for.

Data tables:

  • org.openrewrite.java.table.CompileErrors: The source code of compile errors.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find uses of deprecated classes

org.openrewrite.java.search.FindDeprecatedClasses

Find uses of deprecated classes, optionally ignoring those classes that are inside deprecated scopes.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find uses of deprecated fields

org.openrewrite.java.search.FindDeprecatedFields

Find uses of deprecated fields in any API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find uses of deprecated methods

org.openrewrite.java.search.FindDeprecatedMethods

Find uses of deprecated methods in any API.

Data tables:

  • org.openrewrite.java.table.MethodCalls: The text of matching method invocations.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find uses of deprecated classes, methods, and fields

org.openrewrite.java.search.FindDeprecatedUses

Find deprecated uses of methods, fields, and types. Optionally ignore those classes that are inside deprecated scopes.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find empty classes

org.openrewrite.java.search.FindEmptyClasses

Find empty classes without annotations that do not implement an interface or extend a class.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find methods with empty bodies

org.openrewrite.java.search.FindEmptyMethods

Find methods with empty bodies and single public no arg constructors.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find fields

org.openrewrite.java.search.FindFields

Find uses of a field.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find fields of type

org.openrewrite.java.search.FindFieldsOfType

Finds declared fields matching a particular class name.

Data tables:

  • org.openrewrite.java.table.FieldsOfTypeUses: Information about fields that match a specific type.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find implementing classes

org.openrewrite.java.search.FindImplementations

Find class declarations which implement the specified type. If the specified type is a class, its subclasses will be matched. If the specified type is an interface, classes which implement it will be matched.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find source files with imports

org.openrewrite.java.search.FindImports

Locates source files that have imports matching the given type pattern, regardless of whether that import is used in the code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find literals

org.openrewrite.java.search.FindLiterals

Find literals matching a pattern.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find method declaration

org.openrewrite.java.search.FindMethodDeclaration

Locates the declaration of a method.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find method usages

org.openrewrite.java.search.FindMethods

Find method calls by pattern.

Data tables:

  • org.openrewrite.java.table.MethodCalls: The text of matching method invocations.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find missing type information on Java LSTs

org.openrewrite.java.search.FindMissingTypes

This is a diagnostic recipe to highlight where LSTs are missing type attribution information.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find uses of @Repeatable annotations

org.openrewrite.java.search.FindRepeatableAnnotations

Java 8 introduced the concept of @Repeatable annotations.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find types

org.openrewrite.java.search.FindTypes

Find type references by name.

Data tables:

  • org.openrewrite.java.table.TypeUses: The source code of matching type uses.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find files with a particular build tool version

org.openrewrite.java.search.HasBuildToolVersion

Finds Java source files built with a particular build tool. This is useful especially as a precondition for other recipes.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find files compiled at a specific Java version

org.openrewrite.java.search.HasJavaVersion

Finds Java source files matching a particular language level. This is useful especially as a precondition for other recipes.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find files that have at least one use of a method

org.openrewrite.java.search.HasMethod

Marks files that have at least one occurrence of a method matching a pattern.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find files in a source set

org.openrewrite.java.search.HasSourceSet

Source sets are a way to organize your source code into logical groups. For example, Java projects commonly have a main source set for application code and a test source set for test code. This recipe will find all files in a given source set.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find files that have at least one use of a type

org.openrewrite.java.search.HasType

Marks files that have at least one occurrence of a type, even if the name of that type doesn't appear in the source code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find files that are likely not tests

org.openrewrite.java.search.IsLikelyNotTest

Sources that do not contain indicators of being, or being exclusively for the use in tests. This recipe is simply a negation of the org.openrewrite.java.search.IsLikelyTest recipe.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find sources that are likely tests

org.openrewrite.java.search.IsLikelyTest

Sources that contain indicators of being, or being exclusively for the use in tests. This recipe is not exhaustive, but is intended to be a good starting point for finding test sources. Looks at the source set name, and types in use; for example looks for uses of JUnit & TestNG annotations/assertions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Result of method call ignored

org.openrewrite.java.search.ResultOfMethodCallIgnored

Find locations where the result of the method call is being ignored.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Create Java class

org.openrewrite.java.CreateEmptyJavaClass

Create a new, empty Java class.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Study the size of the classpath by source set

org.openrewrite.java.search.ClasspathTypeCounts

Emit one data table row per source set in a project, with the number of types in the source set.

Data tables:

  • org.openrewrite.java.table.ClasspathTypeCount: The number of types in each source set in a project's classpath.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find distinct methods in use

org.openrewrite.java.search.FindDistinctMethods

A sample of every distinct method in use in a repository. The code sample in the method calls data table will be a representative use of the method, though there may be many other such uses of the method.

Data tables:

  • org.openrewrite.java.table.MethodCalls: The text of matching method invocations.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find type mappings

org.openrewrite.java.search.FindTypeMappings

Study the frequency of J types and their JavaType type attribution.

Data tables:

  • org.openrewrite.java.table.TypeMappings: The types mapped to J trees.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find the oldest Java version in use

org.openrewrite.java.search.HasMinimumJavaVersion

The oldest Java version in use is the lowest Java version in use in any source set of any subproject of a repository. It is possible that, for example, the main source set of a project uses Java 8, but a test source set uses Java 17. In this case, the oldest Java version in use is Java 8.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add ASLv2 license header

org.openrewrite.java.AddApache2LicenseHeader

Adds the Apache Software License Version 2.0 to Java source files which are missing a license header.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find plain text secrets

org.openrewrite.java.search.FindSecrets

Find secrets stored in plain text in code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Node.js dependency insight

org.openrewrite.javascript.search.DependencyInsight

Find direct and transitive npm dependencies matching a package name pattern. Results include dependencies that either directly match or transitively include a matching dependency.

Data tables:

  • org.openrewrite.javascript.table.NodeDependenciesInUse: Direct and transitive dependencies in use in Node.js projects.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add value to JSON Object

org.openrewrite.json.AddKeyValue

Adds a value at the specified keyPath with the specified key, if the key doesn't already exist.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change key

org.openrewrite.json.ChangeKey

Change a JSON mapping entry key, while leaving the value intact.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change value

org.openrewrite.json.ChangeValue

Change a JSON mapping entry value leaving the key intact.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Delete key

org.openrewrite.json.DeleteKey

Delete a JSON mapping entry key.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Format JSON

org.openrewrite.json.format.AutoFormat

Format JSON code using a standard comprehensive set of JSON formatting recipes.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

JSON indent

org.openrewrite.json.format.Indents

Format tabs and indents in JSON.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

JSON new lines

org.openrewrite.json.format.WrappingAndBraces

Split members into separate lines in JSON.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find JSON object members

org.openrewrite.json.search.FindKey

Find JSON object members by JsonPath expression.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Create JSON file

org.openrewrite.json.CreateJsonFile

Create a new JSON file.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find Kotlin sources and collect data metrics

org.openrewrite.kotlin.FindKotlinSources

Use data table to collect source files types and counts of files with extensions .kt.

Data tables:

  • org.openrewrite.kotlin.table.KotlinSourceFile: Kotlin sources present in LSTs on the SAAS.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Rename type alias

org.openrewrite.kotlin.RenameTypeAlias

Change the name of a given type alias.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Structural equality tests should use == or !=

org.openrewrite.kotlin.cleanup.EqualsMethodUsage

In Kotlin, == means structural equality and != structural inequality and both map to the left-side term’s equals() function. It is, therefore, redundant to call equals() as a function. Also, == and != are more general than equals() and !equals() because it allows either of both operands to be null. Developers using equals() instead of == or != is often the result of adapting styles from other languages like Java, where == means reference equality and != means reference inequality. The == and != operators are a more concise and elegant way to test structural equality than calling a function.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

it shouldn't be used as a lambda parameter name

org.openrewrite.kotlin.cleanup.ImplicitParameterInLambda

it is a special identifier that allows you to refer to the current parameter being passed to a lambda expression without explicitly naming the parameter. Lambda expressions are a concise way of writing anonymous functions. Many lambda expressions have only one parameter, when this is true the compiler can determine the parameter type by context. Thus when using it with single parameter lambda expressions, you do not need to declare the type.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove method invocation parentheses around single lambda argument

org.openrewrite.kotlin.cleanup.RemoveLambdaArgumentParentheses

For example, convert 1.let({ it + 1 }) to 1.let { it + 1 }.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove trailing comma in Kotlin

org.openrewrite.kotlin.cleanup.RemoveTrailingComma

Remove trailing commas in variable, parameter, and class property lists.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove unnecessary trailing semicolon

org.openrewrite.kotlin.cleanup.RemoveTrailingSemicolon

Some Java programmers may mistakenly add semicolons at the end when writing Kotlin code, but in reality, they are not necessary.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace Char#toInt() with Char#code

org.openrewrite.kotlin.cleanup.ReplaceCharToIntWithCode

Replace the usage of the deprecated Char#toInt() with Char#code. Please ensure that your Kotlin version is 1.5 or later to support the Char#code property. Note that the current implementation does not perform a Kotlin version check.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove unnecessary parentheses on Kotlin types

org.openrewrite.kotlin.cleanup.UnnecessaryTypeParentheses

In Kotlin, it's possible to add redundant nested parentheses in type definitions. This recipe is designed to remove those unnecessary parentheses.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Format Kotlin code

org.openrewrite.kotlin.format.AutoFormat

Format Kotlin code using a standard comprehensive set of Kotlin formatting recipes.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add an annotation processor to maven-compiler-plugin

org.openrewrite.maven.AddAnnotationProcessor

Add an annotation processor to the maven compiler plugin. Will not do anything if it already exists. Also doesn't add anything when no other annotation processors are defined yet. (Perhaps ChangePluginConfiguration can be used).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add a comment to a Maven dependency

org.openrewrite.maven.AddCommentToMavenDependency

Adds a comment as the first element in a Maven dependency.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add Maven parent

org.openrewrite.maven.AddParentPom

Add a parent pom to a Maven pom.xml. Does nothing if a parent pom is already present.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add Maven plugin

org.openrewrite.maven.AddPlugin

Add the specified Maven plugin to the pom.xml.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add Maven plugin dependencies

org.openrewrite.maven.AddPluginDependency

Adds the specified dependencies to a Maven plugin. Will not add the plugin if it does not already exist in the pom.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add Maven profile

org.openrewrite.maven.AddProfile

Add a maven profile to a pom.xml file.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add Maven project property

org.openrewrite.maven.AddProperty

Add a new property to the Maven project property. Prefers to add the property to the parent if the project has multiple modules.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add repository

org.openrewrite.maven.AddRepository

Adds a new Maven Repository or updates a matching repository.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change Maven dependency classifier

org.openrewrite.maven.ChangeDependencyClassifier

Add or alter the classifier of the specified dependency.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change Maven dependency

org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId

Change a Maven dependency coordinates. The newGroupId or newArtifactId MUST be different from before. Matching &lt;dependencyManagement&gt; coordinates are also updated if a newVersion or versionPattern is provided.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change Maven dependency scope

org.openrewrite.maven.ChangeDependencyScope

Add or alter the scope of the specified dependency.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change Maven managed dependency groupId, artifactId and optionally the version

org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId

Change the groupId, artifactId and optionally the version of a specified Maven managed dependency.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Set Maven project packaging

org.openrewrite.maven.ChangePackaging

Sets the packaging type of Maven projects. Either adds the packaging tag if it is missing or changes its context if present.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change Maven parent

org.openrewrite.maven.ChangeParentPom

Change the parent pom of a Maven pom.xml by matching the existing parent via groupId and artifactId, and updating it to a new groupId, artifactId, version, and optional relativePath. Also updates the project to retain dependency management and properties previously inherited from the old parent that are no longer provided by the new parent. Removes redundant dependency versions already managed by the new parent.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change Maven plugin configuration

org.openrewrite.maven.ChangePluginConfiguration

Apply the specified configuration to a Maven plugin. Will not add the plugin if it does not already exist in the pom.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change Maven plugin dependencies

org.openrewrite.maven.ChangePluginDependencies

Applies the specified dependencies to a Maven plugin. Will not add the plugin if it does not already exist in the pom.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change Maven plugin executions

org.openrewrite.maven.ChangePluginExecutions

Apply the specified executions to a Maven plugin. Will not add the plugin if it does not already exist in the pom.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change Maven plugin group and artifact ID

org.openrewrite.maven.ChangePluginGroupIdAndArtifactId

Change the groupId and/or the artifactId of a specified Maven plugin. Optionally update the plugin version. This recipe does not perform any validation and assumes all values passed are valid.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change Maven Project Version

org.openrewrite.maven.ChangeProjectVersion

Change the project version of a Maven pom.xml. Identifies the project to be changed by its groupId and artifactId. If the version is defined as a property, this recipe will only change the property value if the property exists within the same pom.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change Maven project property value

org.openrewrite.maven.ChangePropertyValue

Changes the specified Maven project property value leaving the key intact.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enable Develocity build cache

org.openrewrite.maven.EnableDevelocityBuildCache

Add Develocity build cache configuration to any .mvn/ Develocity configuration file that lack existing configuration.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Exclude Maven dependency

org.openrewrite.maven.ExcludeDependency

Exclude specified dependency from any dependency that transitively includes it.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Convert managed dependencies to runtime dependencies

org.openrewrite.maven.ManagedToRuntimeDependencies

This recipe processes Maven POMs, converting all &lt;dependencyManagement&gt; entries into runtime scoped &lt;dependencies&gt; entries. Import scoped BOMs (like jackson-bom) are left unmodified in &lt;dependencyManagement&gt;. Some style guidelines prefer that &lt;dependencyManagement&gt; be used only for BOMs. This maintain that style while avoiding introducing new symbols onto the compile classpath unintentionally.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Modernize obsolete Maven poms

org.openrewrite.maven.ModernizeObsoletePoms

Very old Maven poms are no longer supported by current versions of Maven. This recipe updates poms with &lt;pomVersion&gt;3&lt;/pomVersion&gt; to &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt; of the Maven pom schema. This does not attempt to upgrade old dependencies or plugins and is best regarded as the starting point of a migration rather than an end-point.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Order POM elements

org.openrewrite.maven.OrderPomElements

Order POM elements according to the recommended order.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove Maven dependency

org.openrewrite.maven.RemoveDependency

Removes a single dependency from the <dependencies> section of the pom.xml.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove duplicate Maven dependencies

org.openrewrite.maven.RemoveDuplicateDependencies

Removes duplicated dependencies in the &lt;dependencies&gt; and &lt;dependencyManagement&gt; sections of the pom.xml.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove duplicate plugin declarations

org.openrewrite.maven.RemoveDuplicatePluginDeclarations

Maven 4 rejects duplicate plugin declarations (same groupId and artifactId) with an error. This recipe removes duplicate plugin declarations, keeping only the first occurrence.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove exclusion

org.openrewrite.maven.RemoveExclusion

Remove any matching exclusion from any matching dependency.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove Maven managed dependency

org.openrewrite.maven.RemoveManagedDependency

Removes a single managed dependency from the <dependencyManagement><dependencies> section of the pom.xml.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove Maven plugin

org.openrewrite.maven.RemovePlugin

Remove the specified Maven plugin from the POM.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove Maven plugin dependency

org.openrewrite.maven.RemovePluginDependency

Removes a dependency from the <dependencies> section of a plugin in the pom.xml.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove Maven project property

org.openrewrite.maven.RemoveProperty

Removes the specified Maven project property from the pom.xml.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove redundant explicit dependency and plugin versions

org.openrewrite.maven.RemoveRedundantDependencyVersions

Remove explicitly-specified dependency/plugin versions when a parent POM's dependencyManagement/pluginManagement specifies the version.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove redundant properties

org.openrewrite.maven.RemoveRedundantProperties

Remove properties when a parent POM specifies the same property.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove repository

org.openrewrite.maven.RemoveRepository

Removes a matching Maven repository.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Rename Maven property key

org.openrewrite.maven.RenamePropertyKey

Rename the specified Maven project property key leaving the value unchanged.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update Maven Java project properties

org.openrewrite.maven.UpdateMavenProjectPropertyJavaVersion

The Java version is determined by several project properties, including: * java.version * jdk.version * javaVersion * jdkVersion * maven.compiler.source * maven.compiler.target * maven.compiler.release * release.version If none of these properties are in use and the maven compiler plugin is not otherwise configured, adds the maven.compiler.release property.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update SCM with Git origin

org.openrewrite.maven.UpdateScmFromGitOrigin

Updates or adds the Maven &lt;scm&gt; tag based on the Git remote origin. By default, only existing Source Control Management (SCM) sections are updated. Set addIfMissing to true to also add missing SCM sections.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade Maven parent project version

org.openrewrite.maven.UpgradeParentVersion

Set the parent pom version number according to a version selector or to a specific version number.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade Maven plugin version

org.openrewrite.maven.UpgradePluginVersion

Upgrade the version of a plugin using Node Semver advanced range selectors, allowing more precise control over version updates to patch or minor releases.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use Maven compiler plugin release configuration

org.openrewrite.maven.UseMavenCompilerPluginReleaseConfiguration

Replaces any explicit source or target configuration (if present) on the maven-compiler-plugin with release, and updates the release value if needed. Will not downgrade the Java version if the current version is higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use Maven 4 parent inference

org.openrewrite.maven.UseParentInference

Maven 4.1.0 supports automatic parent version inference when using a relative path. This recipe simplifies parent declarations by using the shorthand &lt;parent/&gt; form when the parent is in the default location (..), removing the explicit &lt;relativePath&gt;, &lt;groupId&gt;, &lt;artifactId&gt;, and &lt;version&gt; elements. Maven automatically infers these values from the parent POM.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Dependency management dependencies should have a version

org.openrewrite.maven.cleanup.DependencyManagementDependencyRequiresVersion

If they don't have a version, they can't possibly affect dependency resolution anywhere, and can be safely removed.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add explicit dependency versions

org.openrewrite.maven.cleanup.ExplicitDependencyVersion

Add explicit dependency versions to POMs for reproducibility, as the LATEST and RELEASE version keywords are deprecated.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add explicit groupId to Maven plugins

org.openrewrite.maven.cleanup.ExplicitPluginGroupId

Add the default &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; to plugins for clarity.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add explicit plugin versions

org.openrewrite.maven.cleanup.ExplicitPluginVersion

Add explicit plugin versions to POMs for reproducibility, as MNG-4173 removes automatic version resolution for POM plugins.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to maven-dependency-plugin goal resolve-sources

org.openrewrite.maven.plugin.DependencyPluginGoalResolveSources

Migrate from sources to resolve-sources for the maven-dependency-plugin.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Maven dependency insight

org.openrewrite.maven.search.DependencyInsight

Find direct and transitive dependencies matching a group, artifact, and scope. Results include dependencies that either directly match or transitively include a matching dependency.

Data tables:

  • org.openrewrite.maven.table.DependenciesInUse: Direct and transitive dependencies in use.
  • org.openrewrite.maven.table.ExplainDependenciesInUse: A dependency graph explainer similar to that shown by gradle dependencyInsight for each matching dependency. This table will contain a row per matching dependency per configuration per (sub)project.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Does not include Maven dependency

org.openrewrite.maven.search.DoesNotIncludeDependency

A precondition which returns false if visiting a Maven pom which includes the specified dependency in the classpath of some scope. For compatibility with multimodule projects, this should most often be applied as a precondition.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Effective dependencies

org.openrewrite.maven.search.EffectiveDependencies

Emit the data of binary dependency relationships.

Data tables:

  • org.openrewrite.maven.table.DependencyGraph: Relationships between dependencies.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Effective managed dependencies

org.openrewrite.maven.search.EffectiveManagedDependencies

Emit the data of binary dependency relationships.

Data tables:

  • org.openrewrite.maven.table.ManagedDependencyGraph: Relationships between POMs and their ancestors that define managed dependencies.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

List effective Maven repositories

org.openrewrite.maven.search.EffectiveMavenRepositories

Lists the Maven repositories that would be used for dependency resolution, in order of precedence. This includes Maven repositories defined in the Maven settings file (and those contributed by active profiles) as determined when the LST was produced.

Data tables:

  • org.openrewrite.maven.search.EffectiveMavenRepositoriesTable: Table showing which Maven repositories were used in dependency resolution for this POM.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find Maven dependency

org.openrewrite.maven.search.FindDependency

Finds first-order dependency uses, i.e. dependencies that are defined directly in a project.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find Maven dependency management entry

org.openrewrite.maven.search.FindManagedDependency

Finds first-order dependency management entries, i.e. dependencies that are defined directly in a project.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find Maven projects

org.openrewrite.maven.search.FindMavenProject

Maven projects are pom.xml files with a MavenResolutionResult marker.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find effective maven settings

org.openrewrite.maven.search.FindMavenSettings

List the effective maven settings file for the current project.

Data tables:

  • org.openrewrite.maven.table.EffectiveMavenSettings: The maven settings file used by each pom.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find Maven plugin

org.openrewrite.maven.search.FindPlugin

Finds a Maven plugin within a pom.xml.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find Maven project properties

org.openrewrite.maven.search.FindProperties

Finds the specified Maven project properties within a pom.xml.

Data tables:

  • org.openrewrite.maven.table.MavenProperties: Property and value.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Maven repository order

org.openrewrite.maven.search.FindRepositoryOrder

Determine the order in which dependencies will be resolved for each pom.xml based on its defined repositories and effective settings.xml.

Data tables:

  • org.openrewrite.maven.table.MavenRepositoryOrder: The order in which dependencies will be resolved for each pom.xml based on its defined repositories and effective settings.xml.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find SCM tag

org.openrewrite.maven.search.FindScm

Finds any &lt;scm&gt; tag directly inside the &lt;project&gt; root of a Maven pom.xml file.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Maven parent insight

org.openrewrite.maven.search.ParentPomInsight

Find Maven parents matching a groupId and artifactId.

Data tables:

  • org.openrewrite.maven.table.ParentPomsInUse: Projects, GAVs and relativePaths for Maven parent POMs in use.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use HTTPS for repositories

org.openrewrite.maven.security.UseHttpsForRepositories

Use HTTPS for repository URLs.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

org.openrewrite.maven.utilities.PrintMavenAsDot

The DOT language format is specified here.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add Maven dependency

org.openrewrite.maven.AddDependency

Add a Maven dependency to a pom.xml file in the correct scope based on where it is used.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add the Develocity Maven extension

org.openrewrite.maven.AddDevelocityMavenExtension

To integrate the Develocity Maven extension into Maven projects, ensure that the develocity-maven-extension is added to the .mvn/extensions.xml file if not already present. Additionally, configure the extension by adding the .mvn/develocity.xml configuration file.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add managed Maven dependency

org.openrewrite.maven.AddManagedDependency

Add a managed Maven dependency to a pom.xml file.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add a configuration option for the Maven runtime

org.openrewrite.maven.AddRuntimeConfig

Add a new configuration option for the Maven runtime if not already present.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Increment Maven project version

org.openrewrite.maven.IncrementProjectVersion

Increase Maven project version by incrementing either the major, minor, or patch version as defined by semver. Other versioning schemes are not supported.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Manage dependencies

org.openrewrite.maven.ManageDependencies

Make existing dependencies managed by moving their version to be specified in the dependencyManagement section of the POM.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove unused properties

org.openrewrite.maven.RemoveUnusedProperties

Detect and remove Maven property declarations which do not have any usage within the project.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update Maven wrapper

org.openrewrite.maven.UpdateMavenWrapper

Update the version of Maven used in an existing Maven wrapper.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade Maven dependency version

org.openrewrite.maven.UpgradeDependencyVersion

Upgrade the version of a dependency by specifying a group and (optionally) an artifact using Node Semver advanced range selectors, allowing more precise control over version updates to patch or minor releases.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade transitive Maven dependencies

org.openrewrite.maven.UpgradeTransitiveDependencyVersion

Upgrades the version of a transitive dependency in a Maven pom file. Leaves direct dependencies unmodified. Can be paired with the regular Upgrade Dependency Version recipe to upgrade a dependency everywhere, regardless of whether it is direct or transitive.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Module has dependency

org.openrewrite.maven.search.ModuleHasDependency

Searches for Maven modules that have a dependency matching the specified groupId and artifactId. Places a SearchResult marker on all sources within a module with a matching dependency. This recipe is intended to be used as a precondition for other recipes. For example this could be used to limit the application of a spring boot migration to only projects that use spring-boot-starter, limiting unnecessary upgrading. If the search result you want is instead just the build.gradle(.kts) file applying the plugin, use the FindDependency recipe instead.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Module has plugin

org.openrewrite.maven.search.ModuleHasPlugin

Searches for Maven modules that have a plugin matching the specified groupId and artifactId. Places a SearchResult marker on all sources within a module with a matching plugin. This recipe is intended to be used as a precondition for other recipes. For example this could be used to limit the application of a spring boot migration to only projects that apply the spring boot plugin, limiting unnecessary upgrading. If the search result you want is instead just the build.gradle(.kts) file applying the plugin, use the FindPlugins recipe instead.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Apache Maven best practices

org.openrewrite.maven.BestPractices

Applies best practices to Maven POMs.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Drop prefixless expressions in POM

org.openrewrite.maven.cleanup.PrefixlessExpressions

MNG-7404 drops support for prefixless in POMs. This recipe will add the project. prefix where missing.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Maven 4

org.openrewrite.maven.MigrateToMaven4

Migrates Maven POMs from Maven 3 to Maven 4, addressing breaking changes and deprecations. This recipe updates property expressions, lifecycle phases, removes duplicate plugin declarations, and replaces removed properties to ensure compatibility with Maven 4.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace removed root directory properties

org.openrewrite.maven.ReplaceRemovedRootDirectoryProperties

Maven 4 removed support for deprecated root directory properties. This recipe replaces ${executionRootDirectory} with ${session.rootDirectory} and ${multiModuleProjectDirectory} with ${project.rootDirectory}.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace deprecated lifecycle phases

org.openrewrite.maven.ReplaceDeprecatedLifecyclePhases

Maven 4 deprecated all pre-* and post-* lifecycle phases in favor of the before: and after: syntax. This recipe updates plugin phase declarations to use the new syntax, including pre-cleanbefore:clean, pre-sitebefore:site, pre-integration-testbefore:integration-test, and their post-* equivalents.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade to Maven model version 4.1.0

org.openrewrite.maven.UpgradeToModelVersion410

Upgrades Maven POMs from model version 4.0.0 to 4.1.0, enabling new Maven 4 features like &lt;subprojects&gt;, bom packaging, and automatic version inference. This recipe updates the &lt;modelVersion&gt; element, xmlns namespace, and xsi:schemaLocation from 4.0.0 to 4.1.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace modules with subprojects

org.openrewrite.maven.ReplaceModulesWithSubprojects

Maven 4 model version 4.1.0 deprecates the &lt;modules&gt; element in favor of &lt;subprojects&gt; to eliminate confusion with Java's Platform Module System (JPMS). This recipe renames &lt;modules&gt; to &lt;subprojects&gt; and &lt;module&gt; children to &lt;subproject&gt;.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add a new property

org.openrewrite.properties.AddProperty

Adds a new property to a property file. Attempts to place the new property in alphabetical order by the property keys. Whitespace before and after the = must be included in the property and value.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add comment before property key

org.openrewrite.properties.AddPropertyComment

Add a new comment before a property key if not already present, optionally commenting out the property.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change property key

org.openrewrite.properties.ChangePropertyKey

Change a property key leaving the value intact.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change property value

org.openrewrite.properties.ChangePropertyValue

Change a property value leaving the key intact.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Delete property by key

org.openrewrite.properties.DeleteProperty

Deletes key/value pairs from properties files, as well as any comments that immediately precede the key/value pair. Comments separated by two or more newlines from the deleted key/value pair are preserved.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find property

org.openrewrite.properties.search.FindProperties

Finds occurrences of a property key.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Create Properties file

org.openrewrite.properties.CreatePropertiesFile

Create a new Properties file.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change TOML key

org.openrewrite.toml.ChangeKey

Change a TOML key, while leaving the value intact.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change TOML table row value

org.openrewrite.toml.ChangeTableRowValue

Change a value in a TOML table row when the identifying property matches the specified matcher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change TOML value

org.openrewrite.toml.ChangeValue

Change the value of a TOML key.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Delete TOML key

org.openrewrite.toml.DeleteKey

Delete a TOML key-value pair.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Delete TOML table

org.openrewrite.toml.DeleteTable

Delete a TOML table.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Delete TOML table row

org.openrewrite.toml.DeleteTableRow

Delete a TOML table row when one of its values matches the specified matcher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find TOML keys

org.openrewrite.toml.FindKey

Find TOML keys matching a path expression.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Merge TOML table row

org.openrewrite.toml.MergeTableRow

Merge a TOML row into an array table. If a row with the same identifying property exists, merge the values. Otherwise, insert a new row.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace TOML table row

org.openrewrite.toml.ReplaceTableRow

Replace a TOML table row with new content. If a row with the same identifying property exists, replace it entirely.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Create TOML file

org.openrewrite.toml.CreateTomlFile

Create a new TOML file.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add a comment to an XML tag

org.openrewrite.xml.AddCommentToXmlTag

Adds a comment as the first element in an XML tag.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add or update child tag

org.openrewrite.xml.AddOrUpdateChildTag

Adds or updates a child element below the parent(s) matching the provided parentXPath expression. If a child with the same name already exists, it will be replaced by default. Otherwise, a new child will be added. This ensures idempotent behaviour.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add new XML attribute for an Element

org.openrewrite.xml.AddTagAttribute

Add new XML attribute with value on a specified element.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change XML attribute of a specific resource version

org.openrewrite.xml.ChangeNamespaceValue

Alters XML Attribute value within specified element of a specific resource versions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change XML attribute

org.openrewrite.xml.ChangeTagAttribute

Alters XML attribute value on a specified element.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change XML tag name

org.openrewrite.xml.ChangeTagName

Alters the name of XML tags matching the provided expression.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change XML tag value

org.openrewrite.xml.ChangeTagValue

Alters the value of XML tags matching the provided expression. When regex is enabled the replacement happens only for text nodes provided the pattern matches.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove empty XML Tag

org.openrewrite.xml.RemoveEmptyXmlTags

Removes XML tags that do not have attributes or children, including self closing tags.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove trailing whitespace

org.openrewrite.xml.RemoveTrailingWhitespace

Remove any extra trailing whitespace from the end of each line.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove XML tag

org.openrewrite.xml.RemoveXmlTag

Removes XML tags matching the provided expression.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

XSLT transformation

org.openrewrite.xml.XsltTransformation

Apply the specified XSLT transformation on matching files. Note that there are no format matching guarantees when running this recipe.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Format XML

org.openrewrite.xml.format.AutoFormat

Indents XML using the most common indentation size and tabs or space choice in use in the file.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Blank lines

org.openrewrite.xml.format.LineBreaks

Add line breaks at appropriate places between XML syntax elements.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Normalize format

org.openrewrite.xml.format.NormalizeFormat

Move whitespace to the outermost LST element possible.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Normalize line breaks

org.openrewrite.xml.format.NormalizeLineBreaks

Consistently use either Windows style (CRLF) or Linux style (LF) line breaks. If no GeneralFormatStyle is specified this will use whichever style of line endings are more common.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Normalize to tabs or spaces

org.openrewrite.xml.format.NormalizeTabsOrSpaces

Consistently use either tabs or spaces in indentation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Tabs and indents

org.openrewrite.xml.format.TabsAndIndents

Format tabs and indents in XML code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find files without Namespace URI

org.openrewrite.xml.search.DoesNotUseNamespaceUri

Find XML root elements that do not have a specific Namespace URI, optionally restricting the search by an XPath expression.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find XML namespace prefixes

org.openrewrite.xml.search.FindNamespacePrefix

Find XML namespace prefixes, optionally restricting the search by a XPath expression.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find XML tags

org.openrewrite.xml.search.FindTags

Find XML tags by XPath expression.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find XML namespace URIs

org.openrewrite.xml.search.HasNamespaceUri

Find XML namespace URIs, optionally restricting the search by a XPath expression.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add date bounds to OWASP suppressions

org.openrewrite.xml.security.AddOwaspDateBoundSuppressions

Adds an expiration date to all OWASP suppressions in order to ensure that they are periodically reviewed. For use with the OWASP dependency-check tool. More details: https://jeremylong.github.io/DependencyCheck/general/suppression.html.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find OWASP vulnerability suppression XML files

org.openrewrite.xml.security.IsOwaspSuppressionsFile

These files are used to suppress false positives in OWASP Dependency Check.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove out-of-date OWASP suppressions

org.openrewrite.xml.security.RemoveOwaspSuppressions

Remove all OWASP suppressions with a suppression end date in the past, as these are no longer valid. For use with the OWASP dependency-check tool. More details on OWASP suppression files can be found here.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update OWASP suppression date bounds

org.openrewrite.xml.security.UpdateOwaspSuppressionDate

Updates the expiration date for OWASP suppressions having a matching cve tag. For use with the OWASP dependency-check tool. More details: https://jeremylong.github.io/DependencyCheck/general/suppression.html.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Create XML file

org.openrewrite.xml.CreateXmlFile

Create a new XML file.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

XML style Auto-detection debug

org.openrewrite.xml.style.AutodetectDebug

Runs XML Autodetect and records the results in data tables and search markers. A debugging tool for figuring out why XML documents get styled the way they do.

Data tables:

  • org.openrewrite.xml.table.XmlStyleReport: Records style information about XML documents. Used for debugging style auto-detection issues.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Append to sequence

org.openrewrite.yaml.AppendToSequence

Append item to YAML sequence.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change key

org.openrewrite.yaml.ChangeKey

Change a YAML mapping entry key while leaving the value intact.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change property key

org.openrewrite.yaml.ChangePropertyKey

Change a YAML property key while leaving the value intact. Expects dot notation for nested YAML mappings, similar to how Spring Boot interprets application.yml files.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change YAML property

org.openrewrite.yaml.ChangePropertyValue

Change a YAML property. Expects dot notation for nested YAML mappings, similar to how Spring Boot interprets application.yml files.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change value

org.openrewrite.yaml.ChangeValue

Change a YAML mapping entry value while leaving the key intact.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Coalesce YAML properties

org.openrewrite.yaml.CoalesceProperties

Simplify nested map hierarchies into their simplest dot separated property form, similar to how Spring Boot interprets application.yml files.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Comment out property

org.openrewrite.yaml.CommentOutProperty

Comment out a YAML property and add a comment in front.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Delete key

org.openrewrite.yaml.DeleteKey

Delete a YAML mapping entry key.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Delete property

org.openrewrite.yaml.DeleteProperty

Delete a YAML property. Nested YAML mappings are interpreted as dot separated property names, i.e. as Spring Boot interprets application.yml files like a.b.c.d or a.b.c:d.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Merge YAML snippet

org.openrewrite.yaml.MergeYaml

Merge a YAML snippet with an existing YAML document.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Unfold YAML properties

org.openrewrite.yaml.UnfoldProperties

Transforms dot-separated property keys in YAML files into nested map hierarchies to enhance clarity and readability, or for compatibility with tools expecting structured YAML.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove unused YAML

org.openrewrite.yaml.cleanup.RemoveUnused

Remove YAML mappings and sequence keys that have no value.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

YAML indent

org.openrewrite.yaml.format.Indents

Format tabs and indents in YAML.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find YAML entries

org.openrewrite.yaml.search.FindKey

Find YAML entries that match the specified JsonPath expression.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find YAML properties

org.openrewrite.yaml.search.FindProperty

Find YAML properties that match the specified propertyKey. Expects dot notation for nested YAML mappings, similar to how Spring Boot interprets application.yml files.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Copy YAML value

org.openrewrite.yaml.CopyValue

Copies a YAML value from one key to another. The existing key/value pair remains unaffected by this change. Attempts to merge the copied value into the new key if it already exists. Attempts to create the new key if it does not exist.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Create YAML file

org.openrewrite.yaml.CreateYamlFile

Create a new YAML file.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Control flow visualization

org.openrewrite.analysis.controlflow.ControlFlowVisualization

Visualize the control flow of a Java program.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find method usages

org.openrewrite.analysis.search.FindMethods

Find method usages by pattern.

Data tables:

  • org.openrewrite.java.table.MethodCalls: The text of matching method invocations.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

URIs created with an HTTP scheme

org.openrewrite.analysis.search.UriCreatedWithHttpScheme

This is a sample recipe demonstrating a simple application of local data flow analysis.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Finds flow between two methods

org.openrewrite.analysis.search.FindFlowBetweenMethods

Takes two patterns for the start/end methods to find flow between.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find comments' language distribution

io.moderne.ai.FindCommentsLanguage

Finds all comments and uses AI to predict which language the comment is in.

Data tables:

  • io.moderne.ai.table.LanguageDistribution: Shows the distribution of language in comments
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

List all methods used

io.moderne.ai.ListAllMethodsUsed

List all methods used in any Java source file.

Data tables:

  • io.moderne.ai.table.MethodInUse: Methods used in any Java source file.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Fix mis-encoded comments in French

io.moderne.ai.SpellCheckCommentsInFrench

Use spellchecker to fix mis-encoded French comments in comments, JavaDocs, properties or XML files. Mis-encoded comments will contain either '?' or '�'.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Get embeddings for code snippets in code

io.moderne.ai.research.GetCodeEmbedding

This recipe calls an AI model to get an embedding for either classes or methods which can then be used for downstream tasks.

Data tables:

  • io.moderne.ai.table.Embeddings: Collects the embeddings for either each classes or methods.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find method invocations that resemble a pattern

io.moderne.ai.research.FindCodeThatResembles

This recipe uses two phase AI approach to find a method invocation that resembles a search string.

Data tables:

  • io.moderne.ai.table.CodeSearch: Searches for method invocations that resemble a natural language query.
  • io.moderne.ai.table.TopKMethodMatcher: Result from the scanning recipe for top-k method patterns that match the query.
  • io.moderne.ai.table.EmbeddingPerformance: Latency characteristics of uses of embedding models.
  • io.moderne.ai.table.GenerativeModelPerformance: Latency characteristics of uses of generative models.
  • io.moderne.ai.table.SuggestedMethodPatterns: As the next step after the AI-based searching for method invocations, you may want to do rule-based method searching using the recommended method patterns.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Get recommendations

io.moderne.ai.research.GetRecommendations

This recipe calls an AI model to get recommendations for modernizing the code base by looking at a sample of method declarations.

Data tables:

  • io.moderne.ai.table.Recommendations: Collects the recommendations based on sampled methods.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Fix mis-encoded French comments, javadocs and pom.xml comments

io.moderne.ai.FixMisencodedCommentsInFrench

Fixes mis-encoded French comments in your code, javadocs and in your pom.xml files. Mis-encoded comments contain a ? or � character.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find call graph

org.openrewrite.FindCallGraph

Produces a data table where each row represents a method call.

Data tables:

  • org.openrewrite.table.CallGraph: Records method callers and the methods they invoke.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find duplicate source files

org.openrewrite.FindDuplicateSourceFiles

Record the presence of LSTs with duplicate paths, indicating that the same file was parsed more than once.

Data tables:

  • org.openrewrite.table.DuplicateSourceFiles: A list of source files that occur more than once in an LST.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Language composition report

org.openrewrite.LanguageComposition

Counts the number of lines of the various kinds of source code and data formats parsed by OpenRewrite. Comments are not included in line counts. This recipe emits its results as two data tables, making no changes to any source file. One data table is per-file, the other is per-repository.

Data tables:

  • org.openrewrite.table.LanguageCompositionPerRepository: Counts the number of files and lines of source code in the various formats OpenRewrite knows how to parse.
  • org.openrewrite.table.LanguageCompositionPerFolder: A list of folders and the language composition and line counts of their contents.
  • org.openrewrite.table.LanguageCompositionPerFile: A list of individual files and their language composition.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change Android SDK version

org.openrewrite.android.ChangeAndroidSdkVersion

Change compileSdk, compileSdkVersion, targetSdk and targetSdkVersion in an Android Gradle build file to the argument version.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade Android Gradle Plugin (AGP) version

org.openrewrite.android.UpgradeAndroidGradlePluginVersion

Upgrade Android Gradle Plugin (AGP) version and update the Gradle Wrapper version. Compatible versions are published in the AGP release notes.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Android Gradle Plugin 7.2

org.openrewrite.android.MigrateToAndroidGradlePlugin_7_2

Recipes to migrate to Android Gradle Plugin version 7.2.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Android Gradle Plugin 7.3

org.openrewrite.android.MigrateToAndroidGradlePlugin_7_3

Recipes to migrate to Android Gradle Plugin version 7.3.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Android Gradle Plugin 7.4

org.openrewrite.android.MigrateToAndroidGradlePlugin_7_4

Recipes to migrate to Android Gradle Plugin version 7.4.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Android Gradle Plugin 8.0

org.openrewrite.android.MigrateToAndroidGradlePlugin_8_0

Recipes to migrate to Android Gradle Plugin version 8.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Android Gradle Plugin 8.1

org.openrewrite.android.MigrateToAndroidGradlePlugin_8_1

Recipes to migrate to Android Gradle Plugin version 8.1.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Android Gradle Plugin 8.2

org.openrewrite.android.MigrateToAndroidGradlePlugin_8_2

Recipes to migrate to Android Gradle Plugin version 8.2.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Android Gradle Plugin 8.3

org.openrewrite.android.MigrateToAndroidGradlePlugin_8_3

Recipes to migrate to Android Gradle Plugin version 8.3.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Android Gradle Plugin 8.4

org.openrewrite.android.MigrateToAndroidGradlePlugin_8_4

Recipes to migrate to Android Gradle Plugin version 8.4.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Android Gradle Plugin 8.5

org.openrewrite.android.MigrateToAndroidGradlePlugin_8_5

Recipes to migrate to Android Gradle Plugin version 8.5.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Android Gradle Plugin 8.6

org.openrewrite.android.MigrateToAndroidGradlePlugin_8_6

Recipes to migrate to Android Gradle Plugin version 8.6.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Android Gradle Plugin 8.7

org.openrewrite.android.MigrateToAndroidGradlePlugin_8_7

Recipes to migrate to Android Gradle Plugin version 8.7.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade to Android SDK 33

org.openrewrite.android.UpgradeToAndroidSDK33

Recipes to upgrade to Android SDK version 33.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade to Android SDK 34

org.openrewrite.android.UpgradeToAndroidSDK34

Recipes to upgrade to Android SDK version 34.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade to Android SDK 35

org.openrewrite.android.UpgradeToAndroidSDK35

Recipes to upgrade to Android SDK version 35.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer java.util.Base64

org.openrewrite.apache.commons.codec.ApacheBase64ToJavaBase64

Prefer the Java standard library's java.util.Base64 over third-party usage of apache's apache.commons.codec.binary.Base64.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

ApacheCommonsFileUtils Refaster recipes

org.openrewrite.apache.commons.io.ApacheCommonsFileUtilsRecipes

Refaster template recipes for org.openrewrite.apache.commons.io.ApacheCommonsFileUtils.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace FileUtils.getFile(String...) with JDK provided API

org.openrewrite.apache.commons.io.ApacheCommonsFileUtilsRecipes$GetFileRecipe

Replace Apache Commons FileUtils.getFile(String... name) with JDK provided API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace FileUtils.writeStringToFile(File, String) with JDK provided API

org.openrewrite.apache.commons.io.ApacheCommonsFileUtilsRecipes$WriteStringToFileRecipe

Replace Apache Commons FileUtils.writeStringToFile(File file, String data) with JDK provided API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer java.nio.file.Files

org.openrewrite.apache.commons.io.ApacheFileUtilsToJavaFiles

Prefer the Java standard library's java.nio.file.Files over third-party usage of apache's apache.commons.io.FileUtils.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use IOUtils method that include their charset encoding

org.openrewrite.apache.commons.io.ApacheIOUtilsUseExplicitCharset

Use IOUtils method invocations that include the charset encoding instead of using the deprecated versions that do not include a charset encoding. (e.g. converts IOUtils.readLines(inputStream) to IOUtils.readLines(inputStream, StandardCharsets.UTF_8).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

ApacheCommonsStringUtils Refaster recipes

org.openrewrite.apache.commons.lang.ApacheCommonsStringUtilsRecipes

Refaster template recipes for org.openrewrite.apache.commons.lang.ApacheCommonsStringUtils.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace StringUtils.abbreviate(String, int) with JDK provided API

org.openrewrite.apache.commons.lang.ApacheCommonsStringUtilsRecipes$AbbreviateRecipe

Replace Apache Commons StringUtils.abbreviate(String str, int maxWidth) with JDK provided API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace StringUtils.capitalize(String) with JDK provided API

org.openrewrite.apache.commons.lang.ApacheCommonsStringUtilsRecipes$CapitalizeRecipe

Replace Apache Commons StringUtils.capitalize(String str) with JDK provided API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace StringUtils.defaultString(String, String) with JDK provided API

org.openrewrite.apache.commons.lang.ApacheCommonsStringUtilsRecipes$DefaultStringFallbackRecipe

Replace Apache Commons StringUtils.defaultString(String str, String nullDefault) with JDK provided API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace StringUtils.defaultString(String) with JDK provided API

org.openrewrite.apache.commons.lang.ApacheCommonsStringUtilsRecipes$DefaultStringRecipe

Replace Apache Commons StringUtils.defaultString(String str) with JDK provided API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace StringUtils.deleteWhitespace(String) with JDK provided API

org.openrewrite.apache.commons.lang.ApacheCommonsStringUtilsRecipes$DeleteWhitespaceRecipe

Replace Apache Commons StringUtils.deleteWhitespace(String str) with JDK provided API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace StringUtils.equalsIgnoreCase(CharSequence, CharSequence) with JDK provided API

org.openrewrite.apache.commons.lang.ApacheCommonsStringUtilsRecipes$EqualsIgnoreCaseRecipe

Replace Apache Commons StringUtils.equalsIgnoreCase(CharSequence cs1, CharSequence cs2) with JDK provided API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace StringUtils.equals(CharSequence, CharSequence) with JDK provided API

org.openrewrite.apache.commons.lang.ApacheCommonsStringUtilsRecipes$EqualsRecipe

Replace Apache Commons StringUtils.equals(CharSequence cs1, CharSequence cs2) with JDK provided API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace StringUtils.lowerCase(String) with JDK provided API

org.openrewrite.apache.commons.lang.ApacheCommonsStringUtilsRecipes$LowercaseRecipe

Replace Apache Commons StringUtils.lowerCase(String str) with JDK provided API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace StringUtils.removeEnd(String, String) with JDK provided API

org.openrewrite.apache.commons.lang.ApacheCommonsStringUtilsRecipes$RemoveEndRecipe

Replace Apache Commons StringUtils.removeEnd(String str, String remove) with JDK provided API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove redundant null check when using StringUtils.isNotBlank(String)

org.openrewrite.apache.commons.lang.ApacheCommonsStringUtilsRecipes$RemoveRedundantNullCheckWithIsNotBlankRecipe

Remove redundant null check when using StringUtils.isNotBlank(String) as it already handles null values.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace StringUtils.replace(String, String, String) with JDK provided API

org.openrewrite.apache.commons.lang.ApacheCommonsStringUtilsRecipes$ReplaceRecipe

Replace Apache Commons StringUtils.replace(String text, String searchString, String replacement) with JDK provided API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace StringUtils.reverse(String) with JDK provided API

org.openrewrite.apache.commons.lang.ApacheCommonsStringUtilsRecipes$ReverseRecipe

Replace Apache Commons StringUtils.reverse(String str) with JDK provided API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace StringUtils.split(String) with JDK provided API

org.openrewrite.apache.commons.lang.ApacheCommonsStringUtilsRecipes$SplitRecipe

Replace Apache Commons StringUtils.split(String str) with JDK provided API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace StringUtils.join(Iterable&lt;? extends CharSequence&gt;, String) with JDK provided API

org.openrewrite.apache.commons.lang.ApacheCommonsStringUtilsRecipes$StringJoinSeparatorIterableCharSequenceRecipe

Replace Apache Commons StringUtils.join(Iterable&lt;? extends CharSequence&gt; iterable, String separator) with JDK provided API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace StringUtils.strip(String) with JDK provided API

org.openrewrite.apache.commons.lang.ApacheCommonsStringUtilsRecipes$StripRecipe

Replace Apache Commons StringUtils.strip(String str) with JDK provided API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace StringUtils.trim(String) with JDK provided API

org.openrewrite.apache.commons.lang.ApacheCommonsStringUtilsRecipes$TrimRecipe

Replace Apache Commons StringUtils.trim(String str) with JDK provided API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace StringUtils.trimToEmpty(String) with JDK provided API

org.openrewrite.apache.commons.lang.ApacheCommonsStringUtilsRecipes$TrimToEmptyRecipe

Replace Apache Commons StringUtils.trimToEmpty(String str) with JDK provided API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace StringUtils.trimToNull(String) with JDK provided API

org.openrewrite.apache.commons.lang.ApacheCommonsStringUtilsRecipes$TrimToNullRecipe

Replace Apache Commons StringUtils.trimToNull(String str) with JDK provided API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace StringUtils.upperCase(String) with JDK internals

org.openrewrite.apache.commons.lang.ApacheCommonsStringUtilsRecipes$UppercaseRecipe

Replace Apache Commons StringUtils.upperCase(String str) with JDK internals.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace any StringUtils#isEmpty(String) and #isNotEmpty(String)

org.openrewrite.apache.commons.lang.IsNotEmptyToJdk

Replace any StringUtils#isEmpty(String) and #isNotEmpty(String) with s == null || s.isEmpty() and s != null &amp;&amp; !s.isEmpty().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrates deprecated DefaultHttpClient

org.openrewrite.apache.httpclient4.MigrateDefaultHttpClient

Since DefaultHttpClient is deprecated, we need to change it to the CloseableHttpClient. It only covers the default scenario with no custom HttpParams or ConnectionManager. Of note: the DefaultHttpClient does not support TLS 1.2. References: - Find Sec Bugs - IBM Support Pages

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Adds a TimeUnit argument to the matched method invocations

org.openrewrite.apache.httpclient5.AddTimeUnitArgument

In Apache Http Client 5.x migration, an extra TimeUnit argument is required in the timeout and duration methods. Previously in 4.x, all these methods were implicitly having the timeout or duration expressed in milliseconds, but in 5.x the unit of the timeout or duration is required. So, by default this recipe adds TimeUnit.MILLISECONDS, it is possible to specify this as a parameter. Since all affected methods of the Apache Http Client 5.x migration only have one integer/long argument, the recipe applies with matched method invocations of exactly one parameter.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Changes an argument to a TimeValue for matched method invocations

org.openrewrite.apache.httpclient5.ChangeArgumentToTimeValue

In Apache Http Client 5.x migration, some methods that previously took a single long argument have changed to take a TimeValue. Previously in 4.x, all these methods were implicitly having the value expressed in milliseconds. By default this recipe uses TimeUnit.MILLISECONDS for the TimeUnit when creating a TimeValue. It is possible to specify this as a parameter. Since all affected methods of the Apache Http Client 5.x migration only have one long argument, the recipe applies with matched method invocations of exactly one parameter.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Adds offset and length arguments to the read method of SharedInputBuffer

org.openrewrite.apache.httpclient5.InputBufferReadAddOffsetAndLengthArguments

In Apache Http Client 5.x migration, the shortened form of the read(byte[]) has been removed.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replaces AuthScope.ANY

org.openrewrite.apache.httpclient5.MigrateAuthScope

Replace removed constant org.apache.http.auth.AuthScope.AuthScope.ANY with new org.apache.hc.client5.http.auth.AuthScope(null, -1).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate RequestConfig to httpclient5

org.openrewrite.apache.httpclient5.MigrateRequestConfig

Migrate RequestConfig to httpclient5.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated SSLConnectionSocketFactory to DefaultClientTlsStrategy

org.openrewrite.apache.httpclient5.MigrateSSLConnectionSocketFactory

Migrates usage of the deprecated org.apache.http.conn.ssl.SSLConnectionSocketFactory to org.apache.hc.client5.http.ssl.DefaultClientTlsStrategy with proper connection manager setup.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace new StringEntity(String, String) with new StringEntity(String, Charset)

org.openrewrite.apache.httpclient5.MigrateStringEntityStringCharsetConstructor

Replace new StringEntity(String, String) with new StringEntity(String, Charset) to eliminate literal usage for charset parameters.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replaces deprecated HttpRequestBase::getRequestLine()

org.openrewrite.apache.httpclient5.NewRequestLine

HttpRequestBase::getStatusLine() was deprecated in 4.x, so we replace it with new RequestLine(HttpRequest). Ideally we will try to simply method chains for getMethod, getUri and getProtocolVersion, but there are some scenarios where RequestLine object is assigned or used directly, and we need to instantiate the object.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replaces deprecated HttpResponse::getStatusLine()

org.openrewrite.apache.httpclient5.NewStatusLine

HttpResponse::getStatusLine() was deprecated in 4.x, so we replace it for new StatusLine(HttpResponse). Ideally we will try to simplify method chains for getStatusCode, getProtocolVersion and getReasonPhrase, but there are some scenarios where the StatusLine object is assigned or used directly, and we need to instantiate the object.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Adds offset and length arguments to the write method of SharedOutputBuffer

org.openrewrite.apache.httpclient5.OutputBufferWriteAddOffsetAndLengthArguments

In Apache Http Client 5.x migration, the shortened form of the write(byte[]) has been removed.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove ByteBufferAllocator implementations

org.openrewrite.apache.httpclient5.RemoveByteBufferAllocators

In Apache Http Client 5.x migration, both implementations of ByteBufferAllocator have been removed. This recipe will remove usage of said classes in favour of direct static calls to ByteBuffer.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate UsernamePasswordCredentials to httpclient5

org.openrewrite.apache.httpclient5.UsernamePasswordCredentials

Change the password argument going into UsernamePasswordCredentials to be a char[].

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

MavenSharedStringUtils Refaster recipes

org.openrewrite.apache.maven.shared.MavenSharedStringUtilsRecipes

Refaster template recipes for org.openrewrite.apache.maven.shared.MavenSharedStringUtils.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace StringUtils.abbreviate(String, int) with JDK provided API

org.openrewrite.apache.maven.shared.MavenSharedStringUtilsRecipes$AbbreviateRecipe

Replace Maven Shared StringUtils.abbreviate(String str, int maxWidth) with JDK provided API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace StringUtils.capitalise(String) with JDK provided API

org.openrewrite.apache.maven.shared.MavenSharedStringUtilsRecipes$CapitaliseRecipe

Replace Maven Shared StringUtils.capitalise(String str) with JDK provided API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace StringUtils.defaultString(Object, String) with JDK provided API

org.openrewrite.apache.maven.shared.MavenSharedStringUtilsRecipes$DefaultStringFallbackRecipe

Replace Maven Shared StringUtils.defaultString(Object obj, String nullDefault) with JDK provided API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace StringUtils.defaultString(Object) with JDK provided API

org.openrewrite.apache.maven.shared.MavenSharedStringUtilsRecipes$DefaultStringRecipe

Replace Maven Shared StringUtils.defaultString(Object obj) with JDK provided API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace StringUtils.deleteWhitespace(String) with JDK provided API

org.openrewrite.apache.maven.shared.MavenSharedStringUtilsRecipes$DeleteWhitespaceRecipe

Replace Maven Shared StringUtils.deleteWhitespace(String str) with JDK provided API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace StringUtils.equalsIgnoreCase(String, String) with JDK provided API

org.openrewrite.apache.maven.shared.MavenSharedStringUtilsRecipes$EqualsIgnoreCaseRecipe

Replace Maven Shared StringUtils.equalsIgnoreCase(String str1, String str2) with JDK provided API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace StringUtils.equals(String, String) with JDK provided API

org.openrewrite.apache.maven.shared.MavenSharedStringUtilsRecipes$EqualsRecipe

Replace Maven Shared StringUtils.equals(String str1, String str2) with JDK provided API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace StringUtils.lowerCase(String) with JDK provided API

org.openrewrite.apache.maven.shared.MavenSharedStringUtilsRecipes$LowercaseRecipe

Replace Maven Shared StringUtils.lowerCase(String str) with JDK provided API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace StringUtils.replace(String, String, String) with JDK provided API

org.openrewrite.apache.maven.shared.MavenSharedStringUtilsRecipes$ReplaceRecipe

Replace Maven Shared StringUtils.replace(String text, String searchString, String replacement) with JDK provided API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace StringUtils.reverse(String) with JDK provided API

org.openrewrite.apache.maven.shared.MavenSharedStringUtilsRecipes$ReverseRecipe

Replace Maven Shared StringUtils.reverse(String str) with JDK provided API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace StringUtils.split(String) with JDK provided API

org.openrewrite.apache.maven.shared.MavenSharedStringUtilsRecipes$SplitRecipe

Replace Maven Shared StringUtils.split(String str) with JDK provided API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace StringUtils.strip(String) with JDK provided API

org.openrewrite.apache.maven.shared.MavenSharedStringUtilsRecipes$StripRecipe

Replace Maven Shared StringUtils.strip(String str) with JDK provided API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace StringUtils.trim(String) with JDK provided API

org.openrewrite.apache.maven.shared.MavenSharedStringUtilsRecipes$TrimRecipe

Replace Maven Shared StringUtils.trim(String str) with JDK provided API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace StringUtils.upperCase(String) with JDK provided API

org.openrewrite.apache.maven.shared.MavenSharedStringUtilsRecipes$UppercaseRecipe

Replace Maven Shared StringUtils.upperCase(String str) with JDK provided API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace Font.setBoldweight(short) with Font.setBold(boolean)

org.openrewrite.apache.poi.ReplaceSetBoldweightWithSetBold

Replace Font.setBoldweight(short) or equivalent with Font.setBold(boolean).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Apache POI use Cell.setCellType(CellType)

org.openrewrite.apache.poi.ReplaceSetCellType

Cell.setCellType() can be configured with either an integer or a the CellType enumeration. It is clearer and less error-prone to use the CellType enumeration, so this recipe converts all setCellType() calls to use it.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate from Plexus AbstractLogEnabled to SLF4J

org.openrewrite.codehaus.plexus.AbstractLogEnabledToSlf4j

Introduce a SLF4J Logger field and replace calls to getLogger() with calls to the field.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

PlexusFileUtils Refaster recipes

org.openrewrite.codehaus.plexus.PlexusFileUtilsRecipes

Refaster template recipes for org.openrewrite.codehaus.plexus.PlexusFileUtils.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace FileUtils.deleteDirectory(File) with JDK provided API

org.openrewrite.codehaus.plexus.PlexusFileUtilsRecipes$DeleteDirectoryFileRecipe

Replace Plexus FileUtils.deleteDirectory(File directory) with JDK provided API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace FileUtils.deleteDirectory(String) with JDK provided API

org.openrewrite.codehaus.plexus.PlexusFileUtilsRecipes$DeleteDirectoryStringRecipe

Replace Plexus FileUtils.deleteDirectory(String directory) with JDK provided API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace FileUtils.fileExists(String) with JDK provided API

org.openrewrite.codehaus.plexus.PlexusFileUtilsRecipes$FileExistsStringRecipe

Replace Plexus FileUtils.fileExists(String fileName) with JDK provided API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace FileUtils.getFile(String) with JDK provided API

org.openrewrite.codehaus.plexus.PlexusFileUtilsRecipes$GetFileRecipe

Replace Plexus FileUtils.getFile(String fileName) with JDK provided API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

PlexusStringUtils Refaster recipes

org.openrewrite.codehaus.plexus.PlexusStringUtilsRecipes

Refaster template recipes for org.openrewrite.codehaus.plexus.PlexusStringUtils.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace StringUtils.abbreviate(String, int) with JDK provided API

org.openrewrite.codehaus.plexus.PlexusStringUtilsRecipes$AbbreviateRecipe

Replace Plexus StringUtils.abbreviate(String str, int maxWidth) with JDK provided API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace StringUtils.capitalise(String) with JDK provided API

org.openrewrite.codehaus.plexus.PlexusStringUtilsRecipes$CapitaliseRecipe

Replace Plexus StringUtils.capitalise(String str) with JDK provided API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace StringUtils.defaultString(Object, String) with JDK provided API

org.openrewrite.codehaus.plexus.PlexusStringUtilsRecipes$DefaultStringFallbackRecipe

Replace Plexus StringUtils.defaultString(Object obj, String nullDefault) with JDK provided API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace StringUtils.defaultString(Object) with JDK provided API

org.openrewrite.codehaus.plexus.PlexusStringUtilsRecipes$DefaultStringRecipe

Replace Plexus StringUtils.defaultString(Object obj) with JDK provided API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace StringUtils.deleteWhitespace(String) with JDK provided API

org.openrewrite.codehaus.plexus.PlexusStringUtilsRecipes$DeleteWhitespaceRecipe

Replace Plexus StringUtils.deleteWhitespace(String str) with JDK provided API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace StringUtils.equalsIgnoreCase(String, String) with JDK provided API

org.openrewrite.codehaus.plexus.PlexusStringUtilsRecipes$EqualsIgnoreCaseRecipe

Replace Plexus StringUtils.equalsIgnoreCase(String str1, String str2) with JDK provided API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace StringUtils.equals(String, String) with JDK provided API

org.openrewrite.codehaus.plexus.PlexusStringUtilsRecipes$EqualsRecipe

Replace Plexus StringUtils.equals(String str1, String str2) with JDK provided API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace StringUtils.lowerCase(String) with JDK provided API

org.openrewrite.codehaus.plexus.PlexusStringUtilsRecipes$LowercaseRecipe

Replace Plexus StringUtils.lowerCase(String str) with JDK provided API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace StringUtils.replace(String, String, String) with JDK provided API

org.openrewrite.codehaus.plexus.PlexusStringUtilsRecipes$ReplaceRecipe

Replace Plexus StringUtils.replace(String text, String searchString, String replacement) with JDK provided API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace StringUtils.reverse(String) with JDK provided API

org.openrewrite.codehaus.plexus.PlexusStringUtilsRecipes$ReverseRecipe

Replace Plexus StringUtils.reverse(String str) with JDK provided API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace StringUtils.split(String) with JDK provided API

org.openrewrite.codehaus.plexus.PlexusStringUtilsRecipes$SplitRecipe

Replace Plexus StringUtils.split(String str) with JDK provided API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace StringUtils.strip(String) with JDK provided API

org.openrewrite.codehaus.plexus.PlexusStringUtilsRecipes$StripRecipe

Replace Plexus StringUtils.strip(String str) with JDK provided API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace StringUtils.trim(String) with JDK provided API

org.openrewrite.codehaus.plexus.PlexusStringUtilsRecipes$TrimRecipe

Replace Plexus StringUtils.trim(String str) with JDK provided API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace StringUtils.upperCase(String) with JDK provided API

org.openrewrite.codehaus.plexus.PlexusStringUtilsRecipes$UppercaseRecipe

Replace Plexus StringUtils.upperCase(String str) with JDK provided API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrates to Apache Commons Collections 4.x

org.openrewrite.apache.commons.collections.UpgradeApacheCommonsCollections_3_4

Migrate applications to the latest Apache Commons Collections 4.x release. This recipe modifies application's build files, make changes to deprecated/preferred APIs, and migrates configuration settings that have changes between versions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Relocate org.apache.commons:commons-io to commons-io:commons-io

org.openrewrite.apache.commons.io.RelocateApacheCommonsIo

The deployment of org.apache.commons:commons-io was a publishing mistake around 2012 which was corrected by changing the deployment GAV to be located under commons-io:commons-io.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer System.lineSeparator()

org.openrewrite.apache.commons.io.UseSystemLineSeparator

Prefer the Java standard library's System.lineSeparator() over third-party usage of apache's IOUtils.LINE_SEPARATOR.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer java.nio.charset.StandardCharsets

org.openrewrite.apache.commons.io.UseStandardCharsets

Prefer the Java standard library's java.nio.charset.StandardCharsets over third-party usage of apache's org.apache.commons.io.Charsets.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrates to Apache Commons Lang 3.x

org.openrewrite.apache.commons.lang.UpgradeApacheCommonsLang_2_3

Migrate applications to the latest Apache Commons Lang 3.x release. This recipe modifies application's build files, and changes the package as per the migration release notes.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate WordUtils to Apache Commons Text

org.openrewrite.apache.commons.lang.WordUtilsToCommonsText

Migrate org.apache.commons.lang.WordUtils to org.apache.commons.text.WordUtils and add the Commons Text dependency.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer java.nio.charset.StandardCharsets

org.openrewrite.apache.commons.lang3.UseStandardCharsets

Prefer the Java standard library's java.nio.charset.StandardCharsets over org.apache.commons.lang3.CharEncoding.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrates to Apache Commons Math 3.x

org.openrewrite.apache.commons.math.UpgradeApacheCommonsMath_2_3

Migrate applications to the latest Apache Commons Math 3.x release. This recipe modifies application's build files, make changes to deprecated/preferred APIs, and migrates configuration settings that have changes between versions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrates to ApacheHttpClient 4.5.x

org.openrewrite.apache.httpclient4.UpgradeApacheHttpClient_4_5

Migrate applications to the latest Apache HttpClient 4.5.x release. This recipe modifies application's build files, make changes to deprecated/preferred APIs, and migrates configuration settings that have changes between versions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Maps deprecated classes from Apache HttpClient 4.5.x to suggested replacements

org.openrewrite.apache.httpclient4.MappingDeprecatedClasses

Uses new classes/methods instead of the deprecated ones.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to ApacheHttpClient 5.x

org.openrewrite.apache.httpclient5.UpgradeApacheHttpClient_5

Migrate applications to the latest Apache HttpClient 5.x release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate from org.apache.httpcomponents to ApacheHttpClient 5.x dependencies

org.openrewrite.apache.httpclient5.UpgradeApacheHttpClientDependencies

Adopt org.apache.httpcomponents.client5:httpclient5 from org.apache.httpcomponents.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate from httpcore-nio to ApacheHttpClient 5.x core dependency

org.openrewrite.apache.httpclient5.UpgradeApacheHttpCoreNioDependencies

Adopt org.apache.httpcomponents.core5:httpcore5 from org.apache.httpcomponents:httpcore-nio.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Apache HttpCore Nio Input Buffer classes to Apache HttpCore 5.x

org.openrewrite.apache.httpclient5.UpgradeApacheHttpCore_5_NioInputBuffers

Mapping of specifically *InputBuffer classes of Apache HttpCore 5.x from Apache HttpCore Nio 4.4.x.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Apache HttpCore Nio Output Buffer classes to Apache HttpCore 5.x

org.openrewrite.apache.httpclient5.UpgradeApacheHttpCore_5_NioOutputBuffers

Mapping of specifically *OutputBuffer classes of Apache HttpCore 5.x from Apache HttpCore Nio 4.4.x.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Apache HttpCore Nio Util Classes to Apache HttpCore 5.x

org.openrewrite.apache.httpclient5.UpgradeApacheHttpCore_5_NioUtilMapping

Mapping of all the compatible utility classes of Apache HttpCore 5.x from Apache HttpCore Nio 4.4.x.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Apache HttpCore Nio Classes to Apache HttpCore 5.x

org.openrewrite.apache.httpclient5.UpgradeApacheHttpCore_5_NioClassMapping

Mapping of all the compatible classes of Apache HttpCore 5.x from Apache HttpCore Nio 4.4.x.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to ApacheHttpClient 5.x Classes Namespace from 4.x

org.openrewrite.apache.httpclient5.UpgradeApacheHttpClient_5_ClassMapping

Mapping of all the compatible classes of ApacheHttpClient 5.x from 4.x.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to ApacheHttpClient 5.x deprecated methods from 4.x

org.openrewrite.apache.httpclient5.UpgradeApacheHttpClient_5_DeprecatedMethods

Migrates deprecated methods to their equivalent ones in 5.x.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Adds TimeUnit to timeouts and duration methods

org.openrewrite.apache.httpclient5.UpgradeApacheHttpClient_5_TimeUnit

Apache HttpClient 5.x Timeout and duration methods need an extra the TimeUnit argument. This recipe uses milliseconds as a default unit.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to ApacheHttpClient 5.x deprecated methods from 4.x

org.openrewrite.apache.httpclient5.StatusLine

Migrates deprecated methods to their equivalent ones in 5.x.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate setCredentials to ApacheHttpClient 5.x CredentialsStore

org.openrewrite.apache.httpclient5.CredentialsStoreSetCredentials

Migrates BasicCredentialsProvider methodssetCredentials to the new CredentialsStore interface.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate clear to ApacheHttpClient 5.x CredentialsStore

org.openrewrite.apache.httpclient5.CredentialsStoreClear

Migrates BasicCredentialsProvider methodsclear to the new CredentialsStore interface.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrates to Apache POI 3.17

org.openrewrite.apache.poi.UpgradeApachePoi_3_17

Migrates to the last Apache POI 3.x release. This recipe modifies build files and makes changes to deprecated/preferred APIs that have changed between versions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Eliminate unused classes

io.moderne.azul.EliminateUnusedClasses

Deprecate and later delete classes that are unused, as detected by Azul Intelligence Cloud.

Data tables:

  • io.moderne.azul.table.ReachableClasses: Classes in a repository's source code that are reachable. This data table does not contain information about reachability in libraries.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find reachable methods

io.moderne.azul.search.FindReachableMethods

Find all methods defined in the repository's source code that are reachable.

Data tables:

  • io.moderne.azul.table.ReachableMethods: Methods in a repository's source code that are reachable. This data table does not contain information about reachability in libraries.
  • io.moderne.azul.table.UnmatchedReachableMethods: Methods that exist in a reachability dataset but didn't match repository source code.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Install an orb

org.openrewrite.circleci.InstallOrb

Install a CircleCI orb if it is not already installed.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update CircleCI image

org.openrewrite.circleci.UpdateImage

See the list of pre-built CircleCI images.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Applies a codemod to all source files

org.openrewrite.codemods.ApplyCodemod

Applies a codemod represented by an NPM package to all source files.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Biome recommendations

org.openrewrite.codemods.Biome

Run Biome recommended settings on your projects.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Lint source code with ESLint

org.openrewrite.codemods.ESLint

Run ESLint across the code to fix common static analysis issues in the code. This requires the code to have an existing ESLint configuration.

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Run Putout

org.openrewrite.codemods.Putout

Run Putout on your projects.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

React i18next internationalization

org.openrewrite.codemods.ReactI18Next

Automatically internationalizes React applications by extracting hardcoded strings and replacing them with react-i18next translation calls. Handles JSX text, attributes, and template literals with variables. Creates and updates a translation JSON file with extracted strings.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Lint UI5 projects with UI5 linter

org.openrewrite.codemods.UI5

Runs the UI5 Linter, a static code analysis tool for UI5 projects. It checks JavaScript, TypeScript, XML, JSON, and other files in your project and reports findings.

Data tables:

  • org.openrewrite.codemods.UI5Messages: Errors and warnings as reported by UI5.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Require braces around arrow function bodies

org.openrewrite.codemods.cleanup.javascript.ArrowBodyStyle

Require braces around arrow function bodies See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce or disallow capitalization of the first letter of a comment

org.openrewrite.codemods.cleanup.javascript.CapitalizedComments

Enforce or disallow capitalization of the first letter of a comment See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce consistent brace style for all control statements

org.openrewrite.codemods.cleanup.javascript.Curly

Enforce consistent brace style for all control statements See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce dot notation whenever possible

org.openrewrite.codemods.cleanup.javascript.DotNotation

Enforce dot notation whenever possible See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Require the use of === and !==

org.openrewrite.codemods.cleanup.javascript.Eqeqeq

Require the use of === and !== See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Require or disallow logical assignment operator shorthand

org.openrewrite.codemods.cleanup.javascript.LogicalAssignmentOperators

Require or disallow logical assignment operator shorthand See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce a particular style for multiline comments

org.openrewrite.codemods.cleanup.javascript.MultilineCommentStyle

Enforce a particular style for multiline comments See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow equal signs explicitly at the beginning of regular expressions

org.openrewrite.codemods.cleanup.javascript.NoDivRegex

Disallow equal signs explicitly at the beginning of regular expressions See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow else blocks after return statements in if statements

org.openrewrite.codemods.cleanup.javascript.NoElseReturn

Disallow else blocks after return statements in if statements See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow unnecessary calls to .bind()

org.openrewrite.codemods.cleanup.javascript.NoExtraBind

Disallow unnecessary calls to .bind() See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow unnecessary labels

org.openrewrite.codemods.cleanup.javascript.NoExtraLabel

Disallow unnecessary labels See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow shorthand type conversions

org.openrewrite.codemods.cleanup.javascript.NoImplicitCoercion

Disallow shorthand type conversions See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow if statements as the only statement in else blocks

org.openrewrite.codemods.cleanup.javascript.NoLonelyIf

Disallow if statements as the only statement in else blocks See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow initializing variables to undefined

org.openrewrite.codemods.cleanup.javascript.NoUndefInit

Disallow initializing variables to undefined See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow ternary operators when simpler alternatives exist

org.openrewrite.codemods.cleanup.javascript.NoUnneededTernary

Disallow ternary operators when simpler alternatives exist See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow unnecessary computed property keys in objects and classes

org.openrewrite.codemods.cleanup.javascript.NoUselessComputedKey

Disallow unnecessary computed property keys in objects and classes See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow renaming import, export, and destructured assignments to the same name

org.openrewrite.codemods.cleanup.javascript.NoUselessRename

Disallow renaming import, export, and destructured assignments to the same name See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow redundant return statements

org.openrewrite.codemods.cleanup.javascript.NoUselessReturn

Disallow redundant return statements See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Require let or const instead of var

org.openrewrite.codemods.cleanup.javascript.NoVar

Require let or const instead of var See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Require or disallow method and property shorthand syntax for object literals

org.openrewrite.codemods.cleanup.javascript.ObjectShorthand

Require or disallow method and property shorthand syntax for object literals See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce variables to be declared either together or separately in functions

org.openrewrite.codemods.cleanup.javascript.OneVar

Enforce variables to be declared either together or separately in functions See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Require or disallow assignment operator shorthand where possible

org.openrewrite.codemods.cleanup.javascript.OperatorAssignment

Require or disallow assignment operator shorthand where possible See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Require using arrow functions for callbacks

org.openrewrite.codemods.cleanup.javascript.PreferArrowCallback

Require using arrow functions for callbacks See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Require const declarations for variables that are never reassigned after declared

org.openrewrite.codemods.cleanup.javascript.PreferConst

Require const declarations for variables that are never reassigned after declared See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Require destructuring from arrays and/or objects

org.openrewrite.codemods.cleanup.javascript.PreferDestructuring

Require destructuring from arrays and/or objects See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow the use of Math.pow in favor of the ** operator

org.openrewrite.codemods.cleanup.javascript.PreferExponentiationOperator

Disallow the use of Math.pow in favor of the ** operator See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow parseInt() and Number.parseInt() in favor of binary, octal, and hexadecimal literals

org.openrewrite.codemods.cleanup.javascript.PreferNumericLiterals

Disallow parseInt() and Number.parseInt() in favor of binary, octal, and hexadecimal literals See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow use of Object.prototype.hasOwnProperty.call() and prefer use of Object.hasOwn()

org.openrewrite.codemods.cleanup.javascript.PreferObjectHasOwn

Disallow use of Object.prototype.hasOwnProperty.call() and prefer use of Object.hasOwn() See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow using Object.assign with an object literal as the first argument and prefer the use of object spread instead

org.openrewrite.codemods.cleanup.javascript.PreferObjectSpread

Disallow using Object.assign with an object literal as the first argument and prefer the use of object spread instead See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Require template literals instead of string concatenation

org.openrewrite.codemods.cleanup.javascript.PreferTemplate

Require template literals instead of string concatenation See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce sorted import declarations within modules

org.openrewrite.codemods.cleanup.javascript.SortImports

Enforce sorted import declarations within modules See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Require variables within the same declaration block to be sorted

org.openrewrite.codemods.cleanup.javascript.SortVars

Require variables within the same declaration block to be sorted See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Require or disallow strict mode directives

org.openrewrite.codemods.cleanup.javascript.Strict

Require or disallow strict mode directives See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Require or disallow "Yoda" conditions

org.openrewrite.codemods.cleanup.javascript.Yoda

Require or disallow "Yoda" conditions See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Require or disallow Unicode byte order mark (BOM)

org.openrewrite.codemods.cleanup.javascript.UnicodeBom

Require or disallow Unicode byte order mark (BOM) See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Lint TypeScript code using ESLint

org.openrewrite.codemods.ecmascript.ESLintTypeScriptDefaults

The default config includes the @typescript-eslint plugin and the corresponding plugin:@typescript-eslint/recommended extend.

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Format TypeScript using ESLint Prettier plugin

org.openrewrite.codemods.ecmascript.ESLintTypeScriptPrettier

Formats all TypeScript source code using the ESLint Prettier plugin.

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Transform CommonJS style require() calls to ES6 import statements

org.openrewrite.codemods.ecmascript.5to6.cjsToEsm

Transform CommonJS style require() calls to ES6 import statements

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Transform AMD style define() calls to ES6 import statements

org.openrewrite.codemods.ecmascript.5to6.amdToEsm

Transform AMD style define() calls to ES6 import statements

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove "use strict" directives

org.openrewrite.codemods.ecmascript.5to6.noStrict

Remove "use strict" directives

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Generate named exports from CommonJS modules

org.openrewrite.codemods.ecmascript.5to6.namedExportGeneration

Generate named exports from CommonJS modules

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Convert var to let

org.openrewrite.codemods.ecmascript.5to6.varToLet

Convert var to let

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace all function expressions with only return statement with simple arrow

org.openrewrite.codemods.ecmascript.5to6.simpleArrow

Replace all function expressions with only return statement with simple arrow function.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade ECMAScript 5 to ECMAScript 6

org.openrewrite.codemods.ecmascript.5to6.ECMAScript6BestPractices

A collection of common ECMAScript 5 to ECMAScript 6 updates.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Forbid empty named import

org.openrewrite.codemods.cleanup.javascript.NoEmptyNamedBlocks

Forbid empty named import See rule details for import/no-empty-named-blocks

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Forbid import statements with CommonJS module.exports

org.openrewrite.codemods.cleanup.javascript.NoImportModuleExports

Forbid import statements with CommonJS module.exports See rule details for import/no-import-module-exports

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Forbid import of modules using absolute paths

org.openrewrite.codemods.cleanup.javascript.NoAbsolutePath

Forbid import of modules using absolute paths See rule details for import/no-absolute-path

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Forbid importing packages through relative paths

org.openrewrite.codemods.cleanup.javascript.NoRelativePackages

Forbid importing packages through relative paths See rule details for import/no-relative-packages

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Forbid unnecessary path segments in import and require statements

org.openrewrite.codemods.cleanup.javascript.NoUselessPathSegments

Forbid unnecessary path segments in import and require statements See rule details for import/no-useless-path-segments

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce or ban the use of inline type-only markers for named imports

org.openrewrite.codemods.cleanup.javascript.ConsistentTypeSpecifierStyle

Enforce or ban the use of inline type-only markers for named imports See rule details for import/consistent-type-specifier-style

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure all imports appear before other statements

org.openrewrite.codemods.cleanup.javascript.First

Ensure all imports appear before other statements See rule details for import/first

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce a newline after import statements

org.openrewrite.codemods.cleanup.javascript.NewlineAfterImport

Enforce a newline after import statements See rule details for import/newline-after-import

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Forbid repeated import of the same module in multiple places

org.openrewrite.codemods.cleanup.javascript.NoDuplicates

Forbid repeated import of the same module in multiple places See rule details for import/no-duplicates

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Forbid namespace (a.k.a. "wildcard" *) imports.

org.openrewrite.codemods.cleanup.javascript.NoNamespace

Forbid namespace (a.k.a. "wildcard" *) imports. See rule details for import/no-namespace

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce a convention in module import order

org.openrewrite.codemods.cleanup.javascript.Order

Enforce a convention in module import order See rule details for import/order

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

org.openrewrite.codemods.cleanup.jest.RecommendedJestCodeCleanup

Collection of cleanup ESLint rules that are recommended by eslint-plugin-jest.

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow use of deprecated functions from before version 27

org.openrewrite.codemods.cleanup.jest.NoDeprecatedFunctions27

Disallow use of deprecated functions from before version 27 See rule details for jest/no-deprecated-functions

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce test and it usage conventions

org.openrewrite.codemods.cleanup.jest.ConsistentTestIt

Enforce test and it usage conventions See rule details for jest/consistent-test-it

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow alias methods

org.openrewrite.codemods.cleanup.jest.NoAliasMethods

Disallow alias methods See rule details for jest/no-alias-methods

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow Jasmine globals

org.openrewrite.codemods.cleanup.jest.NoJasmineGlobals

Disallow Jasmine globals See rule details for jest/no-jasmine-globals

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Require using .only and .skip over f and x

org.openrewrite.codemods.cleanup.jest.NoTestPrefixes

Require using .only and .skip over f and x See rule details for jest/no-test-prefixes

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow using jest.mock() factories without an explicit type parameter

org.openrewrite.codemods.cleanup.jest.NoUntypedMockFactory

Disallow using jest.mock() factories without an explicit type parameter See rule details for jest/no-untyped-mock-factory

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Suggest using the built-in comparison matchers

org.openrewrite.codemods.cleanup.jest.PreferComparisonMatcher

Suggest using the built-in comparison matchers See rule details for jest/prefer-comparison-matcher

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer await expect(...).resolves over expect(await ...) syntax

org.openrewrite.codemods.cleanup.jest.PreferExpectResolves

Prefer await expect(...).resolves over expect(await ...) syntax See rule details for jest/prefer-expect-resolves

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce lowercase test names

org.openrewrite.codemods.cleanup.jest.PreferLowercaseTitle

Enforce lowercase test names See rule details for jest/prefer-lowercase-title

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer mock resolved/rejected shorthands for promises

org.openrewrite.codemods.cleanup.jest.PreferMockPromiseShorthand

Prefer mock resolved/rejected shorthands for promises See rule details for jest/prefer-mock-promise-shorthand

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Suggest using jest.spyOn()

org.openrewrite.codemods.cleanup.jest.PreferSpyOn

Suggest using jest.spyOn() See rule details for jest/prefer-spy-on

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Suggest using toBe() for primitive literals

org.openrewrite.codemods.cleanup.jest.PreferToBe

Suggest using toBe() for primitive literals See rule details for jest/prefer-to-be

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Suggest using toContain()

org.openrewrite.codemods.cleanup.jest.PreferToContain

Suggest using toContain() See rule details for jest/prefer-to-contain

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Suggest using toHaveLength()

org.openrewrite.codemods.cleanup.jest.PreferToHaveLength

Suggest using toHaveLength() See rule details for jest/prefer-to-have-length

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Suggest using test.todo

org.openrewrite.codemods.cleanup.jest.PreferTodo

Suggest using test.todo See rule details for jest/prefer-todo

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce valid titles

org.openrewrite.codemods.cleanup.jest.ValidTitle

Enforce valid titles See rule details for jest/valid-title

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce consistent usage of destructuring assignment of props, state, and context

org.openrewrite.codemods.cleanup.react.DestructuringAssignment

Enforce consistent usage of destructuring assignment of props, state, and context See rule details for react/destructuring-assignment

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce a specific function type for function components

org.openrewrite.codemods.cleanup.react.FunctionComponentDefinition

Enforce a specific function type for function components See rule details for react/function-component-definition

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce boolean attributes notation in JSX

org.openrewrite.codemods.cleanup.react.JsxBooleanValue

Enforce boolean attributes notation in JSX See rule details for react/jsx-boolean-value

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce closing bracket location in JSX

org.openrewrite.codemods.cleanup.react.JsxClosingBracketLocation

Enforce closing bracket location in JSX See rule details for react/jsx-closing-bracket-location

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce closing tag location for multiline JSX

org.openrewrite.codemods.cleanup.react.JsxClosingTagLocation

Enforce closing tag location for multiline JSX See rule details for react/jsx-closing-tag-location

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow unnecessary JSX expressions when literals alone are sufficient or enforce JSX expressions on literals in JSX children or attributes

org.openrewrite.codemods.cleanup.react.JsxCurlyBracePresence

Disallow unnecessary JSX expressions when literals alone are sufficient or enforce JSX expressions on literals in JSX children or attributes See rule details for react/jsx-curly-brace-presence

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce consistent linebreaks in curly braces in JSX attributes and expressions

org.openrewrite.codemods.cleanup.react.JsxCurlyNewline

Enforce consistent linebreaks in curly braces in JSX attributes and expressions See rule details for react/jsx-curly-newline

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce or disallow spaces inside of curly braces in JSX attributes and expressions

org.openrewrite.codemods.cleanup.react.JsxCurlySpacing

Enforce or disallow spaces inside of curly braces in JSX attributes and expressions See rule details for react/jsx-curly-spacing

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce or disallow spaces around equal signs in JSX attributes

org.openrewrite.codemods.cleanup.react.JsxEqualsSpacing

Enforce or disallow spaces around equal signs in JSX attributes See rule details for react/jsx-equals-spacing

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce proper position of the first property in JSX

org.openrewrite.codemods.cleanup.react.JsxFirstPropNewLine

Enforce proper position of the first property in JSX See rule details for react/jsx-first-prop-new-line

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce shorthand or standard form for React fragments

org.openrewrite.codemods.cleanup.react.JsxFragments

Enforce shorthand or standard form for React fragments See rule details for react/jsx-fragments

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce JSX indentation

org.openrewrite.codemods.cleanup.react.JsxIndent

Enforce JSX indentation See rule details for react/jsx-indent

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce props indentation in JSX

org.openrewrite.codemods.cleanup.react.JsxIndentProps

Enforce props indentation in JSX See rule details for react/jsx-indent-props

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce maximum of props on a single line in JSX

org.openrewrite.codemods.cleanup.react.JsxMaxPropsPerLine

Enforce maximum of props on a single line in JSX See rule details for react/jsx-max-props-per-line

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Require or prevent a new line after jsx elements and expressions

org.openrewrite.codemods.cleanup.react.JsxNewline

Require or prevent a new line after jsx elements and expressions See rule details for react/jsx-newline

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow problematic leaked values from being rendered

org.openrewrite.codemods.cleanup.react.JsxNoLeakedRender

Disallow problematic leaked values from being rendered See rule details for react/jsx-no-leaked-render

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow target="_blank" attribute without rel="noreferrer"

org.openrewrite.codemods.cleanup.react.JsxNoTargetBlank

Disallow target="_blank" attribute without rel="noreferrer" See rule details for react/jsx-no-target-blank

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow unnecessary fragments

org.openrewrite.codemods.cleanup.react.JsxNoUselessFragment

Disallow unnecessary fragments See rule details for react/jsx-no-useless-fragment

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Require one JSX element per line

org.openrewrite.codemods.cleanup.react.JsxOneExpressionPerLine

Require one JSX element per line See rule details for react/jsx-one-expression-per-line

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow multiple spaces between inline JSX props

org.openrewrite.codemods.cleanup.react.JsxPropsNoMultiSpaces

Disallow multiple spaces between inline JSX props See rule details for react/jsx-props-no-multi-spaces

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce props alphabetical sorting

org.openrewrite.codemods.cleanup.react.JsxSortProps

Enforce props alphabetical sorting See rule details for react/jsx-sort-props

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce spacing before closing bracket in JSX

org.openrewrite.codemods.cleanup.react.JsxSpaceBeforeClosing

Enforce spacing before closing bracket in JSX See rule details for react/jsx-space-before-closing

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce whitespace in and around the JSX opening and closing brackets

org.openrewrite.codemods.cleanup.react.JsxTagSpacing

Enforce whitespace in and around the JSX opening and closing brackets See rule details for react/jsx-tag-spacing

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow missing parentheses around multiline JSX

org.openrewrite.codemods.cleanup.react.JsxWrapMultilines

Disallow missing parentheses around multiline JSX See rule details for react/jsx-wrap-multilines

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Lifecycle methods should be methods on the prototype, not class fields

org.openrewrite.codemods.cleanup.react.NoArrowFunctionLifecycle

Lifecycle methods should be methods on the prototype, not class fields See rule details for react/no-arrow-function-lifecycle

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow usage of unknown DOM property

org.openrewrite.codemods.cleanup.react.NoUnknownProperty

Disallow usage of unknown DOM property See rule details for react/no-unknown-property

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce that props are read-only

org.openrewrite.codemods.cleanup.react.PreferReadOnlyProps

Enforce that props are read-only See rule details for react/prefer-read-only-props

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow extra closing tags for components without children

org.openrewrite.codemods.cleanup.react.SelfClosingComp

Disallow extra closing tags for components without children See rule details for react/self-closing-comp

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce propTypes declarations alphabetical sorting

org.openrewrite.codemods.cleanup.react.SortPropTypes

Enforce propTypes declarations alphabetical sorting See rule details for react/sort-prop-types

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

org.openrewrite.codemods.cleanup.storybook.RecommendedStorybookCodeCleanup

Collection of cleanup ESLint rules from eslint-plugin-storybook.

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Interactions should be awaited

org.openrewrite.codemods.cleanup.storybook.AwaitInteractions

Interactions should be awaited See rule details for storybook/await-interactions

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Story files should have a default export

org.openrewrite.codemods.cleanup.storybook.DefaultExports

Story files should have a default export See rule details for storybook/default-exports

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Deprecated hierarchy separator in title property

org.openrewrite.codemods.cleanup.storybook.HierarchySeparator

Deprecated hierarchy separator in title property See rule details for storybook/hierarchy-separator

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

A story should not have a redundant name property

org.openrewrite.codemods.cleanup.storybook.NoRedundantStoryName

A story should not have a redundant name property See rule details for storybook/no-redundant-story-name

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Do not define a title in meta

org.openrewrite.codemods.cleanup.storybook.NoTitlePropertyInMeta

Do not define a title in meta See rule details for storybook/no-title-property-in-meta

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Stories should use PascalCase

org.openrewrite.codemods.cleanup.storybook.PreferPascalCase

Stories should use PascalCase See rule details for storybook/prefer-pascal-case

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use expect from @storybook/jest

org.openrewrite.codemods.cleanup.storybook.UseStorybookExpect

Use expect from @storybook/jest See rule details for storybook/use-storybook-expect

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Do not use testing-library directly on stories

org.openrewrite.codemods.cleanup.storybook.UseStorybookTestingLibrary

Do not use testing-library directly on stories See rule details for storybook/use-storybook-testing-library

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

org.openrewrite.codemods.cleanup.svelte.RecommendedsvelteCodeCleanup

Collection of cleanup ESLint rules from eslint-plugin-svelte.

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

disallow dynamic slot name

org.openrewrite.codemods.cleanup.svelte.NoDynamicSlotName

disallow dynamic slot name See rule details for svelte/no-dynamic-slot-name

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

disallow to use of the store itself as an operand. Need to use $ prefix or get function.

org.openrewrite.codemods.cleanup.svelte.RequireStoreReactiveAccess

disallow to use of the store itself as an operand. Need to use $ prefix or get function. See rule details for svelte/require-store-reactive-access

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

disallow unnecessary mustache interpolations

org.openrewrite.codemods.cleanup.svelte.NoUselessMustaches

disallow unnecessary mustache interpolations See rule details for svelte/no-useless-mustaches

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

enforce the location of first attribute

org.openrewrite.codemods.cleanup.svelte.FirstAttributeLinebreak

enforce the location of first attribute See rule details for svelte/first-attribute-linebreak

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

require or disallow a space before tag's closing brackets

org.openrewrite.codemods.cleanup.svelte.HtmlClosingBracketSpacing

require or disallow a space before tag's closing brackets See rule details for svelte/html-closing-bracket-spacing

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

enforce quotes style of HTML attributes

org.openrewrite.codemods.cleanup.svelte.HtmlQuotes

enforce quotes style of HTML attributes See rule details for svelte/html-quotes

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

enforce self-closing style

org.openrewrite.codemods.cleanup.svelte.HtmlSelfClosing

enforce self-closing style See rule details for svelte/html-self-closing

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

enforce consistent indentation

org.openrewrite.codemods.cleanup.svelte.Indent

enforce consistent indentation See rule details for svelte/indent

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

enforce the maximum number of attributes per line

org.openrewrite.codemods.cleanup.svelte.MaxAttributesPerLine

enforce the maximum number of attributes per line See rule details for svelte/max-attributes-per-line

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

enforce unified spacing in mustache

org.openrewrite.codemods.cleanup.svelte.MustacheSpacing

enforce unified spacing in mustache See rule details for svelte/mustache-spacing

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

disallow spaces around equal signs in attribute

org.openrewrite.codemods.cleanup.svelte.NoSpacesAroundEqualSignsInAttribute

disallow spaces around equal signs in attribute See rule details for svelte/no-spaces-around-equal-signs-in-attribute

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

require class directives instead of ternary expressions

org.openrewrite.codemods.cleanup.svelte.PreferClassDirective

require class directives instead of ternary expressions See rule details for svelte/prefer-class-directive

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

require style directives instead of style attribute

org.openrewrite.codemods.cleanup.svelte.PreferStyleDirective

require style directives instead of style attribute See rule details for svelte/prefer-style-directive

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

enforce use of shorthand syntax in attribute

org.openrewrite.codemods.cleanup.svelte.ShorthandAttribute

enforce use of shorthand syntax in attribute See rule details for svelte/shorthand-attribute

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

enforce use of shorthand syntax in directives

org.openrewrite.codemods.cleanup.svelte.ShorthandDirective

enforce use of shorthand syntax in directives See rule details for svelte/shorthand-directive

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

enforce order of attributes

org.openrewrite.codemods.cleanup.svelte.SortAttributes

enforce order of attributes See rule details for svelte/sort-attributes

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

enforce consistent spacing after the <!-- and before the --> in a HTML comment

org.openrewrite.codemods.cleanup.svelte.SpacedHtmlComment

enforce consistent spacing after the <!-- and before the --> in a HTML comment See rule details for svelte/spaced-html-comment

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

org.openrewrite.codemods.cleanup.vue.RecommendedVueCodeCleanup

Collection of cleanup ESLint rules from eslint-plugin-vue.

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce order of attributes

org.openrewrite.codemods.cleanup.vue.AttributesOrder

Enforce order of attributes See rule details for vue/attributes-order

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce order of component top-level elements

org.openrewrite.codemods.cleanup.vue.ComponentTagsOrder

Enforce order of component top-level elements See rule details for vue/component-tags-order

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce order of properties in components

org.openrewrite.codemods.cleanup.vue.OrderInComponents

Enforce order of properties in components See rule details for vue/order-in-components

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow usage of this in template

org.openrewrite.codemods.cleanup.vue.ThisInTemplate

Disallow usage of this in template See rule details for vue/this-in-template

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce order of component top-level elements

org.openrewrite.codemods.cleanup.vue.BlockOrder

Enforce order of component top-level elements See rule details for vue/block-order

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce line breaks after opening and before closing block-level tags

org.openrewrite.codemods.cleanup.vue.BlockTagNewline

Enforce line breaks after opening and before closing block-level tags See rule details for vue/block-tag-newline

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce specific casing for the component naming style in template

org.openrewrite.codemods.cleanup.vue.ComponentNameInTemplateCasing

Enforce specific casing for the component naming style in template See rule details for vue/component-name-in-template-casing

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce the casing of component name in components options

org.openrewrite.codemods.cleanup.vue.ComponentOptionsNameCasing

Enforce the casing of component name in components options See rule details for vue/component-options-name-casing

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce order of defineEmits and defineProps compiler macros

org.openrewrite.codemods.cleanup.vue.DefineMacrosOrder

Enforce order of defineEmits and defineProps compiler macros See rule details for vue/define-macros-order

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce unified line brake in HTML comments

org.openrewrite.codemods.cleanup.vue.HtmlCommentContentNewline

Enforce unified line brake in HTML comments See rule details for vue/html-comment-content-newline

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce unified spacing in HTML comments

org.openrewrite.codemods.cleanup.vue.HtmlCommentContentSpacing

Enforce unified spacing in HTML comments See rule details for vue/html-comment-content-spacing

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce consistent indentation in HTML comments

org.openrewrite.codemods.cleanup.vue.HtmlCommentIndent

Enforce consistent indentation in HTML comments See rule details for vue/html-comment-indent

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce new lines between multi-line properties in Vue components

org.openrewrite.codemods.cleanup.vue.NewLineBetweenMultiLineProperty

Enforce new lines between multi-line properties in Vue components See rule details for vue/new-line-between-multi-line-property

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce Promise or callback style in nextTick

org.openrewrite.codemods.cleanup.vue.NextTickStyle

Enforce Promise or callback style in nextTick See rule details for vue/next-tick-style

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce props with default values to be optional

org.openrewrite.codemods.cleanup.vue.NoRequiredPropWithDefault

Enforce props with default values to be optional See rule details for vue/no-required-prop-with-default

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow unsupported Vue.js syntax on the specified version

org.openrewrite.codemods.cleanup.vue.NoUnsupportedFeatures

Disallow unsupported Vue.js syntax on the specified version See rule details for vue/no-unsupported-features

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow unnecessary mustache interpolations

org.openrewrite.codemods.cleanup.vue.NoUselessMustaches

Disallow unnecessary mustache interpolations See rule details for vue/no-useless-mustaches

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow unnecessary v-bind directives

org.openrewrite.codemods.cleanup.vue.NoUselessVBind

Disallow unnecessary v-bind directives See rule details for vue/no-useless-v-bind

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Require or disallow padding lines between blocks

org.openrewrite.codemods.cleanup.vue.PaddingLineBetweenBlocks

Require or disallow padding lines between blocks See rule details for vue/padding-line-between-blocks

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Require or disallow newlines between sibling tags in template

org.openrewrite.codemods.cleanup.vue.PaddingLineBetweenTags

Require or disallow newlines between sibling tags in template See rule details for vue/padding-line-between-tags

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Require or disallow padding lines in component definition

org.openrewrite.codemods.cleanup.vue.PaddingLinesInComponentDefinition

Require or disallow padding lines in component definition See rule details for vue/padding-lines-in-component-definition

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce use of defineOptions instead of default export.

org.openrewrite.codemods.cleanup.vue.PreferDefineOptions

Enforce use of defineOptions instead of default export. See rule details for vue/prefer-define-options

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Require static class names in template to be in a separate class attribute

org.openrewrite.codemods.cleanup.vue.PreferSeparateStaticClass

Require static class names in template to be in a separate class attribute See rule details for vue/prefer-separate-static-class

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce consistent indentation in &lt;script&gt;

org.openrewrite.codemods.cleanup.vue.ScriptIndent

Enforce consistent indentation in &lt;script&gt; See rule details for vue/script-indent

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce static class names order

org.openrewrite.codemods.cleanup.vue.StaticClassNamesOrder

Enforce static class names order See rule details for vue/static-class-names-order

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce v-for directive's delimiter style

org.openrewrite.codemods.cleanup.vue.VForDelimiterStyle

Enforce v-for directive's delimiter style See rule details for vue/v-for-delimiter-style

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Require key attribute for conditionally rendered repeated components

org.openrewrite.codemods.cleanup.vue.VIfElseKey

Require key attribute for conditionally rendered repeated components See rule details for vue/v-if-else-key

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce writing style for handlers in v-on directives

org.openrewrite.codemods.cleanup.vue.VOnHandlerStyle

Enforce writing style for handlers in v-on directives See rule details for vue/v-on-handler-style

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce linebreaks after opening and before closing array brackets in &lt;template&gt;

org.openrewrite.codemods.cleanup.vue.ArrayBracketNewline

Enforce linebreaks after opening and before closing array brackets in &lt;template&gt; See rule details for vue/array-bracket-newline

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce consistent spacing inside array brackets in &lt;template&gt;

org.openrewrite.codemods.cleanup.vue.ArrayBracketSpacing

Enforce consistent spacing inside array brackets in &lt;template&gt; See rule details for vue/array-bracket-spacing

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce line breaks after each array element in &lt;template&gt;

org.openrewrite.codemods.cleanup.vue.ArrayElementNewline

Enforce line breaks after each array element in &lt;template&gt; See rule details for vue/array-element-newline

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce consistent spacing before and after the arrow in arrow functions in &lt;template&gt;

org.openrewrite.codemods.cleanup.vue.ArrowSpacing

Enforce consistent spacing before and after the arrow in arrow functions in &lt;template&gt; See rule details for vue/arrow-spacing

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow or enforce spaces inside of blocks after opening block and before closing block in &lt;template&gt;

org.openrewrite.codemods.cleanup.vue.BlockSpacing

Disallow or enforce spaces inside of blocks after opening block and before closing block in &lt;template&gt; See rule details for vue/block-spacing

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce consistent brace style for blocks in &lt;template&gt;

org.openrewrite.codemods.cleanup.vue.BraceStyle

Enforce consistent brace style for blocks in &lt;template&gt; See rule details for vue/brace-style

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Require or disallow trailing commas in &lt;template&gt;

org.openrewrite.codemods.cleanup.vue.CommaDangle

Require or disallow trailing commas in &lt;template&gt; See rule details for vue/comma-dangle

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce consistent spacing before and after commas in &lt;template&gt;

org.openrewrite.codemods.cleanup.vue.CommaSpacing

Enforce consistent spacing before and after commas in &lt;template&gt; See rule details for vue/comma-spacing

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce consistent comma style in &lt;template&gt;

org.openrewrite.codemods.cleanup.vue.CommaStyle

Enforce consistent comma style in &lt;template&gt; See rule details for vue/comma-style

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce consistent newlines before and after dots in &lt;template&gt;

org.openrewrite.codemods.cleanup.vue.DotLocation

Enforce consistent newlines before and after dots in &lt;template&gt; See rule details for vue/dot-location

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce dot notation whenever possible in &lt;template&gt;

org.openrewrite.codemods.cleanup.vue.DotNotation

Enforce dot notation whenever possible in &lt;template&gt; See rule details for vue/dot-notation

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Require the use of === and !== in &lt;template&gt;

org.openrewrite.codemods.cleanup.vue.Eqeqeq

Require the use of === and !== in &lt;template&gt; See rule details for vue/eqeqeq

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Require or disallow spacing between function identifiers and their invocations in &lt;template&gt;

org.openrewrite.codemods.cleanup.vue.FuncCallSpacing

Require or disallow spacing between function identifiers and their invocations in &lt;template&gt; See rule details for vue/func-call-spacing

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce consistent spacing between keys and values in object literal properties in &lt;template&gt;

org.openrewrite.codemods.cleanup.vue.KeySpacing

Enforce consistent spacing between keys and values in object literal properties in &lt;template&gt; See rule details for vue/key-spacing

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce consistent spacing before and after keywords in &lt;template&gt;

org.openrewrite.codemods.cleanup.vue.KeywordSpacing

Enforce consistent spacing before and after keywords in &lt;template&gt; See rule details for vue/keyword-spacing

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce newlines between operands of ternary expressions in &lt;template&gt;

org.openrewrite.codemods.cleanup.vue.MultilineTernary

Enforce newlines between operands of ternary expressions in &lt;template&gt; See rule details for vue/multiline-ternary

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow unnecessary parentheses in &lt;template&gt;

org.openrewrite.codemods.cleanup.vue.NoExtraParens

Disallow unnecessary parentheses in &lt;template&gt; See rule details for vue/no-extra-parens

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce consistent line breaks after opening and before closing braces in &lt;template&gt;

org.openrewrite.codemods.cleanup.vue.ObjectCurlyNewline

Enforce consistent line breaks after opening and before closing braces in &lt;template&gt; See rule details for vue/object-curly-newline

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce consistent spacing inside braces in &lt;template&gt;

org.openrewrite.codemods.cleanup.vue.ObjectCurlySpacing

Enforce consistent spacing inside braces in &lt;template&gt; See rule details for vue/object-curly-spacing

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce placing object properties on separate lines in &lt;template&gt;

org.openrewrite.codemods.cleanup.vue.ObjectPropertyNewline

Enforce placing object properties on separate lines in &lt;template&gt; See rule details for vue/object-property-newline

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Require or disallow method and property shorthand syntax for object literals in &lt;template&gt;

org.openrewrite.codemods.cleanup.vue.ObjectShorthand

Require or disallow method and property shorthand syntax for object literals in &lt;template&gt; See rule details for vue/object-shorthand

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce consistent linebreak style for operators in &lt;template&gt;

org.openrewrite.codemods.cleanup.vue.OperatorLinebreak

Enforce consistent linebreak style for operators in &lt;template&gt; See rule details for vue/operator-linebreak

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Require template literals instead of string concatenation in &lt;template&gt;

org.openrewrite.codemods.cleanup.vue.PreferTemplate

Require template literals instead of string concatenation in &lt;template&gt; See rule details for vue/prefer-template

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Require quotes around object literal property names in &lt;template&gt;

org.openrewrite.codemods.cleanup.vue.QuoteProps

Require quotes around object literal property names in &lt;template&gt; See rule details for vue/quote-props

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce consistent spacing inside parentheses in &lt;template&gt;

org.openrewrite.codemods.cleanup.vue.SpaceInParens

Enforce consistent spacing inside parentheses in &lt;template&gt; See rule details for vue/space-in-parens

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Require spacing around infix operators in &lt;template&gt;

org.openrewrite.codemods.cleanup.vue.SpaceInfixOps

Require spacing around infix operators in &lt;template&gt; See rule details for vue/space-infix-ops

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce consistent spacing before or after unary operators in &lt;template&gt;

org.openrewrite.codemods.cleanup.vue.SpaceUnaryOps

Enforce consistent spacing before or after unary operators in &lt;template&gt; See rule details for vue/space-unary-ops

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Require or disallow spacing around embedded expressions of template strings in &lt;template&gt;

org.openrewrite.codemods.cleanup.vue.TemplateCurlySpacing

Require or disallow spacing around embedded expressions of template strings in &lt;template&gt; See rule details for vue/template-curly-spacing

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Combination of all deprecations

org.openrewrite.codemods.migrate.mui.All

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update the usage of the sx prop to be compatible with @pigment-css/react

org.openrewrite.codemods.migrate.mui.SxProp

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove system props and add them to the sx prop

org.openrewrite.codemods.migrate.mui.SystemProps

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update the theme creation from @mui/system@v5 to be compatible with @pigment-css/react

org.openrewrite.codemods.migrate.mui.ThemeV

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Updates the usage of styled from @mui/system@v5 to be compatible with @pigment-css/react

org.openrewrite.codemods.migrate.mui.Styled

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Updates the usage of the @mui/material/Grid2, @mui/system/Grid, and @mui/joy/Grid components to their updated APIs.

org.openrewrite.codemods.migrate.mui.GridVProps

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Converts components to use the v4 adapter module

org.openrewrite.codemods.migrate.mui.AdapterV

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Renames closeIcon prop to closeButtonIcon

org.openrewrite.codemods.migrate.mui.AutocompleteRenameCloseicon

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Renames option prop to getOptionLabel

org.openrewrite.codemods.migrate.mui.AutocompleteRenameOption

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Updates circle prop to variant=&quot;circular&quot;

org.openrewrite.codemods.migrate.mui.AvatarCircleCircular

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Updates overlap prop to variant=&quot;dot&quot;

org.openrewrite.codemods.migrate.mui.BadgeOverlapValue

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Converts base imports to use React hooks

org.openrewrite.codemods.migrate.mui.BaseHookImports

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Removes component prop from base components

org.openrewrite.codemods.migrate.mui.BaseRemoveComponentProp

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Removes Unstyled suffix from base components

org.openrewrite.codemods.migrate.mui.BaseRemoveUnstyledSuffix

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Renames base components to slots

org.openrewrite.codemods.migrate.mui.BaseRenameComponentsToSlots

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Updates base imports to use named exports

org.openrewrite.codemods.migrate.mui.BaseUseNamedExports

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Updates borderRadius prop values

org.openrewrite.codemods.migrate.mui.BoxBorderradiusValues

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Renames CSS properties for Box component

org.openrewrite.codemods.migrate.mui.BoxRenameCss

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Renames gap prop to spacing

org.openrewrite.codemods.migrate.mui.BoxRenameGap

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Converts sx prop to sx style prop

org.openrewrite.codemods.migrate.mui.BoxSxProp

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Renames color prop to colorOverride

org.openrewrite.codemods.migrate.mui.ButtonColorProp

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Updates variant prop for Chip component

org.openrewrite.codemods.migrate.mui.ChipVariantProp

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Updates variant prop for CircularProgress component

org.openrewrite.codemods.migrate.mui.CircularprogressVariant

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Renames collapsedHeight prop to transitionCollapsedHeight

org.openrewrite.codemods.migrate.mui.CollapseRenameCollapsedheight

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Renames component prop to as

org.openrewrite.codemods.migrate.mui.ComponentRenameProp

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Updates import paths for core styles

org.openrewrite.codemods.migrate.mui.CoreStylesImport

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Updates createMuiTheme usage

org.openrewrite.codemods.migrate.mui.CreateTheme

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Moves date pickers to @mui/x-date-picker

org.openrewrite.codemods.migrate.mui.DatePickersMovedToX

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Updates props for Dialog component

org.openrewrite.codemods.migrate.mui.DialogProps

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Updates props for DialogTitle component

org.openrewrite.codemods.migrate.mui.DialogTitleProps

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prepends emotion cache

org.openrewrite.codemods.migrate.mui.EmotionPrependCache

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Converts ExpansionPanel to use ExpansionPanel component

org.openrewrite.codemods.migrate.mui.ExpansionPanelComponent

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Updates variant prop for Fab component

org.openrewrite.codemods.migrate.mui.FabVariant

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Renames alpha prop to opacity

org.openrewrite.codemods.migrate.mui.FadeRenameAlpha

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Updates justify prop to justifyContent for Grid component

org.openrewrite.codemods.migrate.mui.GridJustifyJustifycontent

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Converts GridList to use Grid component

org.openrewrite.codemods.migrate.mui.GridListComponent

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Updates down prop for Hidden component

org.openrewrite.codemods.migrate.mui.HiddenDownProps

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Updates size prop for IconButton component

org.openrewrite.codemods.migrate.mui.IconButtonSize

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Removes imgProps prop from Avatar component

org.openrewrite.codemods.migrate.mui.JoyAvatarRemoveImgprops

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Renames Mui classname prefix

org.openrewrite.codemods.migrate.mui.JoyRenameClassnamePrefix

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Renames components to slots

org.openrewrite.codemods.migrate.mui.JoyRenameComponentsToSlots

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Renames row prop to flexDirection=&quot;row&quot;

org.openrewrite.codemods.migrate.mui.JoyRenameRowProp

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Renames TextField to Input

org.openrewrite.codemods.migrate.mui.JoyTextFieldToInput

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Converts JSS styles to styled-components

org.openrewrite.codemods.migrate.mui.JssToStyled

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Converts JSS to TypeScript in React components

org.openrewrite.codemods.migrate.mui.JssToTssReact

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

org.openrewrite.codemods.migrate.mui.LinkUnderlineHover

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Updates usage of @mui/styles

org.openrewrite.codemods.migrate.mui.MaterialUiStyles

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Updates usage of @mui/types

org.openrewrite.codemods.migrate.mui.MaterialUiTypes

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Updates props for Modal component

org.openrewrite.codemods.migrate.mui.ModalProps

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Moves lab modules to @mui/material

org.openrewrite.codemods.migrate.mui.MovedLabModules

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replaces @mui imports with @mui/material

org.openrewrite.codemods.migrate.mui.MuiReplace

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Optimizes imports

org.openrewrite.codemods.migrate.mui.OptimalImports

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Updates circular prop to variant=&quot;circular&quot;

org.openrewrite.codemods.migrate.mui.PaginationRoundCircular

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensures presets are safe to use

org.openrewrite.codemods.migrate.mui.PresetSafe

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Renames CSS variables

org.openrewrite.codemods.migrate.mui.RenameCssVariables

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Converts rootRef to ref

org.openrewrite.codemods.migrate.mui.RootRef

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Updates variant prop for Skeleton component

org.openrewrite.codemods.migrate.mui.SkeletonVariant

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Updates usage of styled engine provider

org.openrewrite.codemods.migrate.mui.StyledEngineProvider

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Updates props for Table component

org.openrewrite.codemods.migrate.mui.TableProps

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Updates scroll buttons for Tabs component

org.openrewrite.codemods.migrate.mui.TabsScrollButtons

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Updates minRows and maxRows props for TextareaAutosize component

org.openrewrite.codemods.migrate.mui.TextareaMinmaxRows

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Adds DefaultTheme module augmentation to typescript projects.

org.openrewrite.codemods.migrate.mui.ThemeAugment

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Updates width values for theme breakpoints

org.openrewrite.codemods.migrate.mui.ThemeBreakpointsWidth

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Updates theme breakpoints

org.openrewrite.codemods.migrate.mui.ThemeBreakpoints

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Updates theme options

org.openrewrite.codemods.migrate.mui.ThemeOptions

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Updates theme palette mode

org.openrewrite.codemods.migrate.mui.ThemePaletteMode

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Updates usage of ThemeProvider

org.openrewrite.codemods.migrate.mui.ThemeProvider

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Updates theme spacing

org.openrewrite.codemods.migrate.mui.ThemeSpacing

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Updates round values for theme typography

org.openrewrite.codemods.migrate.mui.ThemeTypographyRound

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Converts all @mui/material submodule imports to the root module

org.openrewrite.codemods.migrate.mui.TopLevelImports

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Updates usage of transitions

org.openrewrite.codemods.migrate.mui.Transitions

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Moves tree view to @mui/x-tree-view

org.openrewrite.codemods.migrate.mui.TreeViewMovedToX

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Updates usage of useAutocomplete

org.openrewrite.codemods.migrate.mui.UseAutocomplete

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Updates usage of useTransitionProps

org.openrewrite.codemods.migrate.mui.UseTransitionprops

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Updates variant prop usage

org.openrewrite.codemods.migrate.mui.VariantProp

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Updates withMobileDialog higher-order component

org.openrewrite.codemods.migrate.mui.WithMobileDialog

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Updates withWidth higher-order component

org.openrewrite.codemods.migrate.mui.WithWidth

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Updates theme spacing API

org.openrewrite.codemods.migrate.mui.ThemeSpacingApi

See Material UI codemod projects for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace lodash and underscore array functions with native JavaScript

org.openrewrite.codemods.migrate.lodash.LodashUnderscoreArray

  • _.head(x) -> x[0] - _.head(x, n) -> x.slice(n) - _.first (alias for _.head) - _.tail(x) -> x.slice(1) - _.tail(x, n) -> x.slice(n) - _.rest (alias for _.tail) - _.last(x) -> x[x.length - 1] - _.last(x, n) -> x.slice(x.length - n)

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace lodash and underscore function functions with native JavaScript

org.openrewrite.codemods.migrate.lodash.LodashUnderscoreFunction

  • _.bind(fn, obj, ...x) -> fn.bind(obj, ...x) - _.partial(fn, a, b); -> (...args) =&gt; fn(a, b, ...args)

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace lodash and underscore object functions with native JavaScript

org.openrewrite.codemods.migrate.lodash.LodashUnderscoreObjects

  • _.clone(x) -> { ...x } - _.extend({}, x, y) -> { ...x, ...y } - _.extend(obj, x, y) -> Object.assign(obj, x, y) - _.keys(x) -> Object.keys(x) - _.pairs(x) -> Object.entries(x) - _.values(x) -> Object.values(x)

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace lodash and underscore utility functions with native JavaScript

org.openrewrite.codemods.migrate.lodash.LodashUnderscoreUtil

  • _.isArray(x) -> Array.isArray(x) - _.isBoolean(x) -> typeof(x) === 'boolean' - _.isFinite(x) -> Number.isFinite(x) - _.isFunction(x) -> typeof(x) === 'function' - _.isNull(x) -> x === null - _.isString(x) -> typeof(x) === 'string' - _.isUndefined(x) -> typeof(x) === 'undefined'

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Next.js Codemods for API Updates

org.openrewrite.codemods.migrate.nextjs.NextJsCodemods

Next.js provides Codemod transformations to help upgrade your Next.js codebase when an API is updated or deprecated.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use withRouter

org.openrewrite.codemods.migrate.nextjs.v6.UrlToWithrouter

Transforms the deprecated automatically injected url property on top-level pages to using withRouter and the router property it injects. Read more here.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Transform AMP HOC into page config

org.openrewrite.codemods.migrate.nextjs.v8.WithampToConfig

Transforms the withAmp HOC into Next.js 9 page configuration.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Transform Anonymous Components into Named Components

org.openrewrite.codemods.migrate.nextjs.v9.NameDefaultComponent

Transforms anonymous components into named components to make sure they work with Fast Refresh. The component will have a camel-cased name based on the name of the file, and it also works with arrow functions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add React imports

org.openrewrite.codemods.migrate.nextjs.v10.AddMissingReactImport

Transforms files that do not import React to include the import in order for the new React JSX transform to work.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Rename Next Image Imports

org.openrewrite.codemods.migrate.nextjs.v11.CraToNext

Safely renames next/image imports in existing Next.js 10 11 or 12 applications to next/legacy/image in Next.js 13. Also renames next/future/image to next/image.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Rename Next Image Imports

org.openrewrite.codemods.migrate.nextjs.v13_0.NextImageToLegacyImage

Safely renames next/image imports in existing Next.js 10 11 or 12 applications to next/legacy/image in Next.js 13. Also renames next/future/image to next/image.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to the New Image Component

org.openrewrite.codemods.migrate.nextjs.v13_0.NextImageExperimental

Dangerously migrates from next/legacy/image to the new next/image by adding inline styles and removing unused props.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

org.openrewrite.codemods.migrate.nextjs.v13_0.NewLink

Remove &amp;lt;a&amp;gt; tags inside Link Components or add a legacyBehavior prop to Links that cannot be auto-fixed.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use Built-in Font

org.openrewrite.codemods.migrate.nextjs.v13_2.BuiltInNextFont

This codemod uninstalls the @next/font package and transforms @next/font imports into the built-in next/font.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate ImageResponse imports

org.openrewrite.codemods.migrate.nextjs.v14_0.NextOgImport

This codemod moves transforms imports from next/server to next/og for usage of Dynamic OG Image Generation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use viewport export

org.openrewrite.codemods.migrate.nextjs.v14_0.MetadataToViewportExport

This codemod migrates certain viewport metadata to viewport export.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

org.openrewrite.codemods.format.RecommendedESLintStyling

Collection of stylistic ESLint rules that are recommended by the ESLint Style.

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce linebreaks after opening and before closing array brackets

org.openrewrite.codemods.format.ArrayBracketNewline

Enforce linebreaks after opening and before closing array brackets See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce consistent spacing inside array brackets

org.openrewrite.codemods.format.ArrayBracketSpacing

Enforce consistent spacing inside array brackets See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce line breaks after each array element

org.openrewrite.codemods.format.ArrayElementNewline

Enforce line breaks after each array element See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Require parentheses around arrow function arguments

org.openrewrite.codemods.format.ArrowParens

Require parentheses around arrow function arguments See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce consistent spacing before and after the arrow in arrow functions

org.openrewrite.codemods.format.ArrowSpacing

Enforce consistent spacing before and after the arrow in arrow functions See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow or enforce spaces inside of blocks after opening block and before closing block

org.openrewrite.codemods.format.BlockSpacing

Disallow or enforce spaces inside of blocks after opening block and before closing block See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce consistent brace style for blocks

org.openrewrite.codemods.format.BraceStyle

Enforce consistent brace style for blocks See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Require or disallow trailing commas

org.openrewrite.codemods.format.CommaDangle

Require or disallow trailing commas See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce consistent spacing before and after commas

org.openrewrite.codemods.format.CommaSpacing

Enforce consistent spacing before and after commas See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce consistent comma style

org.openrewrite.codemods.format.CommaStyle

Enforce consistent comma style See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce consistent spacing inside computed property brackets

org.openrewrite.codemods.format.ComputedPropertySpacing

Enforce consistent spacing inside computed property brackets See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce consistent newlines before and after dots

org.openrewrite.codemods.format.DotLocation

Enforce consistent newlines before and after dots See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Require or disallow newline at the end of files

org.openrewrite.codemods.format.EolLast

Require or disallow newline at the end of files See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Require or disallow spacing between function identifiers and their invocations. Alias of &#x60;function-call-spacing&#x60;.

org.openrewrite.codemods.format.FuncCallSpacing

Require or disallow spacing between function identifiers and their invocations. Alias of &#x60;function-call-spacing&#x60;. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce line breaks between arguments of a function call

org.openrewrite.codemods.format.FunctionCallArgumentNewline

Enforce line breaks between arguments of a function call See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Require or disallow spacing between function identifiers and their invocations

org.openrewrite.codemods.format.FunctionCallSpacing

Require or disallow spacing between function identifiers and their invocations See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce consistent line breaks inside function parentheses

org.openrewrite.codemods.format.FunctionParenNewline

Enforce consistent line breaks inside function parentheses See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce consistent spacing around &#x60;*&#x60; operators in generator functions

org.openrewrite.codemods.format.GeneratorStarSpacing

Enforce consistent spacing around &#x60;*&#x60; operators in generator functions See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce the location of arrow function bodies

org.openrewrite.codemods.format.ImplicitArrowLinebreak

Enforce the location of arrow function bodies See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce consistent indentation

org.openrewrite.codemods.format.Indent

Enforce consistent indentation See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Indentation for binary operators

org.openrewrite.codemods.format.IndentBinaryOps

Indentation for binary operators See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce closing bracket location in JSX

org.openrewrite.codemods.format.JsxClosingBracketLocation

Enforce closing bracket location in JSX See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce closing tag location for multiline JSX

org.openrewrite.codemods.format.JsxClosingTagLocation

Enforce closing tag location for multiline JSX See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow unnecessary JSX expressions when literals alone are sufficient or enforce JSX expressions on literals in JSX children or attributes

org.openrewrite.codemods.format.JsxCurlyBracePresence

Disallow unnecessary JSX expressions when literals alone are sufficient or enforce JSX expressions on literals in JSX children or attributes See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce consistent linebreaks in curly braces in JSX attributes and expressions

org.openrewrite.codemods.format.JsxCurlyNewline

Enforce consistent linebreaks in curly braces in JSX attributes and expressions See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce or disallow spaces inside of curly braces in JSX attributes and expressions

org.openrewrite.codemods.format.JsxCurlySpacing

Enforce or disallow spaces inside of curly braces in JSX attributes and expressions See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce or disallow spaces around equal signs in JSX attributes

org.openrewrite.codemods.format.JsxEqualsSpacing

Enforce or disallow spaces around equal signs in JSX attributes See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce proper position of the first property in JSX

org.openrewrite.codemods.format.JsxFirstPropNewLine

Enforce proper position of the first property in JSX See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce JSX indentation

org.openrewrite.codemods.format.JsxIndent

Enforce JSX indentation See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce props indentation in JSX

org.openrewrite.codemods.format.JsxIndentProps

Enforce props indentation in JSX See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce maximum of props on a single line in JSX

org.openrewrite.codemods.format.JsxMaxPropsPerLine

Enforce maximum of props on a single line in JSX See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Require or prevent a new line after jsx elements and expressions.

org.openrewrite.codemods.format.JsxNewline

Require or prevent a new line after jsx elements and expressions. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Require one JSX element per line

org.openrewrite.codemods.format.JsxOneExpressionPerLine

Require one JSX element per line See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce PascalCase for user-defined JSX components

org.openrewrite.codemods.format.JsxPascalCase

Enforce PascalCase for user-defined JSX components See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow multiple spaces between inline JSX props

org.openrewrite.codemods.format.JsxPropsNoMultiSpaces

Disallow multiple spaces between inline JSX props See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce the consistent use of either double or single quotes in JSX attributes

org.openrewrite.codemods.format.JsxQuotes

Enforce the consistent use of either double or single quotes in JSX attributes See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow extra closing tags for components without children

org.openrewrite.codemods.format.JsxSelfClosingComp

Disallow extra closing tags for components without children See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce props alphabetical sorting

org.openrewrite.codemods.format.JsxSortProps

Enforce props alphabetical sorting See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce whitespace in and around the JSX opening and closing brackets

org.openrewrite.codemods.format.JsxTagSpacing

Enforce whitespace in and around the JSX opening and closing brackets See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow missing parentheses around multiline JSX

org.openrewrite.codemods.format.JsxWrapMultilines

Disallow missing parentheses around multiline JSX See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce consistent spacing between keys and values in object literal properties

org.openrewrite.codemods.format.KeySpacing

Enforce consistent spacing between keys and values in object literal properties See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce consistent spacing before and after keywords

org.openrewrite.codemods.format.KeywordSpacing

Enforce consistent spacing before and after keywords See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce consistent linebreak style

org.openrewrite.codemods.format.LinebreakStyle

Enforce consistent linebreak style See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Require empty lines around comments

org.openrewrite.codemods.format.LinesAroundComment

Require empty lines around comments See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Require or disallow an empty line between class members

org.openrewrite.codemods.format.LinesBetweenClassMembers

Require or disallow an empty line between class members See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Require a specific member delimiter style for interfaces and type literals

org.openrewrite.codemods.format.MemberDelimiterStyle

Require a specific member delimiter style for interfaces and type literals See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce newlines between operands of ternary expressions

org.openrewrite.codemods.format.MultilineTernary

Enforce newlines between operands of ternary expressions See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce or disallow parentheses when invoking a constructor with no arguments

org.openrewrite.codemods.format.NewParens

Enforce or disallow parentheses when invoking a constructor with no arguments See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Require a newline after each call in a method chain

org.openrewrite.codemods.format.NewlinePerChainedCall

Require a newline after each call in a method chain See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow arrow functions where they could be confused with comparisons

org.openrewrite.codemods.format.NoConfusingArrow

Disallow arrow functions where they could be confused with comparisons See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow unnecessary parentheses

org.openrewrite.codemods.format.NoExtraParens

Disallow unnecessary parentheses See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow unnecessary semicolons

org.openrewrite.codemods.format.NoExtraSemi

Disallow unnecessary semicolons See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow leading or trailing decimal points in numeric literals

org.openrewrite.codemods.format.NoFloatingDecimal

Disallow leading or trailing decimal points in numeric literals See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow multiple spaces

org.openrewrite.codemods.format.NoMultiSpaces

Disallow multiple spaces See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow multiple empty lines

org.openrewrite.codemods.format.NoMultipleEmptyLines

Disallow multiple empty lines See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow trailing whitespace at the end of lines

org.openrewrite.codemods.format.NoTrailingSpaces

Disallow trailing whitespace at the end of lines See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow whitespace before properties

org.openrewrite.codemods.format.NoWhitespaceBeforeProperty

Disallow whitespace before properties See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce the location of single-line statements

org.openrewrite.codemods.format.NonblockStatementBodyPosition

Enforce the location of single-line statements See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce consistent line breaks after opening and before closing braces

org.openrewrite.codemods.format.ObjectCurlyNewline

Enforce consistent line breaks after opening and before closing braces See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce consistent spacing inside braces

org.openrewrite.codemods.format.ObjectCurlySpacing

Enforce consistent spacing inside braces See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce placing object properties on separate lines

org.openrewrite.codemods.format.ObjectPropertyNewline

Enforce placing object properties on separate lines See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Require or disallow newlines around variable declarations

org.openrewrite.codemods.format.OneVarDeclarationPerLine

Require or disallow newlines around variable declarations See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce consistent linebreak style for operators

org.openrewrite.codemods.format.OperatorLinebreak

Enforce consistent linebreak style for operators See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Require or disallow padding within blocks

org.openrewrite.codemods.format.PaddedBlocks

Require or disallow padding within blocks See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Require or disallow padding lines between statements

org.openrewrite.codemods.format.PaddingLineBetweenStatements

Require or disallow padding lines between statements See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Require quotes around object literal property names

org.openrewrite.codemods.format.QuoteProps

Require quotes around object literal property names See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce the consistent use of either backticks, double, or single quotes

org.openrewrite.codemods.format.Quotes

Enforce the consistent use of either backticks, double, or single quotes See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce spacing between rest and spread operators and their expressions

org.openrewrite.codemods.format.RestSpreadSpacing

Enforce spacing between rest and spread operators and their expressions See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Require or disallow semicolons instead of ASI

org.openrewrite.codemods.format.Semi

Require or disallow semicolons instead of ASI See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce consistent spacing before and after semicolons

org.openrewrite.codemods.format.SemiSpacing

Enforce consistent spacing before and after semicolons See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce location of semicolons

org.openrewrite.codemods.format.SemiStyle

Enforce location of semicolons See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce consistent spacing before blocks

org.openrewrite.codemods.format.SpaceBeforeBlocks

Enforce consistent spacing before blocks See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce consistent spacing before &#x60;function&#x60; definition opening parenthesis

org.openrewrite.codemods.format.SpaceBeforeFunctionParen

Enforce consistent spacing before &#x60;function&#x60; definition opening parenthesis See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce consistent spacing inside parentheses

org.openrewrite.codemods.format.SpaceInParens

Enforce consistent spacing inside parentheses See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Require spacing around infix operators

org.openrewrite.codemods.format.SpaceInfixOps

Require spacing around infix operators See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce consistent spacing before or after unary operators

org.openrewrite.codemods.format.SpaceUnaryOps

Enforce consistent spacing before or after unary operators See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce consistent spacing after the &#x60;//&#x60; or &#x60;/*&#x60; in a comment

org.openrewrite.codemods.format.SpacedComment

Enforce consistent spacing after the &#x60;//&#x60; or &#x60;/*&#x60; in a comment See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce spacing around colons of switch statements

org.openrewrite.codemods.format.SwitchColonSpacing

Enforce spacing around colons of switch statements See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Require or disallow spacing around embedded expressions of template strings

org.openrewrite.codemods.format.TemplateCurlySpacing

Require or disallow spacing around embedded expressions of template strings See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Require or disallow spacing between template tags and their literals

org.openrewrite.codemods.format.TemplateTagSpacing

Require or disallow spacing between template tags and their literals See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Require consistent spacing around type annotations

org.openrewrite.codemods.format.TypeAnnotationSpacing

Require consistent spacing around type annotations See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforces consistent spacing inside TypeScript type generics

org.openrewrite.codemods.format.TypeGenericSpacing

Enforces consistent spacing inside TypeScript type generics See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Expect space before the type declaration in the named tuple

org.openrewrite.codemods.format.TypeNamedTupleSpacing

Expect space before the type declaration in the named tuple See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Require parentheses around immediate &#x60;function&#x60; invocations

org.openrewrite.codemods.format.WrapIife

Require parentheses around immediate &#x60;function&#x60; invocations See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Require parenthesis around regex literals

org.openrewrite.codemods.format.WrapRegex

Require parenthesis around regex literals See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Require or disallow spacing around the &#x60;&#x60; in &#x60;yield&#x60; expressions

org.openrewrite.codemods.format.YieldStarSpacing

Require or disallow spacing around the &#x60;&#x60; in &#x60;yield&#x60; expressions See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Improve regexes by making them shorter, consistent, and safer.

org.openrewrite.codemods.cleanup.javascript.BetterRegex

Improve regexes by making them shorter, consistent, and safer. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce a specific parameter name in catch clauses.

org.openrewrite.codemods.cleanup.javascript.CatchErrorName

Enforce a specific parameter name in catch clauses. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use destructured variables over properties.

org.openrewrite.codemods.cleanup.javascript.ConsistentDestructuring

Use destructured variables over properties. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce correct Error subclassing.

org.openrewrite.codemods.cleanup.javascript.CustomErrorDefinition

Enforce correct Error subclassing. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce no spaces between braces.

org.openrewrite.codemods.cleanup.javascript.EmptyBraceSpaces

Enforce no spaces between braces. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Require escape sequences to use uppercase values.

org.openrewrite.codemods.cleanup.javascript.EscapeCase

Require escape sequences to use uppercase values. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce explicitly comparing the length or size property of a value.

org.openrewrite.codemods.cleanup.javascript.ExplicitLengthCheck

Enforce explicitly comparing the length or size property of a value. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce the use of new for all builtins, except String, Number, Boolean, Symbol, and BigInt.

org.openrewrite.codemods.cleanup.javascript.NewForBuiltins

Enforce the use of new for all builtins, except String, Number, Boolean, Symbol, and BigInt. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer for…of over the forEach method.

org.openrewrite.codemods.cleanup.javascript.NoArrayForEach

Prefer for…of over the forEach method. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow using the this argument in array methods.

org.openrewrite.codemods.cleanup.javascript.NoArrayMethodThisArgument

Disallow using the this argument in array methods. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce combining multiple Array#push() into one call.

org.openrewrite.codemods.cleanup.javascript.NoArrayPushPush

Enforce combining multiple Array#push() into one call. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow member access from await expression.

org.openrewrite.codemods.cleanup.javascript.NoAwaitExpressionMember

Disallow member access from await expression. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Do not use leading/trailing space between console.log parameters.

org.openrewrite.codemods.cleanup.javascript.NoConsoleSpaces

Do not use leading/trailing space between console.log parameters. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Do not use a for loop that can be replaced with a for-of loop.

org.openrewrite.codemods.cleanup.javascript.NoForLoop

Do not use a for loop that can be replaced with a for-of loop. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce the use of Unicode escapes instead of hexadecimal escapes.

org.openrewrite.codemods.cleanup.javascript.NoHexEscape

Enforce the use of Unicode escapes instead of hexadecimal escapes. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Require Array.isArray() instead of instanceof Array.

org.openrewrite.codemods.cleanup.javascript.NoInstanceofArray

Require Array.isArray() instead of instanceof Array. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow negated conditions.

org.openrewrite.codemods.cleanup.javascript.NoNegatedCondition

Disallow negated conditions. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow nested ternary expressions.

org.openrewrite.codemods.cleanup.javascript.NoNestedTernary

Disallow nested ternary expressions. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow new Array().

org.openrewrite.codemods.cleanup.javascript.NoNewArray

Disallow new Array(). See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce the use of Buffer.from() and Buffer.alloc() instead of the deprecated new Buffer().

org.openrewrite.codemods.cleanup.javascript.NoNewBuffer

Enforce the use of Buffer.from() and Buffer.alloc() instead of the deprecated new Buffer(). See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow the use of the null literal.

org.openrewrite.codemods.cleanup.javascript.NoNull

Disallow the use of the null literal. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow classes that only have static members.

org.openrewrite.codemods.cleanup.javascript.NoStaticOnlyClass

Disallow classes that only have static members. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow comparing undefined using typeof.

org.openrewrite.codemods.cleanup.javascript.NoTypeofUndefined

Disallow comparing undefined using typeof. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow awaiting non-promise values.

org.openrewrite.codemods.cleanup.javascript.NoUnnecessaryAwait

Disallow awaiting non-promise values. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow unreadable array destructuring.

org.openrewrite.codemods.cleanup.javascript.NoUnreadableArrayDestructuring

Disallow unreadable array destructuring. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow useless fallback when spreading in object literals.

org.openrewrite.codemods.cleanup.javascript.NoUselessFallbackInSpread

Disallow useless fallback when spreading in object literals. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow useless array length check.

org.openrewrite.codemods.cleanup.javascript.NoUselessLengthCheck

Disallow useless array length check. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow returning/yielding Promise.resolve()/reject() in async functions or promise callbacks.

org.openrewrite.codemods.cleanup.javascript.NoUselessPromiseResolveReject

Disallow returning/yielding Promise.resolve()/reject() in async functions or promise callbacks. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow unnecessary spread.

org.openrewrite.codemods.cleanup.javascript.NoUselessSpread

Disallow unnecessary spread. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow useless undefined.

org.openrewrite.codemods.cleanup.javascript.NoUselessUndefined

Disallow useless undefined. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disallow number literals with zero fractions or dangling dots.

org.openrewrite.codemods.cleanup.javascript.NoZeroFractions

Disallow number literals with zero fractions or dangling dots. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce proper case for numeric literals.

org.openrewrite.codemods.cleanup.javascript.NumberLiteralCase

Enforce proper case for numeric literals. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce the style of numeric separators by correctly grouping digits.

org.openrewrite.codemods.cleanup.javascript.NumericSeparatorsStyle

Enforce the style of numeric separators by correctly grouping digits. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer .addEventListener() and .removeEventListener() over on-functions.

org.openrewrite.codemods.cleanup.javascript.PreferAddEventListener

Prefer .addEventListener() and .removeEventListener() over on-functions. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer .find() and .findLast() over the first or last element from .filter().

org.openrewrite.codemods.cleanup.javascript.PreferArrayFind

Prefer .find() and .findLast() over the first or last element from .filter(). See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Array#flat() over legacy techniques to flatten arrays.

org.openrewrite.codemods.cleanup.javascript.PreferArrayFlat

Prefer Array#flat() over legacy techniques to flatten arrays. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer .flatMap() over .map().flat().

org.openrewrite.codemods.cleanup.javascript.PreferArrayFlatMap

Prefer .flatMap() over .map().flat(). See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Array#{indexOf,lastIndexOf}() over Array#{findIndex,findLastIndex}() when looking for the index of an item.

org.openrewrite.codemods.cleanup.javascript.PreferArrayIndexOf

Prefer Array#{indexOf,lastIndexOf}() over Array#{findIndex,findLastIndex}() when looking for the index of an item. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer .some() over .filter().length check and .{find,findLast}().

org.openrewrite.codemods.cleanup.javascript.PreferArraySome

Prefer .some() over .filter().length check and .{find,findLast}(). See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer .at() method for index access and String#charAt().

org.openrewrite.codemods.cleanup.javascript.PreferAt

Prefer .at() method for index access and String#charAt(). See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Date.now() to get the number of milliseconds since the Unix Epoch.

org.openrewrite.codemods.cleanup.javascript.PreferDateNow

Prefer Date.now() to get the number of milliseconds since the Unix Epoch. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer default parameters over reassignment.

org.openrewrite.codemods.cleanup.javascript.PreferDefaultParameters

Prefer default parameters over reassignment. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Node#append() over Node#appendChild().

org.openrewrite.codemods.cleanup.javascript.PreferDomNodeAppend

Prefer Node#append() over Node#appendChild(). See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer using .dataset on DOM elements over calling attribute methods.

org.openrewrite.codemods.cleanup.javascript.PreferDomNodeDataset

Prefer using .dataset on DOM elements over calling attribute methods. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer childNode.remove() over parentNode.removeChild(childNode).

org.openrewrite.codemods.cleanup.javascript.PreferDomNodeRemove

Prefer childNode.remove() over parentNode.removeChild(childNode). See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer export…from when re-exporting.

org.openrewrite.codemods.cleanup.javascript.PreferExportFrom

Prefer export…from when re-exporting. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer .includes() over .indexOf() and Array#some() when checking for existence or non-existence.

org.openrewrite.codemods.cleanup.javascript.PreferIncludes

Prefer .includes() over .indexOf() and Array#some() when checking for existence or non-existence. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer reading a JSON file as a buffer.

org.openrewrite.codemods.cleanup.javascript.PreferJsonParseBuffer

Prefer reading a JSON file as a buffer. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer KeyboardEvent#key over KeyboardEvent#keyCode.

org.openrewrite.codemods.cleanup.javascript.PreferKeyboardEventKey

Prefer KeyboardEvent#key over KeyboardEvent#keyCode. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce the use of Math.trunc() instead of bitwise operators.

org.openrewrite.codemods.cleanup.javascript.PreferMathTrunc

Enforce the use of Math.trunc() instead of bitwise operators. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer .before() over .insertBefore(), .replaceWith() over .replaceChild(), prefer one of .before(), .after(), .append() or .prepend() over insertAdjacentText() and insertAdjacentElement().

org.openrewrite.codemods.cleanup.javascript.PreferModernDomApis

Prefer .before() over .insertBefore(), .replaceWith() over .replaceChild(), prefer one of .before(), .after(), .append() or .prepend() over insertAdjacentText() and insertAdjacentElement(). See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer modern Math APIs over legacy patterns.

org.openrewrite.codemods.cleanup.javascript.PreferModernMathApis

Prefer modern Math APIs over legacy patterns. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer JavaScript modules (ESM) over CommonJS.

org.openrewrite.codemods.cleanup.javascript.PreferModule

Prefer JavaScript modules (ESM) over CommonJS. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer using String, Number, BigInt, Boolean, and Symbol directly.

org.openrewrite.codemods.cleanup.javascript.PreferNativeCoercionFunctions

Prefer using String, Number, BigInt, Boolean, and Symbol directly. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer negative index over .length - index when possible.

org.openrewrite.codemods.cleanup.javascript.PreferNegativeIndex

Prefer negative index over .length - index when possible. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer using the node: protocol when importing Node.js builtin modules.

org.openrewrite.codemods.cleanup.javascript.PreferNodeProtocol

Prefer using the node: protocol when importing Node.js builtin modules. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Number static properties over global ones.

org.openrewrite.codemods.cleanup.javascript.PreferNumberProperties

Prefer Number static properties over global ones. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer using Object.fromEntries() to transform a list of key-value pairs into an object.

org.openrewrite.codemods.cleanup.javascript.PreferObjectFromEntries

Prefer using Object.fromEntries() to transform a list of key-value pairs into an object. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer omitting the catch binding parameter.

org.openrewrite.codemods.cleanup.javascript.PreferOptionalCatchBinding

Prefer omitting the catch binding parameter. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer borrowing methods from the prototype instead of the instance.

org.openrewrite.codemods.cleanup.javascript.PreferPrototypeMethods

Prefer borrowing methods from the prototype instead of the instance. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer .querySelector() over .getElementById(), .querySelectorAll() over .getElementsByClassName() and .getElementsByTagName().

org.openrewrite.codemods.cleanup.javascript.PreferQuerySelector

Prefer .querySelector() over .getElementById(), .querySelectorAll() over .getElementsByClassName() and .getElementsByTagName(). See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Reflect.apply() over Function#apply().

org.openrewrite.codemods.cleanup.javascript.PreferReflectApply

Prefer Reflect.apply() over Function#apply(). See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer RegExp#test() over String#match() and RegExp#exec().

org.openrewrite.codemods.cleanup.javascript.PreferRegexpTest

Prefer RegExp#test() over String#match() and RegExp#exec(). See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Set#has() over Array#includes() when checking for existence or non-existence.

org.openrewrite.codemods.cleanup.javascript.PreferSetHas

Prefer Set#has() over Array#includes() when checking for existence or non-existence. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer using Set#size instead of Array#length.

org.openrewrite.codemods.cleanup.javascript.PreferSetSize

Prefer using Set#size instead of Array#length. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer the spread operator over Array.from(), Array#concat(), Array#{slice,toSpliced}() and String#split('').

org.openrewrite.codemods.cleanup.javascript.PreferSpread

Prefer the spread operator over Array.from(), Array#concat(), Array#{slice,toSpliced}() and String#split(''). See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer String#replaceAll() over regex searches with the global flag.

org.openrewrite.codemods.cleanup.javascript.PreferStringReplaceAll

Prefer String#replaceAll() over regex searches with the global flag. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer String#slice() over String#substr() and String#substring().

org.openrewrite.codemods.cleanup.javascript.PreferStringSlice

Prefer String#slice() over String#substr() and String#substring(). See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer String#startsWith() & String#endsWith() over RegExp#test().

org.openrewrite.codemods.cleanup.javascript.PreferStringStartsEndsWith

Prefer String#startsWith() & String#endsWith() over RegExp#test(). See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer String#trimStart() / String#trimEnd() over String#trimLeft() / String#trimRight().

org.openrewrite.codemods.cleanup.javascript.PreferStringTrimStartEnd

Prefer String#trimStart() / String#trimEnd() over String#trimLeft() / String#trimRight(). See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer switch over multiple else-if.

org.openrewrite.codemods.cleanup.javascript.PreferSwitch

Prefer switch over multiple else-if. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer ternary expressions over simple if-else statements.

org.openrewrite.codemods.cleanup.javascript.PreferTernary

Prefer ternary expressions over simple if-else statements. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce throwing TypeError in type checking conditions.

org.openrewrite.codemods.cleanup.javascript.PreferTypeError

Enforce throwing TypeError in type checking conditions. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prevent abbreviations.

org.openrewrite.codemods.cleanup.javascript.PreventAbbreviations

Prevent abbreviations. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce consistent relative URL style.

org.openrewrite.codemods.cleanup.javascript.RelativeUrlStyle

Enforce consistent relative URL style. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce using the separator argument with Array#join().

org.openrewrite.codemods.cleanup.javascript.RequireArrayJoinSeparator

Enforce using the separator argument with Array#join(). See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce using the digits argument with Number#toFixed().

org.openrewrite.codemods.cleanup.javascript.RequireNumberToFixedDigitsArgument

Enforce using the digits argument with Number#toFixed(). See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce better string content.

org.openrewrite.codemods.cleanup.javascript.StringContent

Enforce better string content. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce consistent brace style for case clauses.

org.openrewrite.codemods.cleanup.javascript.SwitchCaseBraces

Enforce consistent brace style for case clauses. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Fix whitespace-insensitive template indentation.

org.openrewrite.codemods.cleanup.javascript.TemplateIndent

Fix whitespace-insensitive template indentation. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enforce consistent case for text encoding identifiers.

org.openrewrite.codemods.cleanup.javascript.TextEncodingIdentifierCase

Enforce consistent case for text encoding identifiers. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Require new when throwing an error.

org.openrewrite.codemods.cleanup.javascript.ThrowNewError

Require new when throwing an error. See rule details

Data tables:

  • org.openrewrite.codemods.ESLintMessages: Errors and warnings as reported by ESLint.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade Angular versions

org.openrewrite.codemods.migrate.angular.ApplyAngularCLI

Run ng update to upgrade Angular CLI and Angular Core to the specified version.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update to Angular v19

org.openrewrite.codemods.migrate.angular.v19

Upgrade to Angular v19

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update to Angular v18

org.openrewrite.codemods.migrate.angular.v18

Upgrade to Angular v18

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update to Angular v17

org.openrewrite.codemods.migrate.angular.v17

Upgrade to Angular v17

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update to Angular v16

org.openrewrite.codemods.migrate.angular.v16

Upgrade to Angular v16

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update to Angular v15

org.openrewrite.codemods.migrate.angular.v15

Upgrade to Angular v15

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change List#add to List#plus and verify.

io.moderne.compiled.verification.ChangeListMethodAndVerify

We know this won't compile.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Verify compilation

io.moderne.compiled.verification.VerifyCompilation

This is a task that runs after another recipe to verify that the changes made by that recipe would result in a successful compilation.

Data tables:

  • io.moderne.compiled.table.ABITraces: ASM trace of the ABI of types needed to perform compile verification.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Comprehend code

io.moderne.knowledge.ComprehendCode

Use LLMs to add inferred knowledge to the code.

Data tables:

  • io.moderne.knowledge.table.ClassDescriptions: The inferred knowledge about classes in the codebase, as provided by an LLM.
  • io.moderne.knowledge.table.MethodDescriptions: The inferred knowledge about methods in the codebase, as provided by an LLM.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Code comprehension with unit test examples

io.moderne.knowledge.ComprehendCodeWithUnitTestExamples

First runs a scanning recipe to grab all unit tests, then supplements the unit tests examples for the AI-generate descriptions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update the README for an OpenRewrite recipe repository

io.moderne.knowledge.docs.UpdateOpenRewriteReadme

Updates the README periodically to reflect the latest contents of recipe projects.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Improve recipe descriptors

io.moderne.moddy.ImproveRecipeDescriptors

Improving recipe display names and descriptions in turn improves Moddy.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update README

io.moderne.knowledge.docs.UpdateReadme

Generate a README file for the project, containing information about the project inferred from its knowledge graph.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Search for a class that uses the given design technique

io.moderne.knowledge.search.SearchDesignTechnique

Search for a class that uses the given design technique.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change resource version

org.openrewrite.concourse.ChangeResourceVersion

Pin or unpin a resource to a particular version.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find resource

org.openrewrite.concourse.FindResource

Find a Concourse resource by name.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update git resource source.uri references

org.openrewrite.concourse.UpdateGitResourceUri

Update git resource source.uri URI values to point to a new URI value.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find pinned resources by type

org.openrewrite.concourse.search.FindPinnedResource

Find resources of a particular type that have pinned versions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change Concourse value

org.openrewrite.concourse.ChangeValue

Change every value matching the key pattern.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find privileged resource_type definitions.

org.openrewrite.concourse.search.FindPrivilegedResourceType

By default, resource_type definitions are unprivileged.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace @Cucumber with @Suite

org.openrewrite.cucumber.jvm.CucumberAnnotationToSuite

Replace @Cucumber with @Suite and @SelectClasspathResource(&quot;cucumber/annotated/class/package&quot;).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace cucumber-java8 hook definition with cucumber-java

org.openrewrite.cucumber.jvm.CucumberJava8HookDefinitionToCucumberJava

Replace LambdaGlue hook definitions with new annotated methods with the same body.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace cucumber-java8 step definitions with cucumber-java

org.openrewrite.cucumber.jvm.CucumberJava8StepDefinitionToCucumberJava

Replace StepDefinitionBody methods with StepDefinitionAnnotations on new methods with the same body.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Drop SummaryPrinter

org.openrewrite.cucumber.jvm.DropSummaryPrinter

Replace SummaryPrinter with Plugin, if not already present.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace cucumber-java step definition regexes with Cucumber expressions

org.openrewrite.cucumber.jvm.RegexToCucumberExpression

Strip regex prefix and suffix from step annotation expressions arguments where possible.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade to Cucumber-JVM 7.x

org.openrewrite.cucumber.jvm.UpgradeCucumber7x

Upgrade to Cucumber-JVM 7.x from any previous version.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade to Cucumber-JVM 5.x

org.openrewrite.cucumber.jvm.UpgradeCucumber5x

Upgrade to Cucumber-JVM 5.x from any previous version.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade to Cucumber-JVM 2.x

org.openrewrite.cucumber.jvm.UpgradeCucumber2x

Upgrade to Cucumber-JVM 2.x from any previous version.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate cucumber-java8 to cucumber-java

org.openrewrite.cucumber.jvm.CucumberJava8ToJava

Migrates cucumber-java8 step definitions and LambdaGlue hooks to cucumber-java annotated methods.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Cucumber to JUnit test @Suite

org.openrewrite.cucumber.jvm.CucumberToJunitPlatformSuite

Migrates Cucumber tests to JUnit test @Suite.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find uses of docker base images

org.openrewrite.docker.search.FindDockerImageUses

Produce an impact analysis of base images used in Dockerfiles, .gitlab-ci files, Kubernetes Deployment file, etc.

Data tables:

  • org.openrewrite.docker.table.DockerBaseImages: Records the FROM block of Dockerfiles.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade a .NET project using upgrade-assistant

org.openrewrite.dotnet.UpgradeAssistant

Run upgrade-assistant upgrade across a repository to upgrade projects to a newer version of .NET.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Analyze a .NET project using upgrade-assistant

org.openrewrite.dotnet.UpgradeAssistantAnalyze

Run upgrade-assistant analyze across a repository to analyze changes required to upgrade projects to a newer version of .NET. This recipe will generate an org.openrewrite.dotnet.UpgradeAssistantAnalysis data table containing the report details.

Data tables:

  • org.openrewrite.dotnet.UpgradeAssistantAnalysis: .NET project upgrade analysis report generated by upgrade-assistant.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade to .NET 6.0 using upgrade-assistant

org.openrewrite.dotnet.MigrateToNet6

Run upgrade-assistant upgrade across a repository to upgrade projects to .NET 6.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade to .NET 7.0 using upgrade-assistant

org.openrewrite.dotnet.MigrateToNet7

Run upgrade-assistant upgrade across a repository to upgrade projects to .NET 7.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade to .NET 8.0 using upgrade-assistant

org.openrewrite.dotnet.MigrateToNet8

Run upgrade-assistant upgrade across a repository to upgrade projects to .NET 8.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade to .NET 9.0 using upgrade-assistant

org.openrewrite.dotnet.MigrateToNet9

Run upgrade-assistant upgrade across a repository to upgrade projects to .NET 9.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add annotation if target annotations exist

org.openrewrite.java.dropwizard.annotation.AddClassAnnotationIfAnnotationExists

Adds annotation if class has any of the specified target annotations.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add annotation if target supertypes exist

org.openrewrite.java.dropwizard.annotation.AddClassAnnotationIfSuperTypeExists

Adds annotation if class extends or implements any of the specified target types.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Combined dependency management to remove and exclude

org.openrewrite.java.dropwizard.config.RemoveAndExcludeDependency

Combines excluding transitive dependencies and removing direct dependencies.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove methods referencing specified package

org.openrewrite.java.dropwizard.general.RemoveMethodsByPackage

Removes any method that has a return type or parameter type from the specified package.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove class variables matching package filter

org.openrewrite.java.dropwizard.general.RemoveVariablesByPackage

Removes class-level variables from classes in the specified package.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change superclass

org.openrewrite.java.dropwizard.method.ChangeSuperType

Changes the superclass of a specified class to a new superclass.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove supertype by fully qualified name matches

org.openrewrite.java.dropwizard.method.RemoveSuperTypeByType

Removes a specified type from class extends or implements clauses.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove unnecessary @Override annotations

org.openrewrite.java.dropwizard.method.RemoveUnnecessaryOverride

Removes @Override annotations from methods that don't actually override or implement any method. This helps maintain clean code by removing incorrect annotations that could be misleading.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove super calls when the class does not extend another class

org.openrewrite.java.dropwizard.method.RemoveUnnecessarySuperCalls

Removes calls to super(...) or super.someMethod(...) if the class does not have a real superclass besides java.lang.Object.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add application.properties if missing

org.openrewrite.java.dropwizard.AddMissingApplicationProperties

This recipe creates an application.properties file in the resources folder if it does not exist.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add Core Example Properties

org.openrewrite.java.dropwizard.AddCoreExampleProperties

Adds core example properties to the application.properties file.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add Spring Boot Actuator Configuration

org.openrewrite.java.dropwizard.AddActuatorConfiguration

Configures Spring Boot Actuator endpoints and health checks in application.properties.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add Hibernate Configuration

org.openrewrite.java.dropwizard.AddHibernateConfiguration

Configures Spring Boot Hibernate and JPA settings in application.properties.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add Jersey Configuration

org.openrewrite.java.dropwizard.AddJerseyConfiguration

Configures essential Jersey properties in Spring Boot that complement the JerseyConfig class.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Dropwizard to Spring Boot

org.openrewrite.java.dropwizard.MigrateDropwizardToSpringBoot

Apply various changes to migrate Dropwizard applications to Spring Boot.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Create Spring Boot Application Entry Point

org.openrewrite.java.dropwizard.CoreSetup

Creates the main Spring Boot application class.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Add Spring Boot Actuator

org.openrewrite.java.dropwizard.MigrateHealthChecksAndMetrics

Configures Spring Boot Actuator with basic health endpoints.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Convert Health Check Implementations

org.openrewrite.java.dropwizard.ModifyDropwizardHealthChecksToSpringVariants

Transforms Dropwizard HealthCheck classes to Spring Boot HealthIndicator.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Configuration Class

org.openrewrite.java.dropwizard.MigrateConfigurationClass

Converts Dropwizard Configuration to Spring Boot format.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Resource Classes

org.openrewrite.java.dropwizard.MigrateResourcesToSpringJersey

Converts Dropwizard Resources to Spring Boot format.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Hibernate

org.openrewrite.java.dropwizard.MigrateHibernate

Converts Dropwizard Resources to Spring Boot format.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Health Checks to Spring Boot

org.openrewrite.java.dropwizard.MigrateTests

Converts Dropwizard tests to Spring Boot format.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Health Checks to Spring Boot

org.openrewrite.java.dropwizard.MigrateSecurity

Converts Dropwizard health checks to Spring Boot format.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Clean up various issues with the code.

org.openrewrite.java.dropwizard.MigrateTasksAndCommands

Clean up the code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Clean up various issues with the code.

org.openrewrite.java.dropwizard.CodeCleanup

Clean up the code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace @Timed (Dropwizard) with @Timed (Micrometer)

org.openrewrite.java.dropwizard.annotation.micrometer.CodahaleTimedToMicrometerTimed

Replaces Dropwizard's @Timed annotation with Micrometer's @Timed annotation, preserving name (mapped to value), absolute, and description attributes.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove a boolean feature flag for feature key

org.openrewrite.featureflags.RemoveBooleanFlag

Replace method invocations for feature key with value, and simplify constant if branch execution.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove a double feature flag for feature key

org.openrewrite.featureflags.RemoveDoubleFlag

Replace method invocations for feature key with value, and simplify constant if branch execution.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove an integer feature flag for feature key

org.openrewrite.featureflags.RemoveIntegerFlag

Replace method invocations for feature key with value, and simplify constant if branch execution.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove a String feature flag for feature key

org.openrewrite.featureflags.RemoveStringFlag

Replace method invocations for feature key with value, and simplify constant if branch execution.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove FF4j's check for feature key

org.openrewrite.featureflags.ff4j.RemoveCheck

Replace check() invocations for featureKey with replacementValue, and simplify constant if branch execution.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find a FF4j feature flag

org.openrewrite.featureflags.ff4j.search.FindFeatureFlag

Find a FF4j feature flag.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change the default value for feature key

org.openrewrite.featureflags.launchdarkly.ChangeVariationDefault

Change the default value for Variation invocations for feature key.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate LDUser to LDContext

org.openrewrite.featureflags.launchdarkly.MigrateUserToContext

Migrate from LDUser and LDUser.Builder to LDContext and ContextBuilder.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove LaunchDarkly's boolVariation for feature key

org.openrewrite.featureflags.launchdarkly.RemoveBoolVariation

Replace boolVariation invocations for feature key with value, and simplify constant if branch execution.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove LaunchDarkly's doubleVariation for feature key

org.openrewrite.featureflags.launchdarkly.RemoveDoubleVariation

Replace doubleVariation invocations for feature key with value, and simplify constant if branch execution.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove LaunchDarkly's intVariation for feature key

org.openrewrite.featureflags.launchdarkly.RemoveIntVariation

Replace intVariation invocations for feature key with value, and simplify constant if branch execution.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove LaunchDarkly's boolVariation for feature key

org.openrewrite.featureflags.launchdarkly.RemoveStringVariation

Replace boolVariation invocations for feature key with value, and simplify constant if branch execution.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find a LaunchDarkly feature flag

org.openrewrite.featureflags.launchdarkly.search.FindFeatureFlag

Find a LaunchDarkly feature flag.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove OpenFeature's getBooleanValue for feature key

org.openrewrite.featureflags.openfeature.RemoveGetBooleanValue

Replace getBooleanValue() invocations for featureKey with replacementValue, and simplify constant if branch execution.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove OpenFeature's getDoubleValue for feature key

org.openrewrite.featureflags.openfeature.RemoveGetDoubleValue

Replace getDoubleValue() invocations for featureKey with replacementValue, and simplify constant if branch execution.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove OpenFeature's getIntegerValue for feature key

org.openrewrite.featureflags.openfeature.RemoveGetIntegerValue

Replace getIntegerValue() invocations for featureKey with replacementValue, and simplify constant if branch execution.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove OpenFeature's getStringValue for feature key

org.openrewrite.featureflags.openfeature.RemoveGetStringValue

Replace getStringValue() invocations for featureKey with replacementValue, and simplify constant if branch execution.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find an OpenFeature feature flag

org.openrewrite.featureflags.openfeature.search.FindFeatureFlag

Find an OpenFeature feature flag.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find a feature flag

org.openrewrite.featureflags.search.FindFeatureFlag

Find a feature flag matching method pattern.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove Unleash's isEnabled for feature key

org.openrewrite.featureflags.unleash.RemoveIsEnabled

Replace isEnabled() invocations for featureKey with replacementValue, and simplify constant if branch execution.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find an Unleash feature flag

org.openrewrite.featureflags.unleash.search.FindFeatureFlag

Find an Unleash feature flag.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to LaunchDarkly 6.x

org.openrewrite.featureflags.launchdarkly.UpgradeLaunchDarkly6

This recipe will apply changes commonly needed when migrating to LaunchDarkly 6.x.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to LaunchDarkly 7.x

org.openrewrite.featureflags.launchdarkly.UpgradeLaunchDarkly7

This recipe will apply changes commonly needed when migrating to LaunchDarkly 7.x.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add cron workflow trigger

org.openrewrite.github.AddCronTrigger

The schedule event allows you to trigger a workflow at a scheduled time.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add cooldown periods to Dependabot configuration

org.openrewrite.github.AddDependabotCooldown

Adds a cooldown section to each update configuration in Dependabot files. Supports default-days, semver-major-days, semver-minor-days, semver-patch-days, include, and exclude options. This implements a security best practice where dependencies are not immediately adopted upon release, allowing time for security vendors to identify potential supply chain compromises. Cooldown applies only to version updates, not security updates. Read more about dependency cooldowns. The available configuration options for dependabot are listed on GitHub.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Cancel in-progress workflow when it is triggered again

org.openrewrite.github.AutoCancelInProgressWorkflow

When a workflow is already running and would be triggered again, cancel the existing workflow. See styfle/cancel-workflow-action for details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change GitHub Action

org.openrewrite.github.ChangeAction

Change a GitHub Action in any workflow.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change GitHub Action version

org.openrewrite.github.ChangeActionVersion

Change the version of a GitHub Action in any workflow.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change dependabot schedule interval

org.openrewrite.github.ChangeDependabotScheduleInterval

Change the schedule interval for a given package-ecosystem in a dependabot.yml configuration file. The available configuration options for dependabot are listed on GitHub.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find jobs missing timeout

org.openrewrite.github.FindMissingTimeout

Find GitHub Actions jobs missing a timeout.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Is GitHub Actions Workflow

org.openrewrite.github.IsGitHubActionsWorkflow

Checks if the file is a GitHub Actions workflow file.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use secrets: inherit if possible

org.openrewrite.github.PreferSecretsInheritWorkflow

Pass all secrets to a reusable workflow using secrets: inherit. See Simplify using secrets with reusable workflows for details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use actions/setup-java temurin distribution as they are cached in hosted runners

org.openrewrite.github.PreferTemurinDistributions

Host runners include Temurin by default as part of the hosted tool cache. Using Temurin speeds up builds as there is no need to download and configure the Java SDK with every build.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove all cron triggers

org.openrewrite.github.RemoveAllCronTriggers

Removes all cron triggers from a workflow.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove unused workflow dispatch inputs

org.openrewrite.github.RemoveUnusedWorkflowDispatchInputs

Remove workflow_dispatch inputs that are not referenced anywhere in the workflow file.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove workflow input argument

org.openrewrite.github.RemoveWorkflowInputArgument

Remove a specific input argument from calls to a reusable workflow.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace runners for a job

org.openrewrite.github.ReplaceRunners

Replaces the runners of a given job.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace secret key names in GitHub Actions

org.openrewrite.github.ReplaceSecretKeys

Replace key names used for secrets in GitHub Actions workflow files.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace GitHub Action secret names

org.openrewrite.github.ReplaceSecrets

Replace references to GitHub Action secrets in workflow files.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use actions/setup-java temurin distribution

org.openrewrite.github.SetupJavaAdoptOpenJDKToTemurin

Adopt OpenJDK got moved to Eclipse Temurin and won't be updated anymore. It is highly recommended to migrate workflows from adopt to temurin to keep receiving software and security updates. See more details in the Good-bye AdoptOpenJDK post.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use actions/setup-java IBM semeru distribution

org.openrewrite.github.SetupJavaAdoptOpenj9ToSemeru

Adopt OpenJDK got moved to Eclipse Temurin and won't be updated anymore. It is highly recommended to migrate workflows from adopt-openj9 to IBM semeru to keep receiving software and security updates. See more details in the Good-bye AdoptOpenJDK post.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Setup Java dependency caching

org.openrewrite.github.SetupJavaCaching

GitHub actions supports dependency caching on Maven and Gradle projects. See the blog post.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade actions/setup-java java-version

org.openrewrite.github.SetupJavaUpgradeJavaVersion

Update the Java version used by actions/setup-java if it is below the expected version number.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade actions/setup-node node-version

org.openrewrite.github.SetupNodeUpgradeNodeVersion

Update the Node.js version used by actions/setup-node if it is below the expected version number.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace actions/setup-python with astral-sh/setup-uv

org.openrewrite.github.SetupPythonToUv

Replace actions/setup-python action with astral-sh/setup-uv action for faster Python environment setup and dependency management. Benefits of UV: - Significantly faster package installation and environment setup - Built-in dependency resolution and locking - Integrated caching for improved CI performance - Drop-in replacement for pip workflows Transformations applied: - actions/setup-python@v5astral-sh/setup-uv@v6 - cache: 'pip'enable-cache: 'true' - pip install -r requirements.txtuv sync (configurable strategy) - python -m &lt;module&gt;uv run &lt;module&gt; - Removes unnecessary pip install --upgrade pip steps Sync strategies: - basic: Basic synchronization (uv sync) - locked: Use locked dependencies (uv sync --locked) - full: Install all extras and dev dependencies (uv sync --all-extras --dev) See the UV GitHub integration guide for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade slackapi/slack-github-action

org.openrewrite.github.UpgradeSlackNotificationVersion2

Update the Slack GitHub Action to use version 2.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find jobs without descriptive names

org.openrewrite.github.security.AnonymousJobsRecipe

Find jobs that lack descriptive names, making them harder to identify in workflow runs. Jobs without name properties default to their job ID, which may not be descriptive. Based on zizmor's anonymous-definition audit.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find credential persistence through GitHub Actions artifacts

org.openrewrite.github.security.ArtifactSecurityRecipe

Find workflows that may persist credentials through artifact uploads. This occurs when checkout actions don't disable credential persistence and upload actions include sensitive paths that may contain credentials, SSH keys, or configuration files. Based on zizmor's artipacked audit.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find spoofable bot actor checks

org.openrewrite.github.security.BotConditionsRecipe

Find workflow conditions that check for bot actors in ways that can be spoofed. Bot actor names (like dependabot[bot]) can be easily spoofed by creating accounts with similar names. Use actor_id with numeric comparison instead for secure bot validation. Based on zizmor's bot-conditions audit.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find cache poisoning vulnerabilities

org.openrewrite.github.security.CachePoisoningRecipe

Detects potential cache poisoning vulnerabilities in workflows that use caching and publish artifacts. When workflows use caches during artifact publishing, attackers may be able to poison the cache with malicious content that gets included in published artifacts. Based on zizmor's cache-poisoning audit.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find dangerous workflow triggers

org.openrewrite.github.security.DangerousTriggersRecipe

Detects use of fundamentally insecure workflow triggers like pull_request_target and workflow_run. These triggers run with elevated privileges and are almost always used insecurely, potentially allowing code injection from untrusted sources. Based on zizmor's dangerous-triggers audit.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find excessive permissions

org.openrewrite.github.security.ExcessivePermissionsRecipe

Find overly broad permissions in GitHub Actions workflows. Flags 'write-all' permissions and excessive write permissions that could be scoped more narrowly for security. Based on zizmor's excessive-permissions audit.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find forbidden action usage

org.openrewrite.github.security.ForbiddenUsesRecipe

Find usage of forbidden or dangerous GitHub Actions that have known security vulnerabilities or follow suspicious patterns. Based on zizmor's forbidden-uses audit.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find dangerous GITHUB_ENV usage

org.openrewrite.github.security.GitHubEnvRecipe

Detects dangerous usage of GITHUB_ENV and GITHUB_PATH environment files in workflows with risky triggers like pull_request_target or workflow_run. Writing to these files can allow code injection when the content includes user-controlled data. Based on zizmor's github-env audit.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find hardcoded container credentials

org.openrewrite.github.security.HardcodedCredentialsRecipe

Detects hardcoded credentials in GitHub Actions container configurations. Container registry passwords should use secrets instead of hardcoded values. Based on zizmor's hardcoded-container-credentials audit.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find insecure commands configuration

org.openrewrite.github.security.InsecureCommandsRecipe

Detects when insecure workflow commands are enabled via ACTIONS_ALLOW_UNSECURE_COMMANDS. This environment variable enables dangerous workflow commands that can lead to code injection vulnerabilities. Based on zizmor's insecure-commands audit.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find obfuscated GitHub Actions features

org.openrewrite.github.security.ObfuscationRecipe

Find workflows that use obfuscated action references or expressions that may be attempting to hide malicious behavior. This includes action paths with '.', '..', empty components, or expressions that use quote manipulation to hide their true intent. Based on zizmor's obfuscation audit.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find commit SHAs with potentially mismatched version comments

org.openrewrite.github.security.RefVersionMismatchRecipe

Find GitHub Actions that are pinned to commit SHAs but have version comments that may not match the actual pinned version. This can lead to confusion about which version is actually being used and potential security issues if the comment misleads developers about the pinned version. Based on zizmor's ref-version-mismatch audit.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find unconditional secrets inheritance

org.openrewrite.github.security.SecretsInheritRecipe

Detects when reusable workflows unconditionally inherit all parent secrets via secrets: inherit. This practice can lead to over-privileged workflows and potential secret exposure to called workflows that may not need access to all secrets. Consider explicitly passing only required secrets. Based on zizmor's secrets-inherit audit.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find usage of self-hosted runners

org.openrewrite.github.security.SelfHostedRunnerRecipe

Find workflows that use self-hosted runners, which may have security implications in public repositories due to potential persistence between workflow runs and lack of isolation. Self-hosted runners should be properly secured and ideally ephemeral. Based on zizmor's self-hosted-runner audit.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find template injection vulnerabilities

org.openrewrite.github.security.TemplateInjectionRecipe

Find GitHub Actions workflows vulnerable to template injection attacks. These occur when user-controllable input (like pull request titles, issue bodies, or commit messages) is used directly in run commands or script inputs without proper escaping. Attackers can exploit this to execute arbitrary code. Based on zizmor's template-injection audit.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find manual credentials instead of trusted publishing

org.openrewrite.github.security.TrustedPublishingRecipe

Find workflows that use manual credentials for publishing instead of OIDC trusted publishing. Trusted publishing eliminates the need for long-lived API tokens and provides better security through short-lived, automatically-rotated tokens. Based on zizmor's use-trusted-publishing audit.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Document permissions usage

org.openrewrite.github.security.UndocumentedPermissionsRecipe

Add documentation comments for permissions blocks in GitHub Actions workflows. Documenting permissions helps reviewers understand why specific permissions are needed and ensures security-conscious development practices. Based on zizmor's undocumented-permissions audit.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Pin GitHub Actions to specific commits

org.openrewrite.github.security.UnpinnedActionsRecipe

Pin GitHub Actions to specific commit SHAs for security and reproducibility. Actions pinned to tags or branches can be changed by the action author, while SHA pins are immutable. Based on zizmor's unpinned-uses audit.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Pin Docker images to digests

org.openrewrite.github.security.UnpinnedDockerImagesRecipe

Pin Docker images to specific digest hashes for security and reproducibility. Images pinned to tags can be changed by the image author, while digest pins are immutable. Based on zizmor's unpinned-images audit.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add manual workflow trigger

org.openrewrite.github.AddManualTrigger

You can manually trigger workflow runs. To trigger specific workflows in a repository, use the workflow_dispatch event.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Check for github-actions updates daily

org.openrewrite.github.DependabotCheckForGithubActionsUpdatesDaily

Set dependabot to check for github-actions updates daily.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Check for github-actions updates weekly

org.openrewrite.github.DependabotCheckForGithubActionsUpdatesWeekly

Set dependabot to check for github-actions updates weekly.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find GitHub action secret references

org.openrewrite.github.FindGitHubActionSecretReferences

Help identify and inventory your GitHub secrets that are being used in GitHub actions.

Data tables:

  • org.openrewrite.table.TextMatches: Lines matching simple text search.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate from tibdex/github-app-token to actions/create-github-app-token

org.openrewrite.github.MigrateTibdexGitHubAppTokenToActions

Migrates from tibdex/github-app-token@v2 to actions/create-github-app-token@v2 and updates parameter names from snake_case to kebab-case.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate astral-sh/setup-uv from v6 to v7

org.openrewrite.github.MigrateSetupUvV6ToV7

Migrates astral-sh/setup-uv from v6 to v7. Updates the action version and removes the deprecated server-url input. See the v7.0.0 release notes for breaking changes.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Rename gradle/wrapper-validation-action to gradle/actions/wrapper-validation

org.openrewrite.github.gradle.RenameWrapperValidationAction

Rename the deprecated gradle/wrapper-validation-action to gradle/actions/wrapper-validation@v3.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Rename gradle/gradle-build-action to gradle/actions/setup-gradle

org.openrewrite.github.gradle.RenameGradleBuildActionToSetupGradle

Rename the deprecated gradle/gradle-build-action to gradle/actions/setup-gradle@v3.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace OSSRH secrets with Sonatype secrets

org.openrewrite.github.ReplaceOssrhSecretsWithSonatype

Replace deprecated OSSRH_S01 secrets with new Sonatype secrets in GitHub Actions workflows. This is an example use of the ReplaceSecrets and ReplaceSecretKeys recipes combined used to update the Maven publishing secrets in OpenRewrite's GitHub organization.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

GitHub Actions security insights

org.openrewrite.github.security.GitHubActionsSecurity

Finds potential security issues in GitHub Actions workflows, based on Zizmor security analysis rules.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add GitLab component

org.openrewrite.gitlab.AddComponent

Add a GitLab component to an existing list, or add a new list where none was present.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add GitLab stages

org.openrewrite.gitlab.AddStages

Add or Update the set of stages defined in .gitlab-ci.yml.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add GitLab template

org.openrewrite.gitlab.AddTemplate

Add a GitLab template to an existing list, or add a new list where none was present.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change GitLab Component

org.openrewrite.gitlab.ChangeComponent

Change a GitLab Component in use.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change GitLab template

org.openrewrite.gitlab.ChangeTemplate

Change a GitLab template in use.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove GitLab template

org.openrewrite.gitlab.RemoveTemplate

Remove a GitLab template from use.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find GitLab Component

org.openrewrite.gitlab.search.FindComponent

Find a GitLab Component in use.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find GitLab Template

org.openrewrite.gitlab.search.FindTemplate

Find a GitLab Template in use.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

AddScalarPreferStandardBasicTypesForHibernate5 (Community Edition)

org.openrewrite.hibernate.AddScalarPreferStandardBasicTypes

Prefer the use of StandardBasicTypes.* in NativeQuery.addScalar(...) invocations.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace extends EmptyInterceptor with implements Interceptor and potentially StatementInspector (Community Edition)

org.openrewrite.hibernate.EmptyInterceptorToInterface

In Hibernate 6.0 the Interceptor interface received default implementations therefore the NOOP implementation that could be extended was no longer needed. This recipe migrates 5.x Interceptor#onPrepareStatement(String) to 6.0 StatementInspector#inspect().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace boolean type mappings with converters (Community Edition)

org.openrewrite.hibernate.MigrateBooleanMappings

Replaces type mapping of booleans with appropriate attribute converters.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migration of ResultCheckStyle to Expectation (Community Edition)

org.openrewrite.hibernate.MigrateResultCheckStyleToExpectation

Will migrate the usage of org.hibernate.annotations.ResultCheckStyle to org.hibernate.jdbc.Expectation in @SQLInsert, @SqlUpdate, @SqlDelete and @SqlDeleteAll annotations.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate UserType to Hibernate 6 (Community Edition)

org.openrewrite.hibernate.MigrateUserType

With Hibernate 6 the UserType interface received a type parameter making it more strictly typed. This recipe applies the changes required to adhere to this change.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove invalid @GeneratedValue annotation (Community Edition)

org.openrewrite.hibernate.RemoveInvalidHibernateGeneratedValueAnnotation

Removes @GeneratedValue annotation from fields that are not also annotated with @Id.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace @LazyCollection with jakarta.persistence.FetchType (Community Edition)

org.openrewrite.hibernate.ReplaceLazyCollectionAnnotation

Adds the FetchType to jakarta annotations and deletes @LazyCollection.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

@Type annotation type parameter migration (Community Edition)

org.openrewrite.hibernate.TypeAnnotationParameter

Hibernate 6.x has 'type' parameter of type String replaced with 'value' of type class.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Hibernate 6.0.x (Community Edition)

org.openrewrite.hibernate.MigrateToHibernate60

This recipe will apply changes commonly needed when migrating to Hibernate 6.0.x. The hibernate dependencies will be updated to use the new org.hibernate.orm group ID and the recipe will make changes necessary to use Hibernate with Jakarta EE 9.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Hibernate dependencies to 6.0.x (Community Edition)

org.openrewrite.hibernate.MigrateToHibernateDependencies60

This recipe will migrate any existing dependencies on Hibernate 5.x to the latest 6.0.x release. This migration will include the adjustment to the new org.hibernate.orm group ID. It accounts for artifacts names that both do and do not include the jakarta suffix and it will change both dependencies and managed dependencies.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Rename JavaTypeDescriptor and SqlTypeDescriptor to JavaType and SqlType (Community Edition)

org.openrewrite.hibernate.TypeDescriptorToType

Rename JavaTypeDescriptor and SqlTypeDescriptor to JavaType and SqlType respectively. See https://github.com/hibernate/hibernate-orm/blob/6.0/migration-guide.adoc#type-system for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Hibernate Types to Hypersistence Utils 6.0 (Community Edition)

org.openrewrite.hibernate.MigrateToHypersistenceUtilsHibernate60

This recipe will migrate any existing dependencies on com.vladmihalcea:hibernate-types to io.hypersistence:hypersistence-utils-hibernate-60. This migration will include the adjustment from com.vladmihalcea to io.hypersistence.utils package name.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Hibernate 6.1.x (Community Edition)

org.openrewrite.hibernate.MigrateToHibernate61

This recipe will apply changes commonly needed when migrating to Hibernate 6.1.x. The hibernate dependencies will be updated to use the new org.hibernate.orm group ID and the recipe will make changes necessary to use Hibernate with Jakarta EE 9.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Hibernate 6.2.x (Community Edition)

org.openrewrite.hibernate.MigrateToHibernate62

This recipe will apply changes commonly needed when migrating to Hibernate 6.2.x.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Hibernate Types to Hypersistence Utils 6.2 (Community Edition)

org.openrewrite.hibernate.MigrateToHypersistenceUtilsHibernate62

This recipe will migrate any existing dependencies on io.hypersistence:hypersistence-utils-hibernate-60 to io.hypersistence:hypersistence-utils-hibernate-62.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Hibernate 6.3.x (Community Edition)

org.openrewrite.hibernate.MigrateToHibernate63

This recipe will apply changes commonly needed when migrating to Hibernate 6.3.x.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Hibernate Types to Hypersistence Utils 6.3 (Community Edition)

org.openrewrite.hibernate.MigrateToHypersistenceUtilsHibernate63

This recipe will migrate any existing dependencies on io.hypersistence:hypersistence-utils-hibernate-62 to io.hypersistence:hypersistence-utils-hibernate-63.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Hibernate 6.4.x (Community Edition)

org.openrewrite.hibernate.MigrateToHibernate64

This recipe will apply changes commonly needed when migrating to Hibernate 6.4.x.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Hibernate 6.5.x (Community Edition)

org.openrewrite.hibernate.MigrateToHibernate65

This recipe will apply changes commonly needed when migrating to Hibernate 6.5.x.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Hibernate 6.6.x (Community Edition)

org.openrewrite.hibernate.MigrateToHibernate66

This recipe will apply changes commonly needed when migrating to Hibernate 6.6.x.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Hibernate 7.0.x (Community Edition)

org.openrewrite.hibernate.MigrateToHibernate70

This recipe will apply changes commonly needed when migrating to Hibernate 7.0.x.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Hibernate 7.1.x (Community Edition)

org.openrewrite.hibernate.MigrateToHibernate71

This recipe will apply changes commonly needed when migrating to Hibernate 7.1.x.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Hibernate Validator 8.0.x (Community Edition)

org.openrewrite.hibernate.validator.HibernateValidator_8_0

This recipe will apply changes commonly needed when migrating to Hibernate Validator 8.0.x.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate JSONNode field iterator for Jackson 3

org.openrewrite.java.jackson.Jackson3JsonNodeFieldIterators

JSONNode fields are using Collections instead of Iterator singe Jackson 3. To mimic Jackson 2s behavior an additional call to Collection#iterator()is needed.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove registrations of modules built-in to Jackson 3

org.openrewrite.java.jackson.RemoveBuiltInModuleRegistrations

In Jackson 3, ParameterNamesModule, Jdk8Module, and JavaTimeModule are built into jackson-databind and no longer need to be registered manually. This recipe removes ObjectMapper.registerModule() and MapperBuilder.addModule() calls for these modules.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove redundant Jackson 3 feature flag configurations

org.openrewrite.java.jackson.RemoveRedundantFeatureFlags

Remove ObjectMapper feature flag configurations that set values to their new Jackson 3 defaults. For example, disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) and configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false) are redundant since this is now disabled by default in Jackson 3.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove redundant @JsonProperty argument

org.openrewrite.java.jackson.RemoveRedundantJsonPropertyValue

Remove @JsonProperty annotation or value attribute when the value matches the argument name.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace removed JsonGenerator capability methods with StreamWriteCapability

org.openrewrite.java.jackson.ReplaceStreamWriteCapability

In Jackson 3, JsonGenerator.canWriteBinaryNatively() and canWriteFormattedNumbers() were removed and replaced with the StreamWriteCapability enum. This recipe updates these method calls to use getWriteCapabilities().isEnabled(StreamWriteCapability.*) instead.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Simplify catch clauses for Jackson exceptions

org.openrewrite.java.jackson.SimplifyJacksonExceptionCatch

In Jackson 3, JacksonException and its subtypes extend RuntimeException. This recipe simplifies multi-catch clauses by removing Jackson exception types when RuntimeException is also caught, since catching both is redundant. For example, catch (JacksonException | RuntimeException e) becomes catch (RuntimeException e).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update configuration of serialization inclusion in ObjectMapper for Jackson 3

org.openrewrite.java.jackson.UpdateSerializationInclusionConfiguration

In Jackson 3, mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL) is no longer supported and should be replaced by changeDefaultPropertyInclusion() for both valueInclusion and contentInclusion.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use format alignment ObjectMappers

org.openrewrite.java.jackson.UseFormatAlignedObjectMappers

Replace wrapping ObjectMapper calls with their format aligned implementation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use modern date/time serialization defaults

org.openrewrite.java.jackson.UseModernDateTimeSerialization

Remove redundant @JsonFormat annotations on java.time types that specify ISO-8601 patterns, as Jackson 3 uses ISO-8601 as the default format (with WRITE_DATES_AS_TIMESTAMPS now disabled by default).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate dependencies from Jackson Codehaus (legacy) to FasterXML

org.openrewrite.java.jackson.codehaus.CodehausDependencyToFasterXML

Replace Codehaus Jackson dependencies with FasterXML Jackson dependencies, and add databind if needed.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Jackson @JsonInclude

org.openrewrite.java.jackson.codehaus.JsonIncludeAnnotation

Move Codehaus' @JsonSerialize.include argument to FasterXMLs @JsonInclude annotation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove Codehaus Jackson annotations if doubly annotated

org.openrewrite.java.jackson.codehaus.RemoveDoublyAnnotatedCodehausAnnotations

Remove Codehaus Jackson annotations if they are doubly annotated with Jackson annotations from the com.fasterxml.jackson package.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate serialization annotation processor

org.openrewrite.java.jackson.codehaus.ReplaceSerializationConfigAnnotationIntrospector

Migrate serialization annotation processor to use the codehaus config method.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Transfer @JsonSerialize arguments from Codehaus to FasterXML

org.openrewrite.java.jackson.codehaus.TransferJsonSerializeArgumentsFromCodehausToFasterXML

Transfer @JsonSerialize annotation arguments (using, contentUsing, keyUsing, nullUsing) from Codehaus to FasterXML. If the argument was set already, it will not be transferred.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate from Jackson Codehaus (legacy) to Jackson FasterXML

org.openrewrite.java.jackson.CodehausToFasterXML

In Jackson 2, the package and dependency coordinates moved from Codehaus to FasterXML.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate classes from Jackson Codehaus (legacy) to Jackson FasterXML

org.openrewrite.java.jackson.CodehausClassesToFasterXML

In Jackson 2, the package and dependency coordinates moved from Codehaus to FasterXML.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrates from Jackson 2.x to Jackson 3.x

org.openrewrite.java.jackson.UpgradeJackson_2_3

Migrate applications to the latest Jackson 3.x release. This recipe handles package changes (com.fasterxml.jackson -> tools.jackson), dependency updates, core class renames, exception renames, and method renames (e.g., JsonGenerator.writeObject() -> writePOJO(), JsonParser.getCurrentValue() -> currentValue()).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade Jackson 2.x dependencies to 3.x

org.openrewrite.java.jackson.UpgradeJackson_2_3_Dependencies

Upgrade Jackson Maven dependencies from 2.x to 3.x versions and update group IDs.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove Jackson 2.x modules included in jackson-databind in 3.x.

org.openrewrite.java.jackson.UpgradeJackson_2_3_RemoveModules

Remove Jackson modules such as jackson-module-parameter-names, jackson-datatype-jdk8, and jackson-datatype-jsr310 to depend on jackson-databind in Jackson 3.x.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update Jackson 2.x types to 3.x

org.openrewrite.java.jackson.UpgradeJackson_2_3_TypeChanges

Update Jackson type names including exception types and core class renames.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Rename Jackson 2.x methods to 3.x equivalents

org.openrewrite.java.jackson.UpgradeJackson_2_3_MethodRenames

Rename Jackson methods that were renamed in 3.x (e.g., writeObject() to writePOJO(), getCurrentValue() to currentValue()).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Rename Jackson 2.x methods to 3.x equivalents for JsonGenerator

org.openrewrite.java.jackson.UpgradeJackson_2_3_JsonGeneratorMethodRenames

Rename JsonGenerator methods that were renamed in 3.x (e.g., writeObject() to writePOJO(), getCurrentValue() to currentValue()).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Rename Jackson 2.x methods to 3.x equivalents for JsonParser

org.openrewrite.java.jackson.UpgradeJackson_2_3_JsonParserMethodRenames

Rename JsonParser methods that were renamed in 3.x (e.g., getTextCharacters() to getStringCharacters(), getCurrentValue() to currentValue()).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Rename Jackson 2.x methods to 3.x equivalents for JsonNode

org.openrewrite.java.jackson.UpgradeJackson_2_3_JsonNodeMethodRenames

Rename JsonNode methods that were renamed in 3.x (e.g., elements() to values(), fields() to entries()).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove redundant Jackson 3 feature flag configurations

org.openrewrite.java.jackson.UpgradeJackson_2_3_RemoveRedundantFeatureFlags

Remove ObjectMapper feature flag configurations that are now defaults in Jackson 3.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update Jackson package names from 2.x to 3.x

org.openrewrite.java.jackson.UpgradeJackson_2_3_PackageChanges

Update Jackson package imports from com.fasterxml.jackson to tools.jackson.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Jackson best practices

org.openrewrite.java.jackson.JacksonBestPractices

Apply best practices for using Jackson library, including upgrade to Jackson 2.x and removing redundant annotations.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change Gradle or Maven dependency

org.openrewrite.java.dependencies.ChangeDependency

Change the group ID, artifact ID, and/or the version of a specified Gradle or Maven dependency.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Dependency insight for Gradle and Maven

org.openrewrite.java.dependencies.DependencyInsight

Finds dependencies, including transitive dependencies, in both Gradle and Maven projects. Matches within all Gradle dependency configurations and Maven scopes.

Data tables:

  • org.openrewrite.maven.table.DependenciesInUse: Direct and transitive dependencies in use.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Dependency report

org.openrewrite.java.dependencies.DependencyList

Emits a data table detailing all Gradle and Maven dependencies. This recipe makes no changes to any source file.

Data tables:

  • org.openrewrite.java.dependencies.table.DependencyListReport: Lists all Gradle and Maven dependencies
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find Maven and Gradle dependencies

org.openrewrite.java.dependencies.FindDependency

Finds direct dependencies declared in Maven and Gradle build files. This does not search transitive dependencies. To detect both direct and transitive dependencies use org.openrewrite.java.dependencies.DependencyInsight This recipe works for both Maven and Gradle projects.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Does not include dependency for Gradle and Maven

org.openrewrite.java.dependencies.search.DoesNotIncludeDependency

A precondition which returns false if visiting a Gradle file / Maven pom which includes the specified dependency in the classpath of some Gradle configuration / Maven scope. For compatibility with multimodule projects, this should most often be applied as a precondition.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add Gradle or Maven dependency

org.openrewrite.java.dependencies.AddDependency

For a Gradle project, add a gradle dependency to a build.gradle file in the correct configuration based on where it is used. Or For a maven project, Add a Maven dependency to a pom.xml file in the correct scope based on where it is used.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Dependency resolution diagnostic

org.openrewrite.java.dependencies.DependencyResolutionDiagnostic

Recipes which manipulate dependencies must be able to successfully access the artifact repositories and resolve dependencies from them. This recipe produces two data tables used to understand the state of dependency resolution. The Repository accessibility report lists all the artifact repositories known to the project and whether respond to network access. The network access is attempted while the recipe is run and so is representative of current conditions. The Gradle dependency configuration errors lists all the dependency configurations that failed to resolve one or more dependencies when the project was parsed. This is representative of conditions at the time the LST was parsed.

Data tables:

  • org.openrewrite.java.dependencies.table.RepositoryAccessibilityReport: Listing of all dependency repositories and whether they are accessible.
  • org.openrewrite.java.dependencies.table.GradleDependencyConfigurationErrors: Records Gradle dependency configurations which failed to resolve during parsing. Partial success/failure is common, a failure in this list does not mean that every dependency failed to resolve.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find relocated dependencies

org.openrewrite.java.dependencies.RelocatedDependencyCheck

Find Maven and Gradle dependencies and Maven plugins that have relocated to a new groupId or artifactId. Relocation information comes from the oga-maven-plugin maintained by Jonathan Lermitage, Filipe Roque and others. This recipe makes no changes to any source file by default. Add changeDependencies=true to change dependencies, but note that you might need to run additional recipes to update imports and adopt other breaking changes.

Data tables:

  • org.openrewrite.java.dependencies.table.RelocatedDependencyReport: A list of dependencies in use that have relocated.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove a Gradle or Maven dependency

org.openrewrite.java.dependencies.RemoveDependency

For Gradle project, removes a single dependency from the dependencies section of the build.gradle. For Maven project, removes a single dependency from the &lt;dependencies&gt; section of the pom.xml.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade Gradle or Maven dependency versions

org.openrewrite.java.dependencies.UpgradeDependencyVersion

For Gradle projects, upgrade the version of a dependency in a build.gradle file. Supports updating dependency declarations of various forms: * String notation: &quot;group:artifact:version&quot; * Map notation: group: 'group', name: 'artifact', version: 'version' It is possible to update version numbers which are defined earlier in the same file in variable declarations. For Maven projects, upgrade the version of a dependency by specifying a group ID and (optionally) an artifact ID using Node Semver advanced range selectors, allowing more precise control over version updates to patch or minor releases.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade transitive Gradle or Maven dependencies

org.openrewrite.java.dependencies.UpgradeTransitiveDependencyVersion

Upgrades the version of a transitive dependency in a Maven pom.xml or Gradle build.gradle. Leaves direct dependencies unmodified. Can be paired with the regular Upgrade Dependency Version recipe to upgrade a dependency everywhere, regardless of whether it is direct or transitive.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find the oldest matching dependency version in use

org.openrewrite.java.dependencies.search.FindMinimumDependencyVersion

The oldest dependency version in use is the lowest dependency version in use in any source set of any subproject of a repository. It is possible that, for example, the main source set of a project uses Jackson 2.11, but a test source set uses Jackson 2.16. In this case, the oldest Jackson version in use is Java 2.11.

Data tables:

  • org.openrewrite.maven.table.DependenciesInUse: Direct and transitive dependencies in use.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find minimum JUnit version

org.openrewrite.java.dependencies.search.FindMinimumJUnitVersion

A recipe to find the minimum version of JUnit dependencies. This recipe is designed to return the minimum version of JUnit in a project. It will search for JUnit 4 and JUnit 5 dependencies in the project. If both versions are found, it will return the minimum version of JUnit 4. If a minimumVersion is provided, the recipe will search to see if the minimum version of JUnit used by the project is no lower than the minimumVersion. For example: if the minimumVersion is 4, and the project has JUnit 4.12 and JUnit 5.7, the recipe will return JUnit 4.12. If the project has only JUnit 5.7, the recipe will return JUnit 5.7. Another example: if the minimumVersion is 5, and the project has JUnit 4.12 and JUnit 5.7, the recipe will not return any results.

Data tables:

  • org.openrewrite.maven.table.DependenciesInUse: Direct and transitive dependencies in use.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Module has dependency

org.openrewrite.java.dependencies.search.ModuleHasDependency

Searches for both Gradle and Maven modules that have a dependency matching the specified groupId and artifactId. Places a SearchResult marker on all sources within a module with a matching dependency. This recipe is intended to be used as a precondition for other recipes. For example this could be used to limit the application of a spring boot migration to only projects that use spring-boot-starter, limiting unnecessary upgrading. If the search result you want is instead just the build.gradle(.kts) or pom.xml file applying the plugin, use the FindDependency recipe instead.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Repository has dependency

org.openrewrite.java.dependencies.search.RepositoryHasDependency

Searches for both Gradle and Maven modules that have a dependency matching the specified groupId and artifactId. Places a SearchResult marker on all sources within a repository with a matching dependency. This recipe is intended to be used as a precondition for other recipes. For example this could be used to limit the application of a spring boot migration to only projects that use a springframework dependency, limiting unnecessary upgrading. If the search result you want is instead just the build.gradle(.kts) or pom.xml file applying the plugin, use the FindDependency recipe instead.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Dependency insight for C#

org.openrewrite.csharp.dependencies.DependencyInsight

Finds dependencies in *.csproj and packages.config.

Data tables:

  • org.openrewrite.maven.table.DependenciesInUse: Direct and transitive dependencies in use.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade C# dependency versions

org.openrewrite.csharp.dependencies.UpgradeDependencyVersion

Upgrades dependencies in *.csproj and packages.config.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find text-direction changes

org.openrewrite.java.security.FindTextDirectionChanges

Finds unicode control characters which can change the direction text is displayed in. These control characters can alter how source code is presented to a human reader without affecting its interpretation by tools like compilers. So a malicious patch could pass code review while introducing vulnerabilities. Note that text direction-changing unicode control characters aren't inherently malicious. These characters can appear for legitimate reasons in code written in or dealing with right-to-left languages. See: https://trojansource.codes/ for more information.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Fix CWE-338 with SecureRandom

org.openrewrite.java.security.FixCwe338

Use a cryptographically strong pseudo-random number generator (PRNG).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Improper privilege management

org.openrewrite.java.security.ImproperPrivilegeManagement

Marking code as privileged enables a piece of trusted code to temporarily enable access to more resources than are available directly to the code that called it.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Partial path traversal vulnerability

org.openrewrite.java.security.PartialPathTraversalVulnerability

Replaces dir.getCanonicalPath().startsWith(parent.getCanonicalPath(), which is vulnerable to partial path traversal attacks, with the more secure dir.getCanonicalFile().toPath().startsWith(parent.getCanonicalFile().toPath()). To demonstrate this vulnerability, consider &quot;/usr/outnot&quot;.startsWith(&quot;/usr/out&quot;). The check is bypassed although /outnot is not under the /out directory. It's important to understand that the terminating slash may be removed when using various String representations of the File object. For example, on Linux, println(new File(&quot;/var&quot;)) will print /var, but println(new File(&quot;/var&quot;, &quot;/&quot;) will print /var/; however, println(new File(&quot;/var&quot;, &quot;/&quot;).getCanonicalPath()) will print /var.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Regular Expression Denial of Service (ReDOS)

org.openrewrite.java.security.RegularExpressionDenialOfService

ReDoS is a Denial of Service attack that exploits the fact that most Regular Expression implementations may reach extreme situations that cause them to work very slowly (exponentially related to input size). See the OWASP description of this attack here for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Secure random

org.openrewrite.java.security.SecureRandom

Use cryptographically secure Pseudo Random Number Generation in the "main" source set. Replaces instantiation of java.util.Random with java.security.SecureRandom.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

SecureRandom seeds are not constant or predictable

org.openrewrite.java.security.SecureRandomPrefersDefaultSeed

Remove SecureRandom#setSeed(*) method invocations having constant or predictable arguments.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use secure temporary file creation

org.openrewrite.java.security.SecureTempFileCreation

java.io.File.createTempFile() has exploitable default file permissions. This recipe migrates to the more secure java.nio.file.Files.createTempFile().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use Files#createTempDirectory

org.openrewrite.java.security.UseFilesCreateTempDirectory

Use Files#createTempDirectory when the sequence File#createTempFile(..)->File#delete()->File#mkdir() is used for creating a temp directory.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Zip slip

org.openrewrite.java.security.ZipSlip

Zip slip is an arbitrary file overwrite critical vulnerability, which typically results in remote command execution. A fuller description of this vulnerability is available in the Snyk documentation on it.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Insecure JMS deserialization

org.openrewrite.java.security.marshalling.InsecureJmsDeserialization

JMS Object messages depend on Java Serialization for marshalling/unmarshalling of the message payload when ObjectMessage#getObject is called. Deserialization of untrusted data can lead to security flaws.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Secure the use of Jackson default typing

org.openrewrite.java.security.marshalling.SecureJacksonDefaultTyping

See the blog post on this subject.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Secure the use of SnakeYAML's constructor

org.openrewrite.java.security.marshalling.SecureSnakeYamlConstructor

See the paper on this subject.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find sensitive API endpoints

org.openrewrite.java.security.search.FindSensitiveApiEndpoints

Find data models exposed by REST APIs that contain sensitive information like PII and secrets.

Data tables:

  • org.openrewrite.java.security.table.SensitiveApiEndpoints: The API endpoints that expose sensitive data.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find JWT secrets

org.openrewrite.java.security.secrets.FindJwtSecrets

Locates JWTs stored in plain text in code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find secrets with regular expressions

org.openrewrite.java.security.secrets.FindSecretsByPattern

A secret is a literal that matches any one of the provided patterns.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find Slack secrets

org.openrewrite.java.security.secrets.FindSlackSecrets

Locates Slack secrets stored in plain text in code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Insecure cookies

org.openrewrite.java.security.servlet.CookieSetSecure

Check for use of insecure cookies. Cookies should be marked as secure. This ensures that the cookie is sent only over HTTPS to prevent cross-site scripting attacks.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Secure Spring service exporters

org.openrewrite.java.security.spring.InsecureSpringServiceExporter

The default Java deserialization mechanism is available via ObjectInputStream class. This mechanism is known to be vulnerable. If an attacker can make an application deserialize malicious data, it may result in arbitrary code execution. Spring’s RemoteInvocationSerializingExporter uses the default Java deserialization mechanism to parse data. As a result, all classes that extend it are vulnerable to deserialization attacks. The Spring Framework contains at least HttpInvokerServiceExporter and SimpleHttpInvokerServiceExporter that extend RemoteInvocationSerializingExporter. These exporters parse data from the HTTP body using the unsafe Java deserialization mechanism. See the full blog post by Artem Smotrakov on CVE-2016-1000027 from which the above description is excerpted.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find hard-coded loopback IPv4 addresses

org.openrewrite.text.FindHardcodedLoopbackAddresses

Locates mentions of hard-coded IPv4 addresses from the loopback IP range. The loopback IP range includes 127.0.0.0 to 127.255.255.255. This detects the entire localhost/loopback subnet range, not just the commonly used 127.0.0.1.

Data tables:

  • org.openrewrite.text.table.HardcodedPrivateIPAddresses: This table lists locations of hardcoded private IPv4 addresses and their value found in source files.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find hard-coded private IPv4 addresses

org.openrewrite.text.FindHardcodedPrivateIPAddresses

Locates mentions of hard-coded IPv4 addresses from private IP ranges. Private IP ranges include: * 192.168.0.0 to 192.168.255.255 * 10.0.0.0 to 10.255.255.255 * 172.16.0.0 to 172.31.255.255 It is not detecting the localhost subnet 127.0.0.0 to 127.255.255.255.

Data tables:

  • org.openrewrite.text.table.HardcodedPrivateIPAddresses: This table lists locations of hardcoded private IPv4 addresses and their value found in source files.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove hard-coded IP addresses from comments

org.openrewrite.text.RemoveHardcodedIPAddressesFromComments

Removes hard-coded IPv4 addresses from comments when they match private IP ranges or loopback addresses. This targets IP addresses that are commented out in various comment formats: Private IP ranges: * 192.168.0.0 to 192.168.255.255 * 10.0.0.0 to 10.255.255.255 * 172.16.0.0 to 172.31.255.255 Loopback IP range: * 127.0.0.0 to 127.255.255.255 Supported comment formats: * C-style line comments (//) * C-style block comments (/* */) * Shell/Python style comments (#) * XML comments (&lt;!-- --&gt;) * YAML comments (#) * Properties file comments (# or !) For line comments, the entire line is removed. For block comments, only the IP address is removed.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find and fix vulnerable Nuget dependencies

org.openrewrite.csharp.dependencies.DependencyVulnerabilityCheck

This software composition analysis (SCA) tool detects and upgrades dependencies with publicly disclosed vulnerabilities. This recipe both generates a report of vulnerable dependencies and upgrades to newer versions with fixes. This recipe only upgrades to the latest patch version. If a minor or major upgrade is required to reach the fixed version, this recipe will not make any changes. Vulnerability information comes from the GitHub Security Advisory Database, which aggregates vulnerability data from several public databases, including the National Vulnerability Database maintained by the United States government. Dependencies following Semantic Versioning will see their patch version updated where applicable.

Data tables:

  • org.openrewrite.csharp.dependencies.table.VulnerabilityReport: A vulnerability report that includes detailed information about the affected artifact and the corresponding CVEs.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find licenses in use in third-party dependencies

org.openrewrite.java.dependencies.DependencyLicenseCheck

Locates and reports on all licenses in use.

Data tables:

  • org.openrewrite.java.dependencies.table.LicenseReport: Contains a license report of third-party dependencies.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find and fix vulnerable dependencies

org.openrewrite.java.dependencies.DependencyVulnerabilityCheck

This software composition analysis (SCA) tool detects and upgrades dependencies with publicly disclosed vulnerabilities. This recipe both generates a report of vulnerable dependencies and upgrades to newer versions with fixes. This recipe by default only upgrades to the latest patch version. If a minor or major upgrade is required to reach the fixed version, this can be controlled using the maximumUpgradeDelta option. Vulnerability information comes from the GitHub Security Advisory Database, which aggregates vulnerability data from several public databases, including the National Vulnerability Database maintained by the United States government. Upgrades dependencies versioned according to Semantic Versioning. ## Customizing Vulnerability Data This recipe can be customized by extending DependencyVulnerabilityCheckBase and overriding the vulnerability data sources: - baselineVulnerabilities(ExecutionContext ctx): Provides the default set of known vulnerabilities. The base implementation loads vulnerability data from the GitHub Security Advisory Database CSV file using ResourceUtils.parseResourceAsCsv(). Override this method to replace the entire vulnerability dataset with your own curated list. - supplementalVulnerabilities(ExecutionContext ctx): Allows adding custom vulnerability data beyond the baseline. The base implementation returns an empty list. Override this method to add organization-specific vulnerabilities, internal security advisories, or vulnerabilities from additional sources while retaining the baseline GitHub Advisory Database. Both methods return List&lt;Vulnerability&gt; objects. Vulnerability data can be loaded from CSV files using ResourceUtils.parseResourceAsCsv(path, Vulnerability.class, consumer) or constructed programmatically. To customize, extend DependencyVulnerabilityCheckBase and override one or both methods depending on your needs. For example, override supplementalVulnerabilities() to add custom CVEs while keeping the standard vulnerability database, or override baselineVulnerabilities() to use an entirely different vulnerability data source. Last updated: 2025-12-15T1102.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.java.dependencies.table.VulnerabilityReport: A vulnerability report that includes detailed information about the affected artifact and the corresponding CVEs.
  • org.openrewrite.java.dependencies.table.DependencyOriginsReport: A report that maps dependencies to their originating root node represented as dependency graph. The information can be used to understand which direct dependencies are responsible for bringing in specific transitive dependencies.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove unused dependencies

org.openrewrite.java.dependencies.RemoveUnusedDependencies

Scans through source code collecting references to types and methods, removing any dependencies that are not used from Maven or Gradle build files. This recipe takes reflective access into account: When reflective access to a class is made unambiguously via a string literal, such as: Class.forName(&quot;java.util.List&quot;) that is counted correctly. When reflective access to a class is made ambiguously via anything other than a string literal no dependencies will be removed. This recipe takes transitive dependencies into account: When a direct dependency is not used but a transitive dependency it brings in is in use the direct dependency is not removed.

Data tables:

  • org.openrewrite.java.dependencies.table.DependencyUsageEvidence: Evidence showing that a dependency is in use in the project.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Software bill of materials

org.openrewrite.java.dependencies.SoftwareBillOfMaterials

Produces a software bill of materials (SBOM) for a project. An SBOM is a complete list of all dependencies used in a project, including transitive dependencies. The produced SBOM is in the CycloneDX XML format. Supports Gradle and Maven. Places a file named sbom.xml adjacent to the Gradle or Maven build file.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

XML parser XXE vulnerability

org.openrewrite.java.security.XmlParserXXEVulnerability

Avoid exposing dangerous features of the XML parser by updating certain factory settings.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enable CSRF attack prevention

org.openrewrite.java.security.spring.CsrfProtection

Cross-Site Request Forgery (CSRF) is a type of attack that occurs when a malicious web site, email, blog, instant message, or program causes a user's web browser to perform an unwanted action on a trusted site when the user is authenticated. See the full OWASP cheatsheet.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prevent clickjacking

org.openrewrite.java.security.spring.PreventClickjacking

The frame-ancestors directive can be used in a Content-Security-Policy HTTP response header to indicate whether or not a browser should be allowed to render a page in a &lt;frame&gt; or &lt;iframe&gt;. Sites can use this to avoid Clickjacking attacks by ensuring that their content is not embedded into other sites.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find Jackson default type mapping enablement

org.openrewrite.java.security.search.FindJacksonDefaultTypeMapping

ObjectMapper#enableTypeMapping(..) can lead to vulnerable deserialization.

Data tables:

  • org.openrewrite.java.table.MethodCalls: The text of matching method invocations.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find vulnerable uses of Jackson @JsonTypeInfo

org.openrewrite.java.security.search.FindVulnerableJacksonJsonTypeInfo

Identify where attackers can deserialize gadgets into a target field.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remediate vulnerabilities from the OWASP Top Ten

org.openrewrite.java.security.OwaspTopTen

OWASP publishes a list of the most impactful common security vulnerabilities. These recipes identify and remediate vulnerabilities from the OWASP Top Ten.

Data tables:

  • org.openrewrite.java.table.MethodCalls: The text of matching method invocations.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.java.dependencies.table.VulnerabilityReport: A vulnerability report that includes detailed information about the affected artifact and the corresponding CVEs.
  • org.openrewrite.java.dependencies.table.DependencyOriginsReport: A report that maps dependencies to their originating root node represented as dependency graph. The information can be used to understand which direct dependencies are responsible for bringing in specific transitive dependencies.

Remediate OWASP A01:2021 Broken access control

org.openrewrite.java.security.OwaspA01

OWASP A01:2021 describes failures related to broken access control.

Data tables:

  • org.openrewrite.java.table.MethodCalls: The text of matching method invocations.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remediate OWASP A02:2021 Cryptographic failures

org.openrewrite.java.security.OwaspA02

OWASP A02:2021 describes failures related to cryptography (or lack thereof), which often lead to exposure of sensitive data. This recipe seeks to remediate these vulnerabilities.

Data tables:

  • org.openrewrite.java.table.MethodCalls: The text of matching method invocations.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remediate OWASP A03:2021 Injection

org.openrewrite.java.security.OwaspA03

OWASP A03:2021 describes failures related to user-supplied data being used to influence program state to operate outside of its intended bounds. This recipe seeks to remediate these vulnerabilities.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remediate OWASP A05:2021 Security misconfiguration

org.openrewrite.java.security.OwaspA05

OWASP A05:2021 describes failures related to security misconfiguration.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remediate OWASP A06:2021 Vulnerable and outdated components

org.openrewrite.java.security.OwaspA06

OWASP A06:2021 describes failures related to vulnerable and outdated components.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.java.dependencies.table.VulnerabilityReport: A vulnerability report that includes detailed information about the affected artifact and the corresponding CVEs.
  • org.openrewrite.java.dependencies.table.DependencyOriginsReport: A report that maps dependencies to their originating root node represented as dependency graph. The information can be used to understand which direct dependencies are responsible for bringing in specific transitive dependencies.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remediate OWASP A08:2021 Software and data integrity failures

org.openrewrite.java.security.OwaspA08

OWASP A08:2021 software and data integrity failures.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.java.table.MethodCalls: The text of matching method invocations.

Find secrets

org.openrewrite.java.security.secrets.FindSecrets

Locates secrets stored in plain text in code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find Artifactory secrets

org.openrewrite.java.security.secrets.FindArtifactorySecrets

Locates Artifactory secrets stored in plain text in code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find AWS secrets

org.openrewrite.java.security.secrets.FindAwsSecrets

Locates AWS secrets stored in plain text in code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find Azure secrets

org.openrewrite.java.security.secrets.FindAzureSecrets

Locates Azure secrets stored in plain text in code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find Discord secrets

org.openrewrite.java.security.secrets.FindDiscordSecrets

Locates Discord secrets stored in plain text in code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find GitHub secrets

org.openrewrite.java.security.secrets.FindGitHubSecrets

Locates GitHub secrets stored in plain text in code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find NPM secrets

org.openrewrite.java.security.secrets.FindNpmSecrets

Locates NPM secrets stored in plain text in code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find RSA private keys

org.openrewrite.java.security.secrets.FindRsaSecrets

Locates RSA private keys stored in plain text in code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find SSH secrets

org.openrewrite.java.security.secrets.FindSshSecrets

Locates SSH secrets stored in plain text in code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find PGP secrets

org.openrewrite.java.security.secrets.FindPgpSecrets

Locates PGP secrets stored in plain text in code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find Facebook secrets

org.openrewrite.java.security.secrets.FindFacebookSecrets

Locates Facebook secrets stored in plain text in code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find generic secrets

org.openrewrite.java.security.secrets.FindGenericSecrets

Locates generic secrets stored in plain text in code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find Google secrets

org.openrewrite.java.security.secrets.FindGoogleSecrets

Locates Google secrets stored in plain text in code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find Heroku secrets

org.openrewrite.java.security.secrets.FindHerokuSecrets

Locates Heroku secrets stored in plain text in code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find MailChimp secrets

org.openrewrite.java.security.secrets.FindMailChimpSecrets

Locates MailChimp secrets stored in plain text in code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find Mailgun secrets

org.openrewrite.java.security.secrets.FindMailgunSecrets

Locates Mailgun secrets stored in plain text in code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find passwords used in URLs

org.openrewrite.java.security.secrets.FindPasswordInUrlSecrets

Locates URLs that contain passwords in plain text.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find PayPal secrets

org.openrewrite.java.security.secrets.FindPayPalSecrets

Locates PayPal secrets stored in plain text in code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find Picatic secrets

org.openrewrite.java.security.secrets.FindPicaticSecrets

Locates Picatic secrets stored in plain text in code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find SendGrid secrets

org.openrewrite.java.security.secrets.FindSendGridSecrets

Locates SendGrid secrets stored in plain text in code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find Stripe secrets

org.openrewrite.java.security.secrets.FindStripeSecrets

Locates Stripe secrets stored in plain text in code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find Square secrets

org.openrewrite.java.security.secrets.FindSquareSecrets

Locates Square secrets stored in plain text in code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find Telegram secrets

org.openrewrite.java.security.secrets.FindTelegramSecrets

Locates Telegram secrets stored in plain text in code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find Twilio secrets

org.openrewrite.java.security.secrets.FindTwilioSecrets

Locates Twilio secrets stored in plain text in code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find Twitter secrets

org.openrewrite.java.security.secrets.FindTwitterSecrets

Locates Twitter secrets stored in plain text in code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Java security best practices

org.openrewrite.java.security.JavaSecurityBestPractices

Applies security best practices to Java code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add XML declaration to Jelly files

org.openrewrite.jenkins.AddJellyXmlDeclaration

Ensure the XML declaration &lt;?jelly escape-by-default='true'?&gt; is present in all .jelly files.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add or correct Jenkins plugins BOM

org.openrewrite.jenkins.AddPluginsBom

Adds Jenkins plugins BOM at the latest release if the project depends on any managed versions or an outdated BOM is present. BOMs are expected to be synchronized to Jenkins LTS versions, so this will also remove any mismatched BOMs (Such as using Jenkins 2.387.3, but importing bom-2.319.x). If the expected BOM is already added, the version will not be upgraded.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disables local file resolution for parent POM

org.openrewrite.jenkins.DisableLocalResolutionForParentPom

Explicitly sets &lt;relativePath/&gt; to disable file resolution, as recommended in the plugin development guide.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Is the project a Jenkins plugin?

org.openrewrite.jenkins.IsJenkinsPlugin

Checks if the project is a Jenkins plugin by the presence of a managed version of jenkins-core.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Parse Jenkinsfile as Groovy

org.openrewrite.jenkins.JenkinsfileAsGroovy

Parse any Jenkinsfile as Groovy code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use Jenkins API plugin instead of libraries

org.openrewrite.jenkins.ReplaceLibrariesWithApiPlugin

Prefer Jenkins API plugins over bundling libraries for slimmer plugins.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade property's value to version

org.openrewrite.jenkins.UpgradeVersionProperty

If the current value is < given version, upgrade it.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Create index.jelly if it doesn't exist

org.openrewrite.jenkins.CreateIndexJelly

Jenkins tooling requires src/main/resources/index.jelly exists with a description.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade jenkins java version

org.openrewrite.jenkins.UpgradeJavaVersion

Upgrades the version of java specified in Jenkins groovy scripts. Will not downgrade if the version is newer than the specified version.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add plugin developer team to CODEOWNERS

org.openrewrite.jenkins.github.AddTeamToCodeowners

Adds the {artifactId}-plugin-developers team to all files in .github/CODEOWNERS if absent.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to HtmlUnit 3.x

org.openrewrite.java.testing.htmlunit.UpgradeHtmlUnit_3

Automates the HtmlUnit migration guide from 2.x to 3.x.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace hudson.Util.getPastTimeString with getTimeSpanString

org.openrewrite.jenkins.migrate.hudson.UtilGetPastTimeStringToGetTimeSpanString

hudson.Util.getPastTimeString has been deprecated since the 2.204.1 LTS release on 2019-12-18.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Modernize a Jenkins plugin to the latest versions supported by Java 8

org.openrewrite.jenkins.ModernizePluginForJava8

This recipe is intended to break down the modernization of very old plugins into distinct steps. It allows modernizing all tooling up to the last versions that supported Java 8. This can then be followed by another recipe that makes the jump to Java 11.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Migrate javax.annotations to SpotBugs annotations

org.openrewrite.jenkins.JavaxAnnotationsToSpotbugs

SpotBugs is the preferred replacement of JSR-305 annotations for Jenkins plugins.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Create Jenkinsfile

org.openrewrite.jenkins.CreateJenkinsfile

Creates a simple base Jenkinsfile in Groovy for a Declarative Pipeline - located in the root of the project.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

org.openrewrite.jenkins.ModernizePlugin

This recipe is intended to change over time to reflect the recommended tooling and recommended Jenkins baseline.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Modernize Jenkinsfile

org.openrewrite.jenkins.ModernizeJenkinsfile

Updates Jenkinsfile to build with recommended Java versions, platforms, and settings.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use commons-lang3 API Plugin

org.openrewrite.jenkins.CommonsLang3ToApiPlugin

Updates pom.xml to depend on commons-lang3-api and exclude commons-lang3 where it is brought in transitively.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Joda-Time to Java time

org.openrewrite.java.joda.time.JodaTimeRecipe

Prefer the Java standard library over third-party usage of Joda Time.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer the Java standard library instead of Joda-Time

org.openrewrite.java.joda.time.NoJodaTime

Before Java 8, Java lacked a robust date and time library, leading to the widespread use of Joda-Time to fill this gap. With the release of Java 8, the java.time package was introduced, incorporating most of Joda-Time's concepts. Features deemed too specialized or bulky for java.time were included in the ThreeTen-Extra library. This recipe migrates Joda-Time types to java.time and threeten-extra types.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add Kubernetes configuration

org.openrewrite.kubernetes.AddConfiguration

Add default required configuration when it is missing.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change Kubernetes API version

org.openrewrite.kubernetes.ChangeApiVersion

Change the Kubernetes API version in a resource.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update image name

org.openrewrite.kubernetes.UpdateContainerImageName

Search for image names that match patterns and replace the components of the name with new values.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add RBAC rules

org.openrewrite.kubernetes.rbac.AddRuleToRole

Add RBAC rules to ClusterRoles or namespaced Roles.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Cap exceeds resource value

org.openrewrite.kubernetes.resource.CapResourceValueToMaximum

Cap resource values that exceed a specific maximum.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find exceeds resource ratio

org.openrewrite.kubernetes.resource.FindExceedsResourceRatio

Find resource manifests that have requests to limits ratios beyond a specific maximum.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find exceeds resource limit

org.openrewrite.kubernetes.resource.FindExceedsResourceValue

Find resource manifests that have limits set beyond a specific maximum.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find annotation

org.openrewrite.kubernetes.search.FindAnnotation

Find annotations that optionally match a given regex.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find disallowed image tags

org.openrewrite.kubernetes.search.FindDisallowedImageTags

The set of image tags to find which are considered disallowed.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find image by name

org.openrewrite.kubernetes.search.FindImage

The image name to search for in containers and initContainers.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find missing image digest

org.openrewrite.kubernetes.search.FindMissingDigest

Find instances of a container name that fails to specify a digest.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find annotation

org.openrewrite.kubernetes.search.FindMissingOrInvalidAnnotation

Find annotations that optionally match a given value.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find label

org.openrewrite.kubernetes.search.FindMissingOrInvalidLabel

Find labels that optionally match a given regex.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find non-TLS Ingresses

org.openrewrite.kubernetes.search.FindNonTlsIngress

Find Ingress resources that don't disallow HTTP or don't have TLS configured.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find missing configuration

org.openrewrite.kubernetes.search.FindResourceMissingConfiguration

Find Kubernetes resources with missing configuration.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find uses of externalIP

org.openrewrite.kubernetes.services.FindServiceExternalIPs

Find any Service whose externalIP list contains, or does not contain, one of a list of IPs.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Service type

org.openrewrite.kubernetes.services.FindServicesByType

Type of Kubernetes Service to find.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update Service externalIP

org.openrewrite.kubernetes.services.UpdateServiceExternalIP

Swap out an IP address with another one in Service externalIP settings.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Kubernetes best practices

org.openrewrite.kubernetes.KubernetesBestPractices

Applies best practices to Kubernetes manifests.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure liveness probe is configured

org.openrewrite.kubernetes.MissingPodLivenessProbe

The kubelet uses liveness probes to know when to schedule restarts for containers. Restarting a container in a deadlock state can help to make the application more available, despite bugs.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure readiness probe is configured

org.openrewrite.kubernetes.MissingPodReadinessProbe

Using the Readiness Probe ensures teams define what actions need to be taken to prevent failure and ensure recovery in case of unexpected errors.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure CPU request is set

org.openrewrite.kubernetes.MissingCpuRequest

If a container is created in a namespace that has a default CPU limit, and the container does not specify its own CPU limit, then the container is assigned the default CPU limit.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure CPU limits are set

org.openrewrite.kubernetes.MissingCpuLimits

A system without managed quotas could eventually collapse due to inadequate resources for the tasks it bares.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure memory request is set

org.openrewrite.kubernetes.MissingMemoryRequest

A container is guaranteed to have as much memory as it requests, but is not allowed to use more memory than the limit set. This configuration may save resources and prevent an attack on an exploited container.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure memory limits are set

org.openrewrite.kubernetes.MissingMemoryLimits

With no limit set, kubectl allocates more and more memory to the container until it runs out.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

No privileged containers

org.openrewrite.kubernetes.NoPrivilegedContainers

Privileged containers are containers that have all of the root capabilities of a host machine, allowing access to resources that are not accessible in ordinary containers.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure lifecycle rule on StorageBucket

org.openrewrite.kubernetes.LifecycleRuleOnStorageBucket

When defining a rule, you can specify any set of conditions for any action. The following configuration defines a rule to delete all objects older than 7 days in a bucket.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

No host process ID sharing

org.openrewrite.kubernetes.NoHostProcessIdSharing

Sharing the host process ID namespace breaks the isolation between container images and can make processes visible to other containers in the pod. This includes all information in the /proc directory, which can sometimes include passwords or keys, passed as environment variables.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

No host IPC sharing

org.openrewrite.kubernetes.NoHostIPCSharing

Preventing sharing of host PID/IPC namespace, networking, and ports ensures proper isolation between Docker containers and the underlying host.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

No root containers

org.openrewrite.kubernetes.NoRootContainers

Containers that run as root frequently have more permissions than their workload requires which, in case of compromise, could help an attacker further their exploits.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure image pull policy is Always

org.openrewrite.kubernetes.ImagePullPolicyAlways

Ensures the latest version of a tag is deployed each time.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

No privilege escalation

org.openrewrite.kubernetes.NoPrivilegeEscalation

Does not allow a process to gain more privileges than its parent process.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

No host network sharing

org.openrewrite.kubernetes.NoHostNetworkSharing

When using the host network mode for a container, that container’s network stack is not isolated from the Docker host, so the container shares the host’s networking namespace and does not get its own IP-address allocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Read-only root filesystem

org.openrewrite.kubernetes.ReadOnlyRootFilesystem

Using an immutable root filesystem and a verified boot mechanism prevents against attackers from "owning" the machine through permanent local changes.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Limit root capabilities in a container

org.openrewrite.kubernetes.LimitContainerCapabilities

Limiting the admission of containers with capabilities ensures that only a small number of containers have extended capabilities outside the default range.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Kubernetes API v1.32

org.openrewrite.kubernetes.migrate.MigrateToAPIv1_32

This recipe will apply changes commonly needed when migrating to Kubernetes API v1.32.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Kubernetes API v1.29

org.openrewrite.kubernetes.migrate.MigrateToAPIv1_29

This recipe will apply changes commonly needed when migrating to Kubernetes API v1.29.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Kubernetes API v1.27

org.openrewrite.kubernetes.migrate.MigrateToAPIv1_27

This recipe will apply changes commonly needed when migrating to Kubernetes API v1.27.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Kubernetes API v1.26

org.openrewrite.kubernetes.migrate.MigrateToAPIv1_26

This recipe will apply changes commonly needed when migrating to Kubernetes API v1.26.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Kubernetes API v1.25

org.openrewrite.kubernetes.migrate.MigrateToAPIv1_25

This recipe will apply changes commonly needed when migrating to Kubernetes API v1.25.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Kubernetes API v1.22

org.openrewrite.kubernetes.migrate.MigrateToAPIv1_22

This recipe will apply changes commonly needed when migrating to Kubernetes API v1.22.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Kubernetes API v1.16

org.openrewrite.kubernetes.migrate.MigrateToAPIv1_16

This recipe will apply changes commonly needed when migrating to Kubernetes API v1.16.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find hardcoded IP addresses

org.openrewrite.kubernetes.search.FindHarcodedIPAddresses

Find hardcoded IP address anywhere in text-based files.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace WSPrincipal.getCredential() with WSSubject lookup

org.openrewrite.java.liberty.ReplaceWSPrincipalGetCredential

Replaces WSCredential credential = WSPrincipal.getCredential(); with a null initializer + try/catch lookup.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use getProperty(&quot;wlp.server.name&quot;)

org.openrewrite.java.liberty.ServerName

ServerName.getDisplayName() is not available in Liberty.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace revokeSSOCookies with logout

org.openrewrite.java.liberty.WebSphereUnavailableSSOCookieMethod

Replace WSSecurityHelper.revokeSSOCookies(request, response) with request.logout().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Move persistence.xml file

org.openrewrite.xml.liberty.PersistenceXmlLocationRule

This recipes moves persistence.xml files into the root META-INF directory in source folder.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace beans.xml file

org.openrewrite.xml.liberty.WebBeansXmlRule

This Recipe replaces OpenWebBeans schema in every beans.xml with the standard CDI schema.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Removes invalid JNDI properties

org.openrewrite.java.liberty.RemoveWas2LibertyNonPortableJndiLookup

Remove the use of invalid JNDI properties from Hashtable.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate from WebSphere traditional to Liberty

org.openrewrite.java.liberty.MigrateFromWebSphereToLiberty

Use this category of rules to identify code changes needed when migrating from WebSphere Application Server traditional to Liberty.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use getSSOCookieFromSSOToken and logout

org.openrewrite.java.liberty.WebSphereUnavailableSSOMethods

This recipe replaces LTPACookieFromSSOToken() with getSSOCookieFromSSOToken and revokeSSOCookies with logout. The two methods are deprecated in traditional WebSphere Application Server Version 8.5 and might be removed in a future release. They are not available on Liberty.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use correct application namespace values

org.openrewrite.xml.liberty.AppDDNamespaceRule

Namespace values in application.xml must be consistent with the descriptor version.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use correct connector namespace values

org.openrewrite.xml.liberty.ConnectorDDNamespaceRule

Namespace values in ra.xml must be consistent with the descriptor version.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use correct ejb-jar namespace values

org.openrewrite.xml.liberty.EJBDDNamespaceRule

Namespace values in ejb-jar.xml must be consistent with the descriptor version.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use correct web-app namespace values

org.openrewrite.xml.liberty.WebDDNamespaceRule

Namespace values in web.xml must be consistent with the descriptor version.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add Liberty Maven plugin

org.openrewrite.maven.liberty.AddOpenLibertyPlugin

This recipe adds the Liberty Maven plugin, which provides several goals for managing a Liberty server and applications.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Unpack Logger method new Object[] {...} into varargs

org.openrewrite.java.logging.ArgumentArrayToVarargs

For Logger methods that support varargs, convert any final explicit Object[] arguments into their unpacked values.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Catch block log level

org.openrewrite.java.logging.CatchBlockLogLevel

Sometimes exceptions are caught and logged at the wrong log level. This will set the log level of logging statements within a catch block not containing an exception to "warn", and the log level of logging statements containing an exception to "error". This supports SLF4J, Log4J1, Log4j2, and Logback.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change logger fields to private

org.openrewrite.java.logging.ChangeLoggersToPrivate

Ensures that logger fields are declared as private to encapsulate logging mechanics within the class.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace any Lombok log annotations with target logging framework annotation

org.openrewrite.java.logging.ChangeLombokLogAnnotation

Replace Lombok annotations such as @CommonsLog and @Log4j with the target logging framework annotation, or @Sl4fj if not provided.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Parameterize logging statements

org.openrewrite.java.logging.ParameterizedLogging

Transform logging statements using concatenation for messages and variables into a parameterized format. For example, logger.info(&quot;hi &quot; + userName) becomes logger.info(&quot;hi {}&quot;, userName). This can significantly boost performance for messages that otherwise would be assembled with String concatenation. Particularly impactful when the log level is not enabled, as no work is done to assemble the message.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use logger instead of printStackTrace()

org.openrewrite.java.logging.PrintStackTraceToLogError

When a logger is present, log exceptions rather than calling printStackTrace().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use logger instead of System.err print statements

org.openrewrite.java.logging.SystemErrToLogging

Replace System.err print statements with a logger.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use logger instead of System.out print statements

org.openrewrite.java.logging.SystemOutToLogging

Replace System.out print statements with a logger.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use logger instead of system print statements

org.openrewrite.java.logging.SystemPrintToLogging

Replace System.out and System.err print statements with a logger.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace deprecated JBoss Logging Logger formatted message invocations with the v-version of methods

org.openrewrite.java.logging.jboss.FormattedArgumentsToVMethodRecipes

Replace logger.level(&quot;hello {0}&quot;, arg) with logger.levelv(&quot;hello {0}&quot;, arg).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template FormattedArgumentsToVMethod.DebugToVDebug

org.openrewrite.java.logging.jboss.FormattedArgumentsToVMethodRecipes$DebugToVDebugRecipe

Recipe created for the following Refaster template: java public static class DebugToVDebug { @BeforeTemplate void before(Logger logger, String message, Object[] args) { logger.debug(message, args); } @AfterTemplate void after(Logger logger, String message, Object[] args) { logger.debugv(message, args); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template FormattedArgumentsToVMethod.DebugToVDebugWithThrowable

org.openrewrite.java.logging.jboss.FormattedArgumentsToVMethodRecipes$DebugToVDebugWithThrowableRecipe

Recipe created for the following Refaster template: java public static class DebugToVDebugWithThrowable { @BeforeTemplate void before(Logger logger, String message, Object[] args, Throwable t) { logger.debug((Object)message, args, t); } @AfterTemplate void after(Logger logger, String message, Object[] args, Throwable t) { logger.debugv(message, args, t); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template FormattedArgumentsToVMethod.ErrorToVError

org.openrewrite.java.logging.jboss.FormattedArgumentsToVMethodRecipes$ErrorToVErrorRecipe

Recipe created for the following Refaster template: java public static class ErrorToVError { @BeforeTemplate void before(Logger logger, String message, Object[] args) { logger.error(message, args); } @AfterTemplate void after(Logger logger, String message, Object[] args) { logger.errorv(message, args); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template FormattedArgumentsToVMethod.ErrorToVErrorWithThrowable

org.openrewrite.java.logging.jboss.FormattedArgumentsToVMethodRecipes$ErrorToVErrorWithThrowableRecipe

Recipe created for the following Refaster template: java public static class ErrorToVErrorWithThrowable { @BeforeTemplate void before(Logger logger, String message, Object[] args, Throwable t) { logger.error((Object)message, args, t); } @AfterTemplate void after(Logger logger, String message, Object[] args, Throwable t) { logger.errorv(message, args, t); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template FormattedArgumentsToVMethod.FatalToVFatal

org.openrewrite.java.logging.jboss.FormattedArgumentsToVMethodRecipes$FatalToVFatalRecipe

Recipe created for the following Refaster template: java public static class FatalToVFatal { @BeforeTemplate void before(Logger logger, String message, Object[] args) { logger.fatal(message, args); } @AfterTemplate void after(Logger logger, String message, Object[] args) { logger.fatalv(message, args); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template FormattedArgumentsToVMethod.FatalToVFatalWithThrowable

org.openrewrite.java.logging.jboss.FormattedArgumentsToVMethodRecipes$FatalToVFatalWithThrowableRecipe

Recipe created for the following Refaster template: java public static class FatalToVFatalWithThrowable { @BeforeTemplate void before(Logger logger, String message, Object[] args, Throwable t) { logger.fatal((Object)message, args, t); } @AfterTemplate void after(Logger logger, String message, Object[] args, Throwable t) { logger.fatalv(message, args, t); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template FormattedArgumentsToVMethod.InfoToVInfo

org.openrewrite.java.logging.jboss.FormattedArgumentsToVMethodRecipes$InfoToVInfoRecipe

Recipe created for the following Refaster template: java public static class InfoToVInfo { @BeforeTemplate void before(Logger logger, String message, Object[] args) { logger.info(message, args); } @AfterTemplate void after(Logger logger, String message, Object[] args) { logger.infov(message, args); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template FormattedArgumentsToVMethod.InfoToVInfoWithThrowable

org.openrewrite.java.logging.jboss.FormattedArgumentsToVMethodRecipes$InfoToVInfoWithThrowableRecipe

Recipe created for the following Refaster template: java public static class InfoToVInfoWithThrowable { @BeforeTemplate void before(Logger logger, String message, Object[] args, Throwable t) { logger.info((Object)message, args, t); } @AfterTemplate void after(Logger logger, String message, Object[] args, Throwable t) { logger.infov(message, args, t); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template FormattedArgumentsToVMethod.TraceToVTrace

org.openrewrite.java.logging.jboss.FormattedArgumentsToVMethodRecipes$TraceToVTraceRecipe

Recipe created for the following Refaster template: java public static class TraceToVTrace { @BeforeTemplate void before(Logger logger, String message, Object[] args) { logger.trace(message, args); } @AfterTemplate void after(Logger logger, String message, Object[] args) { logger.tracev(message, args); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template FormattedArgumentsToVMethod.TraceToVTraceWithThrowable

org.openrewrite.java.logging.jboss.FormattedArgumentsToVMethodRecipes$TraceToVTraceWithThrowableRecipe

Recipe created for the following Refaster template: java public static class TraceToVTraceWithThrowable { @BeforeTemplate void before(Logger logger, String message, Object[] args, Throwable t) { logger.trace((Object)message, args, t); } @AfterTemplate void after(Logger logger, String message, Object[] args, Throwable t) { logger.tracev(message, args, t); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template FormattedArgumentsToVMethod.WarnToVWarn

org.openrewrite.java.logging.jboss.FormattedArgumentsToVMethodRecipes$WarnToVWarnRecipe

Recipe created for the following Refaster template: java public static class WarnToVWarn { @BeforeTemplate void before(Logger logger, String message, Object[] args) { logger.warn(message, args); } @AfterTemplate void after(Logger logger, String message, Object[] args) { logger.warnv(message, args); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template FormattedArgumentsToVMethod.WarnToVWarnWithThrowable

org.openrewrite.java.logging.jboss.FormattedArgumentsToVMethodRecipes$WarnToVWarnWithThrowableRecipe

Recipe created for the following Refaster template: java public static class WarnToVWarnWithThrowable { @BeforeTemplate void before(Logger logger, String message, Object[] args, Throwable t) { logger.warn((Object)message, args, t); } @AfterTemplate void after(Logger logger, String message, Object[] args, Throwable t) { logger.warnv(message, args, t); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JBoss Logging Level arguments with the corresponding eponymous level method calls

org.openrewrite.java.logging.jboss.LoggerLevelArgumentToMethod

Replace calls to Logger.log(Level, ...) with the corresponding eponymous level method calls. For example Logger.log(Level.INFO, ...) to Logger.info(...).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL Level arguments with the corresponding method calls

org.openrewrite.java.logging.jul.LoggerLevelArgumentToMethodRecipes

Replace calls to Logger.log(Level, String) with the corresponding method calls.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL Logger.log(Level.CONFIG, Supplier&lt;String&gt;) with Logger.config(Supplier&lt;String&gt;)

org.openrewrite.java.logging.jul.LoggerLevelArgumentToMethodRecipes$LogLevelConfigSupplierToMethodRecipe

Replace calls to java.util.logging.Logger.log(Level.CONFIG, Supplier&lt;String&gt;) with Logger.config(Supplier&lt;String&gt;).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL Logger.log(Level.CONFIG, String) with Logger.config(String)

org.openrewrite.java.logging.jul.LoggerLevelArgumentToMethodRecipes$LogLevelConfigToMethodRecipe

Replace calls to java.util.logging.Logger.log(Level.CONFIG, String) with Logger.config(String).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL Logger.log(Level.FINE, Supplier&lt;String&gt;) with Logger.fine(Supplier&lt;String&gt;)

org.openrewrite.java.logging.jul.LoggerLevelArgumentToMethodRecipes$LogLevelFineSupplierToMethodRecipe

Replace calls to java.util.logging.Logger.log(Level.FINE, Supplier&lt;String&gt;) with Logger.fine(Supplier&lt;String&gt;).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL Logger.log(Level.FINE, String) with Logger.fine(String)

org.openrewrite.java.logging.jul.LoggerLevelArgumentToMethodRecipes$LogLevelFineToMethodRecipe

Replace calls to java.util.logging.Logger.log(Level.FINE, String) with Logger.fine(String).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL Logger.log(Level.FINER, Supplier&lt;String&gt;) with Logger.finer(Supplier&lt;String&gt;)

org.openrewrite.java.logging.jul.LoggerLevelArgumentToMethodRecipes$LogLevelFinerSupplierToMethodRecipe

Replace calls to java.util.logging.Logger.log(Level.FINER, Supplier&lt;String&gt;) with Logger.finer(Supplier&lt;String&gt;).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL Logger.log(Level.FINER, String) with Logger.finer(String)

org.openrewrite.java.logging.jul.LoggerLevelArgumentToMethodRecipes$LogLevelFinerToMethodRecipe

Replace calls to java.util.logging.Logger.log(Level.FINER, String) with Logger.finer(String).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL Logger.log(Level.FINEST, Supplier&lt;String&gt;) with Logger.finest(Supplier&lt;String&gt;)

org.openrewrite.java.logging.jul.LoggerLevelArgumentToMethodRecipes$LogLevelFinestSupplierToMethodRecipe

Replace calls to java.util.logging.Logger.log(Level.FINEST, Supplier&lt;String&gt;) with Logger.finest(Supplier&lt;String&gt;).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL Logger.log(Level.FINEST, String) with Logger.finest(String)

org.openrewrite.java.logging.jul.LoggerLevelArgumentToMethodRecipes$LogLevelFinestToMethodRecipe

Replace calls to java.util.logging.Logger.log(Level.FINEST, String) with Logger.finest(String).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL Logger.log(Level.INFO, Supplier&lt;String&gt;) with Logger.info(Supplier&lt;String&gt;)

org.openrewrite.java.logging.jul.LoggerLevelArgumentToMethodRecipes$LogLevelInfoSupplierToMethodRecipe

Replace calls to java.util.logging.Logger.log(Level.INFO, Supplier&lt;String&gt;) with Logger.info(Supplier&lt;String&gt;).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL Logger.log(Level.INFO, String) with Logger.info(String)

org.openrewrite.java.logging.jul.LoggerLevelArgumentToMethodRecipes$LogLevelInfoToMethodRecipe

Replace calls to java.util.logging.Logger.log(Level.INFO, String) with Logger.info(String).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL Logger.log(Level.SEVERE, Supplier&lt;String&gt;) with Logger.severe(Supplier&lt;String&gt;)

org.openrewrite.java.logging.jul.LoggerLevelArgumentToMethodRecipes$LogLevelSevereSupplierToMethodRecipe

Replace calls to java.util.logging.Logger.log(Level.SEVERE, Supplier&lt;String&gt;) with Logger.severe(Supplier&lt;String&gt;).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL Logger.log(Level.SEVERE, String) with Logger.severe(String)

org.openrewrite.java.logging.jul.LoggerLevelArgumentToMethodRecipes$LogLevelSevereToMethodRecipe

Replace calls to java.util.logging.Logger.log(Level.SEVERE, String) with Logger.severe(String).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL Logger.log(Level.WARNING, Supplier&lt;String&gt;) with Logger.warning(Supplier&lt;String&gt;)

org.openrewrite.java.logging.jul.LoggerLevelArgumentToMethodRecipes$LogLevelWarningSupplierToMethodRecipe

Replace calls to java.util.logging.Logger.log(Level.WARNING, Supplier&lt;String&gt;) with Logger.warning(Supplier&lt;String&gt;).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL Logger.log(Level.WARNING, String) with Logger.warning(String)

org.openrewrite.java.logging.jul.LoggerLevelArgumentToMethodRecipes$LogLevelWarningToMethodRecipe

Replace calls to java.util.logging.Logger.log(Level.WARNING, String) with Logger.warning(String).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Rewrites JUL's Logger#entering method to Log4j API

org.openrewrite.java.logging.log4j.ConvertJulEntering

Replaces JUL's Logger#entering method calls to Log4j API Logger#traceEntry calls.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Rewrites JUL's Logger#exiting method to Log4j API

org.openrewrite.java.logging.log4j.ConvertJulExiting

Replaces JUL's Logger#exiting method calls to Log4j API Logger#traceEntry calls.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Convert Log4j Logger.setLevel to Log4j2 Configurator.setLevel

org.openrewrite.java.logging.log4j.LoggerSetLevelToConfiguratorRecipe

Converts org.apache.log4j.Logger.setLevel to org.apache.logging.log4j.core.config.Configurator.setLevel.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Log exceptions as parameters rather than as string concatenations

org.openrewrite.java.logging.log4j.LoggingExceptionConcatenationRecipe

By using the exception as another parameter you get the whole stack trace.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prepend a random name to each Log4J statement

org.openrewrite.java.logging.log4j.PrependRandomName

To make finding the callsite of a logging statement easier in code search.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Configure logback logger level

org.openrewrite.java.logging.logback.ConfigureLoggerLevel

Within logback.xml configuration files sets the specified log level for a particular class. Will not create a logback.xml if one does not already exist.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Log4j 2.x Appender to logback-classic equivalents

org.openrewrite.java.logging.logback.Log4jAppenderToLogback

Migrates custom Log4j 2.x Appender components to logback-classic. This recipe operates on the following assumptions: 1.) The contents of the append() method remains unchanged. 2.) The requiresLayout() method is not used in logback and can be removed. 3.) In logback, the stop() method is the equivalent of log4j's close() method. For more details, see this page from logback: Migration from log4j.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Log4j 2.x Layout to logback-classic equivalents

org.openrewrite.java.logging.logback.Log4jLayoutToLogback

Migrates custom Log4j 2.x Layout components to logback-classic. This recipe operates on the following assumptions: 1. A logback-classic layout must extend the LayoutBase&lt;ILoggingEvent&gt; class. 2. log4j's format() is renamed to doLayout() in a logback-classic layout. 3. LoggingEvent getRenderedMessage() is converted to LoggingEvent getMessage(). 4. The log4j ignoresThrowable() method is not needed and has no equivalent in logback-classic. 5. The activateOptions() method merits further discussion. In log4j, a layout will have its activateOptions() method invoked by log4j configurators, that is PropertyConfigurator or DOMConfigurator just after all the options of the layout have been set. Thus, the layout will have an opportunity to check that its options are coherent and if so, proceed to fully initialize itself. 6. In logback-classic, layouts must implement the LifeCycle interface which includes a method called start(). The start() method is the equivalent of log4j's activateOptions() method. For more details, see this page from logback: Migration from log4j.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change SLF4J log level

org.openrewrite.java.logging.slf4j.ChangeLogLevel

Change the log level of SLF4J log statements.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enhances logging of exceptions by including the full stack trace in addition to the exception message

org.openrewrite.java.logging.slf4j.CompleteExceptionLogging

It is a common mistake to call Exception.getMessage() when passing an exception into a log method. Not all exception types have useful messages, and even if the message is useful this omits the stack trace. Including a complete stack trace of the error along with the exception message in the log allows developers to better understand the context of the exception and identify the source of the error more quickly and accurately. If the method invocation includes any call to Exception.getMessage() or Exception.getLocalizedMessage() and not an exception is already passed as the last parameter to the log method, then we will append the exception as the last parameter in the log method.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL Logger creation with SLF4J LoggerFactory

org.openrewrite.java.logging.slf4j.JulGetLoggerToLoggerFactoryRecipes

Replace calls to Logger.getLogger with LoggerFactory.getLogger.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL Logger.getLogger(Some.class.getCanonicalName()) with SLF4J's LoggerFactory.getLogger(Some.class)

org.openrewrite.java.logging.slf4j.JulGetLoggerToLoggerFactoryRecipes$GetLoggerClassCanonicalNameToLoggerFactoryRecipe

Replace calls to java.util.logging.Logger.getLogger(Some.class.getCanonicalName()) with org.slf4j.LoggerFactory.getLogger(Some.class).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL Logger.getLogger(Some.class.getName()) with SLF4J's LoggerFactory.getLogger(Some.class)

org.openrewrite.java.logging.slf4j.JulGetLoggerToLoggerFactoryRecipes$GetLoggerClassNameToLoggerFactoryRecipe

Replace calls to java.util.logging.Logger.getLogger(Some.class.getName()) with org.slf4j.LoggerFactory.getLogger(Some.class).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL active Level check with corresponding SLF4J method calls

org.openrewrite.java.logging.slf4j.JulIsLoggableToIsEnabledRecipes

Replace calls to Logger.isLoggable(Level) with the corresponding SLF4J method calls.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL Logger.isLoggable(Level.ALL) with SLF4J's Logger.isTraceEnabled

org.openrewrite.java.logging.slf4j.JulIsLoggableToIsEnabledRecipes$LoggerIsLoggableLevelAllRecipe

Replace calls to java.util.logging.Logger.isLoggable(Level.ALL) with org.slf4j.Logger.isTraceEnabled().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL Logger.isLoggable(Level.CONFIG) with SLF4J's Logger.isInfoEnabled()

org.openrewrite.java.logging.slf4j.JulIsLoggableToIsEnabledRecipes$LoggerIsLoggableLevelConfigRecipe

Replace calls to java.util.logging.Logger.isLoggable(Level.CONFIG) with org.slf4j.Logger.isInfoEnabled().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL Logger.isLoggable(Level.FINE) with SLF4J's Logger.isDebugEnabled()

org.openrewrite.java.logging.slf4j.JulIsLoggableToIsEnabledRecipes$LoggerIsLoggableLevelFineRecipe

Replace calls to java.util.logging.Logger.isLoggable(Level.FINE) with org.slf4j.Logger.isDebugEnabled().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL Logger.isLoggable(Level.FINER) with SLF4J's Logger.isTraceEnabled()

org.openrewrite.java.logging.slf4j.JulIsLoggableToIsEnabledRecipes$LoggerIsLoggableLevelFinerRecipe

Replace calls to java.util.logging.Logger.isLoggable(Level.FINER) with org.slf4j.Logger.isTraceEnabled().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL Logger.isLoggable(Level.FINEST) with SLF4J's Logger.isTraceEnabled

org.openrewrite.java.logging.slf4j.JulIsLoggableToIsEnabledRecipes$LoggerIsLoggableLevelFinestRecipe

Replace calls to java.util.logging.Logger.isLoggable(Level.FINEST) with org.slf4j.Logger.isTraceEnabled().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL Logger.isLoggable(Level.INFO) with SLF4J's Logger.isInfoEnabled()

org.openrewrite.java.logging.slf4j.JulIsLoggableToIsEnabledRecipes$LoggerIsLoggableLevelInfoRecipe

Replace calls to java.util.logging.Logger.isLoggable(Level.INFO) with org.slf4j.Logger.isInfoEnabled().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL Logger.isLoggable(Level.SEVERE) with SLF4J's Logger.isErrorEnabled()

org.openrewrite.java.logging.slf4j.JulIsLoggableToIsEnabledRecipes$LoggerIsLoggableLevelSevereRecipe

Replace calls to java.util.logging.Logger.isLoggable(Level.SEVERE) with org.slf4j.Logger.isErrorEnabled().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL Logger.isLoggable(Level.WARNING) with SLF4J's Logger.isWarnEnabled()

org.openrewrite.java.logging.slf4j.JulIsLoggableToIsEnabledRecipes$LoggerIsLoggableLevelWarningRecipe

Replace calls to java.util.logging.Logger.isLoggable(Level.WARNING) with org.slf4j.Logger.isWarnEnabled().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL Level.ALL logging with SLF4J's trace level

org.openrewrite.java.logging.slf4j.JulLevelAllToTraceRecipe

Replace java.util.logging.Logger#log(Level.ALL, String) with org.slf4j.Logger#trace(String).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace parameterized JUL level call with corresponding SLF4J method calls

org.openrewrite.java.logging.slf4j.JulParameterizedArguments

Replace calls to parameterized Logger.log(Level,String,…) call with the corresponding slf4j method calls transforming the formatter and parameter lists.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL active Level check with corresponding SLF4J method calls

org.openrewrite.java.logging.slf4j.JulToSlf4jLambdaSupplierRecipes

Replace calls to Logger.isLoggable(Level) with the corresponding SLF4J method calls.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL Logger.config(Supplier&lt;String&gt;) with SLF4J's Logger.atInfo().log(Supplier&lt;String&gt;)

org.openrewrite.java.logging.slf4j.JulToSlf4jLambdaSupplierRecipes$JulToSlf4jSupplierConfigRecipe

Replace calls to java.util.logging.Logger.config(Supplier&lt;String&gt;) with org.slf4j.Logger.atInfo().log(Supplier&lt;String&gt;).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL Logger.fine(Supplier&lt;String&gt;) with SLF4J's Logger.atDebug().log(Supplier&lt;String&gt;)

org.openrewrite.java.logging.slf4j.JulToSlf4jLambdaSupplierRecipes$JulToSlf4jSupplierFineRecipe

Replace calls to java.util.logging.Logger.fine(Supplier&lt;String&gt;) with org.slf4j.Logger.atDebug().log(Supplier&lt;String&gt;).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL Logger.finer(Supplier&lt;String&gt;) with SLF4J's Logger.atTrace().log(Supplier&lt;String&gt;)

org.openrewrite.java.logging.slf4j.JulToSlf4jLambdaSupplierRecipes$JulToSlf4jSupplierFinerRecipe

Replace calls to java.util.logging.Logger.finer(Supplier&lt;String&gt;) with org.slf4j.Logger.atTrace().log(Supplier&lt;String&gt;).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL Logger.finest(Supplier&lt;String&gt;) with SLF4J's Logger.atTrace().log(Supplier&lt;String&gt;)

org.openrewrite.java.logging.slf4j.JulToSlf4jLambdaSupplierRecipes$JulToSlf4jSupplierFinestRecipe

Replace calls to java.util.logging.Logger.finest(Supplier&lt;String&gt;) with org.slf4j.Logger.atTrace().log(Supplier&lt;String&gt;).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL Logger.info(Supplier&lt;String&gt;) with SLF4J's Logger.atInfo().log(Supplier&lt;String&gt;)

org.openrewrite.java.logging.slf4j.JulToSlf4jLambdaSupplierRecipes$JulToSlf4jSupplierInfoRecipe

Replace calls to java.util.logging.Logger.info(Supplier&lt;String&gt;) with org.slf4j.Logger.atInfo().log(Supplier&lt;String&gt;).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL Logger.log(Level.ALL, Supplier&lt;String&gt;) with SLF4J's Logger.atInfo().log(Supplier&lt;String&gt;)

org.openrewrite.java.logging.slf4j.JulToSlf4jLambdaSupplierRecipes$JulToSlf4jSupplierLogAllRecipe

Replace calls to java.util.logging.Logger.log(Level.ALL, Supplier&lt;String&gt;) with org.slf4j.Logger.atTrace().log(Supplier&lt;String&gt;).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL Logger.log(Level.CONFIG, Supplier&lt;String&gt;) with SLF4J's Logger.atInfo().log(Supplier&lt;String&gt;)

org.openrewrite.java.logging.slf4j.JulToSlf4jLambdaSupplierRecipes$JulToSlf4jSupplierLogConfigRecipe

Replace calls to java.util.logging.Logger.log(Level.CONFIG, Supplier&lt;String&gt;) with org.slf4j.Logger.atInfo().log(Supplier&lt;String&gt;).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL Logger.log(Level.FINE, Supplier&lt;String&gt;) with SLF4J's Logger.atInfo().log(Supplier&lt;String&gt;)

org.openrewrite.java.logging.slf4j.JulToSlf4jLambdaSupplierRecipes$JulToSlf4jSupplierLogFineRecipe

Replace calls to java.util.logging.Logger.log(Level.FINE, Supplier&lt;String&gt;) with org.slf4j.Logger.atDebug().log(Supplier&lt;String&gt;).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL Logger.log(Level.FINER, Supplier&lt;String&gt;) with SLF4J's Logger.atInfo().log(Supplier&lt;String&gt;)

org.openrewrite.java.logging.slf4j.JulToSlf4jLambdaSupplierRecipes$JulToSlf4jSupplierLogFinerRecipe

Replace calls to java.util.logging.Logger.log(Level.FINER, Supplier&lt;String&gt;) with org.slf4j.Logger.atTrace().log(Supplier&lt;String&gt;).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL Logger.log(Level.FINEST, Supplier&lt;String&gt;) with SLF4J's Logger.atInfo().log(Supplier&lt;String&gt;)

org.openrewrite.java.logging.slf4j.JulToSlf4jLambdaSupplierRecipes$JulToSlf4jSupplierLogFinestRecipe

Replace calls to java.util.logging.Logger.log(Level.FINEST, Supplier&lt;String&gt;) with org.slf4j.Logger.atTrace().log(Supplier&lt;String&gt;).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL Logger.log(Level.INFO, Supplier&lt;String&gt;) with SLF4J's Logger.atInfo().log(Supplier&lt;String&gt;)

org.openrewrite.java.logging.slf4j.JulToSlf4jLambdaSupplierRecipes$JulToSlf4jSupplierLogInfoRecipe

Replace calls to java.util.logging.Logger.log(Level.INFO, Supplier&lt;String&gt;) with org.slf4j.Logger.atInfo().log(Supplier&lt;String&gt;).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL Logger.log(Level.SEVERE, Supplier&lt;String&gt;) with SLF4J's Logger.atInfo().log(Supplier&lt;String&gt;)

org.openrewrite.java.logging.slf4j.JulToSlf4jLambdaSupplierRecipes$JulToSlf4jSupplierLogSevereRecipe

Replace calls to java.util.logging.Logger.log(Level.SEVERE, Supplier&lt;String&gt;) with org.slf4j.Logger.atError().log(Supplier&lt;String&gt;).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL Logger.log(Level.WARNING, Supplier&lt;String&gt;) with SLF4J's Logger.atInfo().log(Supplier&lt;String&gt;)

org.openrewrite.java.logging.slf4j.JulToSlf4jLambdaSupplierRecipes$JulToSlf4jSupplierLogWarningRecipe

Replace calls to java.util.logging.Logger.log(Level.WARNING, Supplier&lt;String&gt;) with org.slf4j.Logger.atWarn().log(Supplier&lt;String&gt;).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL Logger.severe(Supplier&lt;String&gt;) with SLF4J's Logger.atError().log(Supplier&lt;String&gt;)

org.openrewrite.java.logging.slf4j.JulToSlf4jLambdaSupplierRecipes$JulToSlf4jSupplierSevereRecipe

Replace calls to java.util.logging.Logger.severe(Supplier&lt;String&gt;) with org.slf4j.Logger.atError().log(Supplier&lt;String&gt;).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL Logger.warning(Supplier&lt;String&gt;) with SLF4J's Logger.atWarn().log(Supplier&lt;String&gt;)

org.openrewrite.java.logging.slf4j.JulToSlf4jLambdaSupplierRecipes$JulToSlf4jSupplierWarningRecipe

Replace calls to java.util.logging.Logger.warning(Supplier&lt;String&gt;) with org.slf4j.Logger.atWarn().log(Supplier&lt;String&gt;).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL log(Level, Throwable, Supplier&lt;String&gt;) with corresponding SLF4J method calls

org.openrewrite.java.logging.slf4j.JulToSlf4jLambdaSupplierWithThrowableRecipes

Replace calls to Logger.log(Level, Throwable, Supplier&lt;String&gt;) with the corresponding SLF4J method calls.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL logger.log(Level.ALL, e, Supplier&lt;String&gt;) with SLF4J's Logger.atTrace().log(Supplier&lt;String&gt;)

org.openrewrite.java.logging.slf4j.JulToSlf4jLambdaSupplierWithThrowableRecipes$JulToSlf4jSupplierAllRecipe

Replace calls to java.util.logging.Logger.log(Level.ALL, e, Supplier&lt;String&gt;) with org.slf4j.Logger.atTrace().log(Supplier&lt;String&gt;).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL logger.log(Level.CONFIG, e, Supplier&lt;String&gt;) with SLF4J's Logger.atInfo().log(Supplier&lt;String&gt;)

org.openrewrite.java.logging.slf4j.JulToSlf4jLambdaSupplierWithThrowableRecipes$JulToSlf4jSupplierConfigRecipe

Replace calls to java.util.logging.Logger.log(Level.CONFIG, e, Supplier&lt;String&gt;) with org.slf4j.Logger.atInfo().log(Supplier&lt;String&gt;).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL logger.log(Level.FINE, e, Supplier&lt;String&gt;) with SLF4J's Logger.atDebug().log(Supplier&lt;String&gt;)

org.openrewrite.java.logging.slf4j.JulToSlf4jLambdaSupplierWithThrowableRecipes$JulToSlf4jSupplierFineRecipe

Replace calls to java.util.logging.Logger.log(Level.FINE, e, Supplier&lt;String&gt;) with org.slf4j.Logger.atDebug().log(Supplier&lt;String&gt;).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL logger.log(Level.FINER, e, Supplier&lt;String&gt;) with SLF4J's Logger.atTrace().log(Supplier&lt;String&gt;)

org.openrewrite.java.logging.slf4j.JulToSlf4jLambdaSupplierWithThrowableRecipes$JulToSlf4jSupplierFinerRecipe

Replace calls to java.util.logging.Logger.log(Level.FINER, e, Supplier&lt;String&gt;) with org.slf4j.Logger.atTrace().log(Supplier&lt;String&gt;).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL logger.log(Level.FINEST, e, Supplier&lt;String&gt;) with SLF4J's Logger.atTrace().log(Supplier&lt;String&gt;)

org.openrewrite.java.logging.slf4j.JulToSlf4jLambdaSupplierWithThrowableRecipes$JulToSlf4jSupplierFinestRecipe

Replace calls to java.util.logging.Logger.log(Level.FINEST, e, Supplier&lt;String&gt;) with org.slf4j.Logger.atTrace().log(Supplier&lt;String&gt;).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL logger.log(Level.INFO, e, Supplier&lt;String&gt;) with SLF4J's Logger.atInfo().log(Supplier&lt;String&gt;)

org.openrewrite.java.logging.slf4j.JulToSlf4jLambdaSupplierWithThrowableRecipes$JulToSlf4jSupplierInfoRecipe

Replace calls to java.util.logging.Logger.log(Level.INFO, e, Supplier&lt;String&gt;) with org.slf4j.Logger.atInfo().log(Supplier&lt;String&gt;).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL logger.log(Level.SEVERE, e, Supplier&lt;String&gt;) with SLF4J's Logger.atError().log(Supplier&lt;String&gt;)

org.openrewrite.java.logging.slf4j.JulToSlf4jLambdaSupplierWithThrowableRecipes$JulToSlf4jSupplierSevereRecipe

Replace calls to java.util.logging.Logger.log(Level.SEVERE, e, Supplier&lt;String&gt;) with org.slf4j.Logger.atError().log(Supplier&lt;String&gt;).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL logger.log(Level.WARNING, e, Supplier&lt;String&gt;) with SLF4J's Logger.atWarn().log(Supplier&lt;String&gt;)

org.openrewrite.java.logging.slf4j.JulToSlf4jLambdaSupplierWithThrowableRecipes$JulToSlf4jSupplierWarningRecipe

Replace calls to java.util.logging.Logger.log(Level.WARNING, e, Supplier&lt;String&gt;) with org.slf4j.Logger.atWarn().log(Supplier&lt;String&gt;).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL log(Level, String, Throwable) with corresponding SLF4J method calls

org.openrewrite.java.logging.slf4j.JulToSlf4jSimpleCallsWithThrowableRecipes

Replace calls to Logger.log(Level, String, Throwable) with the corresponding SLF4J method calls.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL logger.log(Level.ALL, String message, Throwable e) with SLF4J's Logger.trace(message, e)

org.openrewrite.java.logging.slf4j.JulToSlf4jSimpleCallsWithThrowableRecipes$JulToSlf4jSupplierAllRecipe

Replace calls to java.util.logging.Logger.log(Level.ALL, String message, Throwable e) with org.slf4j.Logger.trace(message, e).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL logger.log(Level.CONFIG, String message, Throwable e) with SLF4J's Logger.info(message, e)

org.openrewrite.java.logging.slf4j.JulToSlf4jSimpleCallsWithThrowableRecipes$JulToSlf4jSupplierConfigRecipe

Replace calls to java.util.logging.Logger.log(Level.CONFIG, String message, Throwable e) with org.slf4j.Logger.info(message, e).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL logger.log(Level.FINE, String message, Throwable e) with SLF4J's Logger.debug(message, e)

org.openrewrite.java.logging.slf4j.JulToSlf4jSimpleCallsWithThrowableRecipes$JulToSlf4jSupplierFineRecipe

Replace calls to java.util.logging.Logger.log(Level.FINE, String message, Throwable e) with org.slf4j.Logger.debug(message, e).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL logger.log(Level.FINER, String message, Throwable e) with SLF4J's Logger.trace(message, e)

org.openrewrite.java.logging.slf4j.JulToSlf4jSimpleCallsWithThrowableRecipes$JulToSlf4jSupplierFinerRecipe

Replace calls to java.util.logging.Logger.log(Level.FINER, String message, Throwable e) with org.slf4j.Logger.trace(message, e).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL logger.log(Level.FINEST, String message, Throwable e) with SLF4J's Logger.trace(message, e)

org.openrewrite.java.logging.slf4j.JulToSlf4jSimpleCallsWithThrowableRecipes$JulToSlf4jSupplierFinestRecipe

Replace calls to java.util.logging.Logger.log(Level.FINEST, String message, Throwable e) with org.slf4j.Logger.trace(message, e).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL logger.log(Level.INFO, String message, Throwable e) with SLF4J's Logger.info(message, e)

org.openrewrite.java.logging.slf4j.JulToSlf4jSimpleCallsWithThrowableRecipes$JulToSlf4jSupplierInfoRecipe

Replace calls to java.util.logging.Logger.log(Level.INFO, String message, Throwable e) with org.slf4j.Logger.info(message, e).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL logger.log(Level.SEVERE, String message, Throwable e) with SLF4J's Logger.error(message, e)

org.openrewrite.java.logging.slf4j.JulToSlf4jSimpleCallsWithThrowableRecipes$JulToSlf4jSupplierSevereRecipe

Replace calls to java.util.logging.Logger.log(Level.SEVERE, String message, Throwable e) with org.slf4j.Logger.error(message, e).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUL logger.log(Level.WARNING, String message, Throwable e) with SLF4J's Logger.warn(message, e)

org.openrewrite.java.logging.slf4j.JulToSlf4jSimpleCallsWithThrowableRecipes$JulToSlf4jSupplierWarningRecipe

Replace calls to java.util.logging.Logger.log(Level.WARNING, String message, Throwable e) with org.slf4j.Logger.warn(message, e).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Loggers should be named for their enclosing classes

org.openrewrite.java.logging.slf4j.LoggersNamedForEnclosingClass

Ensure LoggerFactory#getLogger(Class) is called with the enclosing class as argument.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Match if (is*Enabled()) with logging statements

org.openrewrite.java.logging.slf4j.MatchIsLogLevelEnabledWithLogStatements

Change any if (is*Enabled()) statements that do not match the maximum log level used in the then part to use the matching is*Enabled() method for that log level. This ensures that the logging condition is consistent with the actual logging statements.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

SLF4J logging statements should begin with constants

org.openrewrite.java.logging.slf4j.Slf4jLogShouldBeConstant

Logging statements shouldn't begin with String#format, calls to toString(), etc.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Strip toString() from arguments

org.openrewrite.java.logging.slf4j.StripToStringFromArguments

Remove .toString() from logger call arguments; SLF4J will automatically call toString() on an argument when not a string, and do so only if the log level is enabled.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Optimize log statements

org.openrewrite.java.logging.slf4j.WrapExpensiveLogStatementsInConditionals

When trace, debug and info log statements use methods for constructing log messages, those methods are called regardless of whether the log level is enabled. This recipe optimizes these statements by either wrapping them in if-statements (SLF4J 1.x) or converting them to fluent API calls (SLF4J 2.0+) to ensure expensive methods are only called when necessary.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Inline log4j-api-2 methods annotated with @InlineMe

org.apache.logging.log4j.InlineLog4jApiMethods

Automatically generated recipes to inline method calls based on @InlineMe annotations discovered in the type table.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

JBoss Logging Best Practices

org.openrewrite.java.logging.jboss.JBossLoggingBestPractices

This recipe applies best practices for logging in JBoss applications. It includes converting argument arrays to varargs for better readability and performance.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Parameterize Log4j 2.x logging statements

org.openrewrite.java.logging.log4j.ParameterizedLogging

Use Log4j 2.x parameterized logging, which can significantly boost performance for messages that otherwise would be assembled with String concatenation. Particularly impactful when the log level is not enabled, as no work is done to assemble the message.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Log4j 1.x to Log4j 2.x

org.openrewrite.java.logging.log4j.Log4j1ToLog4j2

Migrates Log4j 1.x to Log4j 2.x.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade Log4j 2.x dependency version

org.openrewrite.java.logging.log4j.UpgradeLog4J2DependencyVersion

Upgrades the Log4j 2.x dependencies to the latest 2.x version. Mitigates the Log4Shell and other Log4j2-related vulnerabilities.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate JCL to Log4j 2.x API

org.openrewrite.java.logging.log4j.CommonsLoggingToLog4j

Transforms code written using Apache Commons Logging to use Log4j 2.x API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate JUL to Log4j 2.x API

org.openrewrite.java.logging.log4j.JulToLog4j

Transforms code written using java.util.logging to use Log4j 2.x API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate SLF4J to Log4j 2.x API

org.openrewrite.java.logging.log4j.Slf4jToLog4j

Transforms code written using SLF4J to use Log4j 2.x API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Log4j 2.x to Logback

org.openrewrite.java.logging.logback.Log4jToLogback

Migrates usage of Apache Log4j 2.x to using logback as an SLF4J implementation directly. Note, this currently does not modify log4j.properties files.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Log4j to SLF4J

org.openrewrite.java.logging.slf4j.Log4jToSlf4j

Migrates usage of Apache Log4j to using SLF4J directly. Use of the traditional Log4j to SLF4J bridge can result in loss of performance, as the Log4j messages must be formatted before they can be passed to SLF4J. Note, this currently does not modify log4j.properties files.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Parameterize SLF4J's logging statements

org.openrewrite.java.logging.slf4j.ParameterizedLogging

Use SLF4J's parameterized logging, which can significantly boost performance for messages that otherwise would be assembled with String concatenation. Particularly impactful when the log level is not enabled, as no work is done to assemble the message.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Log4j 2.x to SLF4J 1.x

org.openrewrite.java.logging.slf4j.Log4j2ToSlf4j1

Transforms usages of Log4j 2.x to leveraging SLF4J 1.x directly. Note, this currently does not modify log4j.properties files.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Log4j 1.x to SLF4J 1.x

org.openrewrite.java.logging.slf4j.Log4j1ToSlf4j1

Transforms usages of Log4j 1.x to leveraging SLF4J 1.x directly. Note, this currently does not modify log4j.properties files.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

SLF4J best practices

org.openrewrite.java.logging.slf4j.Slf4jBestPractices

Applies best practices to logging with SLF4J.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Apache Commons Logging 1.x to SLF4J 1.x

org.openrewrite.java.logging.slf4j.CommonsLogging1ToSlf4j1

Transforms usages of Apache Commons Logging 1.x to leveraging SLF4J 1.x directly.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate JUL to SLF4J

org.openrewrite.java.logging.slf4j.JulToSlf4j

Migrates usage of Java Util Logging (JUL) to using SLF4J directly.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate JBoss Logging to SLF4J

org.openrewrite.java.logging.slf4j.JBossLoggingToSlf4j

Migrates usage of the JBoss Logging facade to using SLF4J.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add JBoss LogManager's SLF4J provider

org.openrewrite.java.logging.slf4j.AddJBossLogManagerSlf4jProviderDependency

When JBoss LogManager is the logging backend, add its SLF4J provider so we can migrate to SLF4J as a logging facade.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Convert Micrometer Timer to Observations

org.openrewrite.micrometer.TimerToObservation

Convert Micrometer Timer to Observations to instrument once, and get multiple benefits out of it.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find Dropwizard metrics

org.openrewrite.micrometer.dropwizard.FindDropwizardMetrics

Find uses of Dropwizard metrics that could be converted to a more modern metrics instrumentation library.

Data tables:

  • org.openrewrite.micrometer.table.DropwizardMetricsInUse: These metrics should be converted to a more moderne metrics instrumentation library.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Misk counter to Micrometer

org.openrewrite.micrometer.misk.MigrateEmptyLabelMiskCounter

Convert a Misk (Prometheus) counter to a Micrometer counter.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Don't use an explicit empty label list

org.openrewrite.micrometer.misk.NoExplicitEmptyLabelList

listOf() is the default argument for the labels parameter.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Micrometer 1.13

org.openrewrite.micrometer.UpgradeMicrometer_1_13

Migrate applications to the latest Micrometer 1.13 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions as described in the Micrometer 1.13 migration guide.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Micrometer best practices

org.openrewrite.micrometer.MicrometerBestPractices

This recipe will apply a set of best practice refactorings for Micrometer, like adopting Observations instead of Timers.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Misk metrics to Micrometer

org.openrewrite.micrometer.misk.MigrateMiskToMicrometer

This recipe will move Misk metrics to Micrometer, where that is possible to do without a loss of fidelity.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add HttpRequest type parameter for implemented interfaces

org.openrewrite.java.micronaut.AddHttpRequestTypeParameter

Add an HttpRequest type parameter to a class implements statement for interfaces that have been generically parameterized where they previously specified HttpRequest explicitly.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add micronaut-test-resources-client if needed

org.openrewrite.java.micronaut.AddTestResourcesClientDependencyIfNeeded

Add the micronaut-test-resources-client dependency to pom.xml if test.resources.client.enabled property=true.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

De-capitalize BeanIntrospection getProperty(..) and getRequiredProperty(..) name arguments

org.openrewrite.java.micronaut.BeanPropertyCapitalizationStrategy

As of Micronaut 3.x property names for getters like getXForwarded() are de-capitalized from XForwarded to xForwarded.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change Maven annotation processor path

org.openrewrite.java.micronaut.ChangeAnnotationProcessorPath

Change the groupId, artifactId, and version of a Maven annotation processor path.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find Micronaut properties config

org.openrewrite.java.micronaut.FindPropertiesConfig

Find Micronaut properties configuration files.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find Micronaut yaml config

org.openrewrite.java.micronaut.FindYamlConfig

Find Micronaut yaml configuration files.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Fix deprecated no-arg ExceptionHandler constructors

org.openrewrite.java.micronaut.FixDeprecatedExceptionHandlerConstructors

Adds ErrorResponseProcessor argument to deprecated no-arg ExceptionHandler constructors.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Convert OncePerRequestServerFilter extensions to HttpServerFilter

org.openrewrite.java.micronaut.OncePerRequestHttpServerFilterToHttpServerFilter

Starting in Micronaut 3.0 all filters are executed once per request. Directly implement HttpServerFilter instead of extending OncePerRequestHttpServerFilter and replace any usages of micronaut.once attributes with a custom attribute name.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Provider implementation beans to Micronaut @Factory

org.openrewrite.java.micronaut.ProviderImplementationsToMicronautFactories

As of Micronaut 3.x the @Factory annotation is required for creating beans from javax.inject.Provider get() implementations.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove Maven annotation processor path

org.openrewrite.java.micronaut.RemoveAnnotationProcessorPath

Remove the Maven annotation processor path that matches the given groupId and artifactId.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change factory method return types to reflect their resolved return type

org.openrewrite.java.micronaut.SubclassesReturnedFromFactoriesNotInjectable

As of Micronaut 3.x It is no longer possible to inject the internal implementation type from beans produced via factories. Factory method return types are changed to reflect the resolved return type if the method returns a single non-null type that does not match the method declaration return type.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update relocated Micronaut Security config properties

org.openrewrite.java.micronaut.UpdateSecurityPropertiesIfNeeded

This recipe will update relocated security config keys in Micronaut configuration property files.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update relocated Micronaut Security config yaml keys

org.openrewrite.java.micronaut.UpdateSecurityYamlIfNeeded

This recipe will update relocated security config keys in Micronaut configuration yaml files.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade gradle.properties Micronaut version

org.openrewrite.java.micronaut.UpgradeMicronautGradlePropertiesVersion

Set the gradle.properties version number according to a node-style semver selector or to a specific version number.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade micronaut.version Maven property

org.openrewrite.java.micronaut.UpgradeMicronautMavenPropertyVersion

Set the maven micronaut.version property according to a node-style semver selector or to a specific version number.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add Maven annotation processor path

org.openrewrite.java.micronaut.AddAnnotationProcessorPath

Add the groupId, artifactId, version, and exclusions of a Maven annotation processor path.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add snakeyaml dependency if needed

org.openrewrite.java.micronaut.AddSnakeYamlDependencyIfNeeded

This recipe will add the snakeyaml dependency to a Micronaut 4 application that uses yaml configuration.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Copy non-inherited annotations from super class

org.openrewrite.java.micronaut.CopyNonInheritedAnnotations

As of Micronaut 3.x only annotations that are explicitly meta-annotated with @Inherited are inherited from parent classes and interfaces.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add @Introspected to classes requiring a map representation

org.openrewrite.java.micronaut.TypeRequiresIntrospection

In Micronaut 2.x a reflection-based strategy was used to retrieve that information if the class was not annotated with @Introspected. As of Micronaut 3.x it is required to annotate classes with @Introspected that are used in this way.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate from Micronaut 2.x to 3.x

org.openrewrite.java.micronaut.Micronaut2to3Migration

This recipe will apply changes required for migrating from Micronaut 2 to Micronaut 3.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Migrate from Micronaut 3.x to 4.x

org.openrewrite.java.micronaut.Micronaut3to4Migration

This recipe will apply changes required for migrating from Micronaut 3 to Micronaut 4.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Update the Micronaut version to 4.x

org.openrewrite.java.micronaut.UpdateBuildToMicronaut4Version

This recipe will update the Micronaut version to 4.x for a Gradle or Maven build.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add Micronaut build plugins to 4.x

org.openrewrite.java.micronaut.UpdateBuildPlugins

This recipe will update the shadow jar plugin to 8.x and the Micronaut build plugins to 4.x for a Gradle build.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update to Micronaut 4.x platform BOM

org.openrewrite.java.micronaut.UpdateMicronautPlatformBom

This recipe will update a Gradle or Maven build to reference the Micronaut 4 platform BOM.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update jakarta annotations dependency

org.openrewrite.java.micronaut.UpdateJakartaAnnotations

This recipe will remove jakarta annotations dependency as it is a transitive dependency of micronaut-inject, and migrate from javax.annotation if needed.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update to Micronaut Validation 4.x

org.openrewrite.java.micronaut.UpdateMicronautValidation

This recipe will add jakarta validation dependency if needed, migrate from javax.validation if needed, and update micronaut validation dependencies.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Update to Micronaut Email 2.x

org.openrewrite.java.micronaut.UpdateMicronautEmail

This recipe will migrate from javax.validation if needed, and update packages in for the Postmark integration if needed.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update the Micronaut Websocket support

org.openrewrite.java.micronaut.AddMicronautWebsocketDependencyIfNeeded

This recipe will add the explicit Micronaut Websocket dependency if needed

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update the Micronaut Session support

org.openrewrite.java.micronaut.UpdateMicronautSession

This recipe will update the Micronaut Session dependency if needed

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Update the Micronaut Retry support

org.openrewrite.java.micronaut.AddMicronautRetryDependencyIfNeeded

This recipe will add the explicit Micronaut Retry dependency if needed

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update the Micronaut Security library

org.openrewrite.java.micronaut.UpdateMicronautSecurity

This recipe will update imports for relocated classes and update configuration files with renamed keys.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update the Micronaut Data library

org.openrewrite.java.micronaut.UpdateMicronautData

This recipe will make the necessary updates for using Micronaut Data with Micronaut Framework 4.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate the use of TaskExecutors with blocking IO

org.openrewrite.java.micronaut.UpdateBlockingTaskExecutors

This recipe will any usage of TaskExecutors.IO to TaskExecutors.BLOCKING in order to be compatible with virtual threads.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove withJansi Logback configuration

org.openrewrite.java.micronaut.RemoveWithJansiLogbackConfiguration

This recipe will remove the withJansi configuration tag from logback.xml.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove unnecessary dependencies

org.openrewrite.java.micronaut.RemoveUnnecessaryDependencies

This recipe will remove dependencies that are no longer explicitly needed.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update the version of core annotation processors

org.openrewrite.java.micronaut.UpdateMavenAnnotationProcessors

This recipe will update the version of Maven-configured annotation processors from Micronaut Core.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add JDeprScan Maven Plug-in

org.openrewrite.java.migrate.AddJDeprScanPlugin

Add the JDeprScan Maven plugin to scan class files for uses of deprecated APIs.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Adds missing method implementations

org.openrewrite.java.migrate.AddMissingMethodImplementation

Check for missing methods required by interfaces and adds them.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add maven jar plugin to suppress illegal reflection warnings

org.openrewrite.java.migrate.AddSuppressionForIllegalReflectionWarningsPlugin

Adds a maven jar plugin that's configured to suppress Illegal Reflection Warnings.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Catch TypeNotPresentException thrown by Class.getAnnotation()

org.openrewrite.java.migrate.ArrayStoreExceptionToTypeNotPresentException

Replace catch blocks for ArrayStoreException around Class.getAnnotation() with TypeNotPresentException to ensure compatibility with Java 11+.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Behavior change to bean discovery in modules with beans.xml file with no version specified

org.openrewrite.java.migrate.BeanDiscovery

Alters beans with missing version attribute to include this attribute as well as the bean-discovery-mode="all" attribute to maintain an explicit bean archive.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change beans.xml schemaLocation to match XML namespace

org.openrewrite.java.migrate.BeansXmlNamespace

Set the schemaLocation that corresponds to the xmlns set in beans.xml files.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove explicit casts on Arrays.asList(..).toArray()

org.openrewrite.java.migrate.CastArraysAsListToList

Convert code like (Integer[]) Arrays.asList(1, 2, 3).toArray() to Arrays.asList(1, 2, 3).toArray(new Integer[0]).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Return String jks when KeyStore.getDefaultType() is called

org.openrewrite.java.migrate.ChangeDefaultKeyStore

In Java 11 the default keystore was updated from JKS to PKCS12. As a result, applications relying on KeyStore.getDefaultType() may encounter issues after migrating, unless their JKS keystore has been converted to PKCS12. This recipe returns default key store of jks when KeyStore.getDefaultType() method is called to use the pre Java 11 default keystore.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change method invocation return type

org.openrewrite.java.migrate.ChangeMethodInvocationReturnType

Changes the return type of a method invocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace DTO method parameters with data elements

org.openrewrite.java.migrate.DontOverfetchDto

Replace method parameters that have DTOs with their data elements when only the specified data element is used.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace IllegalArgumentException with AlreadyConnectedException in DatagramChannel.send() method

org.openrewrite.java.migrate.IllegalArgumentExceptionToAlreadyConnectedException

Replace IllegalArgumentException with AlreadyConnectedException for DatagramChannel.send() to ensure compatibility with Java 11+.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Rename final method declarations getSuppressed() and addSuppressed(Throwable exception) in classes that extend Throwable

org.openrewrite.java.migrate.JREThrowableFinalMethods

The recipe renames getSuppressed() and addSuppressed(Throwable exception) methods in classes that extend java.lang.Throwable to myGetSuppressed and myAddSuppressed(Throwable). These methods were added to Throwable in Java 7 and are marked final which cannot be overridden.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disable the persistence unit second-level cache

org.openrewrite.java.migrate.JpaCacheProperties

Sets an explicit value for the shared cache mode.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

MBean and MXBean interfaces must be public

org.openrewrite.java.migrate.MXBeanRule

Sets visibility of MBean and MXBean interfaces to public.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace java.lang.ref.Reference.clone() with constructor call

org.openrewrite.java.migrate.ReferenceCloneMethod

The recipe replaces any clone calls that may resolve to a java.lang.ref.Reference.clone() or any of its known subclasses: java.lang.ref.PhantomReference, java.lang.ref.SoftReference, and java.lang.ref.WeakReference with a constructor call passing in the referent and reference queue as parameters.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove illegal semicolons

org.openrewrite.java.migrate.RemoveIllegalSemicolons

Remove semicolons after package declarations and imports, no longer accepted in Java 21 as of JDK-8027682.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace deprecated methods inSecurityManager

org.openrewrite.java.migrate.RemovedSecurityManagerMethods

Replace SecurityManager methods checkAwtEventQueueAccess(), checkSystemClipboardAccess(), checkMemberAccess() and checkTopLevelWindow() deprecated in Java SE 11 by checkPermission(new java.security.AllPermission()).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace AWT getPeer() method

org.openrewrite.java.migrate.ReplaceAWTGetPeerMethod

This recipe replaces the use of getPeer() method in java.awt.* classes. component.getPeer() != null is replaced with component.isDisplayable() and component.getPeer() instanceof LightweightPeer is replaced with component.isLightweight().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace com.sun.awt.AWTUtilities static method invocations

org.openrewrite.java.migrate.ReplaceComSunAWTUtilitiesMethods

This recipe replaces several static calls in com.sun.awt.AWTUtilities with the JavaSE 11 equivalent. The methods replaced are AWTUtilities.isTranslucencySupported(), AWTUtilities.setWindowOpacity(), AWTUtilities.getWindowOpacity(), AWTUtilities.getWindowShape(), AWTUtilities.isWindowOpaque(), AWTUtilities.isTranslucencyCapable() and AWTUtilities.setComponentMixingCutoutShape().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace getLocalizedInputStream and getLocalizedOutputStream with direct assignment

org.openrewrite.java.migrate.ReplaceLocalizedStreamMethods

Replaces Runtime.getLocalizedInputStream(InputStream) and Runtime.getLocalizedOutputStream(OutputStream) with their direct arguments. This modification is made because the previous implementation of getLocalizedInputStream and getLocalizedOutputStream merely returned the arguments provided.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace String literal

org.openrewrite.java.migrate.ReplaceStringLiteralValue

Replace the value of a complete String literal.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update SDKMan Java version

org.openrewrite.java.migrate.UpdateSdkMan

Update the SDKMAN JDK version in the .sdkmanrc file. Given a major release (e.g., 17), the recipe will update the current distribution to the current default SDKMAN version of the specified major release. The distribution option can be used to specify a specific JVM distribution. Note that these must correspond to valid SDKMAN distributions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade Java version

org.openrewrite.java.migrate.UpgradeJavaVersion

Upgrade build plugin configuration to use the specified Java version. This recipe changes java.toolchain.languageVersion in build.gradle(.kts) of gradle projects, or maven-compiler-plugin target version and related settings. Will not downgrade if the version is newer than the specified version.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer java.util.Base64 instead of sun.misc

org.openrewrite.java.migrate.UseJavaUtilBase64

Prefer java.util.Base64 instead of using sun.misc in Java 8 or higher. sun.misc is not exported by the Java module system and accessing this class will result in a warning in Java 11 and an error in Java 17.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Force indentation to either tabs or spaces

org.openrewrite.java.migrate.UseTabsOrSpaces

This is useful for one-off migrations of a codebase that has mixed indentation styles, while preserving all other auto-detected formatting rules.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer new AtomicReference&lt;&gt;()

org.openrewrite.java.migrate.guava.NoGuavaAtomicsNewReference

Prefer the Java standard library over third-party usage of Guava in simple cases like this.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Collection.stream().map(Function) over Collections2.transform

org.openrewrite.java.migrate.guava.NoGuavaCollections2Transform

Prefer Collection.stream().map(Function) over Collections2.transform(Collection, Function).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Files#createTempDirectory()

org.openrewrite.java.migrate.guava.NoGuavaCreateTempDir

Replaces Guava Files#createTempDir() with Java Files#createTempDirectory(..). Transformations are limited to scopes throwing or catching java.io.IOException.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Runnable::run

org.openrewrite.java.migrate.guava.NoGuavaDirectExecutor

Executor is a SAM-compatible interface, so Runnable::run is just as succinct as MoreExecutors.directExecutor() but without the third-party library requirement.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Function.compose(Function)

org.openrewrite.java.migrate.guava.NoGuavaFunctionsCompose

Prefer Function.compose(Function) over Functions.compose(Function, Function).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer List.of(..) in Java 9 or higher

org.openrewrite.java.migrate.guava.NoGuavaImmutableListOf

Replaces .common.collect.ImmutableList.of(..) if the returned type is immediately down-cast.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Map.of(..) in Java 9 or higher

org.openrewrite.java.migrate.guava.NoGuavaImmutableMapOf

Replaces .common.collect.ImmutableMap.of(..) if the returned type is immediately down-cast.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Set.of(..) in Java 9 or higher

org.openrewrite.java.migrate.guava.NoGuavaImmutableSetOf

Replaces .common.collect.ImmutableSet.of(..) if the returned type is immediately down-cast.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Collection.stream().allMatch(Predicate)

org.openrewrite.java.migrate.guava.NoGuavaIterablesAll

Prefer Collection.stream().allMatch(Predicate) over Iterables.all(Collection, Predicate).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Collection.stream().anyMatch(Predicate)

org.openrewrite.java.migrate.guava.NoGuavaIterablesAnyFilter

Prefer Collection.stream().anyMatch(Predicate) over Iterables.any(Collection, Predicate).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Collection.stream().map(Function) over Iterables.transform

org.openrewrite.java.migrate.guava.NoGuavaIterablesTransform

Prefer Collection.stream().map(Function) over Iterables.transform(Collection, Function).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer new ArrayList&lt;&gt;()

org.openrewrite.java.migrate.guava.NoGuavaListsNewArrayList

Prefer the Java standard library over third-party usage of Guava in simple cases like this.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer new CopyOnWriteArrayList&lt;&gt;()

org.openrewrite.java.migrate.guava.NoGuavaListsNewCopyOnWriteArrayList

Prefer the Java standard library over third-party usage of Guava in simple cases like this.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer new LinkedList&lt;&gt;()

org.openrewrite.java.migrate.guava.NoGuavaListsNewLinkedList

Prefer the Java standard library over third-party usage of Guava in simple cases like this.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer new HashMap&lt;&gt;()

org.openrewrite.java.migrate.guava.NoGuavaMapsNewHashMap

Prefer the Java standard library over third-party usage of Guava in simple cases like this.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer new LinkedHashMap&lt;&gt;()

org.openrewrite.java.migrate.guava.NoGuavaMapsNewLinkedHashMap

Prefer the Java standard library over third-party usage of Guava in simple cases like this.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer new TreeMap&lt;&gt;()

org.openrewrite.java.migrate.guava.NoGuavaMapsNewTreeMap

Prefer the Java standard library over third-party usage of Guava in simple cases like this.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Optional.stream().collect(Collectors.toSet())

org.openrewrite.java.migrate.guava.NoGuavaOptionalAsSet

Prefer Optional.stream().collect(Collectors.toSet()) over Optional.asSet().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace com.google.common.base.Optional#fromJavaUtil(java.util.Optional) with argument

org.openrewrite.java.migrate.guava.NoGuavaOptionalFromJavaUtil

Replaces com.google.common.base.Optional#fromJavaUtil(java.util.Optional) with argument.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove com.google.common.base.Optional#toJavaUtil()

org.openrewrite.java.migrate.guava.NoGuavaOptionalToJavaUtil

Remove calls to com.google.common.base.Optional#toJavaUtil().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change Guava's Predicate into java.util.function.Predicate where possible

org.openrewrite.java.migrate.guava.NoGuavaPredicate

Change the type only where no methods are used that explicitly require a Guava Predicate.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Predicate.and(Predicate)

org.openrewrite.java.migrate.guava.NoGuavaPredicatesAndOr

Prefer Predicate.and(Predicate) over Predicates.and(Predicate, Predicate).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Predicate.isEqual(Object)

org.openrewrite.java.migrate.guava.NoGuavaPredicatesEqualTo

Prefer Predicate.isEqual(Object) over Predicates.equalTo(Object).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer A.class::isInstance

org.openrewrite.java.migrate.guava.NoGuavaPredicatesInstanceOf

Prefer A.class::isInstance over Predicates.instanceOf(A.class).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Arrays.asList(..) over Guava primitives

org.openrewrite.java.migrate.guava.NoGuavaPrimitiveAsList

Migrate from Guava com.google.common.primitives.* asList(..) to Arrays.asList(..).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster style Guava to Java migration recipes

org.openrewrite.java.migrate.guava.NoGuavaRefasterRecipes

Recipes that migrate from Guava to Java, using Refaster style templates for cases beyond what declarative recipes can cover.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Preconditions.checkNotNull to Objects.requireNonNull

org.openrewrite.java.migrate.guava.NoGuavaRefasterRecipes$PreconditionsCheckNotNullToObjectsRequireNonNullRecipe

Migrate from Guava Preconditions.checkNotNull to Java 8 java.util.Objects.requireNonNull.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Preconditions.checkNotNull with Object message to Objects.requireNonNull with String.valueOf

org.openrewrite.java.migrate.guava.NoGuavaRefasterRecipes$PreconditionsCheckNotNullWithMessageToObjectsRequireNonNullMessageTypeObjectRecipe

Migrate from Guava Preconditions.checkNotNull to Java 8 java.util.Objects.requireNonNull.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Preconditions.checkNotNull with String message to Objects.requireNonNull

org.openrewrite.java.migrate.guava.NoGuavaRefasterRecipes$PreconditionsCheckNotNullWithMessageToObjectsRequireNonNullRecipe

Migrate from Guava Preconditions.checkNotNull to Java 8 java.util.Objects.requireNonNull.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Collection.stream().filter(Predicate)

org.openrewrite.java.migrate.guava.NoGuavaSetsFilter

Prefer Collection.stream().filter(Predicate) over Sets.filter(Set, Predicate).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer new ConcurrentHashMap&lt;&gt;()

org.openrewrite.java.migrate.guava.NoGuavaSetsNewConcurrentHashSet

Prefer the Java standard library over third-party usage of Guava in simple cases like this.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer new HashSet&lt;&gt;()

org.openrewrite.java.migrate.guava.NoGuavaSetsNewHashSet

Prefer the Java standard library over third-party usage of Guava in simple cases like this.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer new LinkedHashSet&lt;&gt;()

org.openrewrite.java.migrate.guava.NoGuavaSetsNewLinkedHashSet

Prefer the Java standard library over third-party usage of Guava in simple cases like this.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer JDK methods for Maps and Sets of an expected size

org.openrewrite.java.migrate.guava.NoMapsAndSetsWithExpectedSize

Prefer Java 19+ methods to create Maps and Sets of an expected size instead of using Guava methods.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer String#join() over Guava Joiner#join()

org.openrewrite.java.migrate.guava.PreferJavaStringJoin

Replaces supported calls to com.google.common.base.Joiner#join() with java.lang.String#join().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer java.util.Optional#orElse(null) over com.google.common.base.Optional#orNull()

org.openrewrite.java.migrate.guava.PreferJavaUtilOptionalOrElseNull

Replaces com.google.common.base.Optional#orNull() with java.util.Optional#orElse(null).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer java.util.Optional#or(Supplier&lt;T extends java.util.Optional&lt;T&gt;&gt;)

org.openrewrite.java.migrate.guava.PreferJavaUtilOptionalOrSupplier

Prefer java.util.Optional#or(Supplier&lt;T extends java.util.Optional&lt;T&gt;&gt;) over `com.google.common.base.Optional#or(com.google.common.base.Optional).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace invocations of finalize() on FileInputStream and FileOutputStream with close()

org.openrewrite.java.migrate.io.ReplaceFileInOrOutputStreamFinalizeWithClose

Replace invocations of the deprecated finalize() method on FileInputStream and FileOutputStream with close().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate System.out.print to Java 25 IO utility class

org.openrewrite.java.migrate.io.ReplaceSystemOutWithIOPrint

Replace System.out.print(), System.out.println() with IO.print() and IO.println(). Migrates to the new IO utility class introduced in Java 25.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove trailing slash from jakarta.ws.rs.ApplicationPath values

org.openrewrite.java.migrate.jakarta.ApplicationPathWildcardNoLongerAccepted

Remove trailing /* from jakarta.ws.rs.ApplicationPath values.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove Bean.isNullable()

org.openrewrite.java.migrate.jakarta.RemoveBeanIsNullable

Bean.isNullable() has been removed in CDI 4.0.0, and now always returns false.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace BeforeBeanDiscovery.addAnnotatedType(AnnotatedType) with addAnnotatedType(AnnotatedType, String)

org.openrewrite.java.migrate.jakarta.UpdateAddAnnotatedTypes

BeforeBeanDiscovery.addAnnotatedType(AnnotatedType) is deprecated in CDI 1.1. It is Replaced by BeforeBeanDiscovery.addAnnotatedType(AnnotatedType, String).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update annotation attributes using javax to jakarta

org.openrewrite.java.migrate.jakarta.UpdateAnnotationAttributeJavaxToJakarta

Replace javax with jakarta in annotation attributes for matching annotation signatures.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update fireEvent() and createInjectionTarget() calls

org.openrewrite.java.migrate.jakarta.UpdateBeanManagerMethods

Updates BeanManager.fireEvent() or BeanManager.createInjectionTarget().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Updates getRealPath() to call getContext() followed by getRealPath()

org.openrewrite.java.migrate.jakarta.UpdateGetRealPath

Updates getRealPath() for jakarta.servlet.ServletRequest and jakarta.servlet.ServletRequestWrapper to use ServletContext.getRealPath(String).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update Faces @ManagedBean to use CDI @Named

org.openrewrite.java.migrate.jakarta.UpdateManagedBeanToNamed

Faces ManagedBean was deprecated in JSF 2.3 (EE8) and removed in Jakarta Faces 4.0 (EE10). Replace @ManagedBean with @Named for CDI-based bean management.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

@ElementCollection annotations must be accompanied by a defined @Column annotation

org.openrewrite.java.migrate.javax.AddColumnAnnotation

When an attribute is annotated with @ElementCollection, a separate table is created for the attribute that includes the attribute ID and value. In OpenJPA, the column for the annotated attribute is named element, whereas EclipseLink names the column based on the name of the attribute. To remain compatible with tables that were created with OpenJPA, add a @Column annotation with the name attribute set to element.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

@Entity objects with constructors must also have a default constructor

org.openrewrite.java.migrate.javax.AddDefaultConstructorToEntityClass

When a Java Persistence API (JPA) entity class has a constructor with arguments, the class must also have a default, no-argument constructor. The OpenJPA implementation automatically generates the no-argument constructor, but the EclipseLink implementation does not.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use the latest JAX-WS API and runtime for Jakarta EE 8

org.openrewrite.java.migrate.javax.AddJaxwsRuntime

Update build files to use the latest JAX-WS runtime from Jakarta EE 8 to maintain compatibility with Java version 11 or greater. The recipe will add a JAX-WS run-time, in Gradle compileOnly+testImplementation and Maven provided scope, to any project that has a transitive dependency on the JAX-WS API. The resulting dependencies still use the javax namespace, despite the move to the Jakarta artifact.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use the latest JAX-WS API and runtime for Jakarta EE 8

org.openrewrite.java.migrate.javax.AddJaxwsRuntime$AddJaxwsRuntimeGradle

Update Gradle build files to use the latest JAX-WS runtime from Jakarta EE 8 to maintain compatibility with Java version 11 or greater. The recipe will add a JAX-WS run-time, in compileOnly+testImplementation configurations, to any project that has a transitive dependency on the JAX-WS API. The resulting dependencies still use the javax namespace, despite the move to the Jakarta artifact.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use the latest JAX-WS API and runtime for Jakarta EE 8

org.openrewrite.java.migrate.javax.AddJaxwsRuntime$AddJaxwsRuntimeMaven

Update maven build files to use the latest JAX-WS runtime from Jakarta EE 8 to maintain compatibility with Java version 11 or greater. The recipe will add a JAX-WS run-time, in provided scope, to any project that has a transitive dependency on the JAX-WS API. The resulting dependencies still use the javax namespace, despite the move to the Jakarta artifact.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Attributes with automatically generated values require configuration

org.openrewrite.java.migrate.javax.AddTableGenerator

Adds missing @TableGenerator annotation and updates the @GeneratedValue annotation values when it uses automatically generated values.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Unannotated collection attributes require a Transient annotation

org.openrewrite.java.migrate.javax.AddTransientAnnotationToCollections

In OpenJPA, attributes that inherit from the java.util.Collection&lt;E&gt; interface are not a default persistent type, so these attributes are not persisted unless they are annotated. EclipseLink has a different default behavior and attempts to persist these attributes to the database. To keep the OpenJPA behavior of ignoring unannotated collection attributes, add the javax.persistence.Transient annotation to these attributes in EclipseLink.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Private accessor methods must have a @Transient annotation

org.openrewrite.java.migrate.javax.AddTransientAnnotationToPrivateAccessor

According to the JPA 2.1 specification, when property access is used, the property accessor methods must be public or protected. OpenJPA ignores any private accessor methods, whereas EclipseLink persists those attributes. To ignore private accessor methods in EclipseLink, the methods must have a @Transient annotation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use HttpServletRequest logout method for programmatic security logout in Servlet 3.0

org.openrewrite.java.migrate.javax.HttpSessionInvalidate

Do not rely on HttpSession invalidate method for programmatic security logout. Add the HttpServletRequest logout method which was introduced in Java EE 6 as part of the Servlet 3.0 specification.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove the @Temporal annotation for some java.sql attributes

org.openrewrite.java.migrate.javax.RemoveTemporalAnnotation

OpenJPA persists the fields of attributes of type java.sql.Date, java.sql.Time, or java.sql.Timestamp that have a javax.persistence.Temporal annotation, whereas EclipseLink throws an exception. Remove the @Temporal annotation so the behavior in EclipseLink will match the behavior in OpenJPA.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

@JoinColumn annotations must be used with relationship mappings

org.openrewrite.java.migrate.javax.UseJoinColumnForMapping

In OpenJPA, when a relationship attribute has either a @OneToOne or a @ManyToOne annotation with a @Column annotation, the @Column annotation is treated as a @JoinColumn annotation. EclipseLink throws an exception that indicates that the entity class must use @JoinColumn instead of @Column to map a relationship attribute.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add explicit import for Record classes

org.openrewrite.java.migrate.lang.ExplicitRecordImport

Add explicit import for Record classes when upgrading past Java 14+, to avoid conflicts with java.lang.Record.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

If-else-if-else to switch

org.openrewrite.java.migrate.lang.IfElseIfConstructToSwitch

Replace if-else-if-else with switch statements. In order to be replaced with a switch, all conditions must be on the same variable and there must be at least three cases.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use ClassLoader#defineClass(String, byte[], int, int)

org.openrewrite.java.migrate.lang.MigrateClassLoaderDefineClass

Use ClassLoader#defineClass(String, byte[], int, int) instead of the deprecated ClassLoader#defineClass(byte[], int, int) in Java 1.1 or higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use Class#getDeclaredConstructor().newInstance()

org.openrewrite.java.migrate.lang.MigrateClassNewInstanceToGetDeclaredConstructorNewInstance

Use Class#getDeclaredConstructor().newInstance() instead of the deprecated Class#newInstance() in Java 9 or higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate public static void main(String[] args) to instance void main()

org.openrewrite.java.migrate.lang.MigrateMainMethodToInstanceMain

Migrate public static void main(String[] args) method to instance void main() method when the args parameter is unused, as supported by JEP 512 in Java 25+.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use Process#waitFor(Duration)

org.openrewrite.java.migrate.lang.MigrateProcessWaitForDuration

Use Process#waitFor(Duration) instead of Process#waitFor(long, TimeUnit) in Java 25 or higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use SecurityManager#checkMulticast(InetAddress)

org.openrewrite.java.migrate.lang.MigrateSecurityManagerMulticast

Use SecurityManager#checkMulticast(InetAddress) instead of the deprecated SecurityManager#checkMulticast(InetAddress, byte) in Java 1.4 or higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add null check to existing switch cases

org.openrewrite.java.migrate.lang.NullCheckAsSwitchCase

In later Java 21+, null checks are valid in switch cases. This recipe will only add null checks to existing switch cases if there are no other statements in between them or if the block in the if statement is not impacting the flow of the switch.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use switch cases refinement when possible

org.openrewrite.java.migrate.lang.RefineSwitchCases

Use guarded switch case labels and guards if all the statements in the switch block do if/else if/else on the guarded label.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace unused variables with underscore

org.openrewrite.java.migrate.lang.ReplaceUnusedVariablesWithUnderscore

Replace unused variable declarations with underscore (_) for Java 22+. This includes unused variables in enhanced for loops, catch blocks, and lambda parameters where the variable is never referenced.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer String.formatted(Object...)

org.openrewrite.java.migrate.lang.StringFormatted

Prefer String.formatted(Object...) over String.format(String, Object...) in Java 17 or higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

A collection of String rules

org.openrewrite.java.migrate.lang.StringRulesRecipes

A collection of rules for refactoring methods called on String instances in Java code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace String.indexOf(char, 0) with String.indexOf(char)

org.openrewrite.java.migrate.lang.StringRulesRecipes$IndexOfCharRecipe

Replace String.indexOf(char ch, int fromIndex) with String.indexOf(char).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace String.indexOf(String, 0) with String.indexOf(String)

org.openrewrite.java.migrate.lang.StringRulesRecipes$IndexOfStringRecipe

Replace String.indexOf(String str, int fromIndex) with String.indexOf(String).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace redundant String method calls with self

org.openrewrite.java.migrate.lang.StringRulesRecipes$RedundantCallRecipe

Replace redundant substring(..) and toString() method calls with the String self.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace lower and upper case String comparisons with String.equalsIgnoreCase(String)

org.openrewrite.java.migrate.lang.StringRulesRecipes$UseEqualsIgnoreCaseRecipe

Replace String equality comparisons involving .toLowerCase() or .toUpperCase() with String.equalsIgnoreCase(String anotherString).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Convert assigning Switch statements to Switch expressions

org.openrewrite.java.migrate.lang.SwitchCaseAssignmentsToSwitchExpression

Switch statements for which each case is assigning a value to the same variable can be converted to a switch expression that returns the value of the variable. This recipe is only applicable for Java 21 and later.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use switch cases labels for enums

org.openrewrite.java.migrate.lang.SwitchCaseEnumGuardToLabel

Use switch case labels when a guard is checking equality with an enum.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Convert switch cases where every case returns into a returned switch expression

org.openrewrite.java.migrate.lang.SwitchCaseReturnsToSwitchExpression

Switch statements where each case returns a value can be converted to a switch expression that returns the value directly. This recipe is only applicable for Java 21 and later.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Convert switch expression yield to arrow

org.openrewrite.java.migrate.lang.SwitchExpressionYieldToArrow

Convert switch expressions with colon cases and yield statements to arrow syntax. This recipe is only applicable for Java 21 and later.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace Thread.resume(), Thread.stop(), and Thread.suspend() with throw new UnsupportedOperationException()

org.openrewrite.java.migrate.lang.ThreadStopUnsupported

Thread.resume(), Thread.stop(), and Thread.suspend() always throws a new UnsupportedOperationException in Java 21+. This recipe makes that explicit, as the migration is more complicated. See https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/doc-files/threadPrimitiveDeprecation.html .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace 0 &lt; s.length() with !s.isEmpty()

org.openrewrite.java.migrate.lang.UseStringIsEmptyRecipe

Replace 0 &lt; s.length() and s.length() != 0 with !s.isEmpty().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use text blocks

org.openrewrite.java.migrate.lang.UseTextBlocks

Text blocks are easier to read than concatenated strings.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Apply var to generic method invocations

org.openrewrite.java.migrate.lang.var.UseVarForGenericMethodInvocations

Apply var to variables initialized by invocations of generic methods. This recipe ignores generic factory methods without parameters, because open rewrite cannot handle them correctly ATM.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Apply var to Generic Constructors

org.openrewrite.java.migrate.lang.var.UseVarForGenericsConstructors

Apply var to generics variables initialized by constructor calls.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use var for reference-typed variables

org.openrewrite.java.migrate.lang.var.UseVarForObject

Try to apply local variable type inference var to variables containing Objects where possible. This recipe will not touch variable declarations with generics or initializers containing ternary operators.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use var for primitive-typed variables

org.openrewrite.java.migrate.lang.var.UseVarForPrimitive

Try to apply local variable type inference var to primitive variables where possible. This recipe will not touch variable declarations with initializers containing ternary operators.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use ManagementFactory#getPlatformMXBean(PlatformLoggingMXBean.class)

org.openrewrite.java.migrate.logging.MigrateGetLoggingMXBeanToGetPlatformMXBean

Use ManagementFactory#getPlatformMXBean(PlatformLoggingMXBean.class) instead of the deprecated LogManager#getLoggingMXBean() in Java 9 or higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use LogRecord#setInstant(Instant)

org.openrewrite.java.migrate.logging.MigrateLogRecordSetMillisToSetInstant

Use LogRecord#setInstant(Instant) instead of the deprecated LogRecord#setMillis(long) in Java 9 or higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use Logger#getGlobal()

org.openrewrite.java.migrate.logging.MigrateLoggerGlobalToGetGlobal

The preferred way to get the global logger object is via the call Logger#getGlobal() over direct field access to java.util.logging.Logger.global.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use Logger#logrb(.., ResourceBundle bundleName, ..)

org.openrewrite.java.migrate.logging.MigrateLoggerLogrbToUseResourceBundle

Use Logger#logrb(.., ResourceBundle bundleName, ..) instead of the deprecated java.util.logging.Logger#logrb(.., String bundleName, ..) in Java 8 or higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Lombok's @__ syntax to onX_ for Java 8+

org.openrewrite.java.migrate.lombok.LombokOnXToOnX_

Migrates Lombok's onX annotations from the Java 7 style using @__ to the Java 8+ style using onX_. For example, @Getter(onMethod=@__({@Id})) becomes @Getter(onMethod_={@Id}).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer final var over lombok.val

org.openrewrite.java.migrate.lombok.LombokValToFinalVar

Prefer the Java standard library's final var and var over third-party usage of Lombok's lombok.val and lombok.var in Java 10 or higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Convert getter methods to annotations

org.openrewrite.java.migrate.lombok.UseLombokGetter

Convert trivial getter methods to @Getter annotations on their respective fields.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Convert setter methods to annotations

org.openrewrite.java.migrate.lombok.UseLombokSetter

Convert trivial setter methods to @Setter annotations on their respective fields.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use @NoArgsConstructor where applicable

org.openrewrite.java.migrate.lombok.UseNoArgsConstructor

Prefer the Lombok @NoArgsConstructor annotation over explicitly written out constructors.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use @CommonsLog instead of explicit fields

org.openrewrite.java.migrate.lombok.log.UseCommonsLog

Prefer the lombok annotation @CommonsLog over explicitly written out org.apache.commons.logging.Log fields.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use @JBossLog instead of explicit fields

org.openrewrite.java.migrate.lombok.log.UseJBossLog

Prefer the lombok annotation @JBossLog over explicitly written out org.jboss.logging.Logger fields.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use @Log instead of explicit fields

org.openrewrite.java.migrate.lombok.log.UseLog

Prefer the lombok annotation @Log over explicitly written out java.util.logging.Logger fields.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use @Log4j2 instead of explicit fields

org.openrewrite.java.migrate.lombok.log.UseLog4j2

Prefer the lombok annotation @Log4j2 over explicitly written out org.apache.logging.log4j.Logger fields.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use @Slf4 instead of explicit fields

org.openrewrite.java.migrate.lombok.log.UseSlf4j

Prefer the lombok annotation @Slf4 over explicitly written out org.slf4j.Logger fields.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update Maven Java project properties

org.openrewrite.java.migrate.maven.UpdateMavenProjectPropertyJavaVersion

The Java version is determined by several project properties, including: * java.version * jdk.version * javaVersion * jdkVersion * maven.compiler.source * maven.compiler.target * maven.compiler.release * release.version If none of these properties are in use and the maven compiler plugin is not otherwise configured, adds the maven.compiler.release property.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use Maven compiler plugin release configuration

org.openrewrite.java.migrate.maven.UseMavenCompilerPluginReleaseConfiguration

Replaces any explicit source or target configuration (if present) on the maven-compiler-plugin with release, and updates the release value if needed. Will not downgrade the Java version if the current version is higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Simplify Micrometer meter tags

org.openrewrite.java.migrate.metrics.SimplifyMicrometerMeterTags

Use the simplest method to add new tags.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use java.net.HttpURLConnection.HTTP_INTERNAL_ERROR

org.openrewrite.java.migrate.net.MigrateHttpURLConnectionHttpServerErrorToHttpInternalError

Use java.net.HttpURLConnection.HTTP_INTERNAL_ERROR instead of the deprecated java.net.HttpURLConnection.HTTP_SERVER_ERROR.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use java.net.MulticastSocket#setTimeToLive(int)

org.openrewrite.java.migrate.net.MigrateMulticastSocketSetTTLToSetTimeToLive

Use java.net.MulticastSocket#setTimeToLive(int) instead of the deprecated java.net.MulticastSocket#setTTL(byte) in Java 1.2 or higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use java.net.URLDecoder#decode(String, StandardCharsets.UTF_8)

org.openrewrite.java.migrate.net.MigrateURLDecoderDecode

Use java.net.URLDecoder#decode(String, StandardCharsets.UTF_8) instead of the deprecated java.net.URLDecoder#decode(String) in Java 10 or higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use java.net.URLEncoder#encode(String, StandardCharsets.UTF_8)

org.openrewrite.java.migrate.net.MigrateURLEncoderEncode

Use java.net.URLEncoder#encode(String, StandardCharsets.UTF_8) instead of the deprecated java.net.URLEncoder#encode(String) in Java 10 or higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Convert new URL(String) to URI.create(String).toURL()

org.openrewrite.java.migrate.net.URLConstructorToURICreate

Converts new URL(String) constructor to URI.create(String).toURL(). The URL constructor has been deprecated due to security vulnerabilities when handling malformed URLs. Using URI.create(String) provides stronger validation and safer URL handling in modern Java applications.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Convert new URL(String, ..) to new URI(String, ..).toURL()

org.openrewrite.java.migrate.net.URLConstructorsToNewURI

Converts new URL(String, ..) constructors to new URI(String, ..).toURL().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find which Java version is in use

org.openrewrite.java.migrate.search.AboutJavaVersion

A diagnostic for studying the distribution of Java language version levels (both source and target compatibility across files and source sets).

Data tables:

  • org.openrewrite.java.migrate.table.JavaVersionPerSourceSet: A per-source set view of Java version in use.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find data used on DTOs

org.openrewrite.java.migrate.search.FindDataUsedOnDto

Find data elements used on DTOs. This is useful to provide information where data over-fetching may be a problem.

Data tables:

  • org.openrewrite.java.migrate.table.DtoDataUses: The use of the data elements of a DTO by the method declaration using it.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find methods that only use one DTO data element

org.openrewrite.java.migrate.search.FindDtoOverfetching

Find methods that have 'opportunities' for improvement.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find uses of internal javax APIs

org.openrewrite.java.migrate.search.FindInternalJavaxApis

The libraries that define these APIs will have to be migrated before any of the repositories that use them.

Data tables:

  • org.openrewrite.java.table.MethodCalls: The text of matching method invocations.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find Java versions in use

org.openrewrite.java.migrate.search.FindJavaVersion

Finds Java versions in use.

Data tables:

  • org.openrewrite.java.migrate.table.JavaVersionTable: Records versions of Java in use
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use DriverManager#setLogWriter(java.io.PrintWriter)

org.openrewrite.java.migrate.sql.MigrateDriverManagerSetLogStream

Use DriverManager#setLogWriter(java.io.PrintWriter) instead of the deprecated DriverManager#setLogStream(java.io.PrintStream) in Java 1.2 or higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace iterator().next() with getFirst()

org.openrewrite.java.migrate.util.IteratorNext

Replace SequencedCollection.iterator().next() with getFirst().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace List.get(int), add(int, Object), and remove(int) with SequencedCollection *First and *Last methods

org.openrewrite.java.migrate.util.ListFirstAndLast

Replace list.get(0) with list.getFirst(), list.get(list.size() - 1) with list.getLast(), and similar for add(int, E) and remove(int).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer List.of(..)

org.openrewrite.java.migrate.util.MigrateCollectionsSingletonList

Prefer List.of(..) instead of using Collections.singletonList() in Java 9 or higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Map.of(..)

org.openrewrite.java.migrate.util.MigrateCollectionsSingletonMap

Prefer Map.of(..) instead of using Collections.singletonMap() in Java 9 or higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Set.of(..)

org.openrewrite.java.migrate.util.MigrateCollectionsSingletonSet

Prefer Set.Of(..) instead of using Collections.singleton() in Java 9 or higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer List.of(..)

org.openrewrite.java.migrate.util.MigrateCollectionsUnmodifiableList

Prefer List.Of(..) instead of using unmodifiableList(java.util.Arrays asList(&lt;args&gt;)) in Java 9 or higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Set.of(..)

org.openrewrite.java.migrate.util.MigrateCollectionsUnmodifiableSet

Prefer Set.Of(..) instead of using unmodifiableSet(java.util.Set(java.util.Arrays asList(&lt;args&gt;))) in Java 9 or higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use Reader.of(CharSequence) for non-synchronized readers

org.openrewrite.java.migrate.util.MigrateStringReaderToReaderOf

Migrate new StringReader(String) to Reader.of(CharSequence) in Java 25+. This only applies when assigning to Reader variables or returning from methods that return Reader. The new method creates non-synchronized readers which are more efficient when thread-safety is not required.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Optional.isPresent()

org.openrewrite.java.migrate.util.OptionalNotEmptyToIsPresent

Prefer Optional.isPresent() instead of using !Optional.isEmpty() in Java 11 or higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Optional.isEmpty()

org.openrewrite.java.migrate.util.OptionalNotPresentToIsEmpty

Prefer Optional.isEmpty() instead of using !Optional.isPresent() in Java 11 or higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Stream&lt;Optional&gt; idiom recipe

org.openrewrite.java.migrate.util.OptionalStreamRecipe

Migrate Java 8 Optional&lt;Stream&gt;.filter(Optional::isPresent).map(Optional::get) to Java 11 .flatMap(Optional::stream).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove invocations of deprecated invocations from Deflater, Inflater, ZipFile

org.openrewrite.java.migrate.util.RemoveFinalizerFromZip

Remove invocations of finalize() deprecated invocations from Deflater, Inflater, ZipFile.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace java.lang.Math random() with ThreadLocalRandom nextDouble()

org.openrewrite.java.migrate.util.ReplaceMathRandomWithThreadLocalRandomRecipe

Replace java.lang.Math random() with ThreadLocalRandom nextDouble() to reduce contention.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace Stream.collect(Collectors.toUnmodifiableList()) with Stream.toList()

org.openrewrite.java.migrate.util.ReplaceStreamCollectWithToList

Replace Stream.collect(Collectors.toUnmodifiableList()) with Java 16+ Stream.toList(). Also replaces Stream.collect(Collectors.toList()) if convertToList is set to true.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use getFirst() instead of stream().findFirst().orElseThrow()

org.openrewrite.java.migrate.util.StreamFindFirst

For SequencedCollections, use collection.getFirst() instead of collection.stream().findFirst().orElseThrow().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer EnumSet of(..)

org.openrewrite.java.migrate.util.UseEnumSetOf

Prefer EnumSet of(..) instead of using Set of(..) when the arguments are enums in Java 9 or higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Locale.of(..) over new Locale(..)

org.openrewrite.java.migrate.util.UseLocaleOf

Prefer Locale.of(..) over new Locale(..) in Java 19 or higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Map.of(..)

org.openrewrite.java.migrate.util.UseMapOf

Prefer Map.of(..) instead of using java.util.Map#put(..) in Java 10 or higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Adds static modifier to @Produces fields that are in session beans

org.openrewrite.java.migrate.AddStaticVariableOnProducerSessionBean

Ensures that the fields annotated with @Produces which is inside the session bean (@Stateless, @Stateful, or @Singleton) are declared static.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Project has no Jakarta annotations

org.openrewrite.java.migrate.jakarta.HasNoJakartaAnnotations

Mark all source as found per JavaProject where no Jakarta annotations are found. This is useful mostly as a precondition for recipes that require Jakarta annotations to be present

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use latest JAXB API and runtime for Jakarta EE 8

org.openrewrite.java.migrate.javax.AddJaxbRuntime

Update build files to use the latest JAXB runtime from Jakarta EE 8 to maintain compatibility with Java version 11 or greater. The recipe will add a JAXB run-time, in Gradle compileOnly+testImplementation and Maven provided scope, to any project that has a transitive dependency on the JAXB API. The resulting dependencies still use the javax namespace, despite the move to the Jakarta artifact.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add scope annotation to injected classes

org.openrewrite.java.migrate.javax.AddScopeToInjectedClass

Finds member variables annotated with @Inject' and applies @Dependent` scope annotation to the variable's type.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Unannotated entity attributes require a Transient annotation

org.openrewrite.java.migrate.javax.AddTransientAnnotationToEntity

In OpenJPA, attributes that are themselves entity classes are not persisted by default. EclipseLink has a different default behavior and tries to persist these attributes to the database. To keep the OpenJPA behavior of ignoring unannotated entity attributes, add the javax.persistence.Transient annotation to these attributes in EclipseLink.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

@Embeddable classes cannot have an @Id annotation when referenced by an @EmbeddedId annotation

org.openrewrite.java.migrate.javax.RemoveEmbeddableId

According to the Java Persistence API (JPA) specification, if an entity defines an attribute with an @EmbeddedId annotation, the embeddable class cannot contain an attribute with an @Id annotation. If both the @EmbeddedId annotation and the @Id annotation are defined, OpenJPA ignores the @Id annotation, whereas EclipseLink throws an exception.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Rename getter methods to fit Lombok

org.openrewrite.java.migrate.lombok.AdoptLombokGetterMethodNames

Rename methods that are effectively getter to the name Lombok would give them. Limitations: - If two methods in a class are effectively the same getter then one's name will be corrected and the others name will be left as it is. - If the correct name for a method is already taken by another method then the name will not be corrected. - Method name swaps or circular renaming within a class cannot be performed because the names block each other. E.g. int getFoo() { return ba; } int getBa() { return foo; } stays as it is.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Rename setter methods to fit Lombok

org.openrewrite.java.migrate.lombok.AdoptLombokSetterMethodNames

Rename methods that are effectively setter to the name Lombok would give them. Limitations: - If two methods in a class are effectively the same setter then one's name will be corrected and the others name will be left as it is. - If the correct name for a method is already taken by another method then the name will not be corrected. - Method name swaps or circular renaming within a class cannot be performed because the names block each other. E.g. int getFoo() { return ba; } int getBa() { return foo; } stays as it is.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Convert @lombok.Value class to Record

org.openrewrite.java.migrate.lombok.LombokValueToRecord

Convert Lombok @Value annotated classes to standard Java Records.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Plan a Java version migration

org.openrewrite.java.migrate.search.PlanJavaMigration

Study the set of Java versions and associated tools in use across many repositories.

Data tables:

  • org.openrewrite.java.migrate.table.JavaVersionMigrationPlan: A per-repository view of the current state of Java versions and associated build tools
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add explicit Common Annotations dependencies

org.openrewrite.java.migrate.javax.AddCommonAnnotationsDependencies

Add the necessary annotation-api dependency from Jakarta EE 8 to maintain compatibility with Java version 11 or greater.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add explicit Inject dependencies

org.openrewrite.java.migrate.javax.AddInjectDependencies

Add the necessary inject-api dependency from Jakarta EE 8 to maintain compatibility with Java version 11 or greater.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Bouncy Castle from jdk15on to jdk15to18 for Java < 8

org.openrewrite.java.migrate.BouncyCastleFromJdk15OnToJdk15to18

This recipe replaces the Bouncy Castle artifacts from jdk15on to jdk15to18. jdk15on isn't maintained anymore and jdk18on is only for Java 8 and above. The jdk15to18 artifact is the up-to-date replacement of the unmaintained jdk15on for Java < 8.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Bouncy Castle to jdk18on

org.openrewrite.java.migrate.BounceCastleFromJdk15OntoJdk18On

This recipe will upgrade Bouncy Castle dependencies from -jdk15on or -jdk15to18 to -jdk18on.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to IBM Semeru Runtimes

org.openrewrite.java.migrate.IBMSemeru

This recipe will apply changes commonly needed when upgrading Java versions. The solutions provided in this list are solutions only available in IBM Semeru Runtimes.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate from IBM Runtimes to Oracle Runtimes

org.openrewrite.java.migrate.IBMJDKtoOracleJDK

This recipe will apply changes commonly needed when upgrading Java versions. The solutions provided in this list are solutions necessary for migrating from IBM Runtimes to Oracle Runtimes.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use com.ibm.net.ssl.www2.protocol.https.Handler instead of com.sun.net.ssl.internal.www.protocol.https.Handler

org.openrewrite.java.migrate.JREDoNotUseSunNetSslInternalWwwProtocolHttpsHandler

Do not use the com.sun.net.ssl.internal.www.protocol.https.Handler class.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use com.ibm.net.ssl.www2.protocol instead of com.sun.net.ssl.internal.www.protocol

org.openrewrite.java.migrate.JREDoNotUseSunNetSslInternalWwwProtocol

Do not use the com.sun.net.ssl.internal.www.protocol package.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use com.ibm.jsse2 instead of com.sun.net.ssl.internal.ssl

org.openrewrite.java.migrate.JREDoNotUseSunNetSslInternalSslProvider

Do not use the com.sun.net.ssl.internal.ssl.Provider class.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use javax.net.ssl instead of com.sun.net.ssl

org.openrewrite.java.migrate.JREDoNotUseSunNetSslAPIs

Do not use APIs from com.sun.net.ssl packages.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use com.sun.security.auth.module.Krb5LoginModule instead of com.ibm.security.auth.module.Krb5LoginModule

org.openrewrite.java.migrate.Krb5LoginModuleClass

Do not use the com.ibm.security.auth.module.Krb5LoginModule class.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Do not package java.xml.ws module in WebSphere Liberty applications

org.openrewrite.java.migrate.RemovedJavaXMLWSModuleProvided

The java.xml.ws module was removed in Java11. Websphere Liberty provides its own implementation of the module, which can be used by specifying the jaxws-2.2 feature in the server.xml file. This recipe updates the javax.xml.ws dependency to use the provided scope to avoid class loading issues.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Do not package java.xml.bind and java.activation modules in WebSphere Liberty applications

org.openrewrite.java.migrate.RemovedJaxBModuleProvided

The java.xml.bind and java.activation modules were removed in Java11. Websphere Liberty provides its own implementation of the modules, which can be used by specifying the jaxb-2.2 feature in the server.xml file. This recipe updates the javax.xml.bind and javax.activation dependencies to use the provided scope to avoid class loading issues.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change net.wasdev.maven.parent:java8-parent to :parent

org.openrewrite.java.migrate.WasDevMvnChangeParentArtifactId

This recipe changes the artifactId of the &lt;parent&gt; tag in the pom.xml from java8-parent to parent.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Inline guava methods annotated with @InlineMe

com.google.guava.InlineGuavaMethods

Automatically generated recipes to inline method calls based on @InlineMe annotations discovered in the type table.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate com.intellij:annotations to org.jetbrains:annotations

org.openrewrite.java.migrate.ComIntelliJAnnotationsToOrgJetbrainsAnnotations

This recipe will upgrade old dependency of com.intellij:annotations to the newer org.jetbrains:annotations.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade JaCoCo

org.openrewrite.java.migrate.jacoco.UpgradeJaCoCo

This recipe will upgrade JaCoCo to the latest patch version, which traditionally advertises full backwards compatibility for older Java versions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Migrate to Jakarta EE 10

org.openrewrite.java.migrate.jakarta.JakartaEE10

These recipes help with the Migration to Jakarta EE 10, flagging and updating deprecated methods.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Migrate Jakarta EE 9 api dependencies to Jakarta EE 10 versions

org.openrewrite.java.migrate.jakarta.MigrationToJakarta10Apis

Jakarta EE 10 updates some apis compared to Jakarta EE 9.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update Apache Commons FileUpload2 package for EE10

org.openrewrite.java.migrate.jakarta.UpdateFileupload2Dependencies

Update Apache Commons FileUpload2 package for EE10.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove getComment and getVersion methods

org.openrewrite.java.migrate.jakarta.ServletCookieBehaviorChangeRFC6265

Jakarta Servlet methods have been deprecated for removal in Jakarta Servlet 6.0 to align with RFC 6265. In addition, the behavior of these methods has been changed so the setters no longer have any effect, the getComment methods return null, and the getVersion method returns 0. The deprecated methods are removed.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace doUpgrade(..) with ServerContainer.upgradeHttpToWebSocket(..)

org.openrewrite.java.migrate.jakarta.WsWsocServerContainerDeprecation

Deprecated WsWsocServerContainer.doUpgrade(..) is replaced by the Jakarta WebSocket 2.1 specification ServerContainer.upgradeHttpToWebSocket(..).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use isParametersProvided()

org.openrewrite.java.migrate.jakarta.RemovedIsParmetersProvidedMethod

Expression Language prior to 5.0 provides the deprecated MethodExpression.isParmetersProvided() method, with the word 'parameter' misspelled in the method name. This method is unavailable in Jakarta Expression Language 5.0. Use the correctly spelled MethodExpression.isParametersProvided() method instead.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use jakarta.xml.soap.SOAPFactory to create SOAPElements

org.openrewrite.java.migrate.jakarta.RemovedSOAPElementFactory

XML Web Services prior to 4.0 provides the deprecated SOAPElementFactory class, which is removed in XML Web Services 4.0. The recommended replacement is to use jakarta.xml.soap.SOAPFactory to create SOAPElements.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in beans.xml files

org.openrewrite.java.migrate.jakarta.JavaxBeansXmlToJakartaBeansXml

Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries and javax. packages in ejb-jar.xml files

org.openrewrite.java.migrate.jakarta.JavaxEjbJarXmlToJakartaEjbJarXml

Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries and javax. packages in validation.xml files

org.openrewrite.java.migrate.jakarta.JavaxBeanValidationXmlToJakartaBeanValidationXml

Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace deprecated Jakarta Servlet methods and classes

org.openrewrite.java.migrate.jakarta.RemovalsServletJakarta10

This recipe replaces the classes and methods deprecated in Jakarta Servlet 6.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove deprecated API's not supported in CDI4.0

org.openrewrite.java.migrate.jakarta.DeprecatedCDIAPIsRemoved40

Deprecated APIs have been removed in CDI 4.0. This recipe removes and updates the corresponding deprecated methods.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Rename CDI Extension to Jakarta

org.openrewrite.java.migrate.jakarta.JavaxToJakartaCdiExtensions

Rename javax.enterprise.inject.spi.Extension to jakarta.enterprise.inject.spi.Extension.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update Jakarta EE Platform Dependencies to 10.0.0

org.openrewrite.java.migrate.jakarta.UpdateJakartaPlatform10

Update Jakarta EE Platform Dependencies to 10.0.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update Jakarta EE annotation Dependencies to 2.1.x.

org.openrewrite.java.migrate.jakarta.UpdateJakartaAnnotations2

Update Jakarta EE annotation Dependencies to 2.1.x.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update Jakarta EE XML Web Services Dependencies for EE 10.

org.openrewrite.java.migrate.jakarta.UpdateJakartaXmlWsEE10

Update Jakarta EE XML Web Services Dependencies for EE 10.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update GlassFish Jersey Dependencies to 3.1.x

org.openrewrite.java.migrate.jakarta.UpdateJerseyDependencies

Update GlassFish Jersey Dependencies to 3.1.x.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update Apache Commons Email to Email2 for Jakarta

org.openrewrite.java.migrate.jakarta.UpdateApacheCommonsEmailDependencies

Update Apache Commons Email to Email2 for Jakarta.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update Apache Shiro Dependencies to 2.0.x

org.openrewrite.java.migrate.jakarta.UpdateApacheShiroDependencies

Update Apache Shiro Dependencies to 2.0.x.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

org.openrewrite.java.migrate.jakarta.UpdateEclipseLinkDependencies

Update EclipseLink Dependencies to 4.x.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update Eclipse Yasson Dependencies to 3.0.x

org.openrewrite.java.migrate.jakarta.UpdateYassonDependencies

Update Eclipse Yasson Dependencies to 3.0.x.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update Jetty EE9 to Jetty EE10

org.openrewrite.java.migrate.jakarta.JettyUpgradeEE10

Update Jetty dependencies from EE9 to EE10, changing the groupId and artifactIds as needed.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update Plugins for Jakarta EE 10

org.openrewrite.java.migrate.jakarta.MigratePluginsForJakarta10

Update plugin to be compatible with Jakarta EE 10.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update Fastjson for Jakarta EE 10

org.openrewrite.java.migrate.jakarta.MigrateFastjsonForJakarta10

Update Fastjson to be compatible with Jakarta EE 10.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Jakarta EE 11

org.openrewrite.java.migrate.jakarta.JakartaEE11

These recipes help with the Migration to Jakarta EE 11, flagging and updating deprecated methods.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Update Jakarta EE Platform Dependencies to 11.0.x

org.openrewrite.java.migrate.jakarta.UpdateJakartaPlatform11

Update Jakarta EE Platform Dependencies to 11.0.x.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Jakarta EE 9

org.openrewrite.java.migrate.jakarta.JavaxMigrationToJakarta

Jakarta EE 9 is the first version of Jakarta EE that uses the new jakarta namespace.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Migrate deprecated javax.activation packages to jakarta.activation

org.openrewrite.java.migrate.jakarta.JavaxActivationMigrationToJakartaActivation

Java EE has been rebranded to Jakarta EE, necessitating a package relocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.annotation to jakarta.annotation

org.openrewrite.java.migrate.jakarta.JavaxAnnotationMigrationToJakartaAnnotation

Java EE has been rebranded to Jakarta EE, necessitating a package relocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.security.auth.message packages to jakarta.security.auth.message

org.openrewrite.java.migrate.jakarta.JavaxAuthenticationMigrationToJakartaAuthentication

Java EE has been rebranded to Jakarta EE, necessitating a package relocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.security.jacc packages to jakarta.security.jacc

org.openrewrite.java.migrate.jakarta.JavaxAuthorizationMigrationToJakartaAuthorization

Java EE has been rebranded to Jakarta EE, necessitating a package relocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.batch packages to jakarta.batch

org.openrewrite.java.migrate.jakarta.JavaxBatchMigrationToJakartaBatch

Java EE has been rebranded to Jakarta EE, necessitating a package relocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.validation packages to jakarta.validation

org.openrewrite.java.migrate.jakarta.JavaxValidationMigrationToJakartaValidation

Java EE has been rebranded to Jakarta EE, necessitating a package relocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.decorator packages to jakarta.decorator

org.openrewrite.java.migrate.jakarta.JavaxDecoratorToJakartaDecorator

Java EE has been rebranded to Jakarta EE, necessitating a package relocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.ejb packages to jakarta.ejb

org.openrewrite.java.migrate.jakarta.JavaxEjbToJakartaEjb

Java EE has been rebranded to Jakarta EE, necessitating a package relocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.el packages to jakarta.el

org.openrewrite.java.migrate.jakarta.JavaxElToJakartaEl

Java EE has been rebranded to Jakarta EE, necessitating a package relocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated org.apache.commons.fileload packages to org.apache.commons.fileload.core

org.openrewrite.java.migrate.jakarta.FileuploadToFileUpload2

Migrate deprecated org.apache.commons.fileload packages to org.apache.commons.fileload.core

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.enterprise packages to jakarta.enterprise

org.openrewrite.java.migrate.jakarta.JavaxEnterpriseToJakartaEnterprise

Java EE has been rebranded to Jakarta EE, necessitating a package relocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.inject packages to jakarta.inject

org.openrewrite.java.migrate.jakarta.JavaxInjectMigrationToJakartaInject

Java EE has been rebranded to Jakarta EE, necessitating a package relocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.interceptor packages to jakarta.interceptor

org.openrewrite.java.migrate.jakarta.JavaxInterceptorToJakartaInterceptor

Java EE has been rebranded to Jakarta EE, necessitating a package relocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.jms packages to jakarta.jms

org.openrewrite.java.migrate.jakarta.JavaxJmsToJakartaJms

Java EE has been rebranded to Jakarta EE, necessitating a package relocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.json packages to jakarta.json

org.openrewrite.java.migrate.jakarta.JavaxJsonToJakartaJson

Java EE has been rebranded to Jakarta EE, necessitating a package relocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.jws packages to jakarta.jws

org.openrewrite.java.migrate.jakarta.JavaxJwsToJakartaJws

Java EE has been rebranded to Jakarta EE, necessitating a package relocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.jsp packages to jakarta.jsp

org.openrewrite.java.migrate.jakarta.JavaxJspToJakartaJsp

Java EE has been rebranded to Jakarta EE, necessitating a package relocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.mail packages to jakarta.mail

org.openrewrite.java.migrate.jakarta.JavaxMailToJakartaMail

Java EE has been rebranded to Jakarta EE, necessitating a package relocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.persistence packages to jakarta.persistence

org.openrewrite.java.migrate.jakarta.JavaxPersistenceToJakartaPersistence

Java EE has been rebranded to Jakarta EE, necessitating a package relocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.resource packages to jakarta.resource

org.openrewrite.java.migrate.jakarta.JavaxResourceToJakartaResource

Java EE has been rebranded to Jakarta EE, necessitating a package relocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.security.enterprise packages to jakarta.security.enterprise

org.openrewrite.java.migrate.jakarta.JavaxSecurityToJakartaSecurity

Java EE has been rebranded to Jakarta EE, necessitating a package relocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.servlet packages to jakarta.servlet

org.openrewrite.java.migrate.jakarta.JavaxServletToJakartaServlet

Java EE has been rebranded to Jakarta EE, necessitating a package relocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.transaction packages to jakarta.transaction

org.openrewrite.java.migrate.jakarta.JavaxTransactionMigrationToJakartaTransaction

Java EE has been rebranded to Jakarta EE, necessitating a package relocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.websocket packages to jakarta.websocket

org.openrewrite.java.migrate.jakarta.JavaxWebsocketToJakartaWebsocket

Java EE has been rebranded to Jakarta EE, necessitating a package relocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.ws packages to jakarta.ws

org.openrewrite.java.migrate.jakarta.JavaxWsToJakartaWs

Java EE has been rebranded to Jakarta EE, necessitating a package relocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.xml.bind packages to jakarta.xml.bind

org.openrewrite.java.migrate.jakarta.JavaxXmlBindMigrationToJakartaXmlBind

Java EE has been rebranded to Jakarta EE, necessitating a package relocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Migrate XJC Bindings to Jakata XML

org.openrewrite.java.migrate.jakarta.JavaxXmlToJakartaXmlXJCBinding

Java EE has been rebranded to Jakarta EE, migrates the namespace and version in XJC bindings.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.soap packages to jakarta.soap

org.openrewrite.java.migrate.jakarta.JavaxXmlSoapToJakartaXmlSoap

Java EE has been rebranded to Jakarta EE, necessitating a package relocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.xml.ws packages to jakarta.xml.ws

org.openrewrite.java.migrate.jakarta.JavaxXmlWsMigrationToJakartaXmlWs

Java EE has been rebranded to Jakarta EE, necessitating a package relocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in orm.xml files

org.openrewrite.java.migrate.jakarta.JavaxOrmXmlToJakartaOrmXml

Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in persistence.xml files

org.openrewrite.java.migrate.jakarta.JavaxPersistenceXmlToJakartaPersistenceXml

Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Jackson from javax to jakarta namespace

org.openrewrite.java.migrate.jakarta.JacksonJavaxToJakarta

Java EE has been rebranded to Jakarta EE. This recipe replaces existing Jackson dependencies with their counterparts that are compatible with Jakarta EE 9.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Migrate Ehcache from javax to jakarta namespace

org.openrewrite.java.migrate.jakarta.EhcacheJavaxToJakarta

Java EE has been rebranded to Jakarta EE. This recipe replaces existing Ehcache dependencies with their counterparts that are compatible with Jakarta EE 9.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Johnzon from javax to jakarta namespace

org.openrewrite.java.migrate.jakarta.JohnzonJavaxToJakarta

Java EE has been rebranded to Jakarta EE. This recipe replaces existing Johnzon dependencies with their counterparts that are compatible with Jakarta EE 9.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate RestAssured from javax to jakarta namespace by upgrading to a version compatible with J2EE9

org.openrewrite.java.migrate.jakarta.RestAssuredJavaxToJakarta

Java EE has been rebranded to Jakarta EE. This recipe replaces existing RestAssured dependencies with their counterparts that are compatible with Jakarta EE 9.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate org.apache.ws.security and org.apache.ws.security.components.crypto packages to org.apache.wss4j.common.ext and org.apache.wss4j.common.crypto packages

org.openrewrite.java.migrate.jakarta.UpdateApacheWSSecurityPackages

Java EE has been rebranded to Jakarta EE. This recipe replaces Apache security packages to migrate to Apache wss4j.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javaee-api dependencies to jakarta.platform

org.openrewrite.java.migrate.jakarta.JavaxEEApiToJakarta

Java EE has been rebranded to Jakarta EE, necessitating a package relocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove jakarta.annotation-api dependency when managed by Spring Boot

org.openrewrite.java.migrate.jakarta.RemoveJakartaAnnotationDependencyWhenManagedBySpringBoot

Best practice recipe to cleanup a direct dependency which also comes transitively for Spring Boot applications.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update Jetty9 to Jetty12

org.openrewrite.java.migrate.jakarta.JettyUpgradeEE9

Update Jetty dependencies from version 9 to version 12.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update RestLet to 2.6.0

org.openrewrite.java.migrate.jakarta.UpdateRestLet2_6

Update RestLet to 2.6.0

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

JSF 2.x to Jakarta Faces 3.x

org.openrewrite.java.migrate.jakarta.Faces2xMigrationToJakartaFaces3x

Jakarta EE 9 uses Faces 3.0, a major upgrade to Jakarta packages and XML namespaces.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.faces packages to jakarta.faces

org.openrewrite.java.migrate.jakarta.UpdateJakartaFacesApi3

Java EE has been rebranded to Jakarta EE, necessitating a package relocation and upgrade.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Faces XHTML migration for Jakarta EE 9

org.openrewrite.java.migrate.jakarta.JakartaFacesXhtmlEE9

Find and replace javax references to jakarta in XHTML files.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in faces-config.xml files

org.openrewrite.java.migrate.jakarta.JavaxFacesConfigXmlToJakartaFacesConfigXml

Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in taglib.xml files

org.openrewrite.java.migrate.jakarta.JavaxFacesTagLibraryXmlToJakartaFacesTagLibraryXml

Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in web-fragment.xml files

org.openrewrite.java.migrate.jakarta.JavaxWebFragmentXmlToJakartaWebFragmentXml

Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in web.xml files

org.openrewrite.java.migrate.jakarta.JavaxWebXmlToJakartaWebXml

Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate JSF values inside EcmaScript files

org.openrewrite.java.migrate.jakarta.JakartaFacesEcmaScript

Convert JSF to Faces values inside JavaScript,TypeScript, and Properties files.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

JNDI name jsf/ClientSideSecretKey has been renamed to faces/ClientSideSecretKey, and the jsf/FlashSecretKey JNDI name has been renamed to faces/FlashSecretKey

org.openrewrite.java.migrate.jakarta.FacesJNDINamesChanged

The jsf/ClientSideSecretKey JNDI name has been renamed to faces/ClientSideSecretKey, and the jsf/FlashSecretKey JNDI name has been renamed to faces/FlashSecretKey. The JNDI keys that have been renamed are updated to allow use of the keys.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace ResourceResolver with ResourceHandler

org.openrewrite.java.migrate.jakarta.RemovedJakartaFacesResourceResolver

The ResourceResolver class was removed in Jakarta Faces 3.0. The functionality provided by that class can be replaced by using the jakarta.faces.application.ResourceHandler class.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace CURRENT_COMPONENT and CURRENT_COMPOSITE_COMPONENT with getCurrentComponent() and getCurrentCompositeComponent()

org.openrewrite.java.migrate.jakarta.RemovedUIComponentConstant

Replace jakarta.faces.component.UIComponent.CURRENT_COMPONENT and CURRENT_COMPOSITE_COMPONENT constants with jakarta.faces.component.UIComponent.getCurrentComponent() and getCurrentCompositeComponent(). that were added in JSF 2.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use StateManagementStrategy

org.openrewrite.java.migrate.jakarta.RemovedStateManagerMethods

Faces 3.0 introduced using StateManagementStrategy in favor of StateManager, which was later removed in Faces 4.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use jakarta.el instead of jakarta.faces.el and javax.faces.el

org.openrewrite.java.migrate.jakarta.RemovedJakartaFacesExpressionLanguageClasses

Several classes were removed and replaced in Jakarta Faces 3.0. The only Object definition not removed in the jakarta.faces.el package is the CompositeComponentExpressionHolder interface.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade Faces open source libraries

org.openrewrite.java.migrate.jakarta.UpgradeFaces3OpenSourceLibraries

Upgrade PrimeFaces, OmniFaces, and MyFaces libraries to Jakarta EE9 versions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade to Jakarta Faces 4.x

org.openrewrite.java.migrate.jakarta.Faces3xMigrationToFaces4x

Jakarta EE 10 uses Faces 4.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update Jakarta EE Java Faces Dependencies to 4.0.x.

org.openrewrite.java.migrate.jakarta.UpdateJakartaFacesApi4

Update Jakarta EE Java Faces Dependencies to 4.0.x.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Faces XHTML migration for Jakarta EE 10

org.openrewrite.java.migrate.jakarta.JakartaFacesXhtmlEE10

Find and replace legacy JSF namespace URIs with Jakarta Faces URNs in XHTML files.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in faces-config.xml files

org.openrewrite.java.migrate.jakarta.JakartaFacesConfigXml4

Jakarta EE 10 uses Faces version 4.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in taglib.xml files

org.openrewrite.java.migrate.jakarta.JakartaFacesTagLibraryXml4

Faces 4 uses facelet-taglib 4.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in web-fragment.xml files

org.openrewrite.java.migrate.jakarta.JakartaWebFragmentXml6

Faces 4 uses web-fragment 6.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in web.xml files

org.openrewrite.java.migrate.jakarta.JakartaWebXml6

Faces 4 uses web-app 6.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Substitute removed Faces Managed Beans

org.openrewrite.java.migrate.jakarta.FacesManagedBeansRemoved

This recipe substitutes Faces Managed Beans, which were deprecated in JavaServer Faces 2.3 and have been removed from Jakarta Faces 4.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade Faces open source libraries

org.openrewrite.java.migrate.jakarta.UpgradeFaces4OpenSourceLibraries

Upgrade PrimeFaces, OmniFaces, and MyFaces libraries to Jakarta EE10 versions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Jakarta Faces 4.0 to 4.1

org.openrewrite.java.migrate.jakarta.Faces4xMigrationToFaces41x

Jakarta EE 11 uses Faces 4.1 a minor upgrade.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update Jakarta EE Java Faces Dependencies to 4.1.x

org.openrewrite.java.migrate.jakarta.UpdateJakartaFacesApi41

Update Jakarta EE Java Faces Dependencies to 4.1.x.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

OmniFaces Namespace Migration

org.openrewrite.java.migrate.jakarta.OmniFacesNamespaceMigration

Find and replace legacy OmniFaces namespaces.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade Faces open source libraries

org.openrewrite.java.migrate.jakarta.UpgradeFaces41OpenSourceLibraries

Upgrade OmniFaces and MyFaces/Mojarra libraries to Jakarta EE11 versions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use modernized java.util.concurrent APIs

org.openrewrite.java.migrate.concurrent.JavaConcurrentAPIs

The Java concurrent APIs were updated in Java 9 and those changes resulted in certain APIs being deprecated. This recipe update an application to replace the deprecated APIs with their modern alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use AtomicBoolean#weakCompareAndSetPlain(boolean, boolean)

org.openrewrite.java.migrate.concurrent.MigrateAtomicBooleanWeakCompareAndSetToWeakCompareAndSetPlain

Use AtomicBoolean#weakCompareAndSetPlain(boolean, boolean) instead of the deprecated AtomicBoolean#weakCompareAndSet(boolean, boolean) in Java 9 or higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use AtomicInteger#weakCompareAndSetPlain(int, int)

org.openrewrite.java.migrate.concurrent.MigrateAtomicIntegerWeakCompareAndSetToWeakCompareAndSetPlain

Use AtomicInteger#weakCompareAndSetPlain(int, int) instead of the deprecated AtomicInteger#weakCompareAndSet(int, int) in Java 9 or higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use AtomicIntegerArray#weakCompareAndSetPlain(int, int, int)

org.openrewrite.java.migrate.concurrent.MigrateAtomicIntegerArrayWeakCompareAndSetToWeakCompareAndSetPlain

Use AtomicIntegerArray#weakCompareAndSetPlain(int, int, int) instead of the deprecated AtomicIntegerArray#weakCompareAndSet(int, int, int) in Java 9 or higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use AtomicLong#weakCompareAndSetPlain(long, long)

org.openrewrite.java.migrate.concurrent.MigrateAtomicLongWeakCompareAndSetToWeakCompareAndSetPlain

Use AtomicLong#weakCompareAndSetPlain(long, long) instead of the deprecated AtomicLong#weakCompareAndSet(long, long) in Java 9 or higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use AtomicLongArray#weakCompareAndSetPlain(int, long, long)

org.openrewrite.java.migrate.concurrent.MigrateAtomicLongArrayWeakCompareAndSetToWeakCompareAndSetPlain

Use AtomicLongArray#weakCompareAndSetPlain(int, long, long) instead of the deprecated AtomicLongArray#weakCompareAndSet(int, long, long) in Java 9 or higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use AtomicReference#weakCompareAndSetPlain(T, T)

org.openrewrite.java.migrate.concurrent.MigrateAtomicReferenceWeakCompareAndSetToWeakCompareAndSetPlain

Use AtomicReference#weakCompareAndSetPlain(T, T) instead of the deprecated AtomicReference#weakCompareAndSet(T, T) in Java 9 or higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use AtomicReferenceArray#weakCompareAndSetPlain(int, T, T)

org.openrewrite.java.migrate.concurrent.MigrateAtomicReferenceArrayWeakCompareAndSetToWeakCompareAndSetPlain

Use AtomicReferenceArray#weakCompareAndSetPlain(int, T, T) instead of the deprecated AtomicReferenceArray#weakCompareAndSet(int, T, T) in Java 9 or higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to JavaEE6

org.openrewrite.java.migrate.javaee6

These recipes help with the Migration to Java EE 6, flagging and updating deprecated methods.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to JavaEE7

org.openrewrite.java.migrate.javaee7

These recipes help with the Migration to Java EE 7, flagging and updating deprecated methods.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Removed OpenJPA providers in the persistence.xml file

org.openrewrite.java.migrate.javaee7.OpenJPAPersistenceProvider

When migrating to EclipseLink, using OpenJPA providers in EclipseLink results in runtime errors. To resolve these errors, the recipe removes the flagged OpenJPA provider from the persistence.xml.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to JavaEE8

org.openrewrite.java.migrate.javaee8

These recipes help with the Migration to Java EE 8, flagging and updating deprecated methods.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace HttpServletRequestWrapper.isRequestedSessionIdFromUrl() with isRequestedSessionIdFromURL()

org.openrewrite.java.migrate.javaee8.ServletIsRequestedSessionIdFromURL

The method HttpServletRequestWrapper.isRequestedSessionIdFromUrl() is deprecated in JavaEE8 and is replaced by HttpServletRequestWrapper.isRequestedSessionIdFromURL().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Flags any org.apache.bval.jsr* (bval 1.1) and org.apache.bval.jsr303* (bval 1.0) package references

org.openrewrite.java.migrate.javaee8.ApacheDefaultProvider

This recipe flags any org.apache.bval.jsr* (bval 1.1) and org.apache.bval.jsr303* (bval 1.0) package references in validation.xml deployment descriptors. Bean Validation 2.0 and later use the Hibernate Validator implementation instead of the Apache BVal implementation which was used for Bean Validation 1.0 and 1.1.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use modernized java.lang APIs

org.openrewrite.java.migrate.lang.JavaLangAPIs

Certain Java lang APIs have become deprecated and their usages changed, necessitating usage changes.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use Character#isJavaIdentifierStart(char)

org.openrewrite.java.migrate.lang.MigrateCharacterIsJavaLetterToIsJavaIdentifierStart

Use Character#isJavaIdentifierStart(char) instead of the deprecated Character#isJavaLetter(char) in Java 1.1 or higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use Character#isJavaIdentifierPart(char)

org.openrewrite.java.migrate.lang.MigrateCharacterIsJavaLetterOrDigitToIsJavaIdentifierPart

Use Character#isJavaIdentifierPart(char) instead of the deprecated Character#isJavaLetterOrDigit(char) in Java 1.1 or higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use Character#isWhitespace(char)

org.openrewrite.java.migrate.lang.MigrateCharacterIsSpaceToIsWhitespace

Use Character#isWhitespace(char) instead of the deprecated Character#isSpace(char) in Java 1.1 or higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use Runtime.Version#feature()

org.openrewrite.java.migrate.lang.MigrateRuntimeVersionMajorToFeature

Use Runtime.Version#feature() instead of the deprecated Runtime.Version#major() in Java 10 or higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use Runtime.Version#interim()

org.openrewrite.java.migrate.lang.MigrateRuntimeVersionMinorToInterim

Use Runtime.Version#interim() instead of the deprecated Runtime.Version#minor() in Java 10 or higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use Runtime.Version#update()

org.openrewrite.java.migrate.lang.MigrateRuntimeVersionSecurityToUpdate

Use Runtime.Version#update() instead of the deprecated Runtime.Version#security() in Java 10 or higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use local variable type inference

org.openrewrite.java.migrate.lang.UseVar

Apply local variable type inference (var) for primitives and objects. These recipes can cause unused imports, be advised to run `org.openrewrite.java.RemoveUnusedImports afterwards.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use modernized java.util.logging APIs

org.openrewrite.java.migrate.logging.JavaLoggingAPIs

Certain Java logging APIs have become deprecated and their usages changed, necessitating usage changes.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use java.lang.management.PlatformLoggingMXBean

org.openrewrite.java.migrate.logging.MigrateInterfaceLoggingMXBeanToPlatformLoggingMXBean

Use java.lang.management.PlatformLoggingMXBean instead of the deprecated java.util.logging.LoggingMXBean in Java 9 or higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use modernized java.net APIs

org.openrewrite.java.migrate.net.JavaNetAPIs

Certain Java networking APIs have become deprecated and their usages changed, necessitating usage changes.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use java.net.MulticastSocket#getTimeToLive()

org.openrewrite.java.migrate.net.MigrateMulticastSocketGetTTLToGetTimeToLive

Use java.net.MulticastSocket#getTimeToLive() instead of the deprecated java.net.MulticastSocket#getTTL() in Java 1.2 or higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use modernized java.sql APIs

org.openrewrite.java.migrate.sql.JavaSqlAPIs

Certain Java sql APIs have become deprecated and their usages changed, necessitating usage changes.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use modernized java.util APIs

org.openrewrite.java.migrate.util.JavaUtilAPIs

Certain java util APIs have been introduced and are favored over previous APIs.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Java 11

org.openrewrite.java.migrate.Java8toJava11

This recipe will apply changes commonly needed when upgrading to Java 11. Specifically, for those applications that are built on Java 8, this recipe will update and add dependencies on J2EE libraries that are no longer directly bundled with the JDK. This recipe will also replace deprecated API with equivalents when there is a clear migration strategy. Build files will also be updated to use Java 11 as the target/source and plugins will be also be upgraded to versions that are compatible with Java 11.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Upgrade build to Java 11

org.openrewrite.java.migrate.UpgradeBuildToJava11

Updates build files to use Java 11 as the target/source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade plugins to Java 11 compatible versions

org.openrewrite.java.migrate.UpgradePluginsForJava11

Updates plugins to version compatible with Java 11.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add explicit JAX-WS dependencies

org.openrewrite.java.migrate.javax.AddJaxwsDependencies

This recipe will add explicit dependencies for Jakarta EE 8 when a Java 8 application is using JAX-WS. Any existing dependencies will be upgraded to the latest version of Jakarta EE 8. The artifacts are moved to Jakarta EE 8 but the application can continue to use the javax.xml.bind namespace.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use com.sun.xml.bind.* instead of com.sun.xml.internal.bind.*

org.openrewrite.java.migrate.InternalBindPackages

Do not use APIs from com.sun.xml.internal.bind.* packages.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace javax.security.auth.Policy with java.security.Policy

org.openrewrite.java.migrate.RemovedPolicy

The javax.security.auth.Policy class is not available from Java SE 11 onwards.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove Thread.destroy() and Thread.stop(Throwable)

org.openrewrite.java.migrate.ThreadStopDestroy

The java.lang.Thread.destroy() method was never implemented, and the java.lang.Thread.stop(java.lang.Throwable) method has been unusable since Java SE 8. This recipe removes any usage of these methods from your application.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace Paths.get with Path.of

org.openrewrite.java.migrate.nio.file.PathsGetToPathOf

The java.nio.file.Paths.get method was introduced in Java SE 7. The java.nio.file.Path.of method was introduced in Java SE 11. This recipe replaces all usages of Paths.get with Path.of for consistency.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Java 17

org.openrewrite.java.migrate.UpgradeToJava17

This recipe will apply changes commonly needed when migrating to Java 17. Specifically, for those applications that are built on Java 8, this recipe will update and add dependencies on J2EE libraries that are no longer directly bundled with the JDK. This recipe will also replace deprecated API with equivalents when there is a clear migration strategy. Build files will also be updated to use Java 17 as the target/source and plugins will be also be upgraded to versions that are compatible with Java 17.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Upgrade build to Java 17

org.openrewrite.java.migrate.UpgradeBuildToJava17

Updates build files to use Java 17 as the target/source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade plugins to Java 17 compatible versions

org.openrewrite.java.migrate.UpgradePluginsForJava17

Updates plugins to version compatible with Java 17.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Use java.security.cert instead of javax.security.cert

org.openrewrite.java.migrate.DeprecatedJavaxSecurityCert

The javax.security.cert package has been deprecated for removal.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use SunJSSE instead of com.sun.net.ssl.internal.ssl.Provider

org.openrewrite.java.migrate.RemovedLegacySunJSSEProviderName

The com.sun.net.ssl.internal.ssl.Provider provider name was removed.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Adopt setLongThreadID in java.util.logging.LogRecord

org.openrewrite.java.migrate.DeprecatedLogRecordThreadID

Avoid using the deprecated methods in java.util.logging.LogRecord.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Set visibility of premain and agentmain methods to public

org.openrewrite.java.migrate.Jre17AgentMainPreMainPublic

Check for a behavior change in Java agents.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace finalize method in java.util.zip.ZipFile, java.util.zip.Inflater and java.util.zip.Deflater

org.openrewrite.java.migrate.RemovedZipFinalizeMethods

The finalize method in java.util.zip.ZipFile is replaced with the close method and is replaced by the end method in java.util.zip.Inflater and java.util.zip.Deflater as it is no longer available in Java SE 12 and later.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace SSLSession.getPeerCertificateChain() method

org.openrewrite.java.migrate.RemovedSSLSessionGetPeerCertificateChainMethodImpl

The javax.net.ssl.SSLSession.getPeerCertificateChain() method implementation was removed from the SunJSSE provider and HTTP client implementation in Java SE 15. The default implementation will now throw an UnsupportedOperationException. Applications using this method should be updated to use the javax.net.ssl.SSLSession.getPeerCertificates() method instead.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace com.sun.net.ssl package

org.openrewrite.java.migrate.SunNetSslPackageUnavailable

The internal API com.sun.net.ssl is removed. The package was intended for internal use only and replacement APIs can be found in the javax.net.ssl package.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace RMIConnectorServer.CREDENTIAL_TYPES constant

org.openrewrite.java.migrate.RemovedRMIConnectorServerCredentialTypesConstant

This recipe replaces the RMIConnectorServer.CREDENTIAL_TYPES constant with the RMIConnectorServer.CREDENTIALS_FILTER_PATTERN constant.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove Thread.countStackFrames() method

org.openrewrite.java.migrate.DeprecatedCountStackFramesMethod

Thread.countStackFrames() has been removed in Java SE 14 and has been changed in this release to unconditionally throw UnsupportedOperationException This recipe removes the usage of this method in your application as long as the method is not assigned to a variable. For more information on the Java SE 14 deprecation of this method, see https://bugs.java.com/bugdatabase/view_bug?bug_id=8205132.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace finalize method in java.io.FileInputStream and java.io.FileOutputStream

org.openrewrite.java.migrate.RemovedFileIOFinalizeMethods

The finalize method in java.io.FileInputStream and java.io.FileOutputStream is no longer available in Java SE 12 and later. The recipe replaces it with the close method.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change javax.tools.ToolProvider methods calls to static

org.openrewrite.java.migrate.RemovedToolProviderConstructor

The javax.tools.ToolProvider() constructor has been removed in Java SE 16 since the class only contains static methods. The recipe converts javax.tools.ToolProvider getSystemJavaCompiler(), javax.tools.ToolProvider getSystemDocumentationTool() and javax.tools.ToolProvider getSystemToolClassLoader() to static methods.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change java.lang.reflect.Modifier and java.lang.invoke.ConstantBootstraps method calls to static

org.openrewrite.java.migrate.RemovedModifierAndConstantBootstrapsConstructors

The java.lang.reflect.Modifier() and java.lang.invoke.ConstantBootstraps() constructors have been removed in Java SE 15 because both classes only contain static methods. This recipe converts the usage of all methods in the two classes to be static. See https://docs.oracle.com/en/java/javase/15/migrate/index.html#GUID-233853B8-0782-429E-BEF7-7532EE610E63 for more information on these changes.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove Runtime.traceInstructions(boolean) and Runtime.traceMethodCalls methods

org.openrewrite.java.migrate.RemovedRuntimeTraceMethods

The traceInstructions and traceMethodCalls methods in java.lang.Runtime were deprecated in Java SE 9 and are no longer available in Java SE 13 and later. The recipe removes the invocations of these methods since the method invocations do nothing functionally.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add lombok-mapstruct-binding when both MapStruct and Lombok are used

org.openrewrite.java.migrate.AddLombokMapstructBinding

Add the lombok-mapstruct-binding annotation processor as needed when both MapStruct and Lombok are used.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add lombok-mapstruct-binding dependency for Maven when both MapStruct and Lombok are used

org.openrewrite.java.migrate.AddLombokMapstructBindingMavenDependencyOnly

Add the lombok-mapstruct-binding when both MapStruct and Lombok are used, and the dependency does not already exist. Only to be called from org.openrewrite.java.migrate.AddLombokMapstructBinding to reduce redundant checks

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Java 21

org.openrewrite.java.migrate.UpgradeToJava21

This recipe will apply changes commonly needed when migrating to Java 21. This recipe will also replace deprecated API with equivalents when there is a clear migration strategy. Build files will also be updated to use Java 21 as the target/source and plugins will be also be upgraded to versions that are compatible with Java 21.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Upgrade build to Java 21

org.openrewrite.java.migrate.UpgradeBuildToJava21

Updates build files to use Java 21 as the target/source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade plugins to Java 21 compatible versions

org.openrewrite.java.migrate.UpgradePluginsForJava21

Updates plugins and dependencies to version compatible with Java 21.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Adopt SequencedCollection

org.openrewrite.java.migrate.util.SequencedCollection

Replace older code patterns with SequencedCollection methods, as per https://openjdk.org/jeps/431.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Adopt javax.security.auth.Subject.current() and javax.security.auth.Subject.callAs() methods`

org.openrewrite.java.migrate.RemovedSubjectMethods

Replaces the javax.security.auth.Subject.getSubject() and javax.security.auth.Subject.doAs() methods with javax.security.auth.Subject.current() and javax.security.auth.Subject.callAs().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Avoid using the deprecated empty finalize() method in java.desktop

org.openrewrite.java.migrate.DeleteDeprecatedFinalize

The java.desktop module had a few implementations of finalize() that did nothing and have been removed. This recipe will remove these methods.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Adopt switch pattern matching (JEP 441)

org.openrewrite.java.migrate.SwitchPatternMatching

JEP 441 describes how some switch statements can be improved with pattern matching. This recipe applies some of those improvements where applicable.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Java 25

org.openrewrite.java.migrate.UpgradeToJava25

This recipe will apply changes commonly needed when migrating to Java 25. This recipe will also replace deprecated API with equivalents when there is a clear migration strategy. Build files will also be updated to use Java 25 as the target/source and plugins will be also be upgraded to versions that are compatible with Java 25.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Replace Inflater and Deflater end() calls with close()

org.openrewrite.java.migrate.util.MigrateInflaterDeflaterToClose

Replace end() method calls with close() method calls for Inflater and Deflater classes in Java 25+, as they now implement AutoCloseable.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove Security AccessController

org.openrewrite.java.migrate.AccessController

The Security Manager API is unsupported in Java 24. This recipe will remove the usage of java.security.AccessController.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove Security Policy

org.openrewrite.java.migrate.RemoveSecurityPolicy

The Security Manager API is unsupported in Java 24. This recipe will remove the use of java.security.Policy.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove Security SecurityManager

org.openrewrite.java.migrate.RemoveSecurityManager

The Security Manager API is unsupported in Java 24. This recipe will remove the usage of java.security.SecurityManager.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace System.getSecurityManager() with null

org.openrewrite.java.migrate.SystemGetSecurityManagerToNull

The Security Manager API is unsupported in Java 24. This recipe will replace System.getSecurityManager() with null to make its behavior more obvious and try to simplify execution paths afterwards.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use ZipException instead of ZipError

org.openrewrite.java.migrate.MigrateZipErrorToZipException

Use ZipException instead of the deprecated ZipError in Java 9 or higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Java 6

org.openrewrite.java.migrate.UpgradeToJava6

This recipe will apply changes commonly needed when upgrading to Java 6. This recipe will also replace deprecated API with equivalents when there is a clear migration strategy.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Add missing isWrapperFor and unwrap methods.

org.openrewrite.java.migrate.JREWrapperInterface

Add method implementations stubs to classes that implement java.sql.Wrapper.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Java 7

org.openrewrite.java.migrate.UpgradeToJava7

This recipe will apply changes commonly needed when upgrading to Java 7. This recipe will also replace deprecated API with equivalents when there is a clear migration strategy.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Adds missing JDBC interface methods.

org.openrewrite.java.migrate.JREJdbcInterfaceNewMethods

Add method implementations stubs to classes that implement JDBC interfaces.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Java 8

org.openrewrite.java.migrate.UpgradeToJava8

This recipe will apply changes commonly needed when upgrading to Java 8. This recipe will also replace deprecated API with equivalents when there is a clear migration strategy.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Find Virtual Thread opportunities

org.openrewrite.java.migrate.lang.FindVirtualThreadOpportunities

Find opportunities to convert existing code to use Virtual Threads.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.java.table.MethodCalls: The text of matching method invocations.

Find non-virtual ExecutorService creation

org.openrewrite.java.migrate.lang.FindNonVirtualExecutors

Find all places where static java.util.concurrent.Executors method creates a non-virtual java.util.concurrent.ExecutorService. This recipe can be used to search fro ExecutorService that can be replaced by Virtual Thread executor.

Data tables:

  • org.openrewrite.java.table.MethodCalls: The text of matching method invocations.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use modernized javax.lang.model.util APIs

org.openrewrite.java.migrate.javax.JavaxLangModelUtil

Certain javax.lang.model.util APIs have become deprecated and their usages changed, necessitating usage changes.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use javax.lang.model.util.AbstractAnnotationValueVisitor9

org.openrewrite.java.migrate.javax.MigrateAbstractAnnotationValueVisitor6To9

Use javax.lang.model.util.AbstractAnnotationValueVisitor9 instead of the deprecated javax.lang.model.util.AbstractAnnotationValueVisitor6 in Java 9 or higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use javax.lang.model.util.AbstractElementVisitor9

org.openrewrite.java.migrate.javax.MigrateAbstractElementVisitor6To9

Use javax.lang.model.util.AbstractElementVisitor9 instead of the deprecated javax.lang.model.util.AbstractElementVisitor6 in Java 9 or higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use javax.lang.model.util.AbstractTypeVisitor9

org.openrewrite.java.migrate.javax.MigrateAbstractTypeVisitor6To9

Use javax.lang.model.util.AbstractTypeVisitor9 instead of the deprecated javax.lang.model.util.AbstractTypeVisitor6 in Java 9 or higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use javax.lang.model.util.ElementKindVisitor9

org.openrewrite.java.migrate.javax.MigrateElementKindVisitor6To9

Use javax.lang.model.util.ElementKindVisitor9 instead of the deprecated javax.lang.model.util.ElementKindVisitor6 in Java 9 or higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use javax.lang.model.util.ElementScanner9

org.openrewrite.java.migrate.javax.MigrateElementScanner6To9

Use javax.lang.model.util.ElementScanner9 instead of the deprecated javax.lang.model.util.ElementScanner6 in Java 9 or higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use javax.lang.model.util.SimpleAnnotationValueVisitor9

org.openrewrite.java.migrate.javax.MigrateSimpleAnnotationValueVisitor6To9

Use javax.lang.model.util.SimpleAnnotationValueVisitor9 instead of the deprecated javax.lang.model.util.SimpleAnnotationValueVisitor6 in Java 9 or higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use javax.lang.model.util.SimpleElementVisitor9

org.openrewrite.java.migrate.javax.MigrateSimpleElementVisitor6To9

Use javax.lang.model.util.SimpleElementVisitor9 instead of the deprecated javax.lang.model.util.SimpleElementVisitor6 in Java 9 or higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use javax.lang.model.util.SimpleTypeVisitor9

org.openrewrite.java.migrate.javax.MigrateSimpleTypeVisitor6To9

Use javax.lang.model.util.SimpleTypeVisitor9 instead of the deprecated javax.lang.model.util.SimpleTypeVisitor6 in Java 9 or higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use javax.lang.model.util.TypeKindVisitor9

org.openrewrite.java.migrate.javax.MigrateTypeKindVisitor6To9

Use javax.lang.model.util.TypeKindVisitor9 instead of the deprecated javax.lang.model.util.TypeKindVisitor6 in Java 9 or higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use modernized javax.management.monitor APIs

org.openrewrite.java.migrate.javax.JavaxManagementMonitorAPIs

Certain javax.management.monitor APIs have become deprecated and their usages changed, necessitating usage changes.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use javax.management.monitor.CounterMonitor#setInitThreshold

org.openrewrite.java.migrate.javax.MigrateCounterMonitorSetThresholdToSetInitThreshold

Use javax.management.monitor.CounterMonitor#setInitThreshold instead of the deprecated javax.management.monitor.CounterMonitor#setThreshold in JMX 1.2 or higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use modernized javax.xml.stream APIs

org.openrewrite.java.migrate.javax.JavaxXmlStreamAPIs

Certain javax.xml.stream APIs have become deprecated and their usages changed, necessitating usage changes.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use javax.xml.stream.XMLEventFactory#newFactory(String, ClassLoader)

org.openrewrite.java.migrate.javax.MigrateXMLEventFactoryNewInstanceToNewFactory

Use javax.xml.stream.XMLEventFactory#newFactory instead of the deprecated javax.xml.stream.XMLEventFactory#newInstance in Java 7 or higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use javax.xml.stream.XMLInputFactory#newFactory(String, ClassLoader)

org.openrewrite.java.migrate.javax.MigrateXMLInputFactoryNewInstanceToNewFactory

Use javax.xml.stream.XMLInputFactory#newFactory instead of the deprecated javax.xml.stream.XMLInputFactory#newInstance in Java 7 or higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use javax.xml.stream.XMLOutputFactory#newFactory(String, ClassLoader)

org.openrewrite.java.migrate.javax.MigrateXMLOutputFactoryNewInstanceToNewFactory

Use javax.xml.stream.XMLOutputFactory#newFactory instead of the deprecated javax.xml.stream.XMLOutputFactory#newInstance in Java 7 or higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add explicit JAXB API dependencies and runtime

org.openrewrite.java.migrate.javax.AddJaxbDependenciesWithRuntime

This recipe will add explicit dependencies for Jakarta EE 8 when a Java 8 application is using JAXB. Any existing dependencies will be upgraded to the latest version of Jakarta EE 8. The artifacts are moved to Jakarta EE 8 version 2.x which allows for the continued use of the javax.xml.bind namespace. Running a full javax to Jakarta migration using org.openrewrite.java.migrate.jakarta.JavaxMigrationToJakarta will update to versions greater than 3.x which necessitates the package change as well.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Add explicit JAXB API dependencies and remove runtimes

org.openrewrite.java.migrate.javax.AddJaxbDependenciesWithoutRuntime

This recipe will add explicit API dependencies without runtime dependencies for Jakarta EE 8 when a Java 8 application is using JAXB. Any existing API dependencies will be upgraded to the latest version of Jakarta EE 8. The artifacts are moved to Jakarta EE 8 version 2.x which allows for the continued use of the javax.xml.bind namespace. All JAXB runtime implementation dependencies are removed.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Add explicit JAXB API dependencies

org.openrewrite.java.migrate.javax.AddJaxbAPIDependencies

This recipe will add explicit API dependencies for Jakarta EE 8 when a Java 8 application is using JAXB. Any existing dependencies will be upgraded to the latest version of Jakarta EE 8. The artifacts are moved to Jakarta EE 8 version 2.x which allows for the continued use of the javax.xml.bind namespace. Running a full javax to Jakarta migration using org.openrewrite.java.migrate.jakarta.JavaxMigrationToJakarta will update to versions greater than 3.x which necessitates the package change as well.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Migrate JAXB-WS Plugin

org.openrewrite.java.migrate.javax.MigrateJaxBWSPlugin

Upgrade the JAXB-WS Maven plugin to be compatible with Java 11.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

JSpecify best practices

org.openrewrite.java.jspecify.JSpecifyBestPractices

Apply JSpecify best practices, such as migrating off of alternatives, and adding missing @Nullable annotations.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to JSpecify

org.openrewrite.java.jspecify.MigrateToJSpecify

This recipe will migrate to JSpecify annotations from various other nullability annotation standards.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate from javax annotation API to JSpecify

org.openrewrite.java.jspecify.MigrateFromJavaxAnnotationApi

Migrate from javax annotation API to JSpecify.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate from Jakarta annotation API to JSpecify

org.openrewrite.java.jspecify.MigrateFromJakartaAnnotationApi

Migrate from Jakarta annotation API to JSpecify.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate from JetBrains annotations to JSpecify

org.openrewrite.java.jspecify.MigrateFromJetbrainsAnnotations

Migrate from JetBrains annotations to JSpecify.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate from Micrometer annotations to JSpecify

org.openrewrite.java.jspecify.MigrateFromMicrometerAnnotations

Migrate from Micrometer annotations to JSpecify.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate from Spring Framework annotations to JSpecify

org.openrewrite.java.jspecify.MigrateFromSpringFrameworkAnnotations

Migrate from Spring Framework annotations to JSpecify.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate from Micronaut Framework annotations to JSpecify

org.openrewrite.java.jspecify.MigrateFromMicronautAnnotations

Migrate from Micronaut Framework annotations to JSpecify.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Lombok Best Practices

org.openrewrite.java.migrate.lombok.LombokBestPractices

Applies all recipes that enforce best practices for using Lombok.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Lombok to a Java 11 compatible version

org.openrewrite.java.migrate.lombok.UpdateLombokToJava11

Update Lombok dependency to a version that is compatible with Java 11 and migrate experimental Lombok types that have been promoted.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use Lombok logger annotations instead of explicit fields

org.openrewrite.java.migrate.lombok.log.UseLombokLogAnnotations

Applies all recipes that replace logger declarations with class level annotations.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer the Java standard library instead of Guava

org.openrewrite.java.migrate.guava.NoGuava

Guava filled in important gaps in the Java standard library and still does. But at least some of Guava's API surface area is covered by the Java standard library now, and some projects may be able to remove Guava altogether if they migrate to standard library for these functions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer the Java 11 standard library instead of Guava

org.openrewrite.java.migrate.guava.NoGuavaJava11

Guava filled in important gaps in the Java standard library and still does. But at least some of Guava's API surface area is covered by the Java standard library now, and some projects may be able to remove Guava altogether if they migrate to standard library for these functions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer the Java 21 standard library instead of Guava

org.openrewrite.java.migrate.guava.NoGuavaJava21

Guava filled in important gaps in the Java standard library and still does. But at least some of Guava's API surface area is covered by the Java standard library now, and some projects may be able to remove Guava altogether if they migrate to standard library for these functions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer java.nio.charset.StandardCharsets

org.openrewrite.java.migrate.guava.PreferJavaNioCharsetStandardCharsets

Prefer java.nio.charset.StandardCharsets instead of using com.google.common.base.Charsets.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer java.util.function.Function

org.openrewrite.java.migrate.guava.PreferJavaUtilFunction

Prefer java.util.function.Function instead of using com.google.common.base.Function.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer java.util.Optional

org.openrewrite.java.migrate.guava.PreferJavaUtilOptional

Prefer java.util.Optional instead of using com.google.common.base.Optional.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer java.util.function.Predicate

org.openrewrite.java.migrate.guava.PreferJavaUtilPredicate

Prefer java.util.function.Predicate instead of using com.google.common.base.Predicate.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer java.util.function.Supplier

org.openrewrite.java.migrate.guava.PreferJavaUtilSupplier

Prefer java.util.function.Supplier instead of using com.google.common.base.Supplier.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer java.util.Objects#equals

org.openrewrite.java.migrate.guava.PreferJavaUtilObjectsEquals

Prefer java.util.Objects#equals instead of using com.google.common.base.Objects#equal.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer java.util.Objects#hash

org.openrewrite.java.migrate.guava.PreferJavaUtilObjectsHashCode

Prefer java.util.Objects#hash instead of using com.google.common.base.Objects#hashCode or com.google.common.base.Objects hash(..).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer java.util.Objects#requireNonNullElse

org.openrewrite.java.migrate.guava.PreferJavaUtilObjectsRequireNonNullElse

Prefer java.util.Objects#requireNonNullElse instead of using com.google.common.base.MoreObjects#firstNonNull.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer java.util.Collections#unmodifiableNavigableMap

org.openrewrite.java.migrate.guava.PreferJavaUtilCollectionsUnmodifiableNavigableMap

Prefer java.util.Collections#unmodifiableNavigableMap instead of using com.google.common.collect.Maps#unmodifiableNavigableMap.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer java.util.Collections#synchronizedNavigableMap

org.openrewrite.java.migrate.guava.PreferJavaUtilCollectionsSynchronizedNavigableMap

Prefer java.util.Collections#synchronizedNavigableMap instead of using com.google.common.collect.Maps#synchronizedNavigableMap.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer java.lang.Char#compare

org.openrewrite.java.migrate.guava.PreferCharCompare

Prefer java.lang.Char#compare instead of using com.google.common.primitives.Chars#compare.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Integer#compare

org.openrewrite.java.migrate.guava.PreferIntegerCompare

Prefer java.lang.Integer#compare instead of using com.google.common.primitives.Ints#compare.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Long#compare

org.openrewrite.java.migrate.guava.PreferLongCompare

Prefer java.lang.Long#compare instead of using com.google.common.primitives.Longs#compare.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Short#compare

org.openrewrite.java.migrate.guava.PreferShortCompare

Prefer java.lang.Short#compare instead of using com.google.common.primitives.Shorts#compare.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Integer#compareUnsigned

org.openrewrite.java.migrate.guava.PreferIntegerCompareUnsigned

Prefer java.lang.Integer#compareUnsigned instead of using com.google.common.primitives.UnsignedInts#compare or com.google.common.primitives.UnsignedInts#compareUnsigned.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Integer#divideUnsigned

org.openrewrite.java.migrate.guava.PreferIntegerDivideUnsigned

Prefer java.lang.Integer#divideUnsigned instead of using com.google.common.primitives.UnsignedInts#divide or com.google.common.primitives.UnsignedInts#divideUnsigned.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Integer#parseUnsignedInt

org.openrewrite.java.migrate.guava.PreferIntegerParseUnsignedInt

Prefer java.lang.Integer#parseUnsignedInt instead of using com.google.common.primitives.UnsignedInts#parseUnsignedInt.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Integer#remainderUnsigned

org.openrewrite.java.migrate.guava.PreferIntegerRemainderUnsigned

Prefer java.lang.Integer#remainderUnsigned instead of using com.google.common.primitives.UnsignedInts#remainderUnsigned.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Long#compareUnsigned

org.openrewrite.java.migrate.guava.PreferLongCompareUnsigned

Prefer java.lang.Long#compareUnsigned instead of using com.google.common.primitives.UnsignedLongs#compare or com.google.common.primitives.UnsignedLongs#compareUnsigned.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Long#divideUnsigned

org.openrewrite.java.migrate.guava.PreferLongDivideUnsigned

Prefer java.lang.Long#divideUnsigned instead of using com.google.common.primitives.UnsignedLongs#divide or com.google.common.primitives.UnsignedLongs#divideUnsigned.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Long#parseUnsignedInt

org.openrewrite.java.migrate.guava.PreferLongParseUnsignedLong

Prefer java.lang.Long#parseUnsignedInt instead of using com.google.common.primitives.UnsignedLongs#parseUnsignedInt.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Long#remainderUnsigned

org.openrewrite.java.migrate.guava.PreferLongRemainderUnsigned

Prefer java.lang.Long#remainderUnsigned instead of using com.google.common.primitives.UnsignedLongs#remainderUnsigned.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Math#addExact

org.openrewrite.java.migrate.guava.PreferMathAddExact

Prefer java.lang.Math#addExact instead of using com.google.common.math.IntMath#checkedAdd or com.google.common.math.IntMath#addExact.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Math#subtractExact

org.openrewrite.java.migrate.guava.PreferMathSubtractExact

Prefer java.lang.Math#subtractExact instead of using com.google.common.primitives.IntMath#checkedSubtract or com.google.common.primitives.IntMath#subtractExact.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Math#multiplyExact

org.openrewrite.java.migrate.guava.PreferMathMultiplyExact

Prefer java.lang.Math#multiplyExact instead of using com.google.common.primitives.IntMath#checkedMultiply or com.google.common.primitives.IntMath#multiplyExact.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Math#clamp

org.openrewrite.java.migrate.guava.PreferMathClamp

Prefer java.lang.Math#clamp instead of using com.google.common.primitives.*#constrainToRange.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

org.openrewrite.java.migrate.javax.openJPAToEclipseLink

These recipes help migrate Java Persistence applications using OpenJPA to EclipseLink JPA.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove Cobertura Maven plugin

org.openrewrite.java.migrate.cobertura.RemoveCoberturaMavenPlugin

This recipe will remove Cobertura, as it is not compatible with Java 11.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Scala 2.12.+

org.openrewrite.scala.migrate.UpgradeScala_2_12

Upgrade the Scala version for compatibility with newer Java versions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace all EventLoopGroups with MultiThreadIoEventLoopGroup

org.openrewrite.java.netty.EventLoopGroupToMultiThreadIoEventLoopGroupRecipes

Replaces Netty's new *EventLoopGroup with new MultiThreadIoEventLoopGroup(*IoHandler.newFactory()).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace EpollEventLoopGroup with MultiThreadIoEventLoopGroup

org.openrewrite.java.netty.EventLoopGroupToMultiThreadIoEventLoopGroupRecipes$EpollEventLoopGroupFactoryRecipe

Replace new EpollEventLoopGroup() with new MultiThreadIoEventLoopGroup(EpollIoHandler.newFactory()).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace LocalEventLoopGroup with MultiThreadIoEventLoopGroup

org.openrewrite.java.netty.EventLoopGroupToMultiThreadIoEventLoopGroupRecipes$LocalEventLoopGroupFactoryRecipe

Replace new LocalEventLoopGroup() with new MultiThreadIoEventLoopGroup(LocalIoHandler.newFactory()).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace NioEventLoopGroup with MultiThreadIoEventLoopGroup

org.openrewrite.java.netty.EventLoopGroupToMultiThreadIoEventLoopGroupRecipes$NioEventLoopGroupFactoryRecipe

Replace new NioEventLoopGroup() with new MultiThreadIoEventLoopGroup(NioIoHandler.newFactory()).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrates from Netty 4.1.x to Netty 4.2.x

org.openrewrite.netty.UpgradeNetty_4_1_to_4_2

Migrate applications to the latest Netty 4.2.x release.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade Node.js dependencies

org.openrewrite.nodejs.UpgradeDependencyVersion

Upgrade matching Node.js direct dependencies.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find and fix vulnerable npm dependencies

org.openrewrite.nodejs.DependencyVulnerabilityCheck

This software composition analysis (SCA) tool detects and upgrades dependencies with publicly disclosed vulnerabilities. This recipe both generates a report of vulnerable dependencies and upgrades to newer versions with fixes. This recipe only upgrades to the latest patch version. If a minor or major upgrade is required to reach the fixed version, this recipe will not make any changes. Vulnerability information comes from the GitHub Security Advisory Database, which aggregates vulnerability data from several public databases, including the National Vulnerability Database maintained by the United States government. Dependencies following Semantic Versioning will see their patch version updated where applicable.

Data tables:

  • org.openrewrite.nodejs.table.VulnerabilityReport: A vulnerability report that includes detailed information about the affected artifact and the corresponding CVEs.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Node.js dependency insight

org.openrewrite.nodejs.search.DependencyInsight

Identify the direct and transitive Node.js dependencies used in a project.

Data tables:

  • org.openrewrite.nodejs.table.DependenciesInUse: Direct and transitive dependencies in use.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find Node.js projects

org.openrewrite.nodejs.search.FindNodeProjects

Find Node.js projects and summarize data about them.

Data tables:

  • org.openrewrite.nodejs.table.NodeProjects: Summary information about Node.js projects.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Javascript UI library insights

org.openrewrite.nodejs.search.UIInsights

Discover which popular javascript UI libraries (React, Vue.js, Angular, etc.) are being used in your projects.

Data tables:

  • org.openrewrite.nodejs.table.DependenciesInUse: Direct and transitive dependencies in use.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Javascript server-side frameworks insights

org.openrewrite.nodejs.search.ServerSideFrameworksInsights

Discover which popular javascript server-side frameworks (Express, Koa, Hapi, etc.) are being used in your projects.

Data tables:

  • org.openrewrite.nodejs.table.DependenciesInUse: Direct and transitive dependencies in use.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Javascript database interaction library insights

org.openrewrite.nodejs.search.DatabaseInteractionInsights

Discover which popular javascript database interaction libraries (Sequelize, TypeORM, Mongoose, etc.) are being used in your projects.

Data tables:

  • org.openrewrite.nodejs.table.DependenciesInUse: Direct and transitive dependencies in use.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Javascript testing library insights

org.openrewrite.nodejs.search.TestingInsights

Discover which popular javascript testing libraries (Jest, Mocha, Chai, etc.) are being used in your projects.

Data tables:

  • org.openrewrite.nodejs.table.DependenciesInUse: Direct and transitive dependencies in use.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Javascript state management library insights

org.openrewrite.nodejs.search.StateManagementInsights

Discover which popular javascript state management libraries (Redux, MobX, Vuex, etc.) are being used in your projects.

Data tables:

  • org.openrewrite.nodejs.table.DependenciesInUse: Direct and transitive dependencies in use.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Javascript form handling library insights

org.openrewrite.nodejs.search.FormHandlingInsights

Discover which popular javascript form handling libraries (Formik, React Hook Form, Yup, etc.) are being used in your projects.

Data tables:

  • org.openrewrite.nodejs.table.DependenciesInUse: Direct and transitive dependencies in use.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Javascript utility library insights

org.openrewrite.nodejs.search.UtilityInsights

Discover which popular javascript utility libraries (Lodash, Moment.js, Date-fns, etc.) are being used in your projects.

Data tables:

  • org.openrewrite.nodejs.table.DependenciesInUse: Direct and transitive dependencies in use.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Javascript task runners & build tools insights

org.openrewrite.nodejs.search.TaskRunnersBuildToolsInsights

Discover which popular javascript task runners and build tools (Webpack, Parcel, Gulp, etc.) are being used in your projects.

Data tables:

  • org.openrewrite.nodejs.table.DependenciesInUse: Direct and transitive dependencies in use.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Javascript linting & formatting library insights

org.openrewrite.nodejs.search.LintingFormattingInsights

Discover which popular javascript linting and formatting libraries (ESLint, Prettier, Stylelint, etc.) are being used in your projects.

Data tables:

  • org.openrewrite.nodejs.table.DependenciesInUse: Direct and transitive dependencies in use.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Javascript real-time communication library insights

org.openrewrite.nodejs.search.RealTimeCommunicationInsights

Discover which popular javascript real-time communication libraries (Socket.io, Ws, SockJS, etc.) are being used in your projects.

Data tables:

  • org.openrewrite.nodejs.table.DependenciesInUse: Direct and transitive dependencies in use.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Javascript security library insights

org.openrewrite.nodejs.search.SecurityInsights

Discover which popular javascript security libraries (Helmet, Cors, Bcrypt, etc.) are being used in your projects.

Data tables:

  • org.openrewrite.nodejs.table.DependenciesInUse: Direct and transitive dependencies in use.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to OkHttp 4.x

org.openrewrite.okhttp.UpgradeOkHttp4

This recipe will apply changes commonly needed when migrating to OkHttp 4.x.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate OkHttp dependencies to 4.x

org.openrewrite.okhttp.UpgradeOkHttp4Dependencies

Migrate OkHttp dependencies to 4.x.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to OkHttp 5.x

org.openrewrite.okhttp.UpgradeOkHttp5

This recipe will apply changes commonly needed when migrating to OkHttp 5.x.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate OkHttp dependencies to 5.x

org.openrewrite.okhttp.UpgradeOkHttp5Dependencies

Migrate OkHttp dependencies to 5.x.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to MockWebServer3 (core module)

org.openrewrite.okhttp.UpgradeMockWebServer3

Migrate from the legacy mockwebserver artifact to mockwebserver3 core module without JUnit dependency.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to MockWebServer3 with JUnit 4

org.openrewrite.okhttp.UpgradeMockWebServer3JUnit4

Migrate from the legacy mockwebserver artifact to mockwebserver3-junit4 with JUnit 4 integration.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to MockWebServer3 with JUnit 5

org.openrewrite.okhttp.UpgradeMockWebServer3JUnit5

Migrate from the legacy mockwebserver artifact to mockwebserver3-junit5 with JUnit 5 integration.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Reorder the arguments of RequestBody.create()

org.openrewrite.okhttp.ReorderRequestBodyCreateArguments

Reorder the arguments of RequestBody.create() to put the MediaType argument after the String body.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Okio 3.x

org.openrewrite.okio.UpgradeOkio3

This recipe will apply changes commonly needed when migrating to Okio 3.x.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Okio dependencies to 3.x

org.openrewrite.okio.UpgradeOkio3Dependencies

Migrate Okio dependencies to 3.x.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Convert API response codes to strings

org.openrewrite.openapi.swagger.ConvertApiResponseCodesToStrings

Convert API response codes to strings.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Convert API response to content annotation

org.openrewrite.openapi.swagger.ConvertApiResponseToContent

Convert API response to content annotation

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate @ApiImplicitParam to @Parameter

org.openrewrite.openapi.swagger.MigrateApiImplicitParam

Migrate @ApiImplicitParam to @Parameter.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate from @ApiModel to @Schema

org.openrewrite.openapi.swagger.MigrateApiModelToSchema

Converts the @ApiModel annotation to @Schema and converts the "value" attribute to "name".

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate @ApiParam(defaultValue) to @Parameter(schema)

org.openrewrite.openapi.swagger.MigrateApiParamDefaultValue

Migrate @ApiParam(defaultValue) to @Parameter(schema = @Schema(defaultValue)).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate from @Api to @Tag

org.openrewrite.openapi.swagger.MigrateApiToTag

Converts @Api to @Tag annotation and converts the directly mappable attributes and removes the others.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate from @SwaggerDefinition to @OpenAPIDefinition

org.openrewrite.openapi.swagger.MigrateSwaggerDefinitionToOpenAPIDefinition

Migrate from @SwaggerDefinition to @OpenAPIDefinition.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate from Swagger to OpenAPI

org.openrewrite.openapi.swagger.SwaggerToOpenAPI

Migrate from Swagger to OpenAPI.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use Jakarta Swagger Artifacts

org.openrewrite.openapi.swagger.UseJakartaSwaggerArtifacts

Migrate from javax Swagger artifacts to Jakarta versions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate from @ApiOperation to @Operation

org.openrewrite.openapi.swagger.MigrateApiOperationToOperation

Converts the @ApiOperation annotation to @Operation and converts the directly mappable attributes and removes the others.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate from @ApiResponses to @ApiResponses

org.openrewrite.openapi.swagger.MigrateApiResponsesToApiResponses

Changes the namespace of the @ApiResponses and @ApiResponse annotations and converts its attributes (ex. code -> responseCode, message -> description, response -> content).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate from @ApiImplicitParams to @Parameters

org.openrewrite.openapi.swagger.MigrateApiImplicitParamsToParameters

Converts @ApiImplicitParams to @Parameters and the @ApiImplicitParam annotation to @Parameter and converts the directly mappable attributes and removes the others.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate from @ApiParam to @Parameter

org.openrewrite.openapi.swagger.MigrateApiParamToParameter

Converts the @ApiParam annotation to @Parameter and converts the directly mappable attributes.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate from @ApiModelProperty to @Schema

org.openrewrite.openapi.swagger.MigrateApiModelPropertyToSchema

Converts the @ApiModelProperty annotation to @Schema and converts the "value" attribute to "description".

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add a Quarkus configuration property

org.openrewrite.quarkus.AddQuarkusProperty

Add a Quarkus configuration property to an existing configuration file if it does not already exist in that file.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change Quarkus configuration property key

org.openrewrite.quarkus.ChangeQuarkusPropertyKey

Change the key of a property in Quarkus configuration files.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change Quarkus configuration property value

org.openrewrite.quarkus.ChangeQuarkusPropertyValue

Change the value of a property in Quarkus configuration files.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use @ConfigMapping

org.openrewrite.quarkus.ConfigPropertiesToConfigMapping

Migrate Quarkus configuration classes annotated with @ConfigProperties to the equivalent Smallrye @ConfigMapping.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Configure quarkus-maven-plugin with reasonable defaults

org.openrewrite.quarkus.ConfigureQuarkusMavenPluginWithReasonableDefaults

Configures the quarkus-maven-plugin with reasonable defaults, such as default activated goals and &lt;extensions&gt; configuration.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Delete Quarkus configuration property

org.openrewrite.quarkus.DeleteQuarkusProperty

Delete a property from Quarkus configuration files.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use native profile in quarkus-maven-plugin

org.openrewrite.quarkus.MigrateQuarkusMavenPluginNativeImageGoal

Migrates the quarkus-maven-plugin deprecated native-image goal. If the native-image goal needs to be removed, this adds &lt;quarkus.package.type&gt;native&lt;/quarkus.package.type&gt; to the native profile properties section, given the native profile exists in the pom.xml.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use Mutiny multi.toHotStream()

org.openrewrite.quarkus.MultiTransformHotStreamToMultiHotStream

Replace Mutiny API usages of multi.transform().toHotStream() with multi.toHotStream().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate SLF4J Logger injection and usage to Quarkus static Log

org.openrewrite.quarkus.Slf4jToQuarkusLogger

Removes usage of SLF4J Logger fields, adjusts imports, and replaces logger method calls with static Quarkus Log calls, including message formatting and method renaming for parameterized logging.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use @GrpcClient

org.openrewrite.quarkus.quarkus2.GrpcServiceAnnotationToGrpcClient

The @GrpcService annotation is replaced with @GrpcClient in Quarkus 2.x. Removes the optional @GrpcClient.value() unless the service name is different from the name of annotated element.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove avro-maven-plugin

org.openrewrite.quarkus.quarkus2.RemoveAvroMavenPlugin

Removes the avro-maven-plugin if the quarkus-maven-plugin is found in the project's pom.xml. Avro has been integrated with the Quarkus code generation mechanism. This replaces the need to use the Avro plugin.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use @Identifier(&quot;default-kafka-broker&quot;)

org.openrewrite.quarkus.quarkus2.UseIdentifierOnDefaultKafkaBroker

Use @io.smallrye.common.annotation.Identifier on default kafka broker configuration.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use PanacheEntityBase static methods

org.openrewrite.quarkus.quarkus2.UsePanacheEntityBaseStaticMethods

The getEntityManager() and the flush() methods of PanacheEntityBase are now static methods.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use Uni&lt;T extends PanacheEntityBase&gt;

org.openrewrite.quarkus.quarkus2.UsePanacheEntityBaseUniT

The persist() and persistAndFlush() methods now return an Uni&lt;T extends PanacheEntityBase&gt; instead of an Uni&lt;Void&gt; to allow chaining the methods.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use Uni&lt;T extends ReactivePanacheMongoEntityBase&gt;

org.openrewrite.quarkus.quarkus2.UseReactivePanacheMongoEntityBaseUniT

The persist(), update(), and persistOrUpdate() methods now return a Uni&lt;T extends ReactivePanacheMongoEntityBase&gt; instead of a Uni&lt;Void&gt; to allow chaining the methods.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Search Quarkus profiles

org.openrewrite.quarkus.search.FindQuarkusProfiles

Search the properties for existing Quarkus profiles.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find Quarkus property

org.openrewrite.quarkus.search.FindQuarkusProperties

Finds occurrences of a Quarkus property key.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate JavaEE to Quarkus 2

org.openrewrite.quarkus.migrate.javaee.JavaEEtoQuarkus2Migration

These recipes help with the migration of a JavaEE application using EJBs and Hibernate to Quarkus 2. Additional transformations like JSF, JMS, Quarkus Tests may be necessary.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add Quarkus 2 dependencies

org.openrewrite.quarkus.migrate.javaee.AddQuarkus2Dependencies

Add Quarkus 2 dependencies to the project.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove JavaEE dependencies

org.openrewrite.quarkus.migrate.javaee.RemoveJavaEEDependencies

Remove JavaEE dependencies from the project.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate JavaEE Maven Dependencies to Quarkus 2

org.openrewrite.quarkus.migrate.javaee.AddQuarkus2MavenPlugins

Upgrade Standard JavaEE dependencies to Quarkus 2 dependencies.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate JavaEE Code to Quarkus 2

org.openrewrite.quarkus.migrate.javaee.JavaEEtoQuarkus2CodeMigration

Migrate Standard JavaEE Code to Quarkus 2.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Quarkus 1.13 migration from Quarkus 1.11

org.openrewrite.quarkus.Quarkus1to1_13Migration

Migrates Quarkus 1.11 to 1.13.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Quarkus 2.x migration from Quarkus 1.x

org.openrewrite.quarkus.quarkus2.Quarkus1to2Migration

Migrates Quarkus 1.x to 2.x.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Replace doAfterSuccessOrError calls with tap operator

org.openrewrite.reactive.reactor.ReactorDoAfterSuccessOrErrorToTap

As of reactor-core 3.5 the doAfterSuccessOrError method is removed, this recipe replaces it with the tap operator.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace various Processor.cache calls with their Sinks equivalent

org.openrewrite.reactive.reactor.ReactorProcessorCacheToSinkRecipes

As of 3.5 Processors are deprecated and Sinks are preferred.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace ReplayProcessor.cacheLast() with Sinks.many().replay().latest()

org.openrewrite.reactive.reactor.ReactorProcessorCacheToSinkRecipes$ReplayProcessorCacheDefaultToSinkRecipe

As of 3.5 ReplayProcessor is deprecated and Sinks are preferred

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace ReplayProcessor.cacheLast() with Sinks.many().replay().latest()

org.openrewrite.reactive.reactor.ReactorProcessorCacheToSinkRecipes$ReplayProcessorCacheToSinkRecipe

As of 3.5 ReplayProcessor is deprecated and Sinks are preferred

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace various Processor.create calls with their Sinks equivalent

org.openrewrite.reactive.reactor.ReactorProcessorCreateToSinkRecipes

As of 3.5 Processors are deprecated and Sinks are preferred.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace DirectProcessor.create() with Sinks.many().multicast().directBestEffort()

org.openrewrite.reactive.reactor.ReactorProcessorCreateToSinkRecipes$DirectProcessorCreateToSinkRecipe

As of 3.5 DirectProcessor is deprecated and Sinks are preferred

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace EmitterProcessor.create(Boolean) with Sinks.many().multicast().onBackpressureBuffer(Queues.SMALL_BUFFER_SIZE, Boolean)

org.openrewrite.reactive.reactor.ReactorProcessorCreateToSinkRecipes$EmitterProcessorCreateBooleanToSinkRecipe

As of 3.5 EmitterProcessor is deprecated and Sinks are preferred

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace EmitterProcessor.create(int, Boolean) with Sinks.many().multicast().onBackpressureBuffer(int, Boolean)

org.openrewrite.reactive.reactor.ReactorProcessorCreateToSinkRecipes$EmitterProcessorCreateIntBooleanToSinkRecipe

As of 3.5 EmitterProcessor is deprecated and Sinks are preferred

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace EmitterProcessor.create(int) with Sinks.many().multicast().onBackpressureBuffer(int)

org.openrewrite.reactive.reactor.ReactorProcessorCreateToSinkRecipes$EmitterProcessorCreateIntToSinkRecipe

As of 3.5 EmitterProcessor is deprecated and Sinks are preferred

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace EmitterProcessor.create() with Sinks.many().multicast().onBackpressureBuffer()

org.openrewrite.reactive.reactor.ReactorProcessorCreateToSinkRecipes$EmitterProcessorCreateToSinkRecipe

As of 3.5 EmitterProcessor is deprecated and Sinks are preferred

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace MonoProcessor.create() with Sinks.one()

org.openrewrite.reactive.reactor.ReactorProcessorCreateToSinkRecipes$MonoProcessorCreateToSinkRecipe

As of 3.5 MonoProcessor is deprecated and Sinks are preferred

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace ReplayProcessor.create(int, false) with Sinks.many().replay().limit(int)

org.openrewrite.reactive.reactor.ReactorProcessorCreateToSinkRecipes$ReplayProcessorCreateIntLiteralFalseToSinkRecipe

As of 3.5 ReplayProcessor is deprecated and Sinks are preferred

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace ReplayProcessor.create(int, true) with Sinks.many().replay().all(int)

org.openrewrite.reactive.reactor.ReactorProcessorCreateToSinkRecipes$ReplayProcessorCreateIntLiteralTrueToSinkRecipe

As of 3.5 ReplayProcessor is deprecated and Sinks are preferred

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace ReplayProcessor.create(int) with Sinks.many().replay().limit(int)

org.openrewrite.reactive.reactor.ReactorProcessorCreateToSinkRecipes$ReplayProcessorCreateIntToSinkRecipe

As of 3.5 ReplayProcessor is deprecated and Sinks are preferred

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace ReplayProcessor.createSizeAndTimeout(int, Duration, Scheduler) with Sinks.many().replay().limit(int, Duration, Scheduler)

org.openrewrite.reactive.reactor.ReactorProcessorCreateToSinkRecipes$ReplayProcessorCreateSizeAndTimeoutSchedulerToSinkRecipe

As of 3.5 ReplayProcessor is deprecated and Sinks are preferred

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace ReplayProcessor.createSizeAndTimeout(int, Duration) with Sinks.many().replay().limit(int, duration)

org.openrewrite.reactive.reactor.ReactorProcessorCreateToSinkRecipes$ReplayProcessorCreateSizeAndTimeoutToSinkRecipe

As of 3.5 ReplayProcessor is deprecated and Sinks are preferred

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace ReplayProcessor.createTimeout(Duration, Scheduler) with Sinks.many().replay().limit(Duration, Scheduler)

org.openrewrite.reactive.reactor.ReactorProcessorCreateToSinkRecipes$ReplayProcessorCreateTimeoutSchedulerToSinkRecipe

As of 3.5 ReplayProcessor is deprecated and Sinks are preferred

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace ReplayProcessor.createTimeout(Duration) with Sinks.many().replay().limit(duration)

org.openrewrite.reactive.reactor.ReactorProcessorCreateToSinkRecipes$ReplayProcessorCreateTimeoutToSinkRecipe

As of 3.5 ReplayProcessor is deprecated and Sinks are preferred

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace ReplayProcessor.create() with Sinks.many().replay().all()

org.openrewrite.reactive.reactor.ReactorProcessorCreateToSinkRecipes$ReplayProcessorCreateToSinkRecipe

As of 3.5 ReplayProcessor is deprecated and Sinks are preferred

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace UnicastProcessor.create(Queue, Consumer, Disposable) with Sinks.many().unicast().onBackpressureBuffer(Queue, Disposable)

org.openrewrite.reactive.reactor.ReactorProcessorCreateToSinkRecipes$UnicastProcessorCreateQueueConsumerDisposableToSinkRecipe

As of 3.5 UnicastProcessor is deprecated and Sinks are preferred

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace UnicastProcessor.create(Queue, Disposable) with Sinks.many().unicast().onBackpressureBuffer(Queue, Disposable)

org.openrewrite.reactive.reactor.ReactorProcessorCreateToSinkRecipes$UnicastProcessorCreateQueueDisposableToSinkRecipe

As of 3.5 UnicastProcessor is deprecated and Sinks are preferred

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace UnicastProcessor.create(Queue) with Sinks.many().unicast().onBackpressureBuffer(Queue)

org.openrewrite.reactive.reactor.ReactorProcessorCreateToSinkRecipes$UnicastProcessorCreateQueueToSinkRecipe

As of 3.5 UnicastProcessor is deprecated and Sinks are preferred

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace UnicastProcessor.create() with Sinks.many().unicast().onBackpressureBuffer()

org.openrewrite.reactive.reactor.ReactorProcessorCreateToSinkRecipes$UnicastProcessorCreateToSinkRecipe

As of 3.5 UnicastProcessor is deprecated and Sinks are preferred

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Reactor Best Practices

org.openrewrite.reactive.reactor.ReactorBestPractices

This recipe applies best practices for using Reactor.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Reactor 3.5

org.openrewrite.reactive.reactor.UpgradeReactor_3_5

Adopt to breaking changes in Reactor 3.5.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add a blank line around fields with annotations

org.openrewrite.java.recipes.BlankLinesAroundFieldsWithAnnotations

Fields with annotations should have a blank line before them to clearly separate them from the field above. If another field follows, it should also have a blank line after so that the field with the annotation has space on either side of it, visually distinguishing it from its neighbors.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Correctly spaced descriptions

org.openrewrite.java.recipes.CorrectlySpacedDescriptions

Recipe descriptions should be cleanly formatted. This recipe forces correct spacing in multiline descriptions. In a multi line description the lines should not start with whitespace and end with a single space except for the last line which should end with a "." (e.g. return &quot;This is a correct &quot; + &quot;multi line description&quot;; ).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use a standard name for ExecutionContext

org.openrewrite.java.recipes.ExecutionContextParameterName

Visitors that are parameterized with ExecutionContext should use the parameter name ctx.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find OpenRewrite recipes

org.openrewrite.java.recipes.FindRecipes

This recipe finds all OpenRewrite recipes, primarily to produce a data table that is being used to experiment with fine-tuning a large language model to produce more recipes.

Data tables:

  • org.openrewrite.table.RewriteRecipeSource: This table contains the source code of recipes along with their metadata for use in an experiment fine-tuning large language models to produce more recipes.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template IsLiteralNull

org.openrewrite.java.recipes.IsLiteralNullRecipe

Recipe created for the following Refaster template: java public class IsLiteralNull { @BeforeTemplate boolean before(Expression expression) { return expression instanceof J.Literal &amp;&amp; ((J.Literal)expression).getValue() == null; } @AfterTemplate boolean after(Expression expression) { return J.Literal.isLiteralValue(expression, null); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find missing @Option example values

org.openrewrite.java.recipes.MissingOptionExample

Find @Option annotations that are missing example values for documentation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Recipe classes should not have mutable static fields

org.openrewrite.java.recipes.NoMutableStaticFieldsInRecipes

Remove mutable static fields from Recipe classes to discourage their use.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Recipe classes should be public

org.openrewrite.java.recipes.RecipeClassesShouldBePublic

Ensures that classes extending Recipe are declared as public for proper visibility and accessibility.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use of @EqualsAndHashCode on Recipe

org.openrewrite.java.recipes.RecipeEqualsAndHashCodeCallSuper

Recipes are value objects, so should use @EqualsAndHashCode(callSuper = false). While in most cases recipes do not extend other classes and so the option is moot, as a matter of stylistic consistency and to enforce the idea that recipes are value objects, this value should be set to false.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Reorder maybeRemoveImport before maybeAddImport

org.openrewrite.java.recipes.RemoveImportBeforeAddImport

Reorders maybeAddImport and maybeRemoveImport calls so that imports are removed before new imports are added. This ordering prevents potential conflicts when the import being added and the import being removed resolve to the same simple class name.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Show @DocumentExamples first

org.openrewrite.java.recipes.ReorderTestMethods

Reorders RewriteTest methods to place defaults first, followed by any @DocumentExamples.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace null with RewriteTest.doesNotExist()

org.openrewrite.java.recipes.ReplaceNullWithDoesNotExist

Replace the first or second null argument in OpenRewrite Assertions class methods with RewriteTest.doesNotExist().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

RewriteTest classes should not be public

org.openrewrite.java.recipes.RewriteTestClassesShouldNotBePublic

Remove the public modifier from classes that implement RewriteTest.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Automatically select recipe examples from the unit test cases of a recipe

org.openrewrite.java.recipes.SelectRecipeExamples

Add @DocumentExample to the first non-issue and not a disabled unit test of a recipe as an example, if there are not any examples yet.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Single @DocumentExample per test class

org.openrewrite.java.recipes.SingleDocumentExample

Ensures there's only one @DocumentExample annotated @Test method per test class, as that looks best in our documentation. @ParameterizedTest methods are not supported.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Minimal indentation for SourceSpecs text blocks

org.openrewrite.java.recipes.SourceSpecTextBlockIndentation

Text blocks that assert before and after source code should have minimal indentation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

New line at the end of SourceSpecs text blocks

org.openrewrite.java.recipes.SourceSpecTextBlockNewLine

Text blocks that assert before and after source code should have a new line after it is closed.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refactor RewriteTest to use defaults method

org.openrewrite.java.recipes.UseRewriteTestDefaults

When all rewriteRun methods in a test class use the same RecipeSpec configuration, refactor to use the defaults method instead.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use Tree.randomId() in LST constructors

org.openrewrite.java.recipes.UseTreeRandomId

Replaces occurrences of UUID.randomUUID() with Tree.randomId() when passed as an argument to a constructor call for LST elements.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Extract documentation examples from tests

org.openrewrite.java.recipes.ExamplesExtractor

Extract the before/after sources from tests annotated with @DocumentExample, and generate a YAML file with those examples to be shown in the documentation to show usage.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Inline methods annotated with @InlineMe

org.openrewrite.recipes.rewrite.InlineMethods

Automatically generated recipes to inline method calls based on @InlineMe annotations discovered in the type table.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate from OpenRewrite annotations to JSpecify

org.openrewrite.java.jspecify.MigrateFromOpenRewriteAnnotations

Migrate from OpenRewrite's JSR-305 meta-annotations to JSpecify.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

OpenRewrite recipe best practices

org.openrewrite.recipes.rewrite.OpenRewriteRecipeBestPractices

Best practices for OpenRewrite recipe development.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Java Recipe best practices

org.openrewrite.java.recipes.JavaRecipeBestPractices

Best practices for Java recipe development.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Recipe testing best practices

org.openrewrite.java.recipes.RecipeTestingBestPractices

Best practices for testing recipes.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Recipe nullability best practices

org.openrewrite.java.recipes.RecipeNullabilityBestPractices

Use JSpecify nullable annotations; drop Nonnull annotations; use NullMarked on package-info.java instead.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate tests to Java 21

org.openrewrite.java.recipes.UpgradeTestsToJava21

Use Java 21 features in tests.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add io.spring.dependency-management plugin, if in use

org.openrewrite.gradle.spring.AddSpringDependencyManagementPlugin

Prior to Spring Boot 2.0 the dependency management plugin was applied automatically as part of the overall spring boot plugin. Afterwards the dependency-management plugin must be applied explicitly, or Gradle's platform() feature may be used instead. This recipe makes usage of io-spring.dependency-management explicit in anticipation of upgrade to Spring Boot 2.0 or later.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add a spring configuration property

org.openrewrite.java.spring.AddSpringProperty

Add a spring configuration property to a configuration file if it does not already exist in that file.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change parameter type for a method declaration

org.openrewrite.java.spring.ChangeMethodParameter

Change parameter type for a method declaration, identified by a method pattern.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change the key of a Spring application property

org.openrewrite.java.spring.ChangeSpringPropertyKey

Change Spring application property keys existing in either Properties or YAML files, and in @Value, @ConditionalOnProperty or @SpringBootTest annotations.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change the value of a spring application property

org.openrewrite.java.spring.ChangeSpringPropertyValue

Change spring application property values existing in either Properties or Yaml files.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Comment out Spring properties

org.openrewrite.java.spring.CommentOutSpringPropertyKey

Add comment to specified Spring properties, and comment out the property.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Delete a spring configuration property

org.openrewrite.java.spring.DeleteSpringProperty

Delete a spring configuration property from any configuration file that contains a matching key.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Expand Spring YAML properties

org.openrewrite.java.spring.ExpandProperties

Expand YAML properties to not use the dot syntax shortcut.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove implicit web annotation names

org.openrewrite.java.spring.ImplicitWebAnnotationNames

Removes implicit web annotation names.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove the @Autowired annotation on inferred constructor

org.openrewrite.java.spring.NoAutowiredOnConstructor

Spring can infer an autowired constructor when there is a single constructor on the bean. This recipe removes unneeded @Autowired annotations on constructors.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove unnecessary @Repository annotation from Spring Data Repository sub-interface

org.openrewrite.java.spring.NoRepoAnnotationOnRepoInterface

Removes superfluous @Repository annotation from Spring Data Repository sub-interfaces.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove @RequestMapping annotations

org.openrewrite.java.spring.NoRequestMappingAnnotation

Replace method declaration @RequestMapping annotations with @GetMapping, @PostMapping, etc. when possible.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Normalize Spring application*.properties properties to kebab-case

org.openrewrite.java.spring.PropertiesToKebabCaseProperties

Normalize Spring application*.properties properties to kebab-case.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Normalize Spring application*.{yml,yaml} properties to kebab-case

org.openrewrite.java.spring.PropertiesToKebabCaseYaml

Normalize Spring application*.{yml,yaml} properties to kebab-case.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use TLS for AMQP connection strings

org.openrewrite.java.spring.amqp.UseTlsAmqpConnectionString

Use TLS for AMQP connection strings.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Convert receive type in some invocation of StepExecution.xx()

org.openrewrite.java.spring.batch.ConvertReceiveTypeWhenCallStepExecutionMethod

Convert receive type in some invocation of StepExecution.xx().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migration invocation of JobParameter.toString to JobParameter.getValue.toString

org.openrewrite.java.spring.batch.JobParameterToString

JobParameter.toString() logic is quite different in spring batch 5, need take JobParameter.getValue.toString replace the JobParameter.toString.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate ItemWriter

org.openrewrite.java.spring.batch.MigrateItemWriterWrite

In ItemWriter the signature of the write() method has changed in spring-batch 5.x.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate JobBuilderFactory to JobBuilder

org.openrewrite.java.spring.batch.MigrateJobBuilderFactory

JobBuilderFactory was deprecated in spring-batch 5.x. It is replaced by JobBuilder.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add class argument to JobParameters

org.openrewrite.java.spring.batch.MigrateJobParameter

Migration Job Parameter, parameterized type is essential in Spring Batch 5.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate method when it annotated by Spring Batch API

org.openrewrite.java.spring.batch.MigrateMethodAnnotatedByBatchAPI

Migrate method when it annotated by Spring Batch API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate StepBuilderFactory to StepBuilder

org.openrewrite.java.spring.batch.MigrateStepBuilderFactory

StepBuilderFactory was deprecated in spring-batch 5.x. It is replaced by StepBuilder.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove DefaultBatchConfigurer

org.openrewrite.java.spring.batch.RemoveDefaultBatchConfigurer

Remove extends DefaultBatchConfigurer and @Override from associated methods.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Transform classes that extend a given Class to implement the given Interface instead

org.openrewrite.java.spring.batch.ReplaceSupportClassWithItsInterface

As of spring-batch 5.x Listeners has default methods (made possible by a Java 8 baseline) and can be implemented directly without the need for this adapter.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add missing @Configuration annotation

org.openrewrite.java.spring.boot2.AddConfigurationAnnotationIfBeansPresent

Class having @Bean annotation over any methods but missing @Configuration annotation over the declaring class would have @Configuration annotation added.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Adjust configuration classes to use the WebServerFactoryCustomizer interface

org.openrewrite.java.spring.boot2.ChangeEmbeddedServletContainerCustomizer

Find any classes implementing EmbeddedServletContainerCustomizer and change the interface to WebServerFactoryCustomizer&lt;ConfigurableServletWebServerFactory&gt;.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate multi-condition @ConditionalOnBean annotations

org.openrewrite.java.spring.boot2.ConditionalOnBeanAnyNestedCondition

Migrate multi-condition @ConditionalOnBean annotations to AnyNestedCondition.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Unconditionally adds @DependsOnDatabaseInitialization to Spring Beans and Components depending on javax.sql.DataSource

org.openrewrite.java.spring.boot2.DatabaseComponentAndBeanInitializationOrderingUnconditionally

Beans of certain well-known types, such as JdbcTemplate, will be ordered so that they are initialized after the database has been initialized. If you have a bean that works with the DataSource directly, annotate its class or @Bean method with @DependsOnDatabaseInitialization to ensure that it too is initialized after the database has been initialized. See the release notes for more. This recipe will not check if the @DependsOnDatabaseInitialization annotation is on the classpath. This recipe is best combined with a precondition, as seen in DatabaseComponentAndBeanInitializationOrdering.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use ErrorAttributes#getErrorAttributes(WebRequest, ErrorAttributeOptions)

org.openrewrite.java.spring.boot2.GetErrorAttributes

ErrorAttributes#getErrorAttributes(WebRequest, boolean) was deprecated in Spring Boot 2.3.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Convert HeadersConfigurer chained calls into Lambda DSL

org.openrewrite.java.spring.boot2.HeadersConfigurerLambdaDsl

Converts HeadersConfigurer chained call from Spring Security pre 5.2.x into new lambda DSL style calls and removes and() methods.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Convert HttpSecurity chained calls into Lambda DSL

org.openrewrite.java.spring.boot2.HttpSecurityLambdaDsl

Converts HttpSecurity chained call from Spring Security pre 5.2.x into new lambda DSL style calls and removes and() methods.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated ActuatorMediaType to ApiVersion#getProducedMimeType

org.openrewrite.java.spring.boot2.MigrateActuatorMediaTypeToApiVersion

Spring Boot ActuatorMediaType was deprecated in 2.5 in favor of ApiVersion#getProducedMimeType(). Replace MediaType.parseMediaType(ActuatorMediaType.Vx_JSON) with MediaType.asMediaType(ApiVersion.Vx.getProducedMimeType()).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use EnableConfigurationProperties.VALIDATOR_BEAN_NAME

org.openrewrite.java.spring.boot2.MigrateConfigurationPropertiesBindingPostProcessorValidatorBeanName

Replaces field and static access of ConfigurationPropertiesBindingPostProcessor.VALIDATOR_BEAN_NAME with EnableConfigurationProperties.VALIDATOR_BEAN_NAME. Deprecated in 2.2.x.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate null credentials

org.openrewrite.java.spring.boot2.MigrateDatabaseCredentialsForToolProperties

Migrate null credentials.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate null credentials

org.openrewrite.java.spring.boot2.MigrateDatabaseCredentialsForToolYaml

Migrate null credentials.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use DiskSpaceHealthIndicator(File, DataSize)

org.openrewrite.java.spring.boot2.MigrateDiskSpaceHealthIndicatorConstructor

DiskSpaceHealthIndicator(File, long) was deprecated in Spring Data 2.1 for removal in 2.2.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use ErrorProperties#IncludeStacktrace.ON_PARAM

org.openrewrite.java.spring.boot2.MigrateErrorPropertiesIncludeStackTraceConstants

ErrorProperties#IncludeStacktrace.ON_TRACE_PARAM was deprecated in 2.3.x and removed in 2.5.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated Spring-Boot EmbeddedDatabaseConnection.HSQL

org.openrewrite.java.spring.boot2.MigrateHsqlEmbeddedDatabaseConnection

Spring-Boot EmbeddedDatabaseConnection.HSQL was deprecated in favor of EmbeddedDatabaseConnection.HSQLDB in 2.4.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use org.springframework.boot.web.server.LocalServerPort

org.openrewrite.java.spring.boot2.MigrateLocalServerPortAnnotation

Updates the package and adds the necessary dependency if LocalServerPort is in use. The package of LocalServerPort was changed in Spring Boot 2.0, necessitating changes.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

org.openrewrite.java.spring.boot2.MigrateLoggingSystemPropertyConstants

Replaces field and static access of deprecated fields in LoggingSystemProperties with the recommendations from LogbackLoggingSystemProperties. Deprecated in 2.4.x and removed in 2.6.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use MultipartConfigFactory with DataSize arguments

org.openrewrite.java.spring.boot2.MigrateMultipartConfigFactory

Methods to set DataSize with primitive arguments were deprecated in 2.1 and removed in 2.2.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use RestTemplateBuilder#setConnectTimeout(Duration) and RestTemplateBuilder#setReadTimeout(Duration)

org.openrewrite.java.spring.boot2.MigrateRestTemplateBuilderTimeoutByInt

RestTemplateBuilder#setConnectTimeout(int) and RestTemplateBuilder#setReadTimeout(int) were deprecated in Spring Boot 2.1.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate @OutputCaptureRule to @ExtendWith(OutputCaptureExtension.class)

org.openrewrite.java.spring.boot2.OutputCaptureExtension

Use the JUnit Jupiter extension instead of JUnit 4 rule.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace EnvironmentTestUtils with TestPropertyValues

org.openrewrite.java.spring.boot2.ReplaceDeprecatedEnvironmentTestUtils

Replaces any references to the deprecated EnvironmentTestUtils with TestPropertyValues and the appropriate functionality.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace @ExtendWith and @ContextConfiguration with @SpringJunitConfig

org.openrewrite.java.spring.boot2.ReplaceExtendWithAndContextConfiguration

Replaces @ExtendWith(SpringRunner.class) and @ContextConfiguration with @SpringJunitConfig, preserving attributes on @ContextConfiguration, unless @ContextConfiguration(loader = ...) is used.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate RestTemplateBuilder

org.openrewrite.java.spring.boot2.RestTemplateBuilderRequestFactory

Migrate RestTemplateBuilder#requestFactory calls to use a Supplier. See the migration guide for more.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Move SAML relying party identity provider property to asserting party

org.openrewrite.java.spring.boot2.SamlRelyingPartyPropertyApplicationPropertiesMove

Renames spring.security.saml2.relyingparty.registration.(any).identityprovider to spring.security.saml2.relyingparty.registration.(any).assertingparty.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Convert ServerHttpSecurity chained calls into Lambda DSL

org.openrewrite.java.spring.boot2.ServerHttpSecurityLambdaDsl

Converts ServerHttpSecurity chained call from Spring Security pre 5.2.x into new lambda DSL style calls and removes and() methods.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use spring-boot.run.agents configuration key in spring-boot-maven-plugin

org.openrewrite.java.spring.boot2.SpringBootMavenPluginMigrateAgentToAgents

Migrate the spring-boot.run.agent Maven plugin configuration key to spring-boot.run.agents. Deprecated in 2.2.x.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove @SpringExtension

org.openrewrite.java.spring.boot2.UnnecessarySpringExtension

@SpringBootTest and all test slice annotations already applies @SpringExtension as of Spring Boot 2.1.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

In Spring Boot 2.5 a DefaultConfigurationCustomizer can now be used in favour of defining one or more *Provider beans

org.openrewrite.java.spring.boot2.search.CustomizingJooqDefaultConfiguration

To streamline the customization of jOOQ’s DefaultConfiguration, a bean that implements DefaultConfigurationCustomizer can now be defined. This customizer callback should be used in favour of defining one or more *Provider beans, the support for which has now been deprecated. See Spring Boot 2.5 jOOQ customization.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add trailing slash to Spring routes

org.openrewrite.java.spring.boot3.AddRouteTrailingSlash

This is part of Spring MVC and WebFlux URL Matching Changes, as of Spring Framework 6.0, the trailing slash matching configuration option has been deprecated and its default value set to false. This means that previously, a controller @GetMapping(&quot;/some/greeting&quot;) would match both GET /some/greeting and GET /some/greeting/, but it doesn't match GET /some/greeting/ anymore by default and will result in an HTTP 404 error. This recipe is to add declaration of additional route explicitly on the controller handler (like @GetMapping(&quot;/some/greeting&quot;, &quot;/some/greeting/&quot;).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add SetUseTrailingSlashMatch() in configuration

org.openrewrite.java.spring.boot3.AddSetUseTrailingSlashMatch

This is part of Spring MVC and WebFlux URL Matching Changes, as of Spring Framework 6.0, the trailing slash matching configuration option has been deprecated and its default value set to false. This means that previously, a controller @GetMapping(&quot;/some/greeting&quot;) would match both GET /some/greeting and GET /some/greeting/, but it doesn't match GET /some/greeting/ anymore by default and will result in an HTTP 404 error. This recipe is change the default with the global Spring MVC or Webflux configuration.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add @Valid to nested properties in @ConfigurationProperties

org.openrewrite.java.spring.boot3.AddValidToNestedConfigProperties

Adds @Valid annotation to fields in @ConfigurationProperties classes that contain nested properties with validation constraints.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add @Configuration to classes with @EnableXXXSecurity annotations

org.openrewrite.java.spring.boot3.ConfigurationOverEnableSecurity

Prior to Spring Security 6, @EnableXXXSecurity implicitly had @Configuration. Configuration was removed from the definitions of the @EnableSecurity definitions in Spring Security 6. Consequently classes annotated with @EnableXXXSecurity coming from pre-Boot 3 should have @Configuration annotation added.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Downgrade Jakarta Servlet API to 5.0 when using Jetty

org.openrewrite.java.spring.boot3.DowngradeServletApiWhenUsingJetty

Jetty does not yet support Servlet 6.0. This recipe will detect the presence of the spring-boot-starter-jetty as a first-order dependency and will add the maven property jakarta-servlet.version setting it's value to 5.0.0. This will downgrade the jakarta-servlet artifact if the pom's parent extends from the spring-boot-parent.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate WebMvcTagsProvider to DefaultServerRequestObservationConvention

org.openrewrite.java.spring.boot3.MigrateWebMvcTagsToObservationConvention

Migrate WebMvcTagsProvider to DefaultServerRequestObservationConvention as part of Spring Boot 3.2 removals.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Bean methods should return concrete types

org.openrewrite.java.spring.boot3.PreciseBeanType

Replace Bean method return types with concrete types being returned. This is required for Spring 6 AOT.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove Unnecessary @ConstructorBinding

org.openrewrite.java.spring.boot3.RemoveConstructorBindingAnnotation

As of Boot 3.0 @ConstructorBinding is no longer needed at the type level on @ConfigurationProperties classes and should be removed.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enable Spring Batch Annotation

org.openrewrite.java.spring.boot3.RemoveEnableBatchProcessing

Add or remove the @EnableBatchProcessing annotation from a Spring Boot application.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove SolrAutoConfiguration

org.openrewrite.java.spring.boot3.RemoveSolrAutoConfigurationExclude

SolrAutoConfiguration was removed in Spring Boot 3; remove references to it from exclusions on annotations.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace RestTemplateBuilder.requestFactory(Function) with requestFactoryBuilder

org.openrewrite.java.spring.boot3.ReplaceRestTemplateBuilderRequestFactoryMethod

RestTemplateBuilder.requestFactory(java.util.function.Function) was deprecated since Spring Boot 3.4, in favor of requestFactoryBuilder(ClientHttpRequestFactoryBuilder).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate @RequestMapping on FeignClient to @FeignClient path attribute

org.openrewrite.java.spring.cloud2022.MigrateRequestMappingOnFeignClient

Support for @RequestMapping over a FeignClient interface was removed in Spring Cloud OpenFeign 2.2.10.RELEASE.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Convert JdbcTemplate.queryForLong(..) to queryForObject(..)

org.openrewrite.java.spring.data.JdbcTemplateQueryForLongMigration

Replaces calls to JdbcTemplate.queryForLong(..) with queryForObject(String, Class, Object...).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Make AuditorAware.getCurrentAuditor return Optional

org.openrewrite.java.spring.data.MigrateAuditorAwareToOptional

As of Spring boot 2.0, the AuditorAware.getCurrentAuditor method should return an Optional. This recipe will update the implementations of this method to return an Optional using the ofNullable.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use JpaSort.of(..)

org.openrewrite.java.spring.data.MigrateJpaSort

Equivalent constructors in JpaSort were deprecated in Spring Data 2.3.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace @Query annotation by @NativeQuery when possible

org.openrewrite.java.spring.data.MigrateQueryToNativeQuery

Replace @Query annotation by @NativeQuery when nativeQuery = true. @NativeQuery was introduced in Spring Data JPA 3.4.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use QuerydslPredicateExecutor&lt;T&gt;

org.openrewrite.java.spring.data.MigrateQuerydslJpaRepository

QuerydslJpaRepository&lt;T, ID extends Serializable&gt; was deprecated in Spring Data 2.1.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use new SimpleMongoClientDbFactory(String)

org.openrewrite.java.spring.data.RefactorSimpleMongoDbFactory

Replace usage of deprecated new SimpleMongoDbFactory(new MongoClientURI(String)) with new SimpleMongoClientDbFactory(String).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use TLS for JDBC connection strings

org.openrewrite.java.spring.data.UseTlsJdbcConnectionString

Increasingly, for compliance reasons (e.g. NACHA), JDBC connection strings should be TLS-enabled. This recipe will update the port and optionally add a connection attribute to indicate that the connection is TLS-enabled.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate ApiInfoBuilder to Info

org.openrewrite.java.spring.doc.ApiInfoBuilderToInfo

Migrate SpringFox's ApiInfoBuilder to Swagger's Info.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Removes @Import(BeanValidatorPluginsConfiguration.class)

org.openrewrite.java.spring.doc.RemoveBeanValidatorPluginsConfiguration

As Springdoc OpenAPI supports Bean Validation out of the box, the BeanValidatorPluginsConfiguration is no longer supported nor needed. Thus remove @Import(BeanValidatorPluginsConfiguration.class).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace elements of SpringFox's security with Swagger's security models

org.openrewrite.java.spring.doc.SecurityContextToSecurityScheme

Replace ApiKey, AuthorizationScope, and SecurityScheme elements with Swagger's equivalents.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

@Bean methods may not return void

org.openrewrite.java.spring.framework.BeanMethodReturnNull

Make @Bean methods return Object instead of void.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove public from @Bean methods

org.openrewrite.java.spring.framework.BeanMethodsNotPublic

Remove public modifier from @Bean methods. They no longer have to be public visibility to be usable by Spring.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use Environment#acceptsProfiles(Profiles)

org.openrewrite.java.spring.framework.EnvironmentAcceptsProfiles

Environment#acceptsProfiles(String...) was deprecated in Spring Framework 5.1.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate setReadTimeout(java.lang.int) to SocketConfig setSoTimeout(..)

org.openrewrite.java.spring.framework.HttpComponentsClientHttpRequestFactoryReadTimeout

setReadTimeout(..) was removed in Spring Framework 6.1.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use varargs equivalents for deprecated JdbcTemplate signatures

org.openrewrite.java.spring.framework.JdbcTemplateObjectArrayArgToVarArgs

JdbcTemplate signatures with Object[] arguments are deprecated, in favor of their existing varargs equivalents.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate org.springframework.util.Base64Utils to java.io.Base64

org.openrewrite.java.spring.framework.MigrateBase64Utils

Replaces usages of deprecated org.springframework.util.Base64Utils with java.util.Base64.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replaces deprecated ClientHttpResponse#getRawStatusCode()

org.openrewrite.java.spring.framework.MigrateClientHttpResponseGetRawStatusCodeMethod

ClientHttpResponse#getRawStatusCode() was deprecated, so we replace it with getStatusCode(), though the return type has changed from int to HttpStatusCode, so we must account for that as well.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate HandlerInterceptorAdapter to HandlerInterceptor

org.openrewrite.java.spring.framework.MigrateHandlerInterceptor

Deprecated as of 5.3 in favor of implementing HandlerInterceptor and/or AsyncHandlerInterceptor.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate HandlerResult.hasExceptionHandler() to getExceptionHandler()

org.openrewrite.java.spring.framework.MigrateHandlerResultHasExceptionHandlerMethod

org.springframework.web.reactive.HandlerResult.hasExceptionHandler() was deprecated, in favor of getExceptionHandler().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate org.springframework.web.reactive.HandlerResult.setExceptionHandler method

org.openrewrite.java.spring.framework.MigrateHandlerResultSetExceptionHandlerMethod

org.springframework.web.reactive.HandlerResult.setExceptionHandler(Function&lt;Throwable, Mono&lt;HandlerResult&gt;&gt;) was deprecated, in favor of setExceptionHandler(DispatchExceptionHandler).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Convert InstantiationAwareBeanPostProcessorAdapter to SmartInstantiationAwareBeanPostProcessor

org.openrewrite.java.spring.framework.MigrateInstantiationAwareBeanPostProcessorAdapter

As of Spring-Framework 5.3 InstantiationAwareBeanPostProcessorAdapter is deprecated in favor of the existing default methods in SmartInstantiationAwareBeanPostProcessor.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate MethodArgumentNotValidException.errorsToStringList and resolveErrorMessages

org.openrewrite.java.spring.framework.MigrateMethodArgumentNotValidExceptionErrorMethod

org.springframework.web.bind.MethodArgumentNotValidException.errorsToStringList and resolveErrorMessages method was deprecated, in favor of BindErrorUtils.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate ResourceHttpMessageWriter.addHeaders

org.openrewrite.java.spring.framework.MigrateResourceHttpMessageWriterAddHeadersMethod

org.springframework.http.codec.ResourceHttpMessageWriter.addHeaders was deprecated, in favor of addDefaultHeaders method.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate ResponseEntityExceptionHandler from HttpStatus to HttpStatusCode

org.openrewrite.java.spring.framework.MigrateResponseEntityExceptionHandlerHttpStatusToHttpStatusCode

With Spring 6 HttpStatus was replaced by HttpStatusCode in most method signatures in the ResponseEntityExceptionHandler.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate ResponseStatusException#getRawStatusCode() to getStatusCode().value()

org.openrewrite.java.spring.framework.MigrateResponseStatusExceptionGetRawStatusCodeMethod

Migrate Spring Framework 5.3's ResponseStatusException method getRawStatusCode() to Spring Framework 6's getStatusCode().value().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate ResponseStatusException#getStatus() to getStatusCode()

org.openrewrite.java.spring.framework.MigrateResponseStatusExceptionGetStatusCodeMethod

Migrate Spring Framework 5.3's ResponseStatusException method getStatus() to Spring Framework 6's getStatusCode().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate UriComponentsBuilder.fromHttpRequest and parseForwardedFor

org.openrewrite.java.spring.framework.MigrateUriComponentsBuilderMethods

The fromHttpRequest and parseForwardedFor methods in org.springframework.web.util.UriComponentsBuilder were deprecated, in favor of org.springframework.web.util.ForwardedHeaderUtils.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated Spring Web UTF8 MediaType enums

org.openrewrite.java.spring.framework.MigrateUtf8MediaTypes

Spring Web MediaType#APPLICATION_JSON_UTF8 and MediaType#APPLICATION_PROBLEM_JSON_UTF8 were deprecated in 5.2.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate WebExchangeBindException.resolveErrorMessages

org.openrewrite.java.spring.framework.MigrateWebExchangeBindExceptionResolveErrorMethod

org.springframework.web.bind.support.WebExchangeBindException.resolveErrorMessages was deprecated, in favor of BindErrorUtils.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace WebMvcConfigurerAdapter with WebMvcConfigurer

org.openrewrite.java.spring.framework.MigrateWebMvcConfigurerAdapter

As of 5.0 WebMvcConfigurer has default methods (made possible by a Java 8 baseline) and can be implemented directly without the need for this adapter.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace String literals with HttpHeaders constants

org.openrewrite.java.spring.http.ReplaceStringLiteralsWithHttpHeadersConstants

Replace String literals with org.springframework.http.HttpHeaders constants.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace String literals with MediaType constants

org.openrewrite.java.spring.http.ReplaceStringLiteralsWithMediaTypeConstants

Replace String literals with org.springframework.http.MediaType constants.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Simplify unnecessary MediaType.parseMediaType() and MediaType.valueOf() calls

org.openrewrite.java.spring.http.SimplifyMediaTypeParseCalls

Replaces MediaType.parseMediaType(&quot;application/json&quot;) and MediaType.valueOf(&quot;application/json&quot;) with MediaType.APPLICATION_JSON.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Simplify WebTestClient expressions

org.openrewrite.java.spring.http.SimplifyWebTestClientCalls

Simplifies various types of WebTestClient expressions to improve code readability.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change KafkaOperations.send* return type to CompletableFuture

org.openrewrite.java.spring.kafka.KafkaOperationsSendReturnType

Send operations used to return a ListenableFuture but as of 3.0 return a CompletableFuture. Adjust the usage to use CompletableFuture instead.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use Duration in KafkaTestUtils

org.openrewrite.java.spring.kafka.KafkaTestUtilsDuration

Replace KafkaTestUtils methods that take a long argument with methods that take a Duration.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove KafkaOperations.usingCompletableFuture()

org.openrewrite.java.spring.kafka.RemoveUsingCompletableFuture

Remove the KafkaOperations.usingCompletableFuture() bridge during Spring Kafka 2.9 to 3.0 migration.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find HTTP API calls via RestTemplate

org.openrewrite.java.spring.search.FindApiCalls

Find outbound HTTP API calls made via Spring's RestTemplate class.

Data tables:

  • org.openrewrite.java.spring.table.ApiCalls: The API endpoints that applications expose.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find Spring API endpoints

org.openrewrite.java.spring.search.FindApiEndpoints

Find all HTTP API endpoints exposed by Spring applications. More specifically, this marks method declarations annotated with @RequestMapping, @GetMapping, @PostMapping, @PutMapping, @DeleteMapping, and @PatchMapping as search results.

Data tables:

  • org.openrewrite.java.spring.table.ApiEndpoints: The API endpoints that applications expose.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find Spring @ConfigurationProperties

org.openrewrite.java.spring.search.FindConfigurationProperties

Find all classes annotated with @ConfigurationProperties and extract their prefix values. This is useful for discovering all externalized configuration properties in Spring Boot applications.

Data tables:

  • org.openrewrite.java.spring.table.ConfigurationPropertiesTable: Classes annotated with @ConfigurationProperties and their prefix values.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find Spring components

org.openrewrite.java.spring.search.FindSpringComponents

Find Spring components, including controllers, services, repositories, return types of @Bean annotated methods, etc.

Data tables:

  • org.openrewrite.java.spring.table.SpringComponents: Classes defined with a form of a Spring @Component stereotype and types returned from @Bean annotated methods.
  • org.openrewrite.java.spring.table.SpringComponentRelationships: A table of relationships between Spring components.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace HttpSecurity.authorizeRequests(...) with HttpSecurity.authorizeHttpRequests(...) and ExpressionUrlAuthorizationConfigurer, AbstractInterceptUrlConfigurer with AuthorizeHttpRequestsConfigurer, etc

org.openrewrite.java.spring.security5.AuthorizeHttpRequests

Replace HttpSecurity.authorizeRequests(...) deprecated in Spring Security 6 with HttpSecurity.authorizeHttpRequests(...) and all method calls on the resultant object respectively. Replace deprecated AbstractInterceptUrlConfigurer and its deprecated subclasses with AuthorizeHttpRequestsConfigurer and its corresponding subclasses.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace global method security with method security

org.openrewrite.java.spring.security5.ReplaceGlobalMethodSecurityWithMethodSecurity

@EnableGlobalMethodSecurity and &lt;global-method-security&gt; are deprecated in favor of @EnableMethodSecurity and &lt;method-security&gt;, respectively. The new annotation and XML element activate Spring’s pre-post annotations by default and use AuthorizationManager internally.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use new Argon2PasswordEncoder factory methods

org.openrewrite.java.spring.security5.UpdateArgon2PasswordEncoder

In Spring Security 5.8 some Argon2PasswordEncoder constructors have been deprecated in favor of factory methods. Refer to the Spring Security migration docs for more information.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use new Pbkdf2PasswordEncoder factory methods

org.openrewrite.java.spring.security5.UpdatePbkdf2PasswordEncoder

In Spring Security 5.8 some Pbkdf2PasswordEncoder constructors have been deprecated in favor of factory methods. Refer to the Spring Security migration docs for more information.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use new SCryptPasswordEncoder factory methods

org.openrewrite.java.spring.security5.UpdateSCryptPasswordEncoder

In Spring Security 5.8 some SCryptPasswordEncoder constructors have been deprecated in favor of factory methods. Refer to the Spring Security migration docs for more information.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use the new requestMatchers methods

org.openrewrite.java.spring.security5.UseNewRequestMatchers

In Spring Security 5.8, the antMatchers, mvcMatchers, and regexMatchers methods were deprecated in favor of new requestMatchers methods. Refer to the Spring Security docs for more information.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use the new securityMatcher() method

org.openrewrite.java.spring.security5.UseNewSecurityMatchers

In Spring Security 5.8, the HttpSecurity#antMatcher(), HttpSecurity#mvcMatcher(), and HttpSecurity#regexMatcher() methods were deprecated in favor of new HttpSecurity#securityMatcher() method. Refer to the Spring Security docs for more information.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Spring Security 5.4 introduces the ability to configure HttpSecurity by creating a SecurityFilterChain bean

org.openrewrite.java.spring.security5.WebSecurityConfigurerAdapter

The Spring Security WebSecurityConfigurerAdapter was deprecated 5.7, this recipe will transform WebSecurityConfigurerAdapter classes by using a component based approach. Check out the spring-security-without-the-websecurityconfigureradapter blog for more details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Convert HttpSecurity::apply chained calls into HttpSecurity::with Lambda DSL

org.openrewrite.java.spring.security6.ApplyToWithLambdaDsl

Converts HttpSecurity::apply chained call from Spring Security pre 6.2.x into new lambda DSL style calls and removes and() methods.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove calls matching AuthenticationEntryPointFailureHandler.setRethrowAuthenticationServiceException(true)

org.openrewrite.java.spring.security6.PropagateAuthenticationServiceExceptions

Remove any calls matching AuthenticationEntryPointFailureHandler.setRethrowAuthenticationServiceException(true). See the corresponding Sprint Security 6.0 migration step for details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove unnecessary filterSecurityInterceptorOncePerRequest(false) when upgrading to Spring Security 6

org.openrewrite.java.spring.security6.RemoveFilterSecurityInterceptorOncePerRequest

In Spring Security 6.0, &lt;http&gt; defaults authorizeRequests#filterSecurityInterceptorOncePerRequest to false. So, to complete migration, any defaults values can be removed.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove unneeded oauth2Login config when upgrading to Spring Security 6

org.openrewrite.java.spring.security6.RemoveOauth2LoginConfig

oauth2Login() is a Spring Security feature that allows users to authenticate with an OAuth2 or OpenID Connect 1.0 provider. When a user is authenticated using this feature, they are granted a set of authorities that determines what actions they are allowed to perform within the application. In Spring Security 5, the default authority given to a user authenticated with an OAuth2 or OpenID Connect 1.0 provider via oauth2Login() is ROLE_USER. This means that the user is allowed to access the application's resources as a regular user. However, in Spring Security 6, the default authority given to a user authenticated with an OAuth2 provider is OAUTH2_USER, and the default authority given to a user authenticated with an OpenID Connect 1.0 provider is OIDC_USER. These authorities are more specific and allow for better customization of the user's permissions within the application. If you are upgrading to Spring Security 6 and you have previously configured a GrantedAuthoritiesMapper to handle the authorities of users authenticated via oauth2Login(), you can remove it completely as the new default authorities should be sufficient.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove explicit SecurityContextConfigurer.requireExplicitSave(true) opt-in

org.openrewrite.java.spring.security6.RequireExplicitSavingOfSecurityContextRepository

Remove explicit SecurityContextConfigurer.requireExplicitSave(true) opt-in as that is the new default in Spring Security 6. See the corresponding Sprint Security 6.0 migration step for details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove the useAuthorizationManager=true attribute from @EnableReactiveMethodSecurity

org.openrewrite.java.spring.security6.UpdateEnableReactiveMethodSecurity

In Spring security 6.0, @EnableReactiveMethodSecurity defaults useAuthorizationManager to true. So, to complete migration, @EnableReactiveMethodSecurity remove the useAuthorizationManager attribute.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Keep the default RequestCache querying behavior in Spring Security 5

org.openrewrite.java.spring.security6.UpdateRequestCache

By default, Spring Security 5 queries the saved request on every request, which means that in a typical setup, the HttpSession is queried on every request to use the RequestCache. In Spring Security 6, the default behavior has changed, and RequestCache will only be queried for a cached request if the HTTP parameter "continue" is defined. To maintain the same default behavior as Spring Security 5, either explicitly add the HTTP parameter "continue" to every request or use NullRequestCache to override the default behavior.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove explicit configuration of SHA-256 as encoding and matching algorithm for TokenBasedRememberMeServices

org.openrewrite.java.spring.security6.UseSha256InRememberMe

As of Spring Security 6.0 the SHA-256 algorithm is the default for the encoding and matching algorithm used by TokenBasedRememberMeServices and does thus no longer need to be explicitly configured. See the corresponding Sprint Security 6.0 migration step for details.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Convert OAuth2ClientConfigurer chained calls into Lambda DSL

org.openrewrite.java.spring.security6.oauth2.client.OAuth2ClientLambdaDsl

Converts OAuth2ClientConfigurer chained call from Spring Security pre 5.2.x into new lambda DSL style calls and removes and() methods.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Convert OAuth2LoginConfigurer chained calls into Lambda DSL

org.openrewrite.java.spring.security6.oauth2.client.OAuth2LoginLambdaDsl

Converts OAuth2LoginConfigurer chained call from Spring Security pre 5.2.x into new lambda DSL style calls and removes and() methods.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Convert OAuth2ResourceServerConfigurer chained calls into Lambda DSL

org.openrewrite.java.spring.security6.oauth2.server.resource.OAuth2ResourceServerLambdaDsl

Converts OAuth2ResourceServerConfigurer chained call from Spring Security pre 5.2.x into new lambda DSL style calls and removes and() methods.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace SpringClassRule and SpringMethodRule with JUnit 5 SpringExtension

org.openrewrite.java.spring.test.SpringRulesToJUnitExtension

Replace JUnit 4's SpringClassRule and SpringMethodRule with JUnit 5's SpringExtension or rely on an existing @SpringBootTest.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Rename bean

org.openrewrite.java.spring.RenameBean

Renames a Spring bean, both declaration and references.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Separate application.properties by profile

org.openrewrite.java.spring.SeparateApplicationPropertiesByProfile

Separating application.properties into separate files based on profiles.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Separate application YAML by profile

org.openrewrite.java.spring.SeparateApplicationYamlByProfile

The Spring team's recommendation is to separate profile properties into their own YAML files now.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update the API manifest

org.openrewrite.java.spring.UpdateApiManifest

Keep a consolidated manifest of the API endpoints that this application exposes up-to-date.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Merge Spring bootstrap.yml with application.yml

org.openrewrite.java.spring.boot2.MergeBootstrapYamlWithApplicationYaml

In Spring Boot 2.4, support for bootstrap.yml was removed. It's properties should be merged with application.yml.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use AutoConfiguration#imports

org.openrewrite.java.spring.boot2.MoveAutoConfigurationToImportsFile

Use AutoConfiguration#imports instead of the deprecated entry EnableAutoConfiguration in spring.factories when defining autoconfiguration classes.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Integration scheduler pool size

org.openrewrite.java.spring.boot2.search.IntegrationSchedulerPoolRecipe

Spring Integration now reuses an available TaskScheduler rather than configuring its own. In a typical application setup relying on the auto-configuration, this means that Spring Integration uses the auto-configured task scheduler that has a pool size of 1. To restore Spring Integration’s default of 10 threads, use the spring.task.scheduling.pool.size property.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Applications using logging shutdown hooks

org.openrewrite.java.spring.boot2.search.LoggingShutdownHooks

Spring Boot registers a logging shutdown hook by default for JAR-based applications to ensure that logging resources are released when the JVM exits. If your application is deployed as a WAR then the shutdown hook is not registered since the servlet container usually handles logging concerns. Most applications will want the shutdown hook. However, if your application has complex context hierarchies, then you may need to disable it. You can use the logging.register-shutdown-hook property to do that.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Maintain trailing slash URL mappings

org.openrewrite.java.spring.boot3.MaintainTrailingSlashURLMappings

This is part of Spring MVC and WebFlux URL Matching Changes, as of Spring Framework 6.0, the trailing slash matching configuration option has been deprecated and its default value set to false. This means that previously, a controller @GetMapping(&quot;/some/greeting&quot;) would match both GET /some/greeting and GET /some/greeting/, but it doesn't match GET /some/greeting/ anymore by default and will result in an HTTP 404 error. This recipe is to maintain trailing slash in all HTTP url mappings.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use spring.reactor.context-propagation property

org.openrewrite.java.spring.boot3.MigrateHooksToReactorContextProperty

Replace Hooks.enableAutomaticContextPropagation() with spring.reactor.context-propagation=true.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add logging.pattern.level for traceId and spanId

org.openrewrite.java.spring.cloud2022.AddLoggingPatternLevelForSleuth

Add logging.pattern.level for traceId and spanId which was previously set by default, if not already set.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Docket to GroupedOpenAPI

org.openrewrite.java.spring.doc.MigrateDocketBeanToGroupedOpenApiBean

Migrate a Docket bean to a GroupedOpenAPI bean preserving group name, packages and paths. When possible the recipe will prefer property based configuration.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade Spring dependencies

org.openrewrite.maven.spring.UpgradeExplicitSpringBootDependencies

Upgrades dependencies according to the specified version of spring boot. Spring boot has many direct and transitive dependencies. When a module has an explicit dependency on one of these it may also need to be upgraded to match the version used by spring boot.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Spring Boot 2.x best practices

org.openrewrite.java.spring.boot2.SpringBoot2BestPractices

Applies best practices to Spring Boot 2 applications.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Spring Boot 3.3 best practices

org.openrewrite.java.spring.boot3.SpringBoot33BestPractices

Applies best practices to Spring Boot 3 applications.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Spring Boot 3.3 best practices (only)

org.openrewrite.java.spring.boot3.SpringBoot3BestPracticesOnly

Applies best practices to Spring Boot 3 applications, without chaining in upgrades to Spring Boot.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace String literals with Spring constants

org.openrewrite.java.spring.boot3.ReplaceStringLiteralsWithConstants

Replace String literals with Spring constants where applicable.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enable Virtual Threads on Java 21

org.openrewrite.java.spring.boot3.EnableVirtualThreads

Set spring.threads.virtual.enabled to true in application.properties or application.yml.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Flyway 10

org.openrewrite.java.flyway.MigrateToFlyway10

Migrate to Flyway 10. See details at Flyway V10 has landed.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add missing Flyway module for PostgreSQL

org.openrewrite.java.flyway.AddFlywayModulePostgreSQL

Database modules for Flyway 10 have been split out in to separate modules for maintainability. Add the flyway-database-postgresql dependency if you are using PostgreSQL with Flyway 10, as detailed on https://github.com/flyway/flyway/issues/3780.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add missing Flyway module for MySQL

org.openrewrite.java.flyway.AddFlywayModuleMySQL

Database modules for Flyway 10 have been split out into separate modules for maintainability. Add the flyway-mysql dependency if you are using MySQL with Flyway 10, as detailed on https://github.com/flyway/flyway/issues/3780.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add missing Flyway module for Oracle

org.openrewrite.java.flyway.AddFlywayModuleOracle

Database modules for Flyway 10 have been split out into separate modules for maintainability. Add the flyway-database-oracle dependency if you are using Oracle with Flyway 10, as detailed on https://github.com/flyway/flyway/issues/3780.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add missing Flyway module for SQL Server

org.openrewrite.java.flyway.AddFlywayModuleSqlServer

Database modules for Flyway 10 have been split out into separate modules for maintainability. Add the flyway-sqlserver dependency if you are using SQL Server with Flyway 10, as detailed on https://github.com/flyway/flyway/issues/3780.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Normalize Spring properties to kebab-case

org.openrewrite.java.spring.PropertiesToKebabCase

Normalize Spring properties to use lowercase and hyphen-separated syntax. For example, changing spring.main.showBanner to spring.main.show-banner. With Spring's relaxed binding, kebab-case may be used in properties files and still be converted to configuration beans. Note, an exception to this is the case of @Value, which is match-sensitive. For example, @Value(&quot;${anExampleValue}&quot;) will not match an-example-value. The Spring reference documentation recommends using kebab-case for properties where possible.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace deprecated setters in RestTemplateBuilder

org.openrewrite.java.spring.boot3.ReplaceRestTemplateBuilderMethods

Replaces setConnectTimeout, setReadTimeout, and setSslBundle method invocations with connectTimeout, readTimeout, and sslBundle respectively.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace @MockBean and @SpyBean

org.openrewrite.java.spring.boot4.ReplaceMockBeanAndSpyBean

Replaces @MockBean and @SpyBean annotations with @MockitoBean and @MockitoSpyBean.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Spring Batch 5.0 from 4.3

org.openrewrite.java.spring.batch.SpringBatch4To5Migration

Migrate applications built on Spring Batch 4.3 to the latest Spring Batch 5.0 release.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Transform classes that extend *ListenerSupport to implement the *Listener interfaces instead

org.openrewrite.java.spring.batch.ListenerSupportClassToInterface

As of 5.0 *Listener interfaces default methods (made possible by a Java 8 baseline) can be implemented directly without the need for the adapter.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change the type of skipCount parameter in SkipPolicy from int to long

org.openrewrite.java.spring.batch.UpgradeSkipPolicyParameterType

The skipCount parameter in org.springframework.batch.core.step.skip.SkipPolicy#shouldSkip has been changed from int to long, this recipe updates the parameter type in the implementing classes.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Spring Batch 6.0 from 5.2

org.openrewrite.java.spring.batch.SpringBatch5To6Migration

Migrate applications built on Spring Batch 5.2 to the latest Spring Batch 6.0 release.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Spring Boot properties to 2.0

org.openrewrite.java.spring.boot2.SpringBootProperties_2_0

Migrate properties found in application.properties and application.yml.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate from Spring Boot 1.x to 2.0

org.openrewrite.java.spring.boot2.UpgradeSpringBoot_2_0

Migrate Spring Boot 1.x applications to the latest Spring Boot 2.0 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions. This recipe will also chain additional framework migrations (Spring Framework, Spring Data, etc) that are required as part of the migration to Spring Boot 2.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Use WebServerFactoryCustomizer

org.openrewrite.java.spring.boot2.MigrateToWebServerFactoryCustomizer

Use WebServerFactoryCustomizer instead of the deprecated EmbeddedServletContainerCustomizer in Spring Boot 2.0 or higher. This recipe will replace look for any classes that implement EmbeddedServletContainerCustomizer and change the interface to WebServerFactoryCustomizer&lt;ConfigurableServletWebServerFactory&gt;. This recipe also adjusts the types used in the customize() method from *EmbeddedServletContainerFactory to their *ServletWebServerFactory counterparts.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use org.springframework.boot.web.servlet.support.SpringBootServletInitializer

org.openrewrite.java.spring.boot2.MigrateSpringBootServletInitializerPackageName

Use org.springframework.boot.web.servlet.support.SpringBootServletInitializer instead of the deprecated org.springframework.boot.web.support.SpringBootServletInitializer in Spring Boot 1.4 or higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use org.springframework.boot.autoconfigure.http.HttpMessageConverters

org.openrewrite.java.spring.boot2.MigrateHttpMessageConvertersPackageName

Use org.springframework.boot.autoconfigure.http.HttpMessageConverters instead of the deprecated org.springframework.boot.autoconfigure.web.HttpMessageConverters in Spring Boot 2.0 or higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use org.springframework.boot.web.servlet.error.ErrorController

org.openrewrite.java.spring.boot2.MigrateErrorControllerPackageName

Use org.springframework.boot.web.servlet.error.ErrorController instead of the deprecated org.springframework.boot.autoconfigure.web.ErrorController in Spring Boot 2.0 or higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use javax.validation.constraints

org.openrewrite.java.spring.boot2.MigrateHibernateConstraintsToJavax

Use javax.validation.constraints instead of the deprecated org.hibernate.validator.constraints in Spring Boot 2.0 or higher.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add javax.validation-api dependency

org.openrewrite.java.spring.boot2.MaybeAddJavaxValidationApi

Conditional on the application using a version of Spring Boot which uses javax but provides a hibernate-validator version which exports the jakarta.validation-api instead

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace micrometer-spring-legacy with spring-boot-starter-actuator

org.openrewrite.java.spring.boot2.MaybeAddSpringBootStarterActuator

Replace deprecated micrometer-spring-legacy with spring-boot-starter-actuator

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade MyBatis to Spring Boot 2.0

org.openrewrite.java.spring.boot3.UpgradeMyBatisToSpringBoot_2_0

Upgrade MyBatis Spring modules to a version corresponding to Spring Boot 2.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Spring Boot properties to 2.1

org.openrewrite.java.spring.boot2.SpringBootProperties_2_1

Migrate properties found in application.properties and application.yml.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Spring Boot 2.1

org.openrewrite.java.spring.boot2.UpgradeSpringBoot_2_1

Migrate applications to the latest Spring Boot 2.1 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions. This recipe will also chain additional framework migrations (Spring Framework, Spring Data, etc) that are required as part of the migration to Spring Boot 2.1.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Use RestTemplateBuilder#basicAuthentication

org.openrewrite.java.spring.boot2.MigrateRestTemplateBuilderBasicAuthorization

RestTemplateBuilder#basicAuthorization was deprecated in 2.1.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade MyBatis to Spring Boot 2.1

org.openrewrite.java.spring.boot3.UpgradeMyBatisToSpringBoot_2_1

Upgrade MyBatis Spring modules to a version corresponding to Spring Boot 2.1.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Spring Boot properties to 2.2

org.openrewrite.java.spring.boot2.SpringBootProperties_2_2

Migrate properties found in application.properties and application.yml.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Spring Boot 2.2

org.openrewrite.java.spring.boot2.UpgradeSpringBoot_2_2

Migrate applications to the latest Spring Boot 2.2 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions. This recipe will also chain additional framework migrations (Spring Framework, Spring Data, etc) that are required as part of the migration to Spring Boot 2.2.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Use PingHealthIndicator

org.openrewrite.java.spring.boot2.MigrateApplicationHealthIndicatorToPingHealthIndicator

org.springframework.boot.actuate.health.ApplicationHealthIndicator was deprecated in 2.2.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use WebTestClientBuilderCustomizer

org.openrewrite.java.spring.boot2.MigrateWebTestClientBuilderCustomizerPackageName

org.springframework.boot.test.autoconfigure.web.reactive.WebTestClientBuilderCustomizer was deprecated in 2.2.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade MyBatis to Spring Boot 2.2

org.openrewrite.java.spring.boot3.UpgradeMyBatisToSpringBoot_2_2

Upgrade MyBatis Spring modules to a version corresponding to Spring Boot 2.2.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Spring Boot properties to 2.3

org.openrewrite.java.spring.boot2.SpringBootProperties_2_3

Migrate properties found in application.properties and application.yml.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Spring Boot 2.3

org.openrewrite.java.spring.boot2.UpgradeSpringBoot_2_3

Migrate applications to the latest Spring Boot 2.3 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions. This recipe will also chain additional framework migrations (Spring Framework, Spring Data, etc) that are required as part of the migration to Spring Boot 2.3.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Use RestClientBuilderCustomizer

org.openrewrite.java.spring.boot2.MigrateRestClientBuilderCustomizerPackageName

org.springframework.boot.autoconfigure.elasticsearch.rest.RestClientBuilderCustomizer was deprecated in 2.3.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade MyBatis to Spring Boot 2.3

org.openrewrite.java.spring.boot3.UpgradeMyBatisToSpringBoot_2_3

Upgrade MyBatis Spring modules to a version corresponding to Spring Boot 2.3.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Spring Boot properties to 2.4

org.openrewrite.java.spring.boot2.SpringBootProperties_2_4

Migrate properties found in application.properties and application.yml.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Spring Boot 2.4

org.openrewrite.java.spring.boot2.UpgradeSpringBoot_2_4

Migrate applications to the latest Spring Boot 2.4 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions. This recipe will also chain additional framework migrations (Spring Framework, Spring Data, etc) that are required as part of the migration to Spring Boot 2.4.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Use isEagerFilterInit()

org.openrewrite.java.spring.boot2.MigrateUndertowServletWebServerFactoryIsEagerInitFilters

org.springframework.boot.web.embedded.undertow.UndertowServletWebServerFactory#isEagerInitFilters was deprecated in 2.4 and are removed in 2.6.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use setEagerFilterInit(boolean)

org.openrewrite.java.spring.boot2.MigrateUndertowServletWebServerFactorySetEagerInitFilters

org.springframework.boot.web.embedded.undertow.UndertowServletWebServerFactory#setEagerInitFilters was deprecated in 2.4 and are removed in 2.6.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Spring Boot 2.x projects to JUnit 5 from JUnit 4

org.openrewrite.java.spring.boot2.SpringBoot2JUnit4to5Migration

This recipe will migrate a Spring Boot application's tests from JUnit 4 to JUnit 5. This spring-specific migration includes conversion of Spring Test runners to Spring Test extensions and awareness of the composable Spring Test annotations.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove unnecessary Spring @RunWith

org.openrewrite.java.spring.boot2.UnnecessarySpringRunWith

Remove @RunWith annotations on Spring tests.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove obsolete Spring JUnit runners

org.openrewrite.java.spring.boot2.RemoveObsoleteSpringRunners

Remove obsolete classpath runners.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade MyBatis to Spring Boot 2.4

org.openrewrite.java.spring.boot3.UpgradeMyBatisToSpringBoot_2_4

Upgrade MyBatis Spring modules to a version corresponding to Spring Boot 2.4.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Spring Boot properties to 2.5

org.openrewrite.java.spring.boot2.SpringBootProperties_2_5

Migrate properties found in application.properties and application.yml.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade to Spring Boot 2.5

org.openrewrite.java.spring.boot2.UpgradeSpringBoot_2_5

Upgrade to Spring Boot 2.5 from any prior 2.x version.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Find patterns that require updating for Spring Boot 2.5

org.openrewrite.java.spring.boot2.search.FindUpgradeRequirementsSpringBoot_2_5

Looks for a series of patterns that have not yet had auto-remediation recipes developed for.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find projects affected by changes to the default error view message attribute

org.openrewrite.java.spring.boot2.search.MessagesInTheDefaultErrorView

As of Spring Boot 2.5 the message attribute in the default error view was removed rather than blanked when it is not shown. spring-webmvc or spring-webflux projects that parse the error response JSON may need to deal with the missing item (release notes). You can still use the server.error.include-message property if you want messages to be included.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade MyBatis to Spring Boot 2.5

org.openrewrite.java.spring.boot3.UpgradeMyBatisToSpringBoot_2_5

Upgrade MyBatis Spring modules to a version corresponding to Spring Boot 2.5.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Adds @DependsOnDatabaseInitialization to Spring Beans and Components depending on javax.sql.DataSource

org.openrewrite.java.spring.boot2.DatabaseComponentAndBeanInitializationOrdering

Beans of certain well-known types, such as JdbcTemplate, will be ordered so that they are initialized after the database has been initialized. If you have a bean that works with the DataSource directly, annotate its class or @Bean method with @DependsOnDatabaseInitialization to ensure that it too is initialized after the database has been initialized. See the release notes for more.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate flyway and liquibase credentials

org.openrewrite.java.spring.boot2.MigrateDatabaseCredentials

If you currently define a spring.flyway.url or spring.liquibase.url you may need to provide additional username and password properties. In earlier versions of Spring Boot, these settings were derived from spring.datasource properties but this turned out to be problematic for people that provided their own DataSource beans.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Spring Boot properties to 2.6

org.openrewrite.java.spring.boot2.SpringBootProperties_2_6

Migrate properties found in application.properties and application.yml.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Spring Boot 2.6

org.openrewrite.java.spring.boot2.UpgradeSpringBoot_2_6

Migrate applications to the latest Spring Boot 2.6 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions. This recipe will also chain additional framework migrations (Spring Framework, Spring Data, etc) that are required as part of the migration to Spring Boot 2.6.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Upgrade MyBatis to Spring Boot 2.6

org.openrewrite.java.spring.boot3.UpgradeMyBatisToSpringBoot_2_6

Upgrade MyBatis Spring modules to a version corresponding to Spring Boot 2.6.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Spring Boot properties to 2.7

org.openrewrite.java.spring.boot2.SpringBootProperties_2_7

Migrate properties found in application.properties and application.yml.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Spring Boot 2.7

org.openrewrite.java.spring.boot2.UpgradeSpringBoot_2_7

Upgrade to Spring Boot 2.7.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Upgrade MyBatis to Spring Boot 2.7

org.openrewrite.java.spring.boot3.UpgradeMyBatisToSpringBoot_2_7

Upgrade MyBatis Spring modules to a version corresponding to Spring Boot 2.7.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Spring Boot properties to 3.0

org.openrewrite.java.spring.boot3.SpringBootProperties_3_0

Migrate properties found in application.properties and application.yml.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Spring Boot 3.0

org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_0

Migrate applications to the latest Spring Boot 3.0 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions. This recipe will also chain additional framework migrations (Spring Framework, Spring Data, etc) that are required as part of the migration to Spring Boot 2.7.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Remove the deprecated properties additional-keys-to-sanitize from the configprops and env end points

org.openrewrite.java.spring.boot3.ActuatorEndpointSanitization

Spring Boot 3.0 removed the key-based sanitization mechanism used in Spring Boot 2.x in favor of a unified approach. See https://github.com/openrewrite/rewrite-spring/issues/228

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Rename server.max-http-header-size to server.max-http-request-header-size

org.openrewrite.java.spring.boot3.MigrateMaxHttpHeaderSize

Previously, the server.max-http-header-size was treated inconsistently across the four supported embedded web servers. When using Jetty, Netty, or Undertow it would configure the max HTTP request header size. When using Tomcat it would configure the max HTTP request and response header sizes. The renamed property is used to configure the http request header size in Spring Boot 3.0. To limit the max header size of an HTTP response on Tomcat or Jetty (the only two servers that support such a setting), use a WebServerFactoryCustomizer.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate thymeleaf dependencies to Spring Boot 3.x

org.openrewrite.java.spring.boot3.MigrateThymeleafDependencies

Migrate thymeleaf dependencies to the new artifactId, since these are changed with Spring Boot 3.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate dropWizard dependencies to Spring Boot 3.x

org.openrewrite.java.spring.boot3.MigrateDropWizardDependencies

Migrate dropWizard dependencies to the new artifactId, since these are changed with Spring Boot 3.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate SAP cloud foundry logging support to Spring Boot 3.x

org.openrewrite.java.spring.boot3.MigrateSapCfJavaLoggingSupport

Migrate SAP cloud foundry logging support from cf-java-logging-support-servlet to cf-java-logging-support-servlet-jakarta, to use Jakarta with Spring Boot 3.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade MyBatis to Spring Boot 3.0

org.openrewrite.java.spring.boot3.UpgradeMyBatisToSpringBoot_3_0

Upgrade MyBatis Spring modules to a version corresponding to Spring Boot 3.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Spring Boot properties to 3.1

org.openrewrite.java.spring.boot3.SpringBootProperties_3_1

Migrate properties found in application.properties and application.yml.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Spring Boot 3.1

org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_1

Migrate applications to the latest Spring Boot 3.1 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions. This recipe will also chain additional framework migrations (Spring Framework, Spring Data, etc) that are required as part of the migration to Spring Boot 3.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Migrate Spring Boot properties to 3.2

org.openrewrite.java.spring.boot3.SpringBootProperties_3_2

Migrate properties found in application.properties and application.yml.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Spring Boot 3.2

org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_2

Migrate applications to the latest Spring Boot 3.2 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions. This recipe will also chain additional framework migrations (Spring Framework, Spring Data, etc) that are required as part of the migration to Spring Boot 3.1.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Relocate Launcher Classes

org.openrewrite.java.spring.boot3.RelocateLauncherClasses

Relocate classes that have been moved to different packages in Spring Boot 3.2.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade MyBatis to Spring Boot 3.2

org.openrewrite.java.spring.boot3.UpgradeMyBatisToSpringBoot_3_2

Upgrade MyBatis Spring modules to a version corresponding to Spring Boot 3.2.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Spring Boot properties to 3.3

org.openrewrite.java.spring.boot3.SpringBootProperties_3_3

Migrate properties found in application.properties and application.yml.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Spring Boot 3.3

org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_3

Migrate applications to the latest Spring Boot 3.3 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions. This recipe will also chain additional framework migrations (Spring Framework, Spring Data, etc) that are required as part of the migration to Spring Boot 3.2.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Change com.datastax.oss to org.apache.cassandra

org.openrewrite.java.spring.boot3.ChangeCassandraGroupId

Change groupId from com.datastax.oss to org.apache.cassandra and adopt the Spring Boot 3.3 managed version.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Spring Boot properties to 3.4

org.openrewrite.java.spring.boot3.SpringBootProperties_3_4

Migrate properties found in application.properties and application.yml.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Enabled to Access Spring Boot Properties

org.openrewrite.java.spring.boot3.SpringBootProperties_3_4_EnabledToAccess

Migrate properties found in application.properties and application.yml, specifically converting 'enabled' to 'access'

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Spring Boot 3.4 (Community Edition)

org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_4

Migrate applications to the latest Spring Boot 3.4 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Migrate Spring Boot properties to 3.5

org.openrewrite.java.spring.boot3.SpringBootProperties_3_5

Migrate properties found in application.properties and application.yml.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Spring Boot 3.5 (Community Edition)

org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_5

Migrate applications to the latest Spring Boot 3.5 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Update Prometheus Pushgateway Dependency Coordinates

org.openrewrite.java.spring.boot3.UpdatePrometheusPushgateway

Update the Prometheus Pushgateway artifact ID for Spring Boot 3.5 compatibility.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Spring Boot 4.0 modular starters

org.openrewrite.java.spring.boot4.MigrateToModularStarters

Adds the necessary Spring Boot 4.0 starter dependencies based on package usage. Spring Boot 4.0 has a modular design requiring explicit starters for each feature. This recipe detects feature usage via package imports and adds the appropriate starters. Note: Higher-level starters (like data-jpa) include lower-level ones (like jdbc) transitively, so only the highest-level detected starter is added for each technology.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate packages to modular starters

org.openrewrite.java.spring.boot4.MigrateAutoconfigurePackages

Migrate to new packages used for autoconfiguration by Spring Boot 4.0 modules.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Spring Boot properties to 4.0

org.openrewrite.java.spring.boot4.SpringBootProperties_4_0

Migrate properties found in application.properties and application.yml.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Spring Boot 4.0 (Community Edition)

org.openrewrite.java.spring.boot4.UpgradeSpringBoot_4_0

Migrate applications to the latest Spring Boot 4.0 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Migrate to Spring Cloud 2022

org.openrewrite.java.spring.cloud2022.UpgradeSpringCloud_2022

Migrate applications to the latest Spring Cloud 2022 (Kilburn) release.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade dependencies to Spring Cloud 2022

org.openrewrite.java.spring.cloud2022.DependencyUpgrades

Upgrade dependencies to Spring Cloud 2022 from prior 2021.x version.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Spring Cloud Sleuth 3.1 to Micrometer Tracing 1.0

org.openrewrite.java.spring.cloud2022.MigrateCloudSleuthToMicrometerTracing

Spring Cloud Sleuth has been discontinued and only compatible with Spring Boot 2.x.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Spring Cloud 2023

org.openrewrite.java.spring.cloud2023.UpgradeSpringCloud_2023

Migrate applications to the latest Spring Cloud 2023 (Leyton) release.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade dependencies to Spring Cloud 2023

org.openrewrite.java.spring.cloud2023.DependencyUpgrades

Upgrade dependencies to Spring Cloud 2023 from prior 2022.x version.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Spring Cloud 2024

org.openrewrite.java.spring.cloud2024.UpgradeSpringCloud_2024

Migrate applications to the latest Spring Cloud 2024 (Moorgate) release.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade dependencies to Spring Cloud 2024

org.openrewrite.java.spring.cloud2024.DependencyUpgrades

Upgrade dependencies to Spring Cloud 2024 from prior 2023.x version.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Spring Cloud 2025

org.openrewrite.java.spring.cloud2025.UpgradeSpringCloud_2025

Migrate applications to the latest Spring Cloud 2025 (Northfields) release.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade dependencies to Spring Cloud 2025

org.openrewrite.java.spring.cloud2025.DependencyUpgrades

Upgrade dependencies to Spring Cloud 2025 from prior 2024.x version.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to New Spring Cloud Gateway Modules and Starters

org.openrewrite.java.spring.cloud2025.SpringCloudGatewayDeprecatedModulesAndStarters

Migrate to new Spring Cloud Gateway modules and starters for Spring Cloud 2025

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Spring Cloud Gateway Properties

org.openrewrite.java.spring.cloud2025.SpringCloudGatewayProperties

Migrate Spring Cloud Gateway properties for Spring Cloud 2025 release.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Spring Cloud Gateway Webflux Properties

org.openrewrite.java.spring.cloud2025.SpringCloudGatewayWebfluxProperties

Migrate Spring Cloud Gateway Webflux properties for Spring Cloud 2025 release.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Spring Cloud Gateway Proxy Webflux Properties

org.openrewrite.java.spring.cloud2025.SpringCloudGatewayProxyWebfluxProperties

Migrate Spring Cloud Gateway Proxy Webflux properties for Spring Cloud 2025 release.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Spring Cloud Gateway WebMvc Properties

org.openrewrite.java.spring.cloud2025.SpringCloudGatewayWebMvcProperties

Migrate Spring Cloud Gateway WebMvc properties for Spring Cloud 2025 release.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Spring Cloud Gateway Proxy WebMvc Properties

org.openrewrite.java.spring.cloud2025.SpringCloudGatewayProxyWebMvcProperties

Migrate Spring Cloud Gateway Proxy WebMvc properties for Spring Cloud 2025 release.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Spring Data 2.3

org.openrewrite.java.spring.data.UpgradeSpringData_2_3

Migrate applications to the latest Spring Data 2.3 release.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Spring Data JPA 2.5

org.openrewrite.java.spring.data.UpgradeSpringData_2_5

Migrate applications to the latest Spring Data 2.5 release.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use JpaRepository#getById(ID id)

org.openrewrite.java.spring.data.UseJpaRepositoryGetById

JpaRepository#getOne(ID) was deprecated in 2.5.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use JpaRepository#deleteAllInBatch(Iterable&lt;T&gt; entities)

org.openrewrite.java.spring.data.UseJpaRepositoryDeleteAllInBatch

JpaRepository#deleteInBatch(Iterable) was deprecated in 2.5.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Spring Data JPA 2.7

org.openrewrite.java.spring.data.UpgradeSpringData_2_7

Migrate applications to the latest Spring Data JPA 2.7 release.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use JpaRepository#getReferenceById(ID id)

org.openrewrite.java.spring.data.UseJpaRepositoryGetReferenceById

JpaRepository#getOne(ID) was deprecated in 2.5 and JpaRepository#getById(ID) was deprecated in 2.7.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Spring Data JPA 3.4

org.openrewrite.java.spring.data.UpgradeSpringData_3_4

Migrate applications to the latest Spring Data JPA 3.4 release.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Spring Framework 5.0

org.openrewrite.java.spring.framework.UpgradeSpringFramework_5_0

Migrate applications to the latest Spring Framework 5.0 release.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Spring Framework 5.1

org.openrewrite.java.spring.framework.UpgradeSpringFramework_5_1

Migrate applications to the latest Spring Framework 5.1 release.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Spring Framework 5.2

org.openrewrite.java.spring.framework.UpgradeSpringFramework_5_2

Migrate applications to the latest Spring Framework 5.2 release.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Spring Framework 5.3

org.openrewrite.java.spring.framework.UpgradeSpringFramework_5_3

Migrate applications to the latest Spring Framework 5.3 release.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use ObjectUtils#isEmpty(Object)

org.openrewrite.java.spring.framework.UseObjectUtilsIsEmpty

StringUtils#isEmpty(Object) was deprecated in 5.3.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Spring Framework 6.0

org.openrewrite.java.spring.framework.UpgradeSpringFramework_6_0

Migrate applications to the latest Spring Framework 6.0 release.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate breaking changes in ResponseStatusException

org.openrewrite.java.spring.framework.MigrateResponseStatusException

Migrate Spring Framework 5.3's ResponseStatusException method getRawStatusCode() to Spring Framework 6's getStatusCode().value() and ResponseStatusException method getStatus() to Spring Framework 6's getStatusCode() .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate removed Spring Assert methods

org.openrewrite.java.spring.framework.MigrateSpringAssert

Assert methods without a message argument have been removed in Spring Framework 6.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Spring Framework 6.1

org.openrewrite.java.spring.framework.UpgradeSpringFramework_6_1

Migrate applications to the latest Spring Framework 6.1 release.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Spring Framework 6.2

org.openrewrite.java.spring.framework.UpgradeSpringFramework_6_2

Migrate applications to the latest Spring Framework 6.2 release.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Spring Framework 7.0

org.openrewrite.java.spring.framework.UpgradeSpringFramework_7_0

Migrate applications to the latest Spring Framework 7.0 release.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Spring Kafka 3.0

org.openrewrite.java.spring.kafka.UpgradeSpringKafka_3_0

Migrate applications to the latest Spring Kafka 3.0 release.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Spring Security 5.7

org.openrewrite.java.spring.security5.UpgradeSpringSecurity_5_7

Migrate applications to the latest Spring Security 5.7 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Spring Security 5.8

org.openrewrite.java.spring.security5.UpgradeSpringSecurity_5_8

Migrate applications to the latest Spring Security 5.8 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Finds uses of Encryptors.queryableText()

org.openrewrite.java.spring.security5.search.FindEncryptorsQueryableTextUses

Encryptors.queryableText() is insecure and is removed in Spring Security 6.

Data tables:

  • org.openrewrite.java.table.MethodCalls: The text of matching method invocations.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace global method security with method security

org.openrewrite.java.spring.security5.ReplaceGlobalMethodSecurityWithMethodSecurityXml

@EnableGlobalMethodSecurity and &lt;global-method-security&gt; are deprecated in favor of @EnableMethodSecurity and &lt;method-security&gt;, respectively. The new annotation and XML element activate Spring’s pre-post annotations by default and use AuthorizationManager internally.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Rename the package name from com.nimbusds.jose.shaded.json to net.minidev.json

org.openrewrite.java.spring.security5.RenameNimbusdsJsonObjectPackageName

Rename the package name from com.nimbusds.jose.shaded.json to net.minidev.json.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Spring Security 6.0

org.openrewrite.java.spring.security6.UpgradeSpringSecurity_6_0

Migrate applications to the latest Spring Security 6.0 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove unnecessary use-authorization-manager for message security in Spring security 6

org.openrewrite.java.spring.security6.RemoveUseAuthorizationManager

In Spring Security 6, &lt;websocket-message-broker&gt; defaults use-authorization-manager to true. So, the use-authorization-manager attribute for message security is no longer needed and can be removed.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Spring Security 6.1

org.openrewrite.java.spring.security6.UpgradeSpringSecurity_6_1

Migrate applications to the latest Spring Security 6.1 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Spring Security 6.2

org.openrewrite.java.spring.security6.UpgradeSpringSecurity_6_2

Migrate applications to the latest Spring Security 6.2 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Spring Security 6.3

org.openrewrite.java.spring.security6.UpgradeSpringSecurity_6_3

Migrate applications to the latest Spring Security 6.3 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Spring Security 6.4

org.openrewrite.java.spring.security6.UpgradeSpringSecurity_6_4

Migrate applications to the latest Spring Security 6.4 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Spring Security 6.5

org.openrewrite.java.spring.security6.UpgradeSpringSecurity_6_5

Migrate applications to the latest Spring Security 6.5 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Spring Security 7.0

org.openrewrite.java.spring.security7.UpgradeSpringSecurity_7_0

Migrate applications to the latest Spring Security 7.0 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove throws exception in SecurityConfigurer methods init and configure

org.openrewrite.java.spring.security7.SecurityConfigurerRemoveThrowsException

Remove throws exception in SecurityConfigurer methods init and configure.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find Spring Web dependency

org.openrewrite.java.spring.http.SpringWebDependency

Find compile scoped Spring Web dependency for Maven and Gradle, both direct and transitive.

Data tables:

  • org.openrewrite.maven.table.DependenciesInUse: Direct and transitive dependencies in use.
  • org.openrewrite.maven.table.ExplainDependenciesInUse: A dependency graph explainer similar to that shown by gradle dependencyInsight for each matching dependency. This table will contain a row per matching dependency per configuration per (sub)project.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate from SpringFox Swagger to SpringDoc and OpenAPI

org.openrewrite.java.springdoc.SpringFoxToSpringDoc

Migrate from SpringFox Swagger to SpringDoc and OpenAPI.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate from Swagger to SpringDoc and OpenAPI

org.openrewrite.java.springdoc.SwaggerToSpringDoc

Migrate from Swagger to SpringDoc and OpenAPI.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace SpringFox Dependencies

org.openrewrite.java.springdoc.ReplaceSpringFoxDependencies

Replace SpringFox Dependencies.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade to SpringDoc 2.8

org.openrewrite.java.springdoc.UpgradeSpringDoc_2_8

Upgrade to SpringDoc v2.8.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade to SpringDoc 2.6

org.openrewrite.java.springdoc.UpgradeSpringDoc_2_6

Upgrade to SpringDoc v2.6.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade to SpringDoc 2.5

org.openrewrite.java.springdoc.UpgradeSpringDoc_2_5

Upgrade to SpringDoc v2.5.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade to SpringDoc 2.2

org.openrewrite.java.springdoc.UpgradeSpringDoc_2_2

Upgrade to SpringDoc v2.2.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade to SpringDoc 2.1

org.openrewrite.java.springdoc.UpgradeSpringDoc_2

Upgrade to SpringDoc v2.1, as described in the upgrade guide.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate from springdoc-openapi-common to springdoc-openapi-starter-common

org.openrewrite.java.springdoc.MigrateSpringdocCommon

Migrate from springdoc-openapi-common to springdoc-openapi-starter-common.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add Quarkus Maven plugin

org.openrewrite.quarkus.spring.AddQuarkusMavenPlugin

Adds the Quarkus Maven plugin using the same version as the quarkus-bom in dependency management.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove Spring Boot 3.x parent POM

org.openrewrite.quarkus.spring.RemoveSpringBootParent

Removes the Spring Boot 3.x starter parent POM from Maven projects.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Convert Spring ResponseEntity to JAX-RS Response

org.openrewrite.quarkus.spring.ResponseEntityToJaxRsResponse

Transforms Spring ResponseEntity patterns to JAX-RS Response API equivalents.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace SpringApplication.run() with Quarkus.run()

org.openrewrite.quarkus.spring.SpringApplicationRunToQuarkusRun

Replace Spring Boot's SpringApplication.run() method calls with Quarkus's Quarkus.run().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace Spring @Bean with CDI @Produces

org.openrewrite.quarkus.spring.SpringBeanToCdiProduces

Transform Spring @Bean methods to CDI @Produces methods with appropriate scope annotations.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace Spring @Value with CDI @ConfigProperty

org.openrewrite.quarkus.spring.ValueToCdiConfigProperty

Transform Spring @Value annotations to MicroProfile @ConfigProperty with proper parameter mapping.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Convert Spring Web annotations to JAX-RS

org.openrewrite.quarkus.spring.WebToJaxRs

Converts Spring Web annotations such as @RestController, @RequestMapping, @GetMapping, etc., to their JAX-RS equivalents like @Path, @GET, etc.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add Spring compatibility extensions for commonly used annotations

org.openrewrite.quarkus.spring.AddSpringCompatibilityExtensions

Adds Quarkus Spring compatibility extensions when Spring annotations are detected in the codebase.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate @EnableXyz annotations to Quarkus extensions

org.openrewrite.quarkus.spring.EnableAnnotationsToQuarkusDependencies

Removes Spring @EnableXyz annotations and adds the corresponding Quarkus extensions as dependencies.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace Spring Boot starter dependencies with Quarkus equivalents

org.openrewrite.quarkus.spring.MigrateBootStarters

Migrates Spring Boot starter dependencies to their Quarkus equivalents, removing version tags as Quarkus manages versions through its BOM.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace Spring Boot Web with Quarkus REST

org.openrewrite.quarkus.spring.SpringBootWebToQuarkusReactive

Migrates spring-boot-starter-web to quarkus-rest-jackson when reactor dependencies are present.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace Spring Boot Web with Quarkus RESTEasy Classic

org.openrewrite.quarkus.spring.SpringBootWebToQuarkusClassic

Migrates spring-boot-starter-web to quarkus-resteasy-jackson when no reactor dependencies are present.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace Spring Boot Data JPA with Quarkus Hibernate ORM Panache

org.openrewrite.quarkus.spring.SpringBootDataJpaToQuarkus

Migrates spring-boot-starter-data-jpa to quarkus-hibernate-orm-panache.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace Spring Boot Security with Quarkus Security

org.openrewrite.quarkus.spring.SpringBootSecurityToQuarkus

Migrates spring-boot-starter-security to quarkus-security.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace Spring Boot Validation with Quarkus Hibernate Validator

org.openrewrite.quarkus.spring.SpringBootValidationToQuarkus

Migrates spring-boot-starter-validation to quarkus-hibernate-validator.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace Spring Boot Test with Quarkus JUnit 5

org.openrewrite.quarkus.spring.SpringBootTestToQuarkus

Migrates spring-boot-starter-test to quarkus-junit5.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace Spring Boot Actuator with Quarkus SmallRye Health

org.openrewrite.quarkus.spring.SpringBootActuatorToQuarkus

Migrates spring-boot-starter-actuator to quarkus-smallrye-health.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace Spring Boot WebSocket with Quarkus WebSockets

org.openrewrite.quarkus.spring.SpringBootWebSocketToQuarkus

Migrates spring-boot-starter-websocket to quarkus-websockets.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace Spring Boot Cache with Quarkus Cache

org.openrewrite.quarkus.spring.SpringBootCacheToQuarkus

Migrates spring-boot-starter-cache to quarkus-cache.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace Spring Boot WebFlux with Quarkus REST Client

org.openrewrite.quarkus.spring.SpringBootWebFluxToQuarkusReactive

Migrates spring-boot-starter-webflux to quarkus-rest-client-jackson when reactor dependencies are present.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace Spring Boot Data MongoDB with Quarkus MongoDB Panache

org.openrewrite.quarkus.spring.SpringBootDataMongoToQuarkus

Migrates spring-boot-starter-data-mongodb to quarkus-mongodb-panache.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace Spring Boot Data Redis with Quarkus Redis Client

org.openrewrite.quarkus.spring.SpringBootDataRedisToQuarkus

Migrates spring-boot-starter-data-redis to quarkus-redis-client.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace Spring Boot AMQP with Quarkus Messaging AMQP

org.openrewrite.quarkus.spring.SpringBootAmqpToQuarkusReactive

Migrates spring-boot-starter-amqp to quarkus-messaging-amqp when reactor dependencies are present.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace Spring Boot AMQP with Quarkus Messaging RabbitMQ

org.openrewrite.quarkus.spring.SpringBootAmqpToQuarkusClassic

Migrates spring-boot-starter-amqp to quarkus-messaging-rabbitmq when no reactor dependencies are present.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace Spring Kafka with Quarkus Messaging Kafka

org.openrewrite.quarkus.spring.SpringKafkaToQuarkusReactive

Migrates spring-kafka to quarkus-messaging-kafka when reactor dependencies are present.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace Spring Kafka with Quarkus Kafka Client

org.openrewrite.quarkus.spring.SpringKafkaToQuarkusClassic

Migrates spring-kafka to quarkus-kafka-client when no reactor dependencies are present.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace Spring Boot OAuth2 Resource Server with Quarkus OIDC

org.openrewrite.quarkus.spring.SpringBootOAuth2ResourceServerToQuarkus

Migrates spring-boot-starter-oauth2-resource-server to quarkus-oidc.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace Spring Boot OAuth2 Client with Quarkus OIDC Client

org.openrewrite.quarkus.spring.SpringBootOAuth2ClientToQuarkus

Migrates spring-boot-starter-oauth2-clienttoquarkus-oidc-client`.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace Spring Boot JDBC with Quarkus Agroal

org.openrewrite.quarkus.spring.SpringBootJdbcToQuarkus

Migrates spring-boot-starter-jdbc to quarkus-agroal.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace Spring Boot Mail with Quarkus Mailer

org.openrewrite.quarkus.spring.SpringBootMailToQuarkus

Migrates spring-boot-starter-mail to quarkus-mailer.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace Spring Boot Batch with Quarkus Scheduler

org.openrewrite.quarkus.spring.SpringBootBatchToQuarkus

Migrates spring-boot-starter-batch to quarkus-scheduler.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace Spring Boot Thymeleaf with Quarkus Qute

org.openrewrite.quarkus.spring.SpringBootThymeleafToQuarkus

Migrates spring-boot-starter-thymeleaf to quarkus-qute.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace Spring Boot Quartz with Quarkus Quartz

org.openrewrite.quarkus.spring.SpringBootQuartzToQuarkus

Migrates spring-boot-starter-quartz to quarkus-quartz.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace Spring Boot Integration with Camel Quarkus

org.openrewrite.quarkus.spring.SpringBootIntegrationToQuarkus

Migrates spring-boot-starter-integration to camel-quarkus-core.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace Spring Boot ActiveMQ with Quarkus Artemis JMS

org.openrewrite.quarkus.spring.SpringBootActiveMQToQuarkus

Migrates spring-boot-starter-activemq to quarkus-artemis-jms.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace Spring Boot Artemis with Quarkus Artemis JMS

org.openrewrite.quarkus.spring.SpringBootArtemisToQuarkus

Migrates spring-boot-starter-artemis to quarkus-artemis-jms.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace Spring Boot Elasticsearch with Quarkus Elasticsearch REST Client

org.openrewrite.quarkus.spring.SpringBootElasticsearchToQuarkus

Migrates spring-boot-starter-data-elasticsearch to quarkus-elasticsearch-rest-client.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace Spring Boot Data REST with Quarkus REST

org.openrewrite.quarkus.spring.SpringBootDataRestToQuarkus

Migrates spring-boot-starter-data-rest to quarkus-rest-jackson.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate database drivers to Quarkus JDBC extensions

org.openrewrite.quarkus.spring.MigrateDatabaseDrivers

Replaces Spring Boot database driver dependencies with their Quarkus JDBC extension equivalents.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace H2 driver with Quarkus JDBC H2

org.openrewrite.quarkus.spring.H2DriverToQuarkus

Migrates com.h2database:h2 to io.quarkus:quarkus-jdbc-h2 (excludes test scope)

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace H2 test driver with Quarkus JDBC H2 (test scope)

org.openrewrite.quarkus.spring.H2TestDriverToQuarkus

Migrates com.h2database:h2 with test scope to io.quarkus:quarkus-jdbc-h2 with test scope

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace Derby driver with Quarkus JDBC Derby

org.openrewrite.quarkus.spring.DerbyDriverToQuarkus

Migrates org.apache.derby:derby or derbyclient to io.quarkus:quarkus-jdbc-derby (excludes test scope)

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace Derby test driver with Quarkus JDBC Derby (test scope)

org.openrewrite.quarkus.spring.DerbyTestDriverToQuarkus

Migrates org.apache.derby:derby with test scope to io.quarkus:quarkus-jdbc-derby with test scope

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Spring Boot to Quarkus

org.openrewrite.quarkus.spring.SpringBootToQuarkus

Replace Spring Boot with Quarkus.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add or replace Spring Boot build plugin with Quarkus build plugin

org.openrewrite.quarkus.spring.MigrateMavenPlugin

Remove Spring Boot Maven plugin if present and add Quarkus Maven plugin using the same version as the quarkus-bom.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace @SpringBootApplication with Quarkus equivalent

org.openrewrite.quarkus.spring.ReplaceSpringBootApplication

Replace @SpringBootApplication annotation with @QuarkusMain, SpringApplication.run() calls.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Spring annotations to CDI

org.openrewrite.quarkus.spring.StereotypeAnnotationsToCDI

Replace Spring stereotype and injection annotations with CDI equivalents.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change a SQL function name

org.openrewrite.sql.ChangeFunctionName

When migrating between dialects, often one name can be substituted for another. For example, Oracle's NVL function can be replaced with Postgres COALESCE.

Data tables:

  • org.openrewrite.sql.table.DatabaseQueries: Shows matching SQL queries.
  • org.openrewrite.sql.table.DatabaseFunctions: Shows matching SQL functions and the queries that contain them.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Convert SQL data type

org.openrewrite.sql.ConvertDataType

When migrating between SQL dialects, data types often need to be converted. For example, Oracle's VARCHAR2 can be replaced with Postgres VARCHAR, or NUMBER with NUMERIC.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find SQL in code and resource files

org.openrewrite.sql.FindSql

Find SQL in code (e.g. in string literals) and in resources like those ending with .sql.

Data tables:

  • org.openrewrite.sql.table.DatabaseColumnsUsed: Shows which database columns are read/written by a SQL statement.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Format SQL in string text blocks

org.openrewrite.sql.FormatSql

Checks whether a text block may contain SQL, and if so, formats the text accordingly.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find SQL function

org.openrewrite.sql.search.FindFunction

Find SQL functions by name.

Data tables:

  • org.openrewrite.sql.table.DatabaseQueries: Shows matching SQL queries.
  • org.openrewrite.sql.table.DatabaseFunctions: Shows matching SQL functions and the queries that contain them.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Oracle SQL to PostgreSQL

org.openrewrite.sql.MigrateOracleToPostgres

Converts Oracle-specific SQL syntax and functions to PostgreSQL equivalents.

Data tables:

  • org.openrewrite.sql.table.DatabaseQueries: Shows matching SQL queries.
  • org.openrewrite.sql.table.DatabaseFunctions: Shows matching SQL functions and the queries that contain them.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Convert Oracle functions to PostgreSQL

org.openrewrite.sql.ConvertOracleFunctionsToPostgres

Replaces Oracle-specific functions with PostgreSQL equivalents.

Data tables:

  • org.openrewrite.sql.table.DatabaseQueries: Shows matching SQL queries.
  • org.openrewrite.sql.table.DatabaseFunctions: Shows matching SQL functions and the queries that contain them.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Convert Oracle data types to PostgreSQL

org.openrewrite.sql.ConvertOracleDataTypesToPostgres

Replaces Oracle-specific data types with PostgreSQL equivalents.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate SQL Server to PostgreSQL

org.openrewrite.sql.MigrateSqlServerToPostgres

Converts Microsoft SQL Server-specific SQL syntax and functions to PostgreSQL equivalents.

Data tables:

  • org.openrewrite.sql.table.DatabaseQueries: Shows matching SQL queries.
  • org.openrewrite.sql.table.DatabaseFunctions: Shows matching SQL functions and the queries that contain them.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Convert SQL Server functions to PostgreSQL

org.openrewrite.sql.ConvertSqlServerFunctionsToPostgres

Replaces SQL Server-specific functions with PostgreSQL equivalents.

Data tables:

  • org.openrewrite.sql.table.DatabaseQueries: Shows matching SQL queries.
  • org.openrewrite.sql.table.DatabaseFunctions: Shows matching SQL functions and the queries that contain them.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Convert SQL Server data types to PostgreSQL

org.openrewrite.sql.ConvertSqlServerDataTypesToPostgres

Replaces SQL Server-specific data types with PostgreSQL equivalents.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Constructors of an abstract class should not be declared public

org.openrewrite.staticanalysis.AbstractClassPublicConstructor

Constructors of abstract classes can only be called in constructors of their subclasses. Therefore the visibility of public constructors are reduced to protected.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add @Serial annotation to serialVersionUID

org.openrewrite.staticanalysis.AddSerialAnnotationToSerialVersionUID

Annotate any serialVersionUID fields with @Serial to indicate it's part of the serialization mechanism.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add serialVersionUID to a Serializable class when missing

org.openrewrite.staticanalysis.AddSerialVersionUidToSerializable

A serialVersionUID field is strongly recommended in all Serializable classes. If this is not defined on a Serializable class, the compiler will generate this value. If a change is later made to the class, the generated value will change and attempts to deserialize the class will fail.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Annotate methods which may return null with @Nullable

org.openrewrite.staticanalysis.AnnotateNullableMethods

Add @Nullable to non-private methods that may return null. By default org.jspecify.annotations.Nullable is used, but through the nullableAnnotationClass option a custom annotation can be provided. When providing a custom nullableAnnotationClass that annotation should be meta annotated with @Target(TYPE_USE). This recipe scans for methods that do not already have a @Nullable annotation and checks their return statements for potential null values. It also identifies known methods from standard libraries that may return null, such as methods from Map, Queue, Deque, NavigableSet, and Spliterator. The return of streams, or lambdas are not taken into account.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Annotate null-checked method parameters with @Nullable

org.openrewrite.staticanalysis.AnnotateNullableParameters

Add @Nullable to parameters of public methods that are explicitly checked for null. By default org.jspecify.annotations.Nullable is used, but through the nullableAnnotationClass option a custom annotation can be provided. When providing a custom nullableAnnotationClass that annotation should be meta annotated with @Target(TYPE_USE). This recipe scans for methods that do not already have parameters annotated with @Nullable annotation and checks their usages for potential null checks. Additional null-checking methods can be specified via the additionalNullCheckingMethods option.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Annotate required method parameters with @NonNull

org.openrewrite.staticanalysis.AnnotateRequiredParameters

Add @NonNull to parameters of public methods that are explicitly checked for null and throw an exception if null. By default org.jspecify.annotations.NonNull is used, but through the nonNullAnnotationClass option a custom annotation can be provided. When providing a custom nonNullAnnotationClass that annotation should be meta annotated with @Target(TYPE_USE). This recipe scans for methods that do not already have parameters annotated with @NonNull annotation and checks for null validation patterns that throw exceptions, such as if (param == null) throw new IllegalArgumentException().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Atomic Boolean, Integer, and Long equality checks compare their values

org.openrewrite.staticanalysis.AtomicPrimitiveEqualsUsesGet

AtomicBoolean#equals(Object), AtomicInteger#equals(Object) and AtomicLong#equals(Object) are only equal to their instance. This recipe converts a.equals(b) to a.get() == b.get().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Avoid boxed boolean expressions

org.openrewrite.staticanalysis.AvoidBoxedBooleanExpressions

Under certain conditions the java.lang.Boolean type is used as an expression, and it may throw a NullPointerException if the value is null.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

new BigDecimal(double) should not be used

org.openrewrite.staticanalysis.BigDecimalDoubleConstructorRecipe

Use of new BigDecimal(double) constructor can lead to loss of precision. Use BigDecimal.valueOf(double) instead. For example writing new BigDecimal(0.1) does not create a BigDecimal which is exactly equal to 0.1, but it is equal to 0.1000000000000000055511151231257827021181583404541015625. This is because 0.1 cannot be represented exactly as a double (or, for that matter, as a binary fraction of any finite length).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

BigDecimal rounding constants to RoundingMode enums

org.openrewrite.staticanalysis.BigDecimalRoundingConstantsToEnums

Convert BigDecimal rounding constants to the equivalent RoundingMode enum.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Boolean checks should not be inverted

org.openrewrite.staticanalysis.BooleanChecksNotInverted

Ensures that boolean checks are not unnecessarily inverted. Also fixes double negative boolean expressions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Modernize BufferedWriter creation & prevent file descriptor leaks

org.openrewrite.staticanalysis.BufferedWriterCreationRecipes

The code new BufferedWriter(new FileWriter(f)) creates a BufferedWriter that does not close the underlying FileWriter when it is closed. This can lead to file descriptor leaks as per CWE-755. Use Files.newBufferedWriter to create a BufferedWriter that closes the underlying file descriptor when it is closed.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Convert new BufferedWriter(new FileWriter(File, boolean)) to Files.newBufferedWriter(Path, StandardOpenOption)

org.openrewrite.staticanalysis.BufferedWriterCreationRecipes$BufferedWriterFromNewFileWriterWithFileAndBooleanArgumentsRecipe

Convert new BufferedWriter(new FileWriter(f, b)) to Files.newBufferedWriter(f.toPath(), b ? StandardOpenOption.APPEND : StandardOpenOption.CREATE).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Convert new BufferedWriter(new FileWriter(File)) to Files.newBufferedWriter(Path)

org.openrewrite.staticanalysis.BufferedWriterCreationRecipes$BufferedWriterFromNewFileWriterWithFileArgumentRecipe

Convert new BufferedWriter(new FileWriter(f)) to Files.newBufferedWriter(f.toPath()).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Convert new BufferedWriter(new FileWriter(String, boolean)) to Files.newBufferedWriter(Path, StandardOpenOption)

org.openrewrite.staticanalysis.BufferedWriterCreationRecipes$BufferedWriterFromNewFileWriterWithStringAndBooleanArgumentsRecipe

Convert new BufferedWriter(new FileWriter(s, b)) to Files.newBufferedWriter(new java.io.File(s).toPath(), b ? StandardOpenOption.APPEND : StandardOpenOption.CREATE).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Convert new BufferedWriter(new FileWriter(String)) to Files.newBufferedWriter(Path)

org.openrewrite.staticanalysis.BufferedWriterCreationRecipes$BufferedWriterFromNewFileWriterWithStringArgumentRecipe

Convert new BufferedWriter(new FileWriter(s)) to Files.newBufferedWriter(new java.io.File(s).toPath()).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

CaseInsensitive comparisons do not alter case

org.openrewrite.staticanalysis.CaseInsensitiveComparisonsDoNotChangeCase

Remove String#toLowerCase() or String#toUpperCase() from String#equalsIgnoreCase(..) comparisons.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Catch clause should do more than just rethrow

org.openrewrite.staticanalysis.CatchClauseOnlyRethrows

A catch clause that only rethrows the caught exception is unnecessary. Letting the exception bubble up as normal achieves the same result with less code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Chain StringBuilder.append() calls

org.openrewrite.staticanalysis.ChainStringBuilderAppendCalls

String concatenation within calls to StringBuilder.append() causes unnecessary memory allocation. Except for concatenations of String literals, which are joined together at compile time. Replaces inefficient concatenations with chained calls to StringBuilder.append().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

'Collection.toArray()' should be passed an array of the proper type

org.openrewrite.staticanalysis.CollectionToArrayShouldHaveProperType

Using Collection.toArray() without parameters returns an Object[], which requires casting. It is more efficient and clearer to use Collection.toArray(new T[0]) instead.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Combine semantically equal catch blocks

org.openrewrite.staticanalysis.CombineSemanticallyEqualCatchBlocks

Combine catches in a try that contain semantically equivalent blocks. No change will be made when a caught exception exists if combining catches may change application behavior or type attribution is missing.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enum values should be compared with "=="

org.openrewrite.staticanalysis.CompareEnumsWithEqualityOperator

Replaces Enum equals(java.lang.Object) with Enum == java.lang.Object. An !Enum equals(java.lang.Object) will change to !=.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Control flow statement indentation

org.openrewrite.staticanalysis.ControlFlowIndentation

Program flow control statements like if, while, and for can omit curly braces when they apply to only a single statement. This recipe ensures that any statements which follow that statement are correctly indented to show they are not part of the flow control statement.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Covariant equals

org.openrewrite.staticanalysis.CovariantEquals

Checks that classes and records which define a covariant equals() method also override method equals(Object). Covariant equals() means a method that is similar to equals(Object), but with a covariant parameter type (any subtype of Object).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Custom import order

org.openrewrite.staticanalysis.CustomImportOrder

Updates and reorders Java import declarations according to group and order settings compatible with the Checkstyle 'CustomImportOrder' check.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Properly use declaration-site type variance

org.openrewrite.staticanalysis.DeclarationSiteTypeVariance

Currently, Java requires use-site type variance, so if someone has Function&lt;IN, OUT&gt; method parameter, it should rather be Function&lt;? super IN, ? extends OUT&gt;. Unfortunately, it is not easy to notice that ? super and ? extends is missing, so this recipe adds it where that would improve the situation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Default comes last

org.openrewrite.staticanalysis.DefaultComesLast

Ensure the default case comes last after all the cases in a switch statement.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove empty blocks

org.openrewrite.staticanalysis.EmptyBlock

Remove empty blocks that effectively do nothing.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Equals avoids null

org.openrewrite.staticanalysis.EqualsAvoidsNull

Checks that any combination of String literals is on the left side of an equals() comparison. Also checks for String literals assigned to some field (such as someString.equals(anotherString = &quot;text&quot;)). And removes redundant null checks in conjunction with equals comparisons.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use String.contentEquals(CharSequence) instead of String.equals(CharSequence.toString())

org.openrewrite.staticanalysis.EqualsToContentEquals

Use String.contentEquals(CharSequence) instead of String.equals(CharSequence.toString()).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Set charset encoding explicitly when calling String#getBytes

org.openrewrite.staticanalysis.ExplicitCharsetOnStringGetBytes

This makes the behavior of the code platform neutral. It will not override any existing explicit encodings, even if they don't match the default encoding option.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Explicit initialization

org.openrewrite.staticanalysis.ExplicitInitialization

Checks if any class or object member is explicitly initialized to default for its type value: - null for object references - zero for numeric types and char - and false for boolean Removes explicit initializations where they aren't necessary.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use explicit types on lambda arguments

org.openrewrite.staticanalysis.ExplicitLambdaArgumentTypes

Adds explicit types on lambda arguments, which are otherwise optional. This can make the code clearer and easier to read. This does not add explicit types on arguments when the lambda has one or two parameters and does not have a block body, as things are considered more readable in those cases. For example, stream.map((a, b) -&gt; a.length); will not have explicit types added.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Externalizable classes have no-arguments constructor

org.openrewrite.staticanalysis.ExternalizableHasNoArgsConstructor

Externalizable classes handle both serialization and deserialization and must have a no-args constructor for the deserialization process.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Fall through

org.openrewrite.staticanalysis.FallThrough

Checks for fall-through in switch statements, adding break statements in locations where a case contains Java code but does not have a break, return, throw, or continue statement.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Finalize classes with private constructors

org.openrewrite.staticanalysis.FinalClass

Adds the final modifier to classes that expose no public or package-private constructors.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Finalize local variables

org.openrewrite.staticanalysis.FinalizeLocalVariables

Adds the final modifier keyword to local variables which are not reassigned.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Finalize method arguments

org.openrewrite.staticanalysis.FinalizeMethodArguments

Adds the final modifier keyword to method parameters.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Finalize private fields

org.openrewrite.staticanalysis.FinalizePrivateFields

Adds the final modifier keyword to private instance variables which are not reassigned.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Fix String#format and String#formatted expressions

org.openrewrite.staticanalysis.FixStringFormatExpressions

Fix String#format and String#formatted expressions by replacing \n newline characters with %n and removing any unused arguments. Note this recipe is scoped to only transform format expressions which do not specify the argument index.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

for loop counters should use postfix operators

org.openrewrite.staticanalysis.ForLoopControlVariablePostfixOperators

Replace for loop control variables using pre-increment (++i) or pre-decrement (--i) operators with their post-increment (i++) or post-decrement (i++) notation equivalents.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

for loop counters incremented in update

org.openrewrite.staticanalysis.ForLoopIncrementInUpdate

The increment should be moved to the loop's increment clause if possible.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Hidden field

org.openrewrite.staticanalysis.HiddenField

Refactor local variables or parameters which shadow a field defined in the same class.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Hide utility class constructor

org.openrewrite.staticanalysis.HideUtilityClassConstructor

Ensures utility classes (classes containing only static methods or fields in their API) do not have a public constructor.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use indexOf(String, int)

org.openrewrite.staticanalysis.IndexOfChecksShouldUseAStartPosition

Replaces indexOf(String) in binary operations if the compared value is an int and not less than 1.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

indexOf() replaceable by contains()

org.openrewrite.staticanalysis.IndexOfReplaceableByContains

Checking if a value is included in a String or List using indexOf(value)&gt;-1 or indexOf(value)&gt;=0 can be replaced with contains(value).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

indexOf should not compare greater than zero

org.openrewrite.staticanalysis.IndexOfShouldNotCompareGreaterThanZero

Replaces String#indexOf(String) &gt; 0 and List#indexOf(Object) &gt; 0 with &gt;=1. Checking indexOf against &gt;0 ignores the first element, whereas &gt;-1 is inclusive of the first element. For clarity, &gt;=1 is used, because &gt;0 and &gt;=1 are semantically equal. Using &gt;0 may appear to be a mistake with the intent of including all elements. If the intent is to check whether a value in included in a String or List, the String#contains(String) or List#contains(Object) methods may be better options altogether.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Inline variable

org.openrewrite.staticanalysis.InlineVariable

Inline variables when they are immediately used to return or throw. Supports both variable declarations and assignments to local variables.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Changes code to use Java 17's instanceof pattern matching

org.openrewrite.staticanalysis.InstanceOfPatternMatch

Adds pattern variables to instanceof expressions wherever the same (side effect free) expression is referenced in a corresponding type cast expression within the flow scope of the instanceof. Currently, this recipe supports if statements and ternary operator expressions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use Collection#isEmpty() instead of comparing size()

org.openrewrite.staticanalysis.IsEmptyCallOnCollections

Also check for not isEmpty() when testing for not equal to zero size.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Simplify lambda blocks to expressions

org.openrewrite.staticanalysis.LambdaBlockToExpression

Single-line statement lambdas returning a value can be replaced with expression lambdas.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Mask credit card numbers

org.openrewrite.staticanalysis.MaskCreditCardNumbers

When encountering string literals which appear to be credit card numbers, mask the last eight digits with the letter 'X'.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

switch statements should have at least 3 case clauses

org.openrewrite.staticanalysis.MinimumSwitchCases

switch statements are useful when many code paths branch depending on the value of a single expression. For just one or two code paths, the code will be more readable with if statements.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add missing @Override to overriding and implementing methods

org.openrewrite.staticanalysis.MissingOverrideAnnotation

Adds @Override to methods overriding superclass methods or implementing interface methods. Annotating methods improves readability by showing the author's intent to override. Additionally, when annotated, the compiler will emit an error when a signature of the overridden method does not match the superclass method.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Modifier order

org.openrewrite.staticanalysis.ModifierOrder

Modifiers should be declared in the correct order as recommended by the JLS.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Convert while (true) with initial if break to loop condition

org.openrewrite.staticanalysis.MoveConditionsToWhile

Simplifies while (true) loops where the first statement is an if statement that only contains a break. The condition is inverted and moved to the loop condition for better readability.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

No multiple variable declarations

org.openrewrite.staticanalysis.MultipleVariableDeclarations

Places each variable declaration in its own statement and on its own line. Using one variable declaration per line encourages commenting and can increase readability.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Fix missing braces

org.openrewrite.staticanalysis.NeedBraces

Adds missing braces around code such as single-line if, for, while, and do-while block bodies.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Nested enums are not static

org.openrewrite.staticanalysis.NestedEnumsAreNotStatic

Remove static modifier from nested enum types since they are implicitly static.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change StringBuilder and StringBuffer character constructor argument to String

org.openrewrite.staticanalysis.NewStringBuilderBufferWithCharArgument

Instantiating a StringBuilder or a StringBuffer with a Character results in the int representation of the character being used for the initial size.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

No double brace initialization

org.openrewrite.staticanalysis.NoDoubleBraceInitialization

Replace List, Map, and Set double brace initialization with an initialization block.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use Collections#emptyList(), emptyMap(), and emptySet()

org.openrewrite.staticanalysis.NoEmptyCollectionWithRawType

Replaces Collections#EMPTY_... with methods that return generic types.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use comparison rather than equality checks in for conditions

org.openrewrite.staticanalysis.NoEqualityInForCondition

Testing for loop termination using an equality operator (== and !=) is dangerous, because it could set up an infinite loop. Using a relational operator instead makes it harder to accidentally write an infinite loop.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Don't use final on local variables

org.openrewrite.staticanalysis.NoFinalizedLocalVariables

Remove the final modifier keyword from local variables regardless of whether they are used within a local class or an anonymous class.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove finalize() method

org.openrewrite.staticanalysis.NoFinalizer

Finalizers are deprecated. Use of finalize() can lead to performance issues, deadlocks, hangs, and other undesirable behavior.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

No primitive wrappers for #toString() or #compareTo(..)

org.openrewrite.staticanalysis.NoPrimitiveWrappersForToStringOrCompareTo

Primitive wrappers should not be instantiated only for #toString() or #compareTo(..) invocations.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Jump statements should not be redundant

org.openrewrite.staticanalysis.NoRedundantJumpStatements

Jump statements such as return and continue let you change the default flow of program execution, but jump statements that direct the control flow to the original direction are just a waste of keystrokes.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Unnecessary String#toString

org.openrewrite.staticanalysis.NoToStringOnStringType

Remove unnecessary String#toString invocations on objects which are already a string.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Unnecessary String#valueOf(..)

org.openrewrite.staticanalysis.NoValueOfOnStringType

Replace unnecessary String#valueOf(..) method invocations with the argument directly. This occurs when the argument to String#valueOf(arg) is a string literal, such as String.valueOf(&quot;example&quot;). Or, when the String#valueOf(..) invocation is used in a concatenation, such as &quot;example&quot; + String.valueOf(&quot;example&quot;).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Move @Nullable method annotations to the return type

org.openrewrite.staticanalysis.NullableOnMethodReturnType

This is the way the cool kids do it.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

finalize() calls super

org.openrewrite.staticanalysis.ObjectFinalizeCallsSuper

Overrides of Object#finalize() should call super.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace catch(Exception) with specific declared exceptions thrown in the try block

org.openrewrite.staticanalysis.OnlyCatchDeclaredExceptions

Replaces catch(Exception e) blocks with a multi-catch block (catch (SpecificException1 | SpecificException2 e)) containing only the exceptions declared thrown by method or constructor invocations within the try block that are not already caught by more specific catch clauses.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Operator wrapping

org.openrewrite.staticanalysis.OperatorWrap

Fixes line wrapping policies on operators.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer direct comparison of numbers

org.openrewrite.staticanalysis.PreferEqualityComparisonOverDifferenceCheck

Replace a - b == 0 with a == b, a - b != 0 with a != b, a - b &lt; 0 with a &lt; b, and similar transformations for all comparison operators to improve readability and avoid overflow issues.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer increment/decrement and compound assignment operators

org.openrewrite.staticanalysis.PreferIncrementOperator

Prefer the use of increment and decrement operators (++, --, +=, -=) over their more verbose equivalents.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer System.getProperty(&quot;user.home&quot;) over System.getenv(&quot;HOME&quot;)

org.openrewrite.staticanalysis.PreferSystemGetPropertyOverGetenv

Replaces System.getenv(&quot;HOME&quot;) with System.getProperty(&quot;user.home&quot;) for better portability.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use primitive wrapper valueOf method

org.openrewrite.staticanalysis.PrimitiveWrapperClassConstructorToValueOf

The constructor of all primitive types has been deprecated in favor of using the static factory method valueOf available for each of the primitive type wrappers.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Redundant file creation

org.openrewrite.staticanalysis.RedundantFileCreation

Remove unnecessary intermediate creations of files.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace referential equality operators with Object equals method invocations when the operands both override Object.equals(Object obj)

org.openrewrite.staticanalysis.ReferentialEqualityToObjectEquals

Using == or != compares object references, not the equality of two objects. This modifies code where both sides of a binary operation (== or !=) override Object.equals(Object obj) except when the comparison is within an overridden Object.equals(Object obj) method declaration itself. The resulting transformation must be carefully reviewed since any modifications change the program's semantics.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove Object.finalize() invocations

org.openrewrite.staticanalysis.RemoveCallsToObjectFinalize

Remove calls to Object.finalize(). This method is called during garbage collection and calling it manually is misleading.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove garbage collection invocations

org.openrewrite.staticanalysis.RemoveCallsToSystemGc

Removes calls to System.gc() and Runtime.gc(). When to invoke garbage collection is best left to the JVM.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove JavaDoc @param, @return, and @throws with no description

org.openrewrite.staticanalysis.RemoveEmptyJavaDocParameters

Removes @param, @return, and @throws with no description from JavaDocs.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove extra semicolons

org.openrewrite.staticanalysis.RemoveExtraSemicolons

Removes not needed semicolons. Semicolons are considered not needed: * Optional semicolons at the end of try-with-resources, * after the last enum value if no field or method is defined, * no statement between two semicolon.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

hashCode() should not be called on array instances

org.openrewrite.staticanalysis.RemoveHashCodeCallsFromArrayInstances

Replace hashCode() calls on arrays with Arrays.hashCode() because the results from hashCode() are not helpful.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Removes from code Java 14's instanceof pattern matching

org.openrewrite.staticanalysis.RemoveInstanceOfPatternMatch

Adds an explicit variable declaration at the beginning of if statement instead of instanceof pattern matching.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove author tags from JavaDocs

org.openrewrite.staticanalysis.RemoveJavaDocAuthorTag

Removes author tags from JavaDocs to reduce code maintenance.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove redundant null checks before instanceof

org.openrewrite.staticanalysis.RemoveRedundantNullCheckBeforeInstanceof

Removes redundant null checks before instanceof operations since instanceof returns false for null.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove redundant null checks before literal equals

org.openrewrite.staticanalysis.RemoveRedundantNullCheckBeforeLiteralEquals

Removes redundant null checks before equals() comparisons when the receiver is a literal string, since literals can never be null and equals() returns false for null arguments.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove redundant casts

org.openrewrite.staticanalysis.RemoveRedundantTypeCast

Removes unnecessary type casts. Does not currently check casts in lambdas and class constructors.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove System.out#println statements

org.openrewrite.staticanalysis.RemoveSystemOutPrintln

Print statements are often left accidentally after debugging an issue. This recipe removes all System.out#println and System.err#println statements from the code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove toString() calls on arrays

org.openrewrite.staticanalysis.RemoveToStringCallsFromArrayInstances

The result from toString() calls on arrays is largely useless. The output does not actually reflect the contents of the array. Arrays.toString(array) should be used instead as it gives the contents of the array.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove unneeded assertions

org.openrewrite.staticanalysis.RemoveUnneededAssertion

Remove unneeded assertions like assert true, assertTrue(true), or assertFalse(false).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove unneeded block

org.openrewrite.staticanalysis.RemoveUnneededBlock

Flatten blocks into inline statements when possible.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove unused local variables

org.openrewrite.staticanalysis.RemoveUnusedLocalVariables

If a local variable is declared but not used, it is dead code and should be removed.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove unused private fields

org.openrewrite.staticanalysis.RemoveUnusedPrivateFields

If a private field is declared but not used in the program, it can be considered dead code and should therefore be removed.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove unused private methods

org.openrewrite.staticanalysis.RemoveUnusedPrivateMethods

private methods that are never executed are dead code and should be removed.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Rename caught exceptions in empty catch blocks to ignored

org.openrewrite.staticanalysis.RenameExceptionInEmptyCatch

Renames caught exceptions in empty catch blocks to ignored. ignored will be incremented by 1 if a namespace conflict exists.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Reformat local variable names to camelCase

org.openrewrite.staticanalysis.RenameLocalVariablesToCamelCase

Reformat local variable and method parameter names to camelCase to comply with Java naming convention. The recipe will not rename variables declared in for loop controls or catches with a single character. The first character is set to lower case and existing capital letters are preserved. Special characters that are allowed in java field names $ and _ are removed (unless the name starts with one). If a special character is removed the next valid alphanumeric will be capitalized. Currently, does not support renaming members of classes. The recipe will not rename a variable if the result already exists in the class, conflicts with a java reserved keyword, or the result is blank.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Rename methods named hashcode, equal, or tostring

org.openrewrite.staticanalysis.RenameMethodsNamedHashcodeEqualOrToString

Methods should not be named hashcode, equal, or tostring. Any of these are confusing as they appear to be intended as overridden methods from the Object base class, despite being case-insensitive.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Reformat private field names to camelCase

org.openrewrite.staticanalysis.RenamePrivateFieldsToCamelCase

Reformat private field names to camelCase to comply with Java naming convention. The recipe will not rename fields with default, protected or public access modifiers. The recipe will not rename private constants. The first character is set to lower case and existing capital letters are preserved. Special characters that are allowed in java field names $ and _ are removed. If a special character is removed the next valid alphanumeric will be capitalized. The recipe will not rename a field if the result already exists in the class, conflicts with a java reserved keyword, or the result is blank.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Reorder annotation attributes alphabetically

org.openrewrite.staticanalysis.ReorderAnnotationAttributes

Reorder annotation attributes to be alphabetical. Positional arguments (those without explicit attribute names) are left in their original position.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Reorder annotations alphabetically

org.openrewrite.staticanalysis.ReorderAnnotations

Consistently order annotations by comparing their simple name.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace A.class.isInstance(a) with a instanceof A

org.openrewrite.staticanalysis.ReplaceClassIsInstanceWithInstanceof

There should be no A.class.isInstance(a), it should be replaced by a instanceof A.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use Empty Array for Collection.toArray()

org.openrewrite.staticanalysis.ReplaceCollectionToArrayArgWithEmptyArray

Changes new array creation with Collection#toArray(T[]) to use an empty array argument, which is better for performance. According to the Collection#toArray(T[]) documentation: > If the collection fits in the specified array, it is returned therein. However, although it's not intuitive, allocating a right-sized array ahead of time to pass to the API appears to be generally worse for performance according to benchmarking and JVM developers due to a number of implementation details in both Java and the virtual machine. H2 achieved significant performance gains by switching to empty arrays instead pre-sized ones.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace deprecated Runtime#exec() methods

org.openrewrite.staticanalysis.ReplaceDeprecatedRuntimeExecMethods

Replace Runtime#exec(String) methods to use exec(String[]) instead because the former is deprecated after Java 18 and is no longer recommended for use by the Java documentation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace duplicate String literals

org.openrewrite.staticanalysis.ReplaceDuplicateStringLiterals

Replaces String literals with a length of 5 or greater repeated a minimum of 3 times. Qualified String literals include final Strings, method invocations, and new class invocations. Adds a new private static final String or uses an existing equivalent class field. A new variable name will be generated based on the literal value if an existing field does not exist. The generated name will append a numeric value to the variable name if a name already exists in the compilation unit.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use method references in lambda

org.openrewrite.staticanalysis.ReplaceLambdaWithMethodReference

Replaces the single statement lambdas o -&gt; o instanceOf X, o -&gt; (A) o, o -&gt; System.out.println(o), o -&gt; o != null, o -&gt; o == null with the equivalent method reference.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace Optional#isPresent() with Optional#ifPresent()

org.openrewrite.staticanalysis.ReplaceOptionalIsPresentWithIfPresent

Replace Optional#isPresent() with Optional#ifPresent(). Please note that this recipe is only suitable for if-blocks that lack an Else-block and have a single condition applied.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace redundant String format invocations that are wrapped with PrintStream operations

org.openrewrite.staticanalysis.ReplaceRedundantFormatWithPrintf

Replaces PrintStream.print(String.format(format, ...args)) with PrintStream.printf(format, ...args) (and for println, appends a newline to the format string).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace java.util.Stack with java.util.Deque

org.openrewrite.staticanalysis.ReplaceStackWithDeque

From the Javadoc of Stack: > A more complete and consistent set of LIFO stack operations is provided by the Deque interface and its implementations, which should be used in preference to this class.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace StringBuilder#append with String

org.openrewrite.staticanalysis.ReplaceStringBuilderWithString

Replace StringBuilder.append() with String if you are only concatenating a small number of strings and the code is simple and easy to read, as the compiler can optimize simple string concatenation expressions into a single String object, which can be more efficient than using StringBuilder.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace String concatenation with String.valueOf()

org.openrewrite.staticanalysis.ReplaceStringConcatenationWithStringValueOf

Replace inefficient string concatenation patterns like &quot;&quot; + ... with String.valueOf(...). This improves code readability and may have minor performance benefits.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace text block with regular string

org.openrewrite.staticanalysis.ReplaceTextBlockWithString

Replace text block with a regular multi-line string.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace org.apache.commons.lang3.Validate#notNull with Objects#requireNonNull

org.openrewrite.staticanalysis.ReplaceValidateNotNullHavingVarargsWithObjectsRequireNonNull

Replace org.apache.commons.lang3.Validate.notNull(Object, String, Object[]) with Objects.requireNonNull(Object, String).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Week Year (YYYY) should not be used for date formatting

org.openrewrite.staticanalysis.ReplaceWeekYearWithYear

For most dates Week Year (YYYY) and Year (yyyy) yield the same results. However, on the last week of December and the first week of January, Week Year could produce unexpected results.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Simplify Arrays.asList(..) with varargs

org.openrewrite.staticanalysis.SimplifyArraysAsList

Simplifies Arrays.asList() method calls that use explicit array creation to use varargs instead. For example, Arrays.asList(new String[]{&quot;a&quot;, &quot;b&quot;, &quot;c&quot;}) becomes Arrays.asList(&quot;a&quot;, &quot;b&quot;, &quot;c&quot;).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Simplify boolean expression

org.openrewrite.staticanalysis.SimplifyBooleanExpression

Checks for overly complicated boolean expressions, such as if (b == true), b || true, !false, etc.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Simplify boolean expressions using De Morgan's laws

org.openrewrite.staticanalysis.SimplifyBooleanExpressionWithDeMorgan

Applies De Morgan's laws to simplify boolean expressions with negation. Transforms !(a &amp;&amp; b) to !a || !b and !(a || b) to !a &amp;&amp; !b.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Simplify boolean return

org.openrewrite.staticanalysis.SimplifyBooleanReturn

Simplifies Boolean expressions by removing redundancies. For example, a &amp;&amp; true simplifies to a.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Simplify compound statement

org.openrewrite.staticanalysis.SimplifyCompoundStatement

Fixes or removes useless compound statements. For example, removing b &amp;= true, and replacing b &amp;= false with b = false.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Simplify consecutive assignments

org.openrewrite.staticanalysis.SimplifyConsecutiveAssignments

Combine consecutive assignments into a single statement where possible.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Simplify constant if branch execution

org.openrewrite.staticanalysis.SimplifyConstantIfBranchExecution

Checks for if expressions that are always true or false and simplifies them.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Simplify java.time.Duration units

org.openrewrite.staticanalysis.SimplifyDurationCreationUnits

Simplifies java.time.Duration units to be more human-readable.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Simplify else branch if it only has a single if

org.openrewrite.staticanalysis.SimplifyElseBranch

Simplify else branch if it only has a single if.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Simplify ternary expressions

org.openrewrite.staticanalysis.SimplifyTernaryRecipes

Simplifies various types of ternary expressions to improve code readability.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace booleanExpression ? false : true with !booleanExpression

org.openrewrite.staticanalysis.SimplifyTernaryRecipes$SimplifyTernaryFalseTrueRecipe

Replace ternary expressions like booleanExpression ? false : true with !booleanExpression.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace booleanExpression ? true : false with booleanExpression

org.openrewrite.staticanalysis.SimplifyTernaryRecipes$SimplifyTernaryTrueFalseRecipe

Replace ternary expressions like booleanExpression ? true : false with booleanExpression.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Sorted set stream should be collected to LinkedHashSet

org.openrewrite.staticanalysis.SortedSetStreamToLinkedHashSet

Converts set.stream().sorted().collect(Collectors.toSet()) to set.stream().sorted().collect(LinkedHashSet::new).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Static methods need not be final

org.openrewrite.staticanalysis.StaticMethodNotFinal

Static methods do not need to be declared final because they cannot be overridden.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use String.equals() on String literals

org.openrewrite.staticanalysis.StringLiteralEquality

String.equals() should be used when checking value equality on String literals. Using == or != compares object references, not the actual value of the Strings. This only modifies code where at least one side of the binary operation (== or !=) is a String literal, such as &quot;someString&quot; == someVariable;. This is to prevent inadvertently changing code where referential equality is the user's intent.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ternary operators should not be nested

org.openrewrite.staticanalysis.TernaryOperatorsShouldNotBeNested

Nested ternary operators can be hard to read quickly. Prefer simpler constructs for improved readability. If supported, this recipe will try to replace nested ternaries with switch expressions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Typecast parenthesis padding

org.openrewrite.staticanalysis.TypecastParenPad

Fixes whitespace padding between a typecast type identifier and the enclosing left and right parentheses. For example, when configured to remove spacing, ( int ) 0L; becomes (int) 0L;.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

URL Equals and Hash Code

org.openrewrite.staticanalysis.URLEqualsHashCodeRecipes

Uses of equals() and hashCode() cause java.net.URL to make blocking internet connections. Instead, use java.net.URI.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

URL Equals

org.openrewrite.staticanalysis.URLEqualsHashCodeRecipes$URLEqualsRecipe

Uses of equals() cause java.net.URL to make blocking internet connections. Instead, use java.net.URI.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

URL Hash Code

org.openrewrite.staticanalysis.URLEqualsHashCodeRecipes$URLHashCodeRecipe

Uses of hashCode() cause java.net.URL to make blocking internet connections. Instead, use java.net.URI.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove catch for a checked exception if the try block does not throw that exception

org.openrewrite.staticanalysis.UnnecessaryCatch

A refactoring operation may result in a checked exception that is no longer thrown from a try block. This recipe will find and remove unnecessary catch blocks.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Unnecessary close in try-with-resources

org.openrewrite.staticanalysis.UnnecessaryCloseInTryWithResources

Remove unnecessary AutoCloseable#close() statements in try-with-resources.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Unnecessary explicit type arguments

org.openrewrite.staticanalysis.UnnecessaryExplicitTypeArguments

When explicit type arguments are inferable by the compiler, they may be removed.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove unnecessary parentheses

org.openrewrite.staticanalysis.UnnecessaryParentheses

Removes unnecessary parentheses from code where extra parentheses pairs are redundant.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove @Nullable and @CheckForNull annotations from primitives

org.openrewrite.staticanalysis.UnnecessaryPrimitiveAnnotations

Primitives can't be null anyway, so these annotations are not useful in this context.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Unnecessary return as last statement in void method

org.openrewrite.staticanalysis.UnnecessaryReturnAsLastStatement

Removes return from a void method if it's the last statement.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Unnecessary throws

org.openrewrite.staticanalysis.UnnecessaryThrows

Remove unnecessary throws declarations. This recipe will only remove unused, checked exceptions if: - The declaring class or the method declaration is final. - The method declaration is static or private. - The method overrides a method declaration in a super class and the super class does not throw the exception. - The method is public or protected and the exception is not documented via a JavaDoc as a @throws tag.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Unwrap else block after return or throw statement

org.openrewrite.staticanalysis.UnwrapElseAfterReturn

Unwraps the else block when the if block ends with a return or throw statement, reducing nesting and improving code readability.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Unwrap @Repeatable annotations

org.openrewrite.staticanalysis.UnwrapRepeatableAnnotations

Java 8 introduced the concept of @Repeatable annotations, making the wrapper annotation unnecessary.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upper case literal suffixes

org.openrewrite.staticanalysis.UpperCaseLiteralSuffixes

Using upper case literal suffixes for declaring literals is less ambiguous, e.g., 1l versus 1L.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Chain calls to builder methods

org.openrewrite.staticanalysis.UseAsBuilder

Chain calls to builder methods that are on separate lines into one chain of builder calls.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use Collection interfaces

org.openrewrite.staticanalysis.UseCollectionInterfaces

Use Deque, List, Map, ConcurrentMap, Queue, and Set instead of implemented collections. Replaces the return type of public method declarations and the variable type public variable declarations.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use the diamond operator

org.openrewrite.staticanalysis.UseDiamondOperator

The diamond operator (&lt;&gt;) should be used. Java 7 introduced the diamond operator to reduce the verbosity of generics code. For instance, instead of having to declare a List's type in both its declaration and its constructor, you can now simplify the constructor declaration with &lt;&gt;, and the compiler will infer the type.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace java.util.Set#removeAll(java.util.Collection) with java.util.Collection#forEach(Set::remove)

org.openrewrite.staticanalysis.UseForEachRemoveInsteadOfSetRemoveAll

Using java.util.Collection#forEach(Set::remove) rather than java.util.Set#removeAll(java.util.Collection) may improve performance due to a possible O(n^2) complexity.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

No C-style array declarations

org.openrewrite.staticanalysis.UseJavaStyleArrayDeclarations

Change C-Style array declarations int i[]; to int[] i;.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use lambda expressions instead of anonymous classes

org.openrewrite.staticanalysis.UseLambdaForFunctionalInterface

Instead of anonymous class declarations, use a lambda where possible. Using lambdas to replace anonymous classes can lead to more expressive and maintainable code, improve code readability, reduce code duplication, and achieve better performance in some cases.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace invocations of Collections#sort(List, Comparator) with List#sort(Comparator)

org.openrewrite.staticanalysis.UseListSort

The java.util.Collections#sort(..) implementation defers to the java.util.List#sort(Comparator), replaced it with the java.util.List#sort(Comparator) implementation for better readability.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replaces Object.notify() with Object.notifyAll()

org.openrewrite.staticanalysis.UseObjectNotifyAll

Object.notifyAll() and Object.notify() both wake up sleeping threads, but Object.notify() only rouses one while Object.notifyAll() rouses all of them. Since Object.notify() might not wake up the right thread, Object.notifyAll() should be used instead. See this for more information.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use %n instead of \n in format strings

org.openrewrite.staticanalysis.UsePortableNewlines

Format strings should use %n rather than \n to produce platform-specific line separators.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use StandardCharset constants

org.openrewrite.staticanalysis.UseStandardCharset

Replaces Charset.forName(java.lang.String) with the equivalent StandardCharset constant.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use String::replace() when first parameter is not a real regular expression

org.openrewrite.staticanalysis.UseStringReplace

When String::replaceAll is used, the first argument should be a real regular expression. If it’s not the case, String::replace does exactly the same thing as String::replaceAll without the performance drawback of the regex.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use System.lineSeparator()

org.openrewrite.staticanalysis.UseSystemLineSeparator

Replace calls to System.getProperty(&quot;line.separator&quot;) with System.lineSeparator().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer while over for loops

org.openrewrite.staticanalysis.WhileInsteadOfFor

When only the condition expression is defined in a for loop, and the initialization and increment expressions are missing, a while loop should be used instead to increase readability.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Write octal values as decimal

org.openrewrite.staticanalysis.WriteOctalValuesAsDecimal

Developers may not recognize octal values as such, mistaking them instead for decimal values.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Move annotation to type instead of field

org.openrewrite.staticanalysis.java.MoveFieldAnnotationToType

Annotations that could be applied to either a field or a type are better applied to the type, because similar annotations may be more restrictive, leading to compile errors like 'scoping construct cannot be annotated with type-use annotation' when migrating later.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove non-ASCII characters from Javadoc

org.openrewrite.staticanalysis.maven.MavenJavadocNonAsciiRecipe

Maven's javadoc-plugin configuration does not support non-ASCII characters. What makes it tricky is the error is very ambiguous and doesn't help in any way. This recipe removes those non-ASCII characters.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Rename packages to lowercase

org.openrewrite.staticanalysis.LowercasePackage

By convention all Java package names should contain only lowercase letters, numbers, and dashes. This recipe converts any uppercase letters in package names to be lowercase.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Standardize method name casing

org.openrewrite.staticanalysis.MethodNameCasing

Fixes method names that do not follow standard naming conventions. For example, String getFoo_bar() would be adjusted to String getFooBar() and int DoSomething() would be adjusted to int doSomething().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Common static analysis issues

org.openrewrite.staticanalysis.CommonStaticAnalysis

Resolve common static analysis issues (also known as SAST issues).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Java API best practices

org.openrewrite.staticanalysis.JavaApiBestPractices

Use the Java standard library in a way that is most idiomatic.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use Map#containsKey

org.openrewrite.staticanalysis.UseMapContainsKey

map.keySet().contains(a) can be simplified to map.containsKey(a).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace org.apache.commons.lang3.Validate#notNull with Objects#requireNonNull

org.openrewrite.staticanalysis.ReplaceApacheCommonsLang3ValidateNotNullWithObjectsRequireNonNull

Replace org.apache.commons.lang3.Validate.notNull(..) with Objects.requireNonNull(..).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace org.apache.commons.lang3.Validate#notNull with Objects#requireNonNull

org.openrewrite.staticanalysis.ReplaceValidateNotNullHavingSingleArgWithObjectsRequireNonNull

Replace org.apache.commons.lang3.Validate.notNull(Object) with Objects.requireNonNull(Object).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Code cleanup

org.openrewrite.staticanalysis.CodeCleanup

Automatically cleanup code, e.g. remove unnecessary parentheses, simplify expressions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace calls to Thread.run() with Thread.start()

org.openrewrite.staticanalysis.ReplaceThreadRunWithThreadStart

Thread.run() should not be called directly.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Properly use declaration-site type variance for well-known types

org.openrewrite.staticanalysis.CommonDeclarationSiteTypeVariances

When using a method parameter like Function&lt;IN, OUT&gt;, it should rather be Function&lt;? super IN, ? extends OUT&gt;. This recipe checks for method parameters of well-known types.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate DTD to a specific Struts version

org.openrewrite.java.struts.MigrateStrutsDtd

Update Struts DTD to reflect the specified version.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Dynamic Method Invocation to explicit action mappings

org.openrewrite.java.struts.migrate6.MigrateDynamicMethodInvocation

Identifies Struts configurations using Dynamic Method Invocation (DMI) and marks them for migration, as DMI is disabled by default in Struts 6 for security reasons.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find Struts actions

org.openrewrite.java.struts.search.FindStrutsActions

Find actions and their associated definitions.

Data tables:

  • org.openrewrite.java.struts.table.StrutsActions: Definition of struts action.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find struts XML files

org.openrewrite.java.struts.search.FindStrutsXml

Struts XML files may have any name, and may be outside a resources directory, so the true test is to look at the content of the file.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Struts 6.0

org.openrewrite.java.struts.migrate6.MigrateStruts6

Migrate Struts 2.x to Struts 6.0

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade Struts 6.0 dependencies

org.openrewrite.java.struts.migrate6.UpgradeStruts6Dependencies

Upgrade Struts 2.x dependencies to Struts 6.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Struts 6.0 constants

org.openrewrite.java.struts.migrate6.MigrateStruts6Constants

All Xwork constants had been already deprecated, with this version all of them have been removed and Struts constants have been used instead.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Struts 2.0 interceptors to action "aware" interfaces

org.openrewrite.java.struts.migrate6.MigrateAwareInterfaces

These types have moved to a new package in Struts 6.0 and their methods have been renamed from set* to with*.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate OpenSymphony classes to Struts 6.0

org.openrewrite.java.struts.migrate6.MigrateOpenSymphonyClasses

Migrate classes from com.opensymphony.xwork2 to their replacements in org.apache.struts2.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add Terraform configuration

org.openrewrite.terraform.AddConfiguration

If the configuration has a different value, leave it alone. If it is missing, add it.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use a long enough byte length for random resources

org.openrewrite.terraform.SecureRandom

Use a long enough byte length for random resources.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find required providers

org.openrewrite.terraform.search.FindRequiredProvider

Find required_providers blocks in Terraform configuration files. Produces a data table of the provider names and their versions.

Data tables:

  • org.openrewrite.terraform.table.RequiredProviders: A list of required providers in the Terraform configuration.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find Terraform resource

org.openrewrite.terraform.search.FindResource

Find a Terraform resource by resource type.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Best practices for AWS

org.openrewrite.terraform.aws.AWSBestPractices

Securely operate on Amazon Web Services.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Encrypt EBS volumes

org.openrewrite.terraform.aws.EncryptEBSVolumes

Encrypting EBS volumes ensures that replicated copies of your images are secure even if they are accidentally exposed. AWS EBS encryption uses AWS KMS customer master keys (CMK) when creating encrypted volumes and snapshots. Storing EBS volumes in their encrypted state reduces the risk of data exposure or data loss.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Encrypt EBS snapshots

org.openrewrite.terraform.aws.EncryptEBSSnapshots

EBS snapshots should be encrypted, as they often include sensitive information, customer PII or CPNI.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure AWS Elasticsearch domain encryption for data at rest is enabled

org.openrewrite.terraform.aws.EnsureAWSElasticsearchDomainEncryptionForDataAtRestIsEnabled

Ensure AWS Elasticsearch domain encryption for data at rest is enabled.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure AWS Elasticsearch has node-to-node encryption enabled

org.openrewrite.terraform.aws.EnsureAWSElasticsearchHasNodeToNodeEncryptionEnabled

Ensure AWS Elasticsearch has node-to-node encryption enabled.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure AWS CMK rotation is enabled

org.openrewrite.terraform.aws.EnsureAWSCMKRotationIsEnabled

Ensure AWS CMK rotation is enabled.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Encrypt EBS volume launch configurations

org.openrewrite.terraform.aws.EncryptEBSVolumeLaunchConfiguration

EBS volumes allow you to create encrypted launch configurations when creating EC2 instances and auto scaling. When the entire EBS volume is encrypted, data stored at rest on the volume, disk I/O, snapshots created from the volume, and data in-transit between EBS and EC2 are all encrypted.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure IAM password policy expires passwords within 90 days or less

org.openrewrite.terraform.aws.EnsureIAMPasswordPolicyExpiresPasswordsWithin90DaysOrLess

Ensure IAM password policy expires passwords within 90 days or less.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure AWS IAM password policy has a minimum of 14 characters

org.openrewrite.terraform.aws.EnsureAWSIAMPasswordPolicyHasAMinimumOf14Characters

Ensure AWS IAM password policy has a minimum of 14 characters.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure IAM password policy requires at least one lowercase letter

org.openrewrite.terraform.aws.EnsureIAMPasswordPolicyRequiresAtLeastOneLowercaseLetter

Ensure IAM password policy requires at least one lowercase letter.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure IAM password policy requires at least one number

org.openrewrite.terraform.aws.EnsureIAMPasswordPolicyRequiresAtLeastOneNumber

Ensure IAM password policy requires at least one number.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure IAM password policy prevents password reuse

org.openrewrite.terraform.aws.EnsureIAMPasswordPolicyPreventsPasswordReuse

Ensure IAM password policy prevents password reuse.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure IAM password policy requires at least one symbol

org.openrewrite.terraform.aws.EnsureIAMPasswordPolicyRequiresAtLeastOneSymbol

Ensure IAM password policy requires at least one symbol.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure IAM password policy requires at least one uppercase letter

org.openrewrite.terraform.aws.EnsureIAMPasswordPolicyRequiresAtLeastOneUppercaseLetter

Ensure IAM password policy requires at least one uppercase letter.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Encrypt RDS clusters

org.openrewrite.terraform.aws.EncryptRDSClusters

Native RDS encryption helps protect your cloud applications and fulfils compliance requirements for data-at-rest encryption.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure AWS RDS database instance is not publicly accessible

org.openrewrite.terraform.aws.EnsureAWSRDSDatabaseInstanceIsNotPubliclyAccessible

Ensure AWS RDS database instance is not publicly accessible.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure the S3 bucket has access logging enabled

org.openrewrite.terraform.aws.EnsureTheS3BucketHasAccessLoggingEnabled

Ensure the S3 bucket has access logging enabled.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure data stored in an S3 bucket is securely encrypted at rest

org.openrewrite.terraform.aws.EnsureDataStoredInAnS3BucketIsSecurelyEncryptedAtRest

Ensure data stored in an S3 bucket is securely encrypted at rest.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure AWS S3 object versioning is enabled

org.openrewrite.terraform.aws.EnsureAWSS3ObjectVersioningIsEnabled

Ensure AWS S3 object versioning is enabled.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enable point-in-time recovery for DynamoDB

org.openrewrite.terraform.aws.EnableDynamoDbPITR

DynamoDB Point-In-Time Recovery (PITR) is an automatic backup service for DynamoDB table data that helps protect your DynamoDB tables from accidental write or delete operations.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Encrypt ElastiCache Redis at rest

org.openrewrite.terraform.aws.EncryptElastiCacheRedisAtRest

ElastiCache for Redis offers default encryption at rest as a service.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Encrypt ElastiCache Redis in transit

org.openrewrite.terraform.aws.EncryptElastiCacheRedisInTransit

ElastiCache for Redis offers optional encryption in transit. In-transit encryption provides an additional layer of data protection when transferring data over standard HTTPS protocol.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Scan images pushed to ECR

org.openrewrite.terraform.aws.EnableECRScanOnPush

ECR Image Scanning assesses and identifies operating system vulnerabilities. Using automated image scans you can ensure container image vulnerabilities are found before getting pushed to production.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use HTTPS for Cloudfront distribution

org.openrewrite.terraform.aws.UseHttpsForCloudfrontDistribution

Secure communication by default.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure CloudTrail log file validation is enabled

org.openrewrite.terraform.aws.EnsureCloudTrailLogFileValidationIsEnabled

Ensure CloudTrail log file validation is enabled.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure Amazon EKS control plane logging enabled for all log types

org.openrewrite.terraform.aws.EnsureAmazonEKSControlPlaneLoggingEnabledForAllLogTypes

Ensure Amazon EKS control plane logging enabled for all log types.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure AWS EKS cluster endpoint access is publicly disabled

org.openrewrite.terraform.aws.EnsureAWSEKSClusterEndpointAccessIsPubliclyDisabled

Ensure AWS EKS cluster endpoint access is publicly disabled.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure AWS EFS with encryption for data at rest is enabled

org.openrewrite.terraform.aws.EnsureAWSEFSWithEncryptionForDataAtRestIsEnabled

Ensure AWS EFS with encryption for data at rest is enabled.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure Kinesis Stream is securely encrypted

org.openrewrite.terraform.aws.EnsureKinesisStreamIsSecurelyEncrypted

Ensure Kinesis Stream is securely encrypted.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Encrypt Neptune storage

org.openrewrite.terraform.aws.EncryptNeptuneStorage

Encryption of Neptune storage protects data and metadata against unauthorized access.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Encrypt DAX storage at rest

org.openrewrite.terraform.aws.EncryptDAXStorage

DAX encryption at rest automatically integrates with AWS KMS for managing the single service default key used to encrypt clusters.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure AWS Lambda functions have tracing enabled

org.openrewrite.terraform.aws.EnsureAWSLambdaFunctionsHaveTracingEnabled

Ensure AWS Lambda functions have tracing enabled.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Make ECR tags immutable

org.openrewrite.terraform.aws.ImmutableECRTags

Amazon ECR supports immutable tags, preventing image tags from being overwritten. In the past, ECR tags could have been overwritten, this could be overcome by requiring users to uniquely identify an image using a naming convention.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Encrypt Redshift storage at rest

org.openrewrite.terraform.aws.EncryptRedshift

Redshift clusters should be securely encrypted at rest.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Encrypt DocumentDB storage

org.openrewrite.terraform.aws.EncryptDocumentDB

The encryption feature available for Amazon DocumentDB clusters provides an additional layer of data protection by helping secure your data against unauthorized access to the underlying storage.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disable Instance Metadata Service version 1

org.openrewrite.terraform.aws.DisableInstanceMetadataServiceV1

As a request/response method IMDSv1 is prone to local misconfigurations.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure AWS Elasticsearch domains have EnforceHTTPS enabled

org.openrewrite.terraform.aws.EnsureAWSElasticsearchDomainsHaveEnforceHTTPSEnabled

Ensure AWS Elasticsearch domains have EnforceHTTPS enabled.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Encrypt Aurora clusters

org.openrewrite.terraform.aws.EncryptAuroraClusters

Native Aurora encryption helps protect your cloud applications and fulfils compliance requirements for data-at-rest encryption.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Encrypt EFS Volumes in ECS Task Definitions in transit

org.openrewrite.terraform.aws.EncryptEFSVolumesInECSTaskDefinitionsInTransit

Enable attached EFS definitions in ECS tasks to use encryption in transit.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure AWS Lambda function is configured for function-level concurrent execution limit

org.openrewrite.terraform.aws.EnsureAWSLambdaFunctionIsConfiguredForFunctionLevelConcurrentExecutionLimit

Ensure AWS Lambda function is configured for function-level concurrent execution limit.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure enhanced monitoring for Amazon RDS instances is enabled

org.openrewrite.terraform.aws.EnsureEnhancedMonitoringForAmazonRDSInstancesIsEnabled

Ensure enhanced monitoring for Amazon RDS instances is enabled.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enable API gateway caching

org.openrewrite.terraform.aws.EnableApiGatewayCaching

Enable caching for all methods of API Gateway.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure detailed monitoring for EC2 instances is enabled

org.openrewrite.terraform.aws.EnsureDetailedMonitoringForEC2InstancesIsEnabled

Ensure detailed monitoring for EC2 instances is enabled.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure respective logs of Amazon RDS are enabled

org.openrewrite.terraform.aws.EnsureRespectiveLogsOfAmazonRDSAreEnabled

Ensure respective logs of Amazon RDS are enabled.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure VPC subnets do not assign public IP by default

org.openrewrite.terraform.aws.EnsureVPCSubnetsDoNotAssignPublicIPByDefault

Ensure VPC subnets do not assign public IP by default.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure EC2 is EBS optimized

org.openrewrite.terraform.aws.EnsureEC2IsEBSOptimized

Ensure EC2 is EBS optimized.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure ECR repositories are encrypted

org.openrewrite.terraform.aws.EnsureECRRepositoriesAreEncrypted

Ensure ECR repositories are encrypted.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Encrypt CodeBuild projects

org.openrewrite.terraform.aws.EncryptCodeBuild

Build artifacts, such as a cache, logs, exported raw test report data files, and build results, are encrypted by default using CMKs for Amazon S3 that are managed by the AWS Key Management Service.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure RDS instances have Multi-AZ enabled

org.openrewrite.terraform.aws.EnsureRDSInstancesHaveMultiAZEnabled

Ensure RDS instances have Multi-AZ enabled.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure RDS database has IAM authentication enabled

org.openrewrite.terraform.aws.EnsureRDSDatabaseHasIAMAuthenticationEnabled

Ensure RDS database has IAM authentication enabled.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Best practices for Azure

org.openrewrite.terraform.azure.AzureBestPractices

Securely operate on Microsoft Azure.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Encrypt Azure VM data disk with ADE/CMK

org.openrewrite.terraform.azure.EncryptAzureVMDataDiskWithADECMK

Ensure Azure VM data disk is encrypted with ADE/CMK.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enable Azure Storage secure transfer required

org.openrewrite.terraform.azure.EnableAzureStorageSecureTransferRequired

Microsoft recommends requiring secure transfer for all storage accounts.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Disable Kubernetes dashboard

org.openrewrite.terraform.azure.DisableKubernetesDashboard

Disabling the dashboard eliminates it as an attack vector. The dashboard add-on is disabled by default for all new clusters created on Kubernetes 1.18 or greater.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure the storage container storing activity logs is not publicly accessible

org.openrewrite.terraform.azure.EnsureTheStorageContainerStoringActivityLogsIsNotPubliclyAccessible

Ensure the storage container storing activity logs is not publicly accessible.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure Azure Network Watcher NSG flow logs retention is greater than 90 days

org.openrewrite.terraform.azure.EnsureAzureNetworkWatcherNSGFlowLogsRetentionIsGreaterThan90Days

Ensure Azure Network Watcher NSG flow logs retention is greater than 90 days.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure Azure App Service Web app redirects HTTP to HTTPS

org.openrewrite.terraform.azure.EnsureAzureAppServiceWebAppRedirectsHTTPToHTTPS

Ensure Azure App Service Web app redirects HTTP to HTTPS.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure Web App uses the latest version of TLS encryption

org.openrewrite.terraform.azure.EnsureWebAppUsesTheLatestVersionOfTLSEncryption

Ensure Web App uses the latest version of TLS encryption.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure Web App has incoming client certificates enabled

org.openrewrite.terraform.azure.EnsureWebAppHasIncomingClientCertificatesEnabled

Ensure Web App has incoming client certificates enabled.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure Web App uses the latest version of HTTP

org.openrewrite.terraform.azure.EnsureWebAppUsesTheLatestVersionOfHTTP

Ensure Web App uses the latest version of HTTP.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure standard pricing tier is selected

org.openrewrite.terraform.azure.EnsureStandardPricingTierIsSelected

Ensure standard pricing tier is selected.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure a security contact phone number is present

org.openrewrite.terraform.azure.EnsureASecurityContactPhoneNumberIsPresent

Ensure a security contact phone number is present.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure Send email notification for high severity alerts is enabled

org.openrewrite.terraform.azure.EnsureSendEmailNotificationForHighSeverityAlertsIsEnabled

Ensure Send email notification for high severity alerts is enabled.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure Send email notification for high severity alerts to admins is enabled

org.openrewrite.terraform.azure.EnsureSendEmailNotificationForHighSeverityAlertsToAdminsIsEnabled

Ensure Send email notification for high severity alerts to admins is enabled.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure Azure SQL server audit log retention is greater than 90 days

org.openrewrite.terraform.azure.EnsureAzureSQLServerAuditLogRetentionIsGreaterThan90Days

Ensure Azure SQL server audit log retention is greater than 90 days.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure Azure SQL Server threat detection alerts are enabled for all threat types

org.openrewrite.terraform.azure.EnsureAzureSQLServerThreatDetectionAlertsAreEnabledForAllThreatTypes

Ensure Azure SQL Server threat detection alerts are enabled for all threat types.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure Azure SQL server send alerts to field value is set

org.openrewrite.terraform.azure.EnsureAzureSQLServerSendAlertsToFieldValueIsSet

Ensure Azure SQL server send alerts to field value is set.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure MSSQL servers have email service and co-administrators enabled

org.openrewrite.terraform.azure.EnsureMSSQLServersHaveEmailServiceAndCoAdministratorsEnabled

Ensure MSSQL servers have email service and co-administrators enabled.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure MySQL server databases have Enforce SSL connection enabled

org.openrewrite.terraform.azure.EnsureMySQLServerDatabasesHaveEnforceSSLConnectionEnabled

Ensure MySQL server databases have Enforce SSL connection enabled.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure Azure PostgreSQL database server with SSL connection is enabled

org.openrewrite.terraform.azure.EnsureAzurePostgreSQLDatabaseServerWithSSLConnectionIsEnabled

Ensure Azure PostgreSQL database server with SSL connection is enabled.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Set Azure Storage Account default network access to deny

org.openrewrite.terraform.azure.SetAzureStorageAccountDefaultNetworkAccessToDeny

Ensure Azure Storage Account default network access is set to Deny.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enable Azure Storage Account Trusted Microsoft Services access

org.openrewrite.terraform.azure.EnableAzureStorageAccountTrustedMicrosoftServicesAccess

Certain Microsoft services that interact with storage accounts operate from networks that cannot be granted access through network rules. Using this configuration, you can allow the set of trusted Microsoft services to bypass those network rules.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure activity log retention is set to 365 days or greater

org.openrewrite.terraform.azure.EnsureActivityLogRetentionIsSetTo365DaysOrGreater

Ensure activity log retention is set to 365 days or greater.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure log profile is configured to capture all activities

org.openrewrite.terraform.azure.EnsureLogProfileIsConfiguredToCaptureAllActivities

Ensure log profile is configured to capture all activities.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure all keys have an expiration date

org.openrewrite.terraform.azure.EnsureAllKeysHaveAnExpirationDate

Ensure all keys have an expiration date.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure AKV secrets have an expiration date set

org.openrewrite.terraform.azure.EnsureAKVSecretsHaveAnExpirationDateSet

Ensure AKV secrets have an expiration date set.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure Azure key vault is recoverable

org.openrewrite.terraform.azure.EnsureAzureKeyVaultIsRecoverable

Ensure Azure key vault is recoverable.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure storage account uses latest TLS version

org.openrewrite.terraform.azure.EnsureStorageAccountUsesLatestTLSVersion

Communication between an Azure Storage account and a client application is encrypted using Transport Layer Security (TLS). Microsoft recommends using the latest version of TLS for all your Microsoft Azure App Service web applications.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure public network access enabled is set to False for mySQL servers

org.openrewrite.terraform.azure.EnsurePublicNetworkAccessEnabledIsSetToFalseForMySQLServers

Ensure public network access enabled is set to False for mySQL servers.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure MySQL is using the latest version of TLS encryption

org.openrewrite.terraform.azure.EnsureMySQLIsUsingTheLatestVersionOfTLSEncryption

Ensure MySQL is using the latest version of TLS encryption.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure app service enables HTTP logging

org.openrewrite.terraform.azure.EnsureAppServiceEnablesHTTPLogging

Ensure app service enables HTTP logging.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure app service enables detailed error messages

org.openrewrite.terraform.azure.EnsureAppServiceEnablesDetailedErrorMessages

Ensure app service enables detailed error messages.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure app service enables failed request tracing

org.openrewrite.terraform.azure.EnsureAppServiceEnablesFailedRequestTracing

Ensure app service enables failed request tracing.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure PostgreSQL server disables public network access

org.openrewrite.terraform.azure.EnsurePostgreSQLServerDisablesPublicNetworkAccess

Ensure PostgreSQL server disables public network access.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure managed identity provider is enabled for app services

org.openrewrite.terraform.azure.EnsureManagedIdentityProviderIsEnabledForAppServices

Ensure managed identity provider is enabled for app services.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure FTP Deployments are disabled

org.openrewrite.terraform.azure.EnsureFTPDeploymentsAreDisabled

Ensure FTP Deployments are disabled.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure app services use Azure files

org.openrewrite.terraform.azure.EnsureAppServicesUseAzureFiles

Ensure app services use Azure files.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure MySQL server disables public network access

org.openrewrite.terraform.azure.EnsureMySQLServerDisablesPublicNetworkAccess

Ensure MySQL server disables public network access.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure MySQL server enables geo-redundant backups

org.openrewrite.terraform.azure.EnsureMySQLServerEnablesGeoRedundantBackups

Ensure MySQL server enables geo-redundant backups.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enable geo-redundant backups on PostgreSQL server

org.openrewrite.terraform.azure.EnableGeoRedundantBackupsOnPostgreSQLServer

Ensure PostgreSQL server enables geo-redundant backups.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure key vault allows firewall rules settings

org.openrewrite.terraform.azure.EnsureKeyVaultAllowsFirewallRulesSettings

Ensure key vault allows firewall rules settings.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure key vault enables purge protection

org.openrewrite.terraform.azure.EnsureKeyVaultEnablesPurgeProtection

Ensure key vault enables purge protection.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure key vault key is backed by HSM

org.openrewrite.terraform.azure.EnsureKeyVaultKeyIsBackedByHSM

Ensure key vault key is backed by HSM.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure key vault secrets have content_type set

org.openrewrite.terraform.azure.EnsureKeyVaultSecretsHaveContentTypeSet

Ensure key vault secrets have content_type set.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure AKS policies add-on

org.openrewrite.terraform.azure.EnsureAKSPoliciesAddOn

Azure Policy Add-on for Kubernetes service (AKS) extends Gatekeeper v3, an admission controller webhook for Open Policy Agent (OPA), to apply at-scale enforcements and safeguards on your clusters in a centralized, consistent manner.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure Azure application gateway has WAF enabled

org.openrewrite.terraform.azure.EnsureAzureApplicationGatewayHasWAFEnabled

Ensure Azure application gateway has WAF enabled.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure MySQL server enables Threat Detection policy

org.openrewrite.terraform.azure.EnsureMySQLServerEnablesThreatDetectionPolicy

Ensure MySQL server enables Threat Detection policy.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure PostgreSQL server enables Threat Detection policy

org.openrewrite.terraform.azure.EnsurePostgreSQLServerEnablesThreatDetectionPolicy

Ensure PostgreSQL server enables Threat Detection policy.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure PostgreSQL server enables infrastructure encryption

org.openrewrite.terraform.azure.EnsurePostgreSQLServerEnablesInfrastructureEncryption

Ensure PostgreSQL server enables infrastructure encryption.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Best practices for GCP

org.openrewrite.terraform.gcp.GCPBestPractices

Securely operate on Google Cloud Platform.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure GCP Kubernetes cluster node auto-repair configuration is enabled

org.openrewrite.terraform.gcp.EnsureGCPKubernetesClusterNodeAutoRepairConfigurationIsEnabled

Ensure GCP Kubernetes cluster node auto-repair configuration is enabled.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enable PodSecurityPolicy controller on Google Kubernetes Engine (GKE) clusters

org.openrewrite.terraform.gcp.EnablePodSecurityPolicyControllerOnGKEClusters

Ensure PodSecurityPolicy controller is enabled on Google Kubernetes Engine (GKE) clusters.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure private cluster is enabled when creating Kubernetes clusters

org.openrewrite.terraform.gcp.EnsurePrivateClusterIsEnabledWhenCreatingKubernetesClusters

Ensure private cluster is enabled when creating Kubernetes clusters.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enable VPC Flow Logs for subnetworks

org.openrewrite.terraform.gcp.EnableVPCFlowLogsForSubnetworks

Ensure GCP VPC flow logs for subnets are enabled. Flow Logs capture information on IP traffic moving through network interfaces. This information can be used to monitor anomalous traffic and provide security insights.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure GCP cloud storage bucket with uniform bucket-level access are enabled

org.openrewrite.terraform.gcp.EnsureGCPCloudStorageBucketWithUniformBucketLevelAccessAreEnabled

Ensure GCP cloud storage bucket with uniform bucket-level access are enabled.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure GCP VM instances have block project-wide SSH keys feature enabled

org.openrewrite.terraform.gcp.EnsureGCPVMInstancesHaveBlockProjectWideSSHKeysFeatureEnabled

Ensure GCP VM instances have block project-wide SSH keys feature enabled.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure IP forwarding on instances is disabled

org.openrewrite.terraform.gcp.EnsureIPForwardingOnInstancesIsDisabled

Ensure IP forwarding on instances is disabled.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure compute instances launch with shielded VM enabled

org.openrewrite.terraform.gcp.EnsureComputeInstancesLaunchWithShieldedVMEnabled

Ensure compute instances launch with shielded VM enabled.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Enable VPC flow logs and intranode visibility

org.openrewrite.terraform.gcp.EnableVPCFlowLogsAndIntranodeVisibility

Enable VPC flow logs and intranode visibility.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure binary authorization is used

org.openrewrite.terraform.gcp.EnsureBinaryAuthorizationIsUsed

Ensure binary authorization is used.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure GCP Kubernetes engine clusters have legacy compute engine metadata endpoints disabled

org.openrewrite.terraform.gcp.EnsureGCPKubernetesEngineClustersHaveLegacyComputeEngineMetadataEndpointsDisabled

Ensure GCP Kubernetes engine clusters have legacy compute engine metadata endpoints disabled.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure secure boot for shielded GKE nodes is enabled

org.openrewrite.terraform.gcp.EnsureSecureBootForShieldedGKENodesIsEnabled

Ensure secure boot for shielded GKE nodes is enabled.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure the GKE metadata server is enabled

org.openrewrite.terraform.gcp.EnsureTheGKEMetadataServerIsEnabled

Ensure the GKE metadata server is enabled.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Ensure shielded GKE nodes are enabled

org.openrewrite.terraform.gcp.EnsureShieldedGKENodesAreEnabled

Ensure shielded GKE nodes are enabled.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Arquillian JUnit 4 @InSequence to JUnit Jupiter @Order

org.openrewrite.java.testing.arquillian.ReplaceArquillianInSequenceAnnotation

Transforms the Arquillian JUnit 4 @InSequence to the JUnit Jupiter @Order.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Adopt AssertJ Duration assertions

org.openrewrite.java.testing.assertj.AdoptAssertJDurationAssertions

Adopt AssertJ DurationAssert assertions for more expressive messages.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Adopt AssertJ BigInteger Assertions

org.openrewrite.java.testing.assertj.AssertJBigIntegerRulesRecipes

Adopt AssertJ BigInteger Assertions. Favor semantically explicit methods (e.g. myBigInteger.isZero() over myBigInteger.isEqualTo(0)).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace isCloseTo with isEqualTo

org.openrewrite.java.testing.assertj.AssertJBigIntegerRulesRecipes$AbstractBigIntegerAssertIsEqualToRecipe

Replace isCloseTo with isEqualTo when offset or percentage is zero.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace isNotCloseTo with isNotEqualTo

org.openrewrite.java.testing.assertj.AssertJBigIntegerRulesRecipes$AbstractBigIntegerAssertIsNotEqualToRecipe

Replace isNotCloseTo with isNotEqualTo when offset or percentage is zero.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace isNotEqualTo(0) with isNotZero()

org.openrewrite.java.testing.assertj.AssertJBigIntegerRulesRecipes$AbstractBigIntegerAssertIsNotZeroRecipe

Replace isNotEqualTo(0) with isNotZero().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace isEqualTo(1) with isOne()

org.openrewrite.java.testing.assertj.AssertJBigIntegerRulesRecipes$AbstractBigIntegerAssertIsOneRecipe

Replace isEqualTo(1) with isOne().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace isEqualTo(0) with isZero()

org.openrewrite.java.testing.assertj.AssertJBigIntegerRulesRecipes$AbstractBigIntegerAssertIsZeroRecipe

Replace isEqualTo(0) with isZero().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Adopt AssertJ Byte Assertions

org.openrewrite.java.testing.assertj.AssertJByteRulesRecipes

Adopt AssertJ Byte Assertions. Favor semantically explicit methods (e.g. myByte.isZero() over myByte.isEqualTo(0)).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace isCloseTo with isEqualTo

org.openrewrite.java.testing.assertj.AssertJByteRulesRecipes$AbstractByteAssertIsEqualToRecipe

Replace isCloseTo with isEqualTo when offset or percentage is zero.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace isNotCloseTo with isNotEqualTo

org.openrewrite.java.testing.assertj.AssertJByteRulesRecipes$AbstractByteAssertIsNotEqualToRecipe

Replace isNotCloseTo with isNotEqualTo when offset or percentage is zero.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace isNotEqualTo(0) with isNotZero()

org.openrewrite.java.testing.assertj.AssertJByteRulesRecipes$AbstractByteAssertIsNotZeroRecipe

Replace isNotEqualTo(0) with isNotZero().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace isEqualTo(1) with isOne()

org.openrewrite.java.testing.assertj.AssertJByteRulesRecipes$AbstractByteAssertIsOneRecipe

Replace isEqualTo(1) with isOne().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace isEqualTo(0) with isZero()

org.openrewrite.java.testing.assertj.AssertJByteRulesRecipes$AbstractByteAssertIsZeroRecipe

Replace isEqualTo(0) with isZero().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Adopt AssertJ Double Assertions

org.openrewrite.java.testing.assertj.AssertJDoubleRulesRecipes

Adopt AssertJ Double Assertions. Favor semantically explicit methods (e.g. myDouble.isZero() over myDouble.isEqualTo(0.0)).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace isEqualTo with isCloseTo

org.openrewrite.java.testing.assertj.AssertJDoubleRulesRecipes$AbstractDoubleAssertIsCloseToWithOffsetRecipe

Replace isEqualTo with isCloseTo when offset or percentage is provided.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace isCloseTo with isEqualTo

org.openrewrite.java.testing.assertj.AssertJDoubleRulesRecipes$AbstractDoubleAssertIsEqualToRecipe

Replace isCloseTo with isEqualTo when offset or percentage is zero.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace isNotCloseTo with isNotEqualTo

org.openrewrite.java.testing.assertj.AssertJDoubleRulesRecipes$AbstractDoubleAssertIsNotEqualToRecipe

Replace isNotCloseTo with isNotEqualTo when offset or percentage is zero.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace isNotEqualTo(0) with isNotZero()

org.openrewrite.java.testing.assertj.AssertJDoubleRulesRecipes$AbstractDoubleAssertIsNotZeroRecipe

Replace isNotEqualTo(0) with isNotZero().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace isEqualTo(1) with isOne()

org.openrewrite.java.testing.assertj.AssertJDoubleRulesRecipes$AbstractDoubleAssertIsOneRecipe

Replace isEqualTo(1) with isOne().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace isEqualTo(0) with isZero()

org.openrewrite.java.testing.assertj.AssertJDoubleRulesRecipes$AbstractDoubleAssertIsZeroRecipe

Replace isEqualTo(0) with isZero().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Adopt AssertJ Float Assertions

org.openrewrite.java.testing.assertj.AssertJFloatRulesRecipes

Adopt AssertJ Float Assertions. Favor semantically explicit methods (e.g. myFloat.isZero() over myFloat.isEqualTo(0.0f)).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace isEqualTo with isCloseTo

org.openrewrite.java.testing.assertj.AssertJFloatRulesRecipes$AbstractFloatAssertIsCloseToWithOffsetRecipe

Replace isEqualTo with isCloseTo when offset or percentage is provided.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace isCloseTo with isEqualTo

org.openrewrite.java.testing.assertj.AssertJFloatRulesRecipes$AbstractFloatAssertIsEqualToRecipe

Replace isCloseTo with isEqualTo when offset or percentage is zero.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace isNotCloseTo with isNotEqualTo

org.openrewrite.java.testing.assertj.AssertJFloatRulesRecipes$AbstractFloatAssertIsNotEqualToRecipe

Replace isNotCloseTo with isNotEqualTo when offset or percentage is zero.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace isNotEqualTo(0) with isNotZero()

org.openrewrite.java.testing.assertj.AssertJFloatRulesRecipes$AbstractFloatAssertIsNotZeroRecipe

Replace isNotEqualTo(0) with isNotZero().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace isEqualTo(1) with isOne()

org.openrewrite.java.testing.assertj.AssertJFloatRulesRecipes$AbstractFloatAssertIsOneRecipe

Replace isEqualTo(1) with isOne().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace isEqualTo(0) with isZero()

org.openrewrite.java.testing.assertj.AssertJFloatRulesRecipes$AbstractFloatAssertIsZeroRecipe

Replace isEqualTo(0) with isZero().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Adopt AssertJ Integer Assertions

org.openrewrite.java.testing.assertj.AssertJIntegerRulesRecipes

Adopt AssertJ Integer Assertions. Favor semantically explicit methods (e.g. myInteger.isZero() over myInteger.isEqualTo(0)).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace isCloseTo with isEqualTo

org.openrewrite.java.testing.assertj.AssertJIntegerRulesRecipes$AbstractIntegerAssertIsEqualToRecipe

Replace isCloseTo with isEqualTo when offset or percentage is zero.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace isNotCloseTo with isNotEqualTo

org.openrewrite.java.testing.assertj.AssertJIntegerRulesRecipes$AbstractIntegerAssertIsNotEqualToRecipe

Replace isNotCloseTo with isNotEqualTo when offset or percentage is zero.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace isNotEqualTo(0) with isNotZero()

org.openrewrite.java.testing.assertj.AssertJIntegerRulesRecipes$AbstractIntegerAssertIsNotZeroRecipe

Replace isNotEqualTo(0) with isNotZero().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace isEqualTo(1) with isOne()

org.openrewrite.java.testing.assertj.AssertJIntegerRulesRecipes$AbstractIntegerAssertIsOneRecipe

Replace isEqualTo(1) with isOne().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace isEqualTo(0) with isZero()

org.openrewrite.java.testing.assertj.AssertJIntegerRulesRecipes$AbstractIntegerAssertIsZeroRecipe

Replace isEqualTo(0) with isZero().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Adopt AssertJ Long Assertions

org.openrewrite.java.testing.assertj.AssertJLongRulesRecipes

Adopt AssertJ Long Assertions. Favor semantically explicit methods (e.g. myLong.isZero() over myLong.isEqualTo(0)).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace isCloseTo with isEqualTo

org.openrewrite.java.testing.assertj.AssertJLongRulesRecipes$AbstractLongAssertIsEqualToRecipe

Replace isCloseTo with isEqualTo when offset or percentage is zero.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace isNotCloseTo with isNotEqualTo

org.openrewrite.java.testing.assertj.AssertJLongRulesRecipes$AbstractLongAssertIsNotEqualToRecipe

Replace isNotCloseTo with isNotEqualTo when offset or percentage is zero.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace isNotEqualTo(0) with isNotZero()

org.openrewrite.java.testing.assertj.AssertJLongRulesRecipes$AbstractLongAssertIsNotZeroRecipe

Replace isNotEqualTo(0) with isNotZero().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace isEqualTo(1) with isOne()

org.openrewrite.java.testing.assertj.AssertJLongRulesRecipes$AbstractLongAssertIsOneRecipe

Replace isEqualTo(1) with isOne().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace isEqualTo(0) with isZero()

org.openrewrite.java.testing.assertj.AssertJLongRulesRecipes$AbstractLongAssertIsZeroRecipe

Replace isEqualTo(0) with isZero().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Adopt AssertJ Short Assertions

org.openrewrite.java.testing.assertj.AssertJShortRulesRecipes

Adopt AssertJ Short Assertions. Favor semantically explicit methods (e.g. myShort.isZero() over myShort.isEqualTo(0)).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace isCloseTo with isEqualTo

org.openrewrite.java.testing.assertj.AssertJShortRulesRecipes$AbstractShortAssertIsEqualToRecipe

Replace isCloseTo with isEqualTo when offset or percentage is zero.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace isNotCloseTo with isNotEqualTo

org.openrewrite.java.testing.assertj.AssertJShortRulesRecipes$AbstractShortAssertIsNotEqualToRecipe

Replace isNotCloseTo with isNotEqualTo when offset or percentage is zero.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace isNotEqualTo(0) with isNotZero()

org.openrewrite.java.testing.assertj.AssertJShortRulesRecipes$AbstractShortAssertIsNotZeroRecipe

Replace isNotEqualTo(0) with isNotZero().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace isEqualTo(1) with isOne()

org.openrewrite.java.testing.assertj.AssertJShortRulesRecipes$AbstractShortAssertIsOneRecipe

Replace isEqualTo(1) with isOne().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace isEqualTo(0) with isZero()

org.openrewrite.java.testing.assertj.AssertJShortRulesRecipes$AbstractShortAssertIsZeroRecipe

Replace isEqualTo(0) with isZero().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Collapse consecutive assertThat statements

org.openrewrite.java.testing.assertj.CollapseConsecutiveAssertThatStatements

Collapse consecutive assertThat statements into single assertThat chained statement. This recipe ignores assertThat statements that have method invocation as parameter.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace AbstractDateAssert#isEqualToIgnoringMillis(java.util.Date) by by isCloseTo(Date, long)

org.openrewrite.java.testing.assertj.IsEqualToIgnoringMillisToIsCloseToRecipe

isEqualToIgnoringMillis() is deprecated in favor of isCloseTo().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

JUnit assertArrayEquals to assertJ

org.openrewrite.java.testing.assertj.JUnitAssertArrayEqualsToAssertThat

Convert JUnit-style assertArrayEquals() to AssertJ's assertThat().contains() equivalents.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

JUnit assertEquals to AssertJ

org.openrewrite.java.testing.assertj.JUnitAssertEqualsToAssertThat

Convert JUnit-style assertEquals() to AssertJ's assertThat().isEqualTo().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

JUnit assertFalse to AssertJ

org.openrewrite.java.testing.assertj.JUnitAssertFalseToAssertThat

Convert JUnit-style assertFalse() to AssertJ's assertThat().isFalse().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

JUnit assertInstanceOf to AssertJ

org.openrewrite.java.testing.assertj.JUnitAssertInstanceOfToAssertThat

Convert JUnit-style assertInstanceOf() to AssertJ's assertThat().isInstanceOf().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

JUnit assertNotEquals to AssertJ

org.openrewrite.java.testing.assertj.JUnitAssertNotEqualsToAssertThat

Convert JUnit-style assertNotEquals() to AssertJ's assertThat().isNotEqualTo().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

JUnit assertNotNull to AssertJ

org.openrewrite.java.testing.assertj.JUnitAssertNotNullToAssertThat

Convert JUnit-style assertNotNull() to AssertJ's assertThat().isNotNull().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

JUnit assertNull to AssertJ

org.openrewrite.java.testing.assertj.JUnitAssertNullToAssertThat

Convert JUnit-style assertNull() to AssertJ's assertThat().isNull().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

JUnit assertSame to AssertJ

org.openrewrite.java.testing.assertj.JUnitAssertSameToAssertThat

Convert JUnit-style assertSame() to AssertJ's assertThat().isSameAs().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

JUnit AssertThrows to AssertJ exceptionType

org.openrewrite.java.testing.assertj.JUnitAssertThrowsToAssertExceptionType

Convert JUnit#AssertThrows to AssertJ#assertThatExceptionOfType to allow for chained assertions on the thrown exception.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

JUnit assertTrue to AssertJ

org.openrewrite.java.testing.assertj.JUnitAssertTrueToAssertThat

Convert JUnit-style assertTrue() to AssertJ's assertThat().isTrue().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

JUnit fail to AssertJ

org.openrewrite.java.testing.assertj.JUnitFailToAssertJFail

Convert JUnit-style fail() to AssertJ's fail().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Convert try-catch-fail blocks to AssertJ's assertThatThrownBy

org.openrewrite.java.testing.assertj.JUnitTryFailToAssertThatThrownBy

Replace try-catch blocks where the try block ends with a fail() statement and the catch block optionally contains assertions, with AssertJ's assertThatThrownBy().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Simplify AssertJ assertions with literal arguments

org.openrewrite.java.testing.assertj.SimplifyAssertJAssertion

Simplify AssertJ assertions by replacing them with more expressive dedicated assertions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Simplify AssertJ chained assertions

org.openrewrite.java.testing.assertj.SimplifyChainedAssertJAssertion

Many AssertJ chained assertions have dedicated assertions that function the same. It is best to use the dedicated assertions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Simplify AssertJ assertions with hasSize argument

org.openrewrite.java.testing.assertj.SimplifyHasSizeAssertion

Simplify AssertJ assertions by replacing hasSize with hasSameSizeAs dedicated assertions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Simplify redundant AssertJ assertion chains

org.openrewrite.java.testing.assertj.SimplifyRedundantAssertJChains

Removes redundant AssertJ assertions when chained methods already provide the same or stronger guarantees.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Simplify AssertJ assertions on SequencedCollection

org.openrewrite.java.testing.assertj.SimplifySequencedCollectionAssertions

Simplify AssertJ assertions on SequencedCollection by using dedicated assertion methods. For example, assertThat(sequencedCollection.getLast()) can be simplified to assertThat(sequencedCollection).last().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Simplify assertThat(collection.stream().map(...)) to assertThat(collection).extracting(...)

org.openrewrite.java.testing.assertj.SimplifyStreamMapToExtracting

Simplifies AssertJ assertions that use stream().map() to extract values from a collection by using the dedicated extracting() method instead. This makes the assertion more readable and leverages AssertJ's built-in extraction capabilities.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUnit assertEquals(false, &lt;boolean&gt;) to assertFalse(&lt;boolean&gt;) / assertTrue(&lt;boolean&gt;)

org.openrewrite.java.testing.cleanup.AssertEqualsBooleanToAssertBoolean

Using assertFalse or assertTrue is simpler and more clear.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

assertEquals(a, null) to assertNull(a)

org.openrewrite.java.testing.cleanup.AssertEqualsNullToAssertNull

Using assertNull(a) is simpler and more clear.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUnit assertFalse(a.equals(b)) to assertNotEquals(a,b)

org.openrewrite.java.testing.cleanup.AssertFalseEqualsToAssertNotEquals

Using assertNotEquals(a,b) is simpler and more clear.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUnit assertFalse(!&lt;boolean&gt;) to assertTrue(&lt;boolean&gt;)

org.openrewrite.java.testing.cleanup.AssertFalseNegationToAssertTrue

Using assertTrue is simpler and more clear.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUnit assertFalse(a == null) to assertNotNull(a)

org.openrewrite.java.testing.cleanup.AssertFalseNullToAssertNotNull

Using assertNotNull(a) is simpler and more clear.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove JUnit assertTrue(true) and assertFalse(false)

org.openrewrite.java.testing.cleanup.AssertLiteralBooleanRemovedRecipe

These assertions are redundant and do not provide any value. They can be safely removed.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUnit assertTrue(false, &quot;reason&quot;) and assertFalse(true, &quot;reason&quot;) with fail(&quot;reason&quot;)

org.openrewrite.java.testing.cleanup.AssertLiteralBooleanToFailRecipes

Using fail is more direct and clear.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertLiteralBooleanToFail.WithMessage

org.openrewrite.java.testing.cleanup.AssertLiteralBooleanToFailRecipes$WithMessageRecipe

Recipe created for the following Refaster template: java static class WithMessage { @BeforeTemplate void assertFalseBefore(String message) { assertFalse(true, message); } @BeforeTemplate void assertTrueBefore(String message) { assertTrue(false, message); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(String message) { fail(message); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertLiteralBooleanToFail.WithoutMessage

org.openrewrite.java.testing.cleanup.AssertLiteralBooleanToFailRecipes$WithoutMessageRecipe

Recipe created for the following Refaster template: java static class WithoutMessage { @BeforeTemplate void assertFalseBefore() { assertFalse(true); } @BeforeTemplate void assertTrueBefore() { assertTrue(false); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after() { fail(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUnit assertNotEquals(false, &lt;boolean&gt;) to assertFalse(&lt;boolean&gt;) / assertTrue(&lt;boolean&gt;)

org.openrewrite.java.testing.cleanup.AssertNotEqualsBooleanToAssertBoolean

Using assertFalse or assertTrue is simpler and more clear.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Junit assertTrue(a == b) to assertEquals(a,b)

org.openrewrite.java.testing.cleanup.AssertTrueComparisonToAssertEquals

Using assertEquals(a,b) is simpler and more clear.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUnit assertTrue(a.equals(b)) to assertEquals(a,b)

org.openrewrite.java.testing.cleanup.AssertTrueEqualsToAssertEquals

Using assertEquals(a,b) is simpler and more clear.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUnit assertTrue(!&lt;boolean&gt;) to assertFalse(&lt;boolean&gt;)

org.openrewrite.java.testing.cleanup.AssertTrueNegationToAssertFalse

Using assertFalse is simpler and more clear.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUnit assertTrue(a == null) to assertNull(a)

org.openrewrite.java.testing.cleanup.AssertTrueNullToAssertNull

Using assertNull(a) is simpler and more clear.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Assertion arguments should be passed in the correct order

org.openrewrite.java.testing.cleanup.AssertionsArgumentOrder

Assertions such as org.junit.Assert.assertEquals expect the first argument to be the expected value and the second argument to be the actual value; for org.testng.Assert, it’s the other way around. This recipe detects J.Literal, J.NewArray, and java.util.Iterable arguments swapping them if necessary so that the error messages won't be confusing.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Kotlin test methods should have return type Unit

org.openrewrite.java.testing.cleanup.KotlinTestMethodsShouldReturnUnit

Kotlin test methods annotated with @Test, @ParameterizedTest, @RepeatedTest, @TestTemplate should have Unit return type. Other return types can cause test discovery issues, and warnings as of JUnit 5.13+. This recipe changes the return type to Unit and removes return statements.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove empty tests without comments

org.openrewrite.java.testing.cleanup.RemoveEmptyTests

Removes empty methods with a @Test annotation if the body does not have comments.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove test prefix from JUnit 5 tests

org.openrewrite.java.testing.cleanup.RemoveTestPrefix

Remove test from methods with @Test, @ParameterizedTest, @RepeatedTest or @TestFactory. They no longer have to prefix test to be usable by JUnit 5.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Simplify throws statements of tests

org.openrewrite.java.testing.cleanup.SimplifyTestThrows

Replace all thrown exception classes of test method signatures by Exception.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Test methods should have void return type

org.openrewrite.java.testing.cleanup.TestMethodsShouldBeVoid

Test methods annotated with @Test, @ParameterizedTest, @RepeatedTest, @TestTemplate should have void return type. Non-void return types can cause test discovery issues, and warnings as of JUnit 5.13+. This recipe changes the return type to void and removes return statements.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Include an assertion in tests

org.openrewrite.java.testing.cleanup.TestsShouldIncludeAssertions

For tests not having any assertions, wrap the statements with JUnit Jupiter's Assertions#assertDoesNotThrow(..).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate the DBRiderTestExecutionListener to the @DBRider annotation

org.openrewrite.java.testing.dbrider.ExecutionListenerToDbRiderAnnotation

Migrate the DBRiderTestExecutionListener to the @DBRider annotation. This recipe is useful when migrating from JUnit 4 dbrider-spring to JUnit 5 dbrider-junit5.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace EasyMock verify calls with Mockito verify calls

org.openrewrite.java.testing.easymock.EasyMockVerifyToMockitoVerify

Replace EasyMock.verify(dependency) with individual Mockito.verify(dependency).method() calls based on expected methods.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Test classes that extend org.easymock.EasyMockSupport to use Mockito

org.openrewrite.java.testing.easymock.RemoveExtendsEasyMockSupport

Modify test classes by removing extends EasyMockSupport and replacing EasyMock methods with Mockito equivalents.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Hamcrest assertThat(boolean, Matcher) to AssertJ

org.openrewrite.java.testing.hamcrest.AssertThatBooleanToAssertJ

Replace Hamcrest assertThat(String, boolean) with AssertJ assertThat(boolean).as(String).isTrue().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate from Hamcrest instanceOf matcher to JUnit 5

org.openrewrite.java.testing.hamcrest.HamcrestInstanceOfToJUnit5

Migrate from Hamcrest instanceOf and isA matcher to JUnit5 assertInstanceOf assertion.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Hamcrest is(Object) to AssertJ

org.openrewrite.java.testing.hamcrest.HamcrestIsMatcherToAssertJ

Migrate Hamcrest is(Object) to AssertJ Assertions.assertThat(..).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate from Hamcrest Matcher to AssertJ

org.openrewrite.java.testing.hamcrest.HamcrestMatcherToAssertJ

Migrate from Hamcrest Matcher to AssertJ assertions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate from Hamcrest Matcher to JUnit 5

org.openrewrite.java.testing.hamcrest.HamcrestMatcherToJUnit5

Migrate from Hamcrest Matcher to JUnit 5 assertions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Hamcrest not(Matcher) to AssertJ

org.openrewrite.java.testing.hamcrest.HamcrestNotMatcherToAssertJ

Migrate from Hamcrest not(Matcher) to AssertJ assertions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate anyOf Hamcrest Matcher to AssertJ

org.openrewrite.java.testing.hamcrest.HamcrestOfMatchersToAssertJ

Migrate the anyOf Hamcrest Matcher to AssertJ's satisfiesAnyOf assertion.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove Hamcrest is(Matcher)

org.openrewrite.java.testing.hamcrest.RemoveIsMatcher

Remove Hamcrest is(Matcher) ahead of migration.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Convert JMockit @Mocked and @Injectable annotated arguments

org.openrewrite.java.testing.jmockit.JMockitAnnotatedArgumentToMockito

Convert JMockit @Mocked and @Injectable annotated arguments into Mockito statements.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Rewrite JMockit Expectations, NonStrictExpectations, Verifications, VerificationsInOrder, FullVerifications

org.openrewrite.java.testing.jmockit.JMockitBlockToMockito

Rewrites JMockit Expectations, NonStrictExpectations, Verifications, VerificationsInOrder, FullVerifications blocks to Mockito statements.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Rewrite JMockit MockUp to Mockito statements

org.openrewrite.java.testing.jmockit.JMockitMockUpToMockito

Rewrites JMockit MockUp blocks to Mockito statements. This recipe will not rewrite private methods in MockUp.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

JUnit 5 inner test classes should be annotated with @Nested

org.openrewrite.java.testing.junit5.AddMissingNested

Adds @Nested to inner classes that contain JUnit 5 tests.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add missing @BeforeEach, @AfterEach, @Test to overriding methods

org.openrewrite.java.testing.junit5.AddMissingTestBeforeAfterAnnotations

Adds @BeforeEach, @AfterEach, @Test to methods overriding superclass methods if the annotations are present on the superclass method.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add missing @ParameterizedTest annotation when @ValueSource is used or replace @Test with @ParameterizedTest

org.openrewrite.java.testing.junit5.AddParameterizedTestAnnotation

Add missing @ParameterizedTest annotation when @ValueSource is used or replace @Test with @ParameterizedTest.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Applies JUnit 5 assertThrows on last statement in lambda block only

org.openrewrite.java.testing.junit5.AssertThrowsOnLastStatement

Applies JUnit 5 assertThrows on last statement in lambda block only. In rare cases may cause compilation errors if the lambda uses effectively non final variables. In some cases, tests might fail if earlier statements in the lambda block throw exceptions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

JUnit 4 Assert To JUnit Jupiter Assertions

org.openrewrite.java.testing.junit5.AssertToAssertions

Change JUnit 4's org.junit.Assert into JUnit Jupiter's org.junit.jupiter.api.Assertions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

assertTrue(x instanceof y) to assertInstanceOf(y.class, x)

org.openrewrite.java.testing.junit5.AssertTrueInstanceofToAssertInstanceOf

Migration of JUnit4 (or potentially JUnit5) test case in form of assertTrue(x instanceof y) to assertInstanceOf(y.class, x).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

JUnit 4 @Category to JUnit Jupiter @Tag

org.openrewrite.java.testing.junit5.CategoryToTag

Transforms the JUnit 4 @Category, which can list multiple categories, into one @Tag annotation per category listed.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Cleanup JUnit imports

org.openrewrite.java.testing.junit5.CleanupJUnitImports

Removes unused org.junit import symbols.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace @CsvSource with @ValueSource for single method arguments

org.openrewrite.java.testing.junit5.CsvSourceToValueSource

Replaces JUnit 5's @CsvSource annotation with @ValueSource when the parameterized test has only a single method argument.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

JUnit 4 @RunWith(Enclosed.class) to JUnit Jupiter @Nested

org.openrewrite.java.testing.junit5.EnclosedToNested

Removes the Enclosed specification from a class, with Nested added to its inner classes by AddMissingNested.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate JUnit 4 environmentVariables rule to JUnit 5 system stubs extension

org.openrewrite.java.testing.junit5.EnvironmentVariables

Replaces usage of the JUnit 4 @Rule EnvironmentVariables with the JUnit 5-compatible SystemStubsExtension and @SystemStub EnvironmentVariables from the System Stubs library.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

JUnit 4 ExpectedException To JUnit Jupiter's assertThrows()

org.openrewrite.java.testing.junit5.ExpectedExceptionToAssertThrows

Replace usages of JUnit 4's @Rule ExpectedException with JUnit 5's Assertions.assertThrows().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Gradle Test use JUnit Jupiter

org.openrewrite.java.testing.junit5.GradleUseJunitJupiter

By default Gradle's Test tasks use JUnit 4. Gradle Test tasks must be configured with useJUnitPlatform() to run JUnit Jupiter tests. This recipe adds the useJUnitPlatform() method call to the Test task configuration.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Pragmatists @RunWith(JUnitParamsRunner.class) to JUnit Jupiter @Parameterized tests

org.openrewrite.java.testing.junit5.JUnitParamsRunnerToParameterized

Convert Pragmatists Parameterized test to the JUnit Jupiter ParameterizedTest equivalent.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Make lifecycle methods non private

org.openrewrite.java.testing.junit5.LifecycleNonPrivate

Make JUnit 5's @AfterAll, @AfterEach, @BeforeAll and @BeforeEach non private.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate JUnit 4 TestCase to JUnit Jupiter

org.openrewrite.java.testing.junit5.MigrateJUnitTestCase

Convert JUnit 4 TestCase to JUnit Jupiter.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

JUnit 4 MockitoJUnit to JUnit Jupiter MockitoExtension

org.openrewrite.java.testing.junit5.MockitoJUnitToMockitoExtension

Replaces MockitoJUnit rules with MockitoExtension.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

JUnit 4 @RunWith(Parameterized.class) to JUnit Jupiter parameterized tests

org.openrewrite.java.testing.junit5.ParameterizedRunnerToParameterized

Convert JUnit 4 parameterized runner the JUnit Jupiter parameterized test equivalent.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove duplicates uses of @TestTemplate implementations for a single method

org.openrewrite.java.testing.junit5.RemoveDuplicateTestTemplates

Remove duplicates uses of @TestTemplate implementations for a single method.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove JUnit 4 @RunWith annotations that do not require an @ExtendsWith replacement

org.openrewrite.java.testing.junit5.RemoveObsoleteRunners

Some JUnit 4 @RunWith annotations do not require replacement with an equivalent JUnit Jupiter @ExtendsWith annotation. This can be used to remove those runners that either do not have a JUnit Jupiter equivalent or do not require a replacement as part of JUnit 4 to 5 migration.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace fail() in try-catch blocks with Assertions.assertDoesNotThrow(() -&gt; { ... })

org.openrewrite.java.testing.junit5.RemoveTryCatchFailBlocks

Replace try-catch blocks where catch merely contains a fail() for fail(String) statement with Assertions.assertDoesNotThrow(() -&gt; { ... }).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

JUnit 4 @RunWith to JUnit Jupiter @ExtendWith

org.openrewrite.java.testing.junit5.RunnerToExtension

Replace runners with the JUnit Jupiter extension equivalent.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Make @TempDir fields non final

org.openrewrite.java.testing.junit5.TempDirNonFinal

Make JUnit 5's org.junit.jupiter.api.io.TempDir fields non final.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use JUnit Jupiter @TempDir

org.openrewrite.java.testing.junit5.TemporaryFolderToTempDir

Translates JUnit 4's org.junit.rules.TemporaryFolder into JUnit 5's org.junit.jupiter.api.io.TempDir.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

JUnit TestName @Rule to JUnit Jupiter TestInfo

org.openrewrite.java.testing.junit5.TestRuleToTestInfo

Replace usages of JUnit 4's @Rule TestName with JUnit 5's TestInfo.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

JUnit 4 @Rule Timeout to JUnit Jupiter's Timeout

org.openrewrite.java.testing.junit5.TimeoutRuleToClassAnnotation

Replace usages of JUnit 4's @Rule Timeout with JUnit 5 Timeout class annotation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate JUnit 4 lifecycle annotations to JUnit Jupiter

org.openrewrite.java.testing.junit5.UpdateBeforeAfterAnnotations

Replace JUnit 4's @Before, @BeforeClass, @After, and @AfterClass annotations with their JUnit Jupiter equivalents.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

OkHttp 3.x MockWebServer @Rule To 4.x MockWebServer

org.openrewrite.java.testing.junit5.UpdateMockWebServer

Replace usages of okhttp3 3.x @Rule MockWebServer with 4.x MockWebServer.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate JUnit 4 @Test annotations to JUnit 5

org.openrewrite.java.testing.junit5.UpdateTestAnnotation

Update usages of JUnit 4's @org.junit.Test annotation to JUnit 5's org.junit.jupiter.api.Test annotation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use JUnit5's assertSame or assertNotSame instead of assertTrue(... == ...)

org.openrewrite.java.testing.junit5.UseAssertSame

Prefers the usage of assertSame or assertNotSame methods instead of using of vanilla assertTrue or assertFalse with a boolean comparison.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate from JUnit 4 @FixedMethodOrder to JUnit 5 @TestMethodOrder

org.openrewrite.java.testing.junit5.UseTestMethodOrder

JUnit optionally allows test method execution order to be specified. This replaces JUnit 4 test execution ordering annotations with JUnit 5 replacements.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use wiremock extension

org.openrewrite.java.testing.junit5.UseWiremockExtension

As of 2.31.0, wiremock supports JUnit 5 via an extension.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate MethodOrderer.Alphanumeric to MethodOrderer.MethodName

org.openrewrite.java.testing.junit6.MigrateMethodOrdererAlphanumeric

JUnit 6 removed the MethodOrderer.Alphanumeric class. This recipe migrates usages to MethodOrderer.MethodName which provides similar functionality.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate JUnit JRE conditions

org.openrewrite.java.testing.junit6.MinimumJreConditions

This recipe will: - Remove tests that are only active on JREs that are below the specified version. - Adjust ranges to use minimum the specified version.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove InvocationInterceptor.interceptDynamicTest

org.openrewrite.java.testing.junit6.RemoveInterceptDynamicTest

JUnit 6 removed the interceptDynamicTest(Invocation, ExtensionContext) method from InvocationInterceptor. This recipe removes implementations of this deprecated method.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Adds Mockito extensions to Mockito tests

org.openrewrite.java.testing.mockito.AddMockitoExtensionIfAnnotationsUsed

Adds @ExtendWith(MockitoExtension.class) to tests using @Mock or @Captor.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace Mockito 1.x anyString() with nullable(String.class)

org.openrewrite.java.testing.mockito.AnyStringToNullable

Since Mockito 2.10 anyString() no longer matches null values. Use nullable(Class) instead.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Cleanup Mockito imports

org.openrewrite.java.testing.mockito.CleanupMockitoImports

Removes unused org.mockito import symbols, unless its possible they are associated with method invocations having null or unknown type information.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Cleanup PowerMock imports

org.openrewrite.java.testing.mockito.CleanupPowerMockImports

Removes unused org.powermock import symbols.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Close unclosed static mocks

org.openrewrite.java.testing.mockito.CloseUnclosedStaticMocks

Ensures that all mockStatic calls are properly closed. If mockStatic is in lifecycle methods like @BeforeEach or @BeforeAll, creates a class variable and closes it in @AfterEach or @AfterAll. If mockStatic is inside a test method, wraps it in a try-with-resources block.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use static form of Mockito MockUtil

org.openrewrite.java.testing.mockito.MockUtilsToStatic

Best-effort attempt to remove Mockito MockUtil instances.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

JUnit 4 MockitoJUnitRunner.Silent to JUnit Jupiter MockitoExtension with LENIENT settings

org.openrewrite.java.testing.mockito.MockitoJUnitRunnerSilentToExtension

Replace @RunWith(MockitoJUnitRunner.Silent.class) with @ExtendWith(MockitoExtension.class) and @MockitoSettings(strictness = Strictness.LENIENT).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace JUnit 4 MockitoJUnitRunner with junit-jupiter MockitoExtension

org.openrewrite.java.testing.mockito.MockitoJUnitRunnerToExtension

Replace JUnit 4 MockitoJUnitRunner annotations with JUnit 5 @ExtendWith(MockitoExtension.class) using the appropriate strictness levels (LENIENT, WARN, STRICT_STUBS).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace Mockito.when on static (non mock) with try-with-resource with MockedStatic

org.openrewrite.java.testing.mockito.MockitoWhenOnStaticToMockStatic

Replace Mockito.when on static (non mock) with try-with-resource with MockedStatic as Mockito4 no longer allows this. For JUnit 4/5 & TestNG: When @Before* is used, a close call is added to the corresponding @After* method. This change moves away from implicit bytecode manipulation for static method stubbing, making mocking behavior more explicit and scoped to avoid unintended side effects.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace PowerMock.mockStatic() with Mockito.mockStatic()

org.openrewrite.java.testing.mockito.PowerMockitoMockStaticToMockito

Replaces PowerMockito.mockStatic() by Mockito.mockStatic(). Removes the @PrepareForTest annotation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace PowerMockito.whenNew with Mockito counterpart

org.openrewrite.java.testing.mockito.PowerMockitoWhenNewToMockito

Replaces PowerMockito.whenNew calls with respective Mockito.whenConstructed calls.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove MockitoAnnotations.initMocks(this) if specified JUnit runners

org.openrewrite.java.testing.mockito.RemoveInitMocksIfRunnersSpecified

Remove MockitoAnnotations.initMocks(this) if specified class-level JUnit runners @RunWith(MockitoJUnitRunner.class) or @ExtendWith(MockitoExtension.class).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove Mockito.times(0) and Mockito.times(1)

org.openrewrite.java.testing.mockito.RemoveTimesZeroAndOne

Remove Mockito.times(0) and Mockito.times(1) from Mockito.verify() calls.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace MockitoAnnotations.initMocks(this) to MockitoAnnotations.openMocks(this)

org.openrewrite.java.testing.mockito.ReplaceInitMockToOpenMock

Replace MockitoAnnotations.initMocks(this) to MockitoAnnotations.openMocks(this) and generate AutoCloseable mocks.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Call to Mockito method "verify", "when" or "given" should be simplified

org.openrewrite.java.testing.mockito.SimplifyMockitoVerifyWhenGiven

Fixes Sonar issue java:S6068: Call to Mockito method "verify", "when" or "given" should be simplified.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Adopt @Container and add @Testcontainers

org.openrewrite.java.testing.testcontainers.AddTestcontainersAnnotations

Convert Testcontainers @Rule/@ClassRule to JUnit 5 @Container and add @Testcontainers.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add image argument to container constructor

org.openrewrite.java.testing.testcontainers.ExplicitContainerImage

Set the image to use for a container explicitly if unset, rather than relying on the default image for the container class.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

TestNG assertEquals to AssertJ

org.openrewrite.java.testing.testng.TestNgAssertEqualsToAssertThat

Convert TestNG-style assertEquals() to AssertJ's assertThat().isEqualTo().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

TestNG assertNotEquals to AssertJ

org.openrewrite.java.testing.testng.TestNgAssertNotEqualsToAssertThat

Convert TestNG-style assertNotEquals() to AssertJ's assertThat().isNotEqualTo().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Convert Truth assert_() to AssertJ

org.openrewrite.java.testing.truth.TruthAssertToAssertThat

Converts Google Truth's assert_() method to AssertJ's standard assertion pattern.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Convert Truth assertWithMessage to AssertJ

org.openrewrite.java.testing.truth.TruthAssertWithMessageToAssertJ

Converts Google Truth's assertWithMessage().that() pattern to AssertJ's assertThat().as() pattern.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Truth custom subjects to AssertJ

org.openrewrite.java.testing.truth.TruthCustomSubjectsToAssertJ

Marks Google Truth's assertAbout() usage for manual review as AssertJ handles custom assertions differently.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Convert Truth Throwable assertions to AssertJ

org.openrewrite.java.testing.truth.TruthThrowableAssertions

Converts Google Truth's Throwable assertion chains like hasMessageThat().contains() to AssertJ equivalents.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove public visibility of JUnit 5 tests

org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic

Remove public and optionally protected modifiers from methods with @Test, @ParameterizedTest, @RepeatedTest, @TestFactory, @BeforeEach, @AfterEach, @BeforeAll, or @AfterAll. They no longer have to be public visibility to be usable by JUnit 5.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add Hamcrest JUnit dependency

org.openrewrite.java.testing.junit5.AddHamcrestJUnitDependency

Add Hamcrest JUnit dependency only if JUnit 4's assertThat or assumeThat is used.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add JUnit Jupiter dependencies

org.openrewrite.java.testing.junit5.AddJupiterDependencies

Adds JUnit Jupiter dependencies to a Maven or Gradle project. JUnit Jupiter can be added either with the artifact junit-jupiter, or both of junit-jupiter-api and junit-jupiter-engine. This adds junit-jupiter dependency unless junit-jupiter-api or junit-jupiter-engine are already present.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace Mockito 1.x anyString()/any() with nullable(Class)

org.openrewrite.java.testing.mockito.AnyToNullable

Since Mockito 2.10 anyString() and any() no longer matches null values. Use nullable(Class) instead.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace verifyZeroInteractions() with verifyNoMoreInteractions()

org.openrewrite.java.testing.mockito.VerifyZeroToNoMoreInteractions

Replaces verifyZeroInteractions() with verifyNoMoreInteractions() in Mockito tests when migration when using a Mockito version < 3.x.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Find unit tests

org.openrewrite.java.testing.search.FindUnitTests

Produces a data table showing how methods are used in unit tests.

Data tables:

  • org.openrewrite.java.testing.search.FindUnitTestTable: Method declarations used in unit tests
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

ArchUnit 0.x upgrade

org.openrewrite.java.testing.archunit.ArchUnit0to1Migration

Upgrade ArchUnit from 0.x to 1.x.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use Arquillian JUnit 5 Extension

org.openrewrite.java.testing.arquillian.ArquillianJUnit4ToArquillianJUnit5

Migrates Arquillian JUnit 4 to JUnit 5.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

AssertJ best practices

org.openrewrite.java.testing.assertj.Assertj

Migrates JUnit asserts to AssertJ and applies best practices to assertions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Statically import AssertJ's assertThat

org.openrewrite.java.testing.assertj.StaticImports

Consistently use a static import rather than inlining the Assertions class name in tests.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Simplify AssertJ chained assertions

org.openrewrite.java.testing.assertj.SimplifyChainedAssertJAssertions

Replace AssertJ assertions where a method is called on the actual value with a dedicated assertion.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Shorten AssertJ assertions

org.openrewrite.java.testing.assertj.SimplifyAssertJAssertions

Replace AssertJ assertions where a dedicated assertion is available for the same actual value.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate JUnit asserts to AssertJ

org.openrewrite.java.testing.assertj.JUnitToAssertj

AssertJ provides a rich set of assertions, truly helpful error messages, improves test code readability. Converts assertions from org.junit.jupiter.api.Assertions to org.assertj.core.api.Assertions. Will convert JUnit 4 to JUnit Jupiter if necessary to match and modify assertions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Fest 2.x to AssertJ

org.openrewrite.java.testing.assertj.FestToAssertj

AssertJ provides a rich set of assertions, truly helpful error messages, improves test code readability. Converts Fest 2.x imports to AssertJ imports.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use Byteman JUnit 5 dependency

org.openrewrite.java.testing.byteman.BytemanJUnit4ToBytemanJUnit5

Migrates Byteman JUnit 4 to JUnit 5.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Testing best practices

org.openrewrite.java.testing.cleanup.BestPractices

Applies best practices to tests.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate from Java Faker to Datafaker

org.openrewrite.java.testing.datafaker.JavaFakerToDataFaker

Change imports and dependencies related to Java Faker to Datafaker replacements.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate rider-spring (JUnit4) to rider-junit5 (JUnit5)

org.openrewrite.java.testing.dbrider.MigrateDbRiderSpringToDbRiderJUnit5

This recipe will migrate the necessary dependencies and annotations from DbRider with JUnit4 to JUnit5 in a Spring application.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate from EasyMock to Mockito

org.openrewrite.java.testing.easymock.EasyMockToMockito

This recipe will apply changes commonly needed when migrating from EasyMock to Mockito.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add org.hamcrest:hamcrest if it is used.

org.openrewrite.java.testing.hamcrest.AddHamcrestIfUsed

JUnit Jupiter does not include hamcrest as a transitive dependency. If needed, add a direct dependency.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use consistent Hamcrest matcher imports

org.openrewrite.java.testing.hamcrest.ConsistentHamcrestMatcherImports

Use consistent imports for Hamcrest matchers, and remove wrapping is(Matcher) calls ahead of further changes.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Hamcrest assertions to JUnit Jupiter

org.openrewrite.java.testing.hamcrest.MigrateHamcrestToJUnit5

Migrate Hamcrest assertThat(..) to JUnit Jupiter Assertions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Hamcrest assertions to AssertJ

org.openrewrite.java.testing.hamcrest.MigrateHamcrestToAssertJ

Migrate Hamcrest assertThat(..) to AssertJ Assertions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate from JMockit to Mockito

org.openrewrite.java.testing.jmockit.JMockitToMockito

This recipe will apply changes commonly needed when migrating from JMockit to Mockito.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

JUnit Jupiter best practices

org.openrewrite.java.testing.junit.JupiterBestPractices

Applies best practices to tests.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

JUnit 5 best practices

org.openrewrite.java.testing.junit5.JUnit5BestPractices

Applies best practices to tests.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Statically import JUnit Jupiter assertions

org.openrewrite.java.testing.junit5.StaticImports

Always use a static import for assertion methods.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

JUnit Jupiter migration from JUnit 4.x

org.openrewrite.java.testing.junit5.JUnit4to5Migration

Migrates JUnit 4.x tests to JUnit Jupiter.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Exclude JUnit 4, unless Testcontainers is used

org.openrewrite.java.testing.junit5.ExcludeJUnit4UnlessUsingTestcontainers

Excludes JUnit 4, as it ought not to be necessary in a JUnit 5 project, unless Testcontainers is used.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use MatcherAssert#assertThat(..)

org.openrewrite.java.testing.junit5.UseHamcrestAssertThat

JUnit 4's Assert#assertThat(..) This method was deprecated in JUnit 4 and removed in JUnit Jupiter.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use Assertions#assume*(..) and Hamcrest's MatcherAssume#assume*(..)

org.openrewrite.java.testing.junit5.MigrateAssumptions

Many of JUnit 4's Assume#assume(..) methods have no direct counterpart in JUnit 5 and require Hamcrest JUnit's MatcherAssume.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use Mockito JUnit Jupiter extension

org.openrewrite.java.testing.junit5.UseMockitoExtension

Migrate uses of @RunWith(MockitoJUnitRunner.class) (and similar annotations) to @ExtendWith(MockitoExtension.class).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use JUnit Jupiter @Disabled

org.openrewrite.java.testing.junit5.IgnoreToDisabled

Migrates JUnit 4.x @Ignore to JUnit Jupiter @Disabled.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use JUnit Jupiter Executable

org.openrewrite.java.testing.junit5.ThrowingRunnableToExecutable

Migrates JUnit 4.x ThrowingRunnable to JUnit Jupiter Executable.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use Vert.x JUnit 5 Extension

org.openrewrite.java.testing.junit5.VertxUnitToVertxJunit5

Migrates Vert.x @RunWith VertxUnitRunner to the JUnit Jupiter @ExtendWith VertxExtension.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use OkHttp 3 MockWebServer for JUnit 5

org.openrewrite.java.testing.junit5.UpgradeOkHttpMockWebServer

Migrates OkHttp 3 MockWebServer to enable JUnit Jupiter Extension support.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Clean Up Assertions

org.openrewrite.java.testing.junit5.CleanupAssertions

Simplifies JUnit Jupiter assertions to their most-direct equivalents.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use XMLUnit Legacy for JUnit 5

org.openrewrite.java.testing.junit5.UseXMLUnitLegacy

Migrates XMLUnit 1.x to XMLUnit legacy 2.x.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade Surefire Plugin

org.openrewrite.java.testing.junit5.UpgradeSurefirePlugin

Upgrades the Maven Surefire Plugin to the latest version if still using an older Maven version.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade to JUnit 5.14

org.openrewrite.java.testing.junit5.UpgradeToJUnit514

Upgrades JUnit 5 to 5.14.x and migrates all deprecated APIs.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

JUnit 6 best practices

org.openrewrite.java.testing.junit.JUnit6BestPractices

Applies best practices to tests.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

JUnit 6 migration from JUnit 5.x

org.openrewrite.java.testing.junit6.JUnit5to6Migration

Migrates JUnit 5.x tests to JUnit 6.x.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Mockito best practices

org.openrewrite.java.testing.mockito.MockitoBestPractices

Applies best practices for Mockito tests.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Mockito 5.x upgrade

org.openrewrite.java.testing.mockito.Mockito1to5Migration

Upgrade Mockito from 1.x to 5.x.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Mockito 4 to 5.x upgrade only

org.openrewrite.java.testing.mockito.Mockito4to5Only

Upgrade Mockito from 4.x to 5.x. Does not include 1.x to 4.x migration.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Mockito 4.x upgrade

org.openrewrite.java.testing.mockito.Mockito1to4Migration

Upgrade Mockito from 1.x to 4.x.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Mockito 3.x migration from 1.x

org.openrewrite.java.testing.mockito.Mockito1to3Migration

Upgrade Mockito from 1.x to 3.x.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace PowerMock with raw Mockito

org.openrewrite.java.testing.mockito.ReplacePowerMockito

PowerMockito with raw Mockito; best executed as part of a Mockito upgrade.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Testcontainers best practices

org.openrewrite.java.testing.testcontainers.TestContainersBestPractices

Apply best practices to Testcontainers usage.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to testcontainers-java 2.x

org.openrewrite.java.testing.testcontainers.Testcontainers2Migration

Change dependencies and types to migrate to testcontainers-java 2.x.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace ContainerState.getContainerIpAddress() with getHost()

org.openrewrite.java.testing.testcontainers.GetHostMigration

Replace org.testcontainers.containers.ContainerState.getContainerIpAddress() with getHost().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Explicit container images and versions

org.openrewrite.java.testing.testcontainers.ExplicitContainerImages

Replace implicit default container images and versions with explicit versions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Rename Testcontainers dependencies

org.openrewrite.java.testing.testcontainers.Testcontainers2Dependencies

Change Testcontainers dependencies to adopt the new consistent testcontainers- prefix.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Testcontainers 2 container classes

org.openrewrite.java.testing.testcontainers.Testcontainers2ContainerClasses

Change Testcontainers container classes to their new package locations in Testcontainers 2.x.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate TestNG assertions to AssertJ

org.openrewrite.java.testing.testng.TestNgToAssertj

Convert assertions from org.testng.Assert to org.assertj.core.api.Assertions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Google Truth to AssertJ

org.openrewrite.java.testing.truth.MigrateTruthToAssertJ

Migrate Google Truth assertions to AssertJ assertions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Output Recipe Version

com.oracle.weblogic.rewrite.OutputRecipeVersion

Displays the version of the recipe after it runs.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade weblogic.version Maven property

com.oracle.weblogic.rewrite.UpgradeWeblogicMavenPropertyVersion

Set the Maven weblogic.version property according to a node-style semver selector or to a specific version number.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

ChangeJakartaFacesMethodCalls

com.oracle.weblogic.rewrite.jakarta.ChangeJakartaFacesMethodCalls

Handle method call changes for deprecated Faces/EL methods with different arguments from the original.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade group, artifact ID and version of an artifactItem, of a maven plugin execution configuration

com.oracle.weblogic.rewrite.jakarta.UpgradeMavenPluginArtifactItems

Change the groupId and the artifactId of an artifactItem in the configuration section of a plugin's execution. This recipe does not perform any validation and assumes all values passed are valid.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Adjust application.properties for jakarta.* packages

io.quarkus.updates.core.quarkus30.AdjustApplicationPropertiesWithJakarta

Adjust application.properties for jakarta.* packages

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Adjust application.yaml for jakarta.* packages

io.quarkus.updates.core.quarkus30.AdjustApplicationYamlWithJakarta

Adjust application.yaml for jakarta.* packages

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Adjust all-open directives in Kotlin plugin configuration

io.quarkus.updates.core.quarkus30.AdjustKotlinAllOpenDirectives

Adjust all-open directives in Kotlin plugin configuration

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Adjust the package properties

io.quarkus.updates.core.quarkus310.AdjustPackageProperty

Adjust the package properties

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add <extensions>true</extensions> to quarkus-maven-plugin

io.quarkus.updates.core.quarkus331.AddExtensionsTrueToQuarkusMavenPlugin

Add <extensions>true</extensions> to the quarkus-maven-plugin configuration if not already present.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add an annotation processor to the Maven Compiler plugin configuration

io.quarkus.updates.core.quarkus37.AddMavenCompilerAnnotationProcessor

Add an annotation processor to the Maven Compiler plugin configuration.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change Maven Compiler plugin annotation processor groupId, artifactId and/or the version

io.quarkus.updates.core.quarkus37.ChangeMavenCompilerAnnotationProcessorGroupIdAndArtifactId

Change the groupId, artifactId and/or the version of a specified Maven Compiler plugin annotation processor.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade actions/setup-java java-version

io.quarkus.updates.core.quarkus37.SetupJavaUpgradeJavaVersion

Update the Java version used by actions/setup-java if it is below the expected version number.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Sync Maven Compiler plugin annotation processor version with the one provided by the BOM

io.quarkus.updates.core.quarkus37.SyncMavenCompilerAnnotationProcessorVersion

Sync Maven Compiler plugin annotation processor version with the one provided by the BOM.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade Java version

io.quarkus.updates.core.quarkus37.UpgradeJavaVersion

Upgrade build plugin configuration to use the specified Java version. This recipe changes java.toolchain.languageVersion in build.gradle(.kts) of gradle projects, or maven-compiler-plugin target version and related settings. Will not downgrade if the version is newer than the specified version.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove an annotation processor from the Maven Compiler plugin configuration

io.quarkus.updates.core.quarkus39.RemoveMavenCompilerAnnotationProcessor

Remove an annotation processor from the Maven Compiler plugin configuration.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Adust quarkus.minio.url property key

io.quarkus.updates.quarkiverse.minio.minio38.AdjustURLPropertyValue

Adjust quarkus.minio.url property key to quarkus.minio.host.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade actions/setup-java java-version

org.apache.camel.upgrade.SetupJavaUpgradeJavaVersion

Update the Java version used by actions/setup-java if it is below the expected version number.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade Java version

org.apache.camel.upgrade.UpgradeJavaVersion

Upgrade build plugin configuration to use the specified Java version. This recipe changes java.toolchain.languageVersion in build.gradle(.kts) of gradle projects, or maven-compiler-plugin target version and related settings. Will not downgrade if the version is newer than the specified version.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Camel API changes

org.apache.camel.upgrade.camel40.java.CamelAPIsRecipe

Apache Camel API migration from version 3.20 or higher to 4.0. Removal of deprecated APIs.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Camel bean recipe

org.apache.camel.upgrade.camel40.java.CamelBeanRecipe

Camel bean recipe.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replaces removed method camel EIP

org.apache.camel.upgrade.camel40.java.CamelEIPRecipe

The InOnly and InOut EIPs have been removed. Instead, use 'SetExchangePattern' or 'To' where you can specify the exchange pattern to use.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Camel Http Extension changes

org.apache.camel.upgrade.camel40.java.CamelHttpRecipe

Camel Http Extension changes.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Camel XMl DSL Circuit Breaker changes

org.apache.camel.upgrade.camel40.xml.CircuitBreakerXmlDslRecipe

Apache Camel XML DSL Circuit Breaker migration from version 3.20 or higher to 4.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Camel XMl DSL changes

org.apache.camel.upgrade.camel40.xml.XmlDslRecipe

Apache Camel XML DSL migration from version 3.20 or higher to 4.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Camel Yaml changes regarding route-configuration children

org.apache.camel.upgrade.camel40.yaml.CamelYamlRouteConfigurationSequenceRecipe

Camel YAML changes. route-configuration children sequence is replaced with mappingEntry (with special migration of "on-exception").

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Camel Yaml steps not allowed as route child

org.apache.camel.upgrade.camel40.yaml.CamelYamlStepsInFromRecipe

The YAML DSL backwards compatible mode in Camel 3.14 or older, which allowed 'steps' to be defined as a child of 'route' has been removed.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Camel Core changes

org.apache.camel.upgrade.camel41.CamelCoreRecipe

Apache Camel Core migration from version 4.0 to 4.1.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Camel XMl DSL changes

org.apache.camel.upgrade.camel41.XmlDslRecipe

Apache Camel XML DSL migration from version 4.0 to 4.1.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Changes for creation of inlined beans.

org.apache.camel.upgrade.camel41.YamlDslRecipe

If inlined bean is created, parameters type and beanType has bean changed.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Camel XMl DSL changes

org.apache.camel.upgrade.camel410.XmlDsl410Recipe

Apache Camel XML DSL migration from version 4.9 o 4.10.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Camel Java DSL change for camel 4.12

org.apache.camel.upgrade.camel412.Java412Recipes

Apache Camel Java DSL migration from version 4.11 to 4.12.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Camel YML DSL changes

org.apache.camel.upgrade.camel413.YamlDsl413Recipe

Apache Camel YML DSL migration from version 4.12 o 4.13.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Milo: The monitored item data value listener API has changed

org.apache.camel.upgrade.camel416.Camel416MiloLambdaRecipe

Milo: The monitored item data value listener API has changed.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Camel Core changes

org.apache.camel.upgrade.camel42.CamelSagaRecipe

Apache Camel Core migration from version 4.0 to 4.1.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Camel Resequence DSL changes

org.apache.camel.upgrade.camel43.CamelResequenceEIPXmlRecipe

Batch and stream attributes were renamed in Resequence EIP XML DSL.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Camel Core changes

org.apache.camel.upgrade.camel43.CamelThrottleEIPRecipe

Apache Camel Core migration from version 4.0 to 4.1.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Camel Core changes

org.apache.camel.upgrade.camel44.CamelCoreRecipe

Apache Camel Core migration from version 4.3 to 4.4.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Camel XMl DSL changes

org.apache.camel.upgrade.camel46.XmlDsl46Recipe

Apache Camel XML DSL migration from version 3.20 or higher to 4.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Bean property to properties.

org.apache.camel.upgrade.camel46.YamlDsl46Recipe

Each bean property is changed to bean properties.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change of headers with embedded HTTP server (consumer)

org.apache.camel.upgrade.camel47.Java47Recipes

Change of headers with embedded HTTP server (consumer). The headers CamelHttpServletRequest and CamelHttpServletResponse has been removed..

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Camel XMl DSL changes

org.apache.camel.upgrade.camel47.XmlDsl47Recipe

Apache Camel XML DSL migration from version 4.6 o 4.7.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Camel YML DSL changes

org.apache.camel.upgrade.camel47.YamlDsl47Recipe

Apache Camel YML DSL migration from version 4.6 o 4.7.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change prefix of property with Camel case

org.apache.camel.upgrade.customRecipes.ChangePropertyKeyWithCaseChange

Change prefix of property with Camel case

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replaces a literal matching an expression

org.apache.camel.upgrade.customRecipes.LiteralRegexpConverterRecipe

Replaces literal, groups from regexp can be used as $0, $1, ...

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Move getter from context to ExtendedCamelContext.

org.apache.camel.upgrade.customRecipes.MoveGetterToExtendedCamelContext

Move getter from context to ExtendedCamelContext

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Move getter from context to PluginHelper.

org.apache.camel.upgrade.customRecipes.MoveGetterToPluginHelper

Move getter from context to PluginHelper

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update Apache Camel configurations keys

org.apache.camel.upgrade.customRecipes.PropertiesAndYamlKeyUpdate

Update Apache Camel configurations keys

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Camel XMl DSL changes

org.apache.camel.upgrade.customRecipes.ReplacePropertyInComponentXml

Apache Camel XML DSL migration from version 4.9 o 4.10.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Renames property of the component

org.apache.camel.upgrade.customRecipes.ReplacePropertyInComponentYaml

ARenames property of the component.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Camel XMl DSL changes

org.apache.camel.upgrade.customRecipes.ReplacePropertyInDataFormatXml

Apache Camel XML DSL migration from version 4.9 o 4.10.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Renames property of the component

org.apache.camel.upgrade.customRecipes.ReplacePropertyInDataFormatYaml

ARenames property of the component.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add a comment to a method

software.amazon.awssdk.v2migration.AddCommentToMethod

Add a comment to a method.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Convert ByteBuffer to SdkBytes

software.amazon.awssdk.v2migration.ByteBufferToSdkBytes

Convert ByteBuffer to SdkBytes by calling SdkBytes#fromByteBuffer

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change AWS SDK for Java v1 types to v2 equivalents

software.amazon.awssdk.v2migration.ChangeSdkType

Change AWS SDK for Java v1 types to v2 equivalents.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Convert Date to Instant

software.amazon.awssdk.v2migration.DateToInstant

Convert Date to Instant by calling Date#toInstant

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

V1 Enum Casing to V2

software.amazon.awssdk.v2migration.EnumCasingToV2

Transforms V1 enum constants from pascal case to screaming snake case for v2.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Move HTTP settings from the ClientOverrideConfiguration to ApacheHttpClient for sync and NettyNioAsyncHttpClient for async

software.amazon.awssdk.v2migration.HttpSettingsToHttpClient

Move HTTP settings from the ClientOverrideConfiguration to ApacheHttpClient for sync SDK client and NettyNioAsyncHttpClient for async SDK client.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Transform 'new' expressions to builders

software.amazon.awssdk.v2migration.NewClassToBuilder

Transforms 'new' expression for generated model, client objects and client config related objects to the equivalent builder()..build() expression in V2.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change new objects creation to Builder pattern

software.amazon.awssdk.v2migration.NewClassToBuilderPattern

Transform the creation of a class using 'new' to builder pattern.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Transform 'new' expressions to static factory methods

software.amazon.awssdk.v2migration.NewClassToStaticFactory

Transforms 'new' expression for client config related objects to the equivalent .create() expression in V2.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Convert the method parameter from numeric type to duration

software.amazon.awssdk.v2migration.NumberToDuration

Convert the method parameter from numeric types to duration.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add imports and comments to unsupported S3 transforms.

software.amazon.awssdk.v2migration.S3AddImportsAndComments

Add imports and comments to unsupported S3 transforms.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

S3 Event Notification method to v2

software.amazon.awssdk.v2migration.S3EventNotificationMethodToV2

S3 Event Notification method to v2

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

V1 S3 non-streaming requests to V2

software.amazon.awssdk.v2migration.S3NonStreamingRequestToV2

Transform usage of V1 S3 non-streaming requests to V2.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

V1 S3 non-streaming requests to V2

software.amazon.awssdk.v2migration.S3NonStreamingRequestToV2Complex

Transform usage of V1 S3 non-streaming requests to V2.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

S3 POJOs to V2

software.amazon.awssdk.v2migration.S3PojoToV2

S3 POJOs to V2

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

V1 S3 PutObjectRequest, AmazonS3.putObject(PutObjectRequest), and TransferManager.upload(PutObjectRequest) to V2

software.amazon.awssdk.v2migration.S3PutObjectRequestToV2

Transform V1 S3 PutObjectRequest to V2, as well as methods that take it as an argument.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

V1 S3 streaming requests to V2

software.amazon.awssdk.v2migration.S3StreamingRequestToV2

Transform usage of V1 S3 streaming requests such as PutObject to V2.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

V1 S3Object to V2

software.amazon.awssdk.v2migration.S3StreamingResponseToV2

Transform usage of V1 S3Object to V2.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add imports and comments to unsupported S3 transfer manager transforms.

software.amazon.awssdk.v2migration.S3TmAddComments

Add imports and comments to unsupported S3 transfer manager transforms.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Convert v1 AmazonS3URI to v2 S3Uri

software.amazon.awssdk.v2migration.S3UriToV2

Convert v1 AmazonS3URI to v2 S3Uri

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Convert SdkBytes to ByteBuffer

software.amazon.awssdk.v2migration.SdkBytesToByteBuffer

Convert SdkBytes to ByteBuffer by calling SdkBytes#asByteBuffer()

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

SDK Exceptions Methods to V2

software.amazon.awssdk.v2migration.SdkExceptionToV2

SDK Exceptions Methods to V2

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Convert V1 setters to V2 toBuilder setters

software.amazon.awssdk.v2migration.SettersToBuilderV2

Convert V1 setters to V2 toBuilder setters

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Transfer Manager Methods to V2

software.amazon.awssdk.v2migration.TransferManagerMethodsToV2

Transfer Manager Methods to V2

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

V1 client builder variations to builder()

software.amazon.awssdk.v2migration.V1BuilderVariationsToV2Builder

Transforms V1 builder variations to builder()

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

V1 Getter to V2

software.amazon.awssdk.v2migration.V1GetterToV2

Transforms V1 getter to fluent getter in V2.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

V1 Setter to V2

software.amazon.awssdk.v2migration.V1SetterToV2

Transforms V1 setter to fluent setter in V2.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Wrap the region string provided on the SDK client builder with Region.of

software.amazon.awssdk.v2migration.WrapSdkClientBuilderRegionStr

Wrap the region string provided on the SDK client builder with Region.of.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

tech.picnic.errorprone.refasterrules.AssertJBigDecimalRulesRecipes

Note that, contrary to collections of Refaster rules for other org.assertj.core.api.NumberAssert subtypes, these rules do not rewrite to/from BigDecimalAssert#isEqualTo(Object) and BigDecimalAssert#isNotEqualTo(Object). This is because BigDecimal#equals(Object) considers not only the numeric value of compared instances, but also their scale. As a result various seemingly straightforward transformations would actually subtly change the assertion's semantics. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJBigDecimalRules.AbstractBigDecimalAssertIsEqualByComparingTo

tech.picnic.errorprone.refasterrules.AssertJBigDecimalRulesRecipes$AbstractBigDecimalAssertIsEqualByComparingToRecipe

Recipe created for the following Refaster template: java static final class AbstractBigDecimalAssertIsEqualByComparingTo { @BeforeTemplate AbstractBigDecimalAssert&lt;?&gt; before(AbstractBigDecimalAssert&lt;?&gt; bigDecimalAssert, BigDecimal n) { return Refaster.anyOf(bigDecimalAssert.isCloseTo(n, offset(BigDecimal.ZERO)), bigDecimalAssert.isCloseTo(n, withPercentage(0))); } @AfterTemplate AbstractBigDecimalAssert&lt;?&gt; after(AbstractBigDecimalAssert&lt;?&gt; bigDecimalAssert, BigDecimal n) { return bigDecimalAssert.isEqualByComparingTo(n); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJBigDecimalRules.AbstractBigDecimalAssertIsNotEqualByComparingTo

tech.picnic.errorprone.refasterrules.AssertJBigDecimalRulesRecipes$AbstractBigDecimalAssertIsNotEqualByComparingToRecipe

Recipe created for the following Refaster template: java static final class AbstractBigDecimalAssertIsNotEqualByComparingTo { @BeforeTemplate AbstractBigDecimalAssert&lt;?&gt; before(AbstractBigDecimalAssert&lt;?&gt; bigDecimalAssert, BigDecimal n) { return Refaster.anyOf(bigDecimalAssert.isNotCloseTo(n, offset(BigDecimal.ZERO)), bigDecimalAssert.isNotCloseTo(n, withPercentage(0))); } @AfterTemplate AbstractBigDecimalAssert&lt;?&gt; after(AbstractBigDecimalAssert&lt;?&gt; bigDecimalAssert, BigDecimal n) { return bigDecimalAssert.isNotEqualByComparingTo(n); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

AssertJBigIntegerRules Refaster recipes

tech.picnic.errorprone.refasterrules.AssertJBigIntegerRulesRecipes

Refaster template recipes for tech.picnic.errorprone.refasterrules.AssertJBigIntegerRules. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJBigIntegerRules.AbstractBigIntegerAssertIsEqualTo

tech.picnic.errorprone.refasterrules.AssertJBigIntegerRulesRecipes$AbstractBigIntegerAssertIsEqualToRecipe

Recipe created for the following Refaster template: java static final class AbstractBigIntegerAssertIsEqualTo { @BeforeTemplate AbstractBigIntegerAssert&lt;?&gt; before(AbstractBigIntegerAssert&lt;?&gt; bigIntegerAssert, BigInteger n) { return Refaster.anyOf(bigIntegerAssert.isCloseTo(n, offset(BigInteger.ZERO)), bigIntegerAssert.isCloseTo(n, withPercentage(0))); } @AfterTemplate AbstractBigIntegerAssert&lt;?&gt; after(AbstractBigIntegerAssert&lt;?&gt; bigIntegerAssert, BigInteger n) { return bigIntegerAssert.isEqualTo(n); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJBigIntegerRules.AbstractBigIntegerAssertIsNotEqualTo

tech.picnic.errorprone.refasterrules.AssertJBigIntegerRulesRecipes$AbstractBigIntegerAssertIsNotEqualToRecipe

Recipe created for the following Refaster template: java static final class AbstractBigIntegerAssertIsNotEqualTo { @BeforeTemplate AbstractBigIntegerAssert&lt;?&gt; before(AbstractBigIntegerAssert&lt;?&gt; bigIntegerAssert, BigInteger n) { return Refaster.anyOf(bigIntegerAssert.isNotCloseTo(n, offset(BigInteger.ZERO)), bigIntegerAssert.isNotCloseTo(n, withPercentage(0))); } @AfterTemplate AbstractBigIntegerAssert&lt;?&gt; after(AbstractBigIntegerAssert&lt;?&gt; bigIntegerAssert, BigInteger n) { return bigIntegerAssert.isNotEqualTo(n); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJBigIntegerRules.AbstractBigIntegerAssertIsNotZero

tech.picnic.errorprone.refasterrules.AssertJBigIntegerRulesRecipes$AbstractBigIntegerAssertIsNotZeroRecipe

Recipe created for the following Refaster template: java static final class AbstractBigIntegerAssertIsNotZero { @BeforeTemplate AbstractBigIntegerAssert&lt;?&gt; before(AbstractBigIntegerAssert&lt;?&gt; bigIntegerAssert) { return Refaster.anyOf(bigIntegerAssert.isNotZero(), bigIntegerAssert.isNotEqualTo(0L), bigIntegerAssert.isNotEqualTo(BigInteger.ZERO)); } @AfterTemplate AbstractBigIntegerAssert&lt;?&gt; after(AbstractBigIntegerAssert&lt;?&gt; bigIntegerAssert) { return bigIntegerAssert.isNotEqualTo(0); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJBigIntegerRules.AbstractBigIntegerAssertIsOne

tech.picnic.errorprone.refasterrules.AssertJBigIntegerRulesRecipes$AbstractBigIntegerAssertIsOneRecipe

Recipe created for the following Refaster template: java static final class AbstractBigIntegerAssertIsOne { @BeforeTemplate AbstractBigIntegerAssert&lt;?&gt; before(AbstractBigIntegerAssert&lt;?&gt; bigIntegerAssert) { return Refaster.anyOf(bigIntegerAssert.isOne(), bigIntegerAssert.isEqualTo(1L), bigIntegerAssert.isEqualTo(BigInteger.ONE)); } @AfterTemplate AbstractBigIntegerAssert&lt;?&gt; after(AbstractBigIntegerAssert&lt;?&gt; bigIntegerAssert) { return bigIntegerAssert.isEqualTo(1); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJBigIntegerRules.AbstractBigIntegerAssertIsZero

tech.picnic.errorprone.refasterrules.AssertJBigIntegerRulesRecipes$AbstractBigIntegerAssertIsZeroRecipe

Recipe created for the following Refaster template: java static final class AbstractBigIntegerAssertIsZero { @BeforeTemplate AbstractBigIntegerAssert&lt;?&gt; before(AbstractBigIntegerAssert&lt;?&gt; bigIntegerAssert) { return Refaster.anyOf(bigIntegerAssert.isZero(), bigIntegerAssert.isEqualTo(0L), bigIntegerAssert.isEqualTo(BigInteger.ZERO)); } @AfterTemplate AbstractBigIntegerAssert&lt;?&gt; after(AbstractBigIntegerAssert&lt;?&gt; bigIntegerAssert) { return bigIntegerAssert.isEqualTo(0); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

AssertJBooleanRules Refaster recipes

tech.picnic.errorprone.refasterrules.AssertJBooleanRulesRecipes

Refaster template recipes for tech.picnic.errorprone.refasterrules.AssertJBooleanRules. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJBooleanRules.AbstractBooleanAssertIsEqualTo

tech.picnic.errorprone.refasterrules.AssertJBooleanRulesRecipes$AbstractBooleanAssertIsEqualToRecipe

Recipe created for the following Refaster template: java static final class AbstractBooleanAssertIsEqualTo { @BeforeTemplate AbstractBooleanAssert&lt;?&gt; before(AbstractBooleanAssert&lt;?&gt; boolAssert, boolean other) { return boolAssert.isNotEqualTo(!other); } @AfterTemplate AbstractBooleanAssert&lt;?&gt; after(AbstractBooleanAssert&lt;?&gt; boolAssert, boolean other) { return boolAssert.isEqualTo(other); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJBooleanRules.AbstractBooleanAssertIsFalse

tech.picnic.errorprone.refasterrules.AssertJBooleanRulesRecipes$AbstractBooleanAssertIsFalseRecipe

Recipe created for the following Refaster template: java static final class AbstractBooleanAssertIsFalse { @BeforeTemplate AbstractBooleanAssert&lt;?&gt; before(AbstractBooleanAssert&lt;?&gt; boolAssert) { return Refaster.anyOf(boolAssert.isEqualTo(false), boolAssert.isNotEqualTo(true)); } @AfterTemplate AbstractBooleanAssert&lt;?&gt; after(AbstractBooleanAssert&lt;?&gt; boolAssert) { return boolAssert.isFalse(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJBooleanRules.AbstractBooleanAssertIsNotEqualTo

tech.picnic.errorprone.refasterrules.AssertJBooleanRulesRecipes$AbstractBooleanAssertIsNotEqualToRecipe

Recipe created for the following Refaster template: java static final class AbstractBooleanAssertIsNotEqualTo { @BeforeTemplate AbstractBooleanAssert&lt;?&gt; before(AbstractBooleanAssert&lt;?&gt; boolAssert, boolean other) { return boolAssert.isEqualTo(!other); } @AfterTemplate AbstractBooleanAssert&lt;?&gt; after(AbstractBooleanAssert&lt;?&gt; boolAssert, boolean other) { return boolAssert.isNotEqualTo(other); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJBooleanRules.AbstractBooleanAssertIsTrue

tech.picnic.errorprone.refasterrules.AssertJBooleanRulesRecipes$AbstractBooleanAssertIsTrueRecipe

Recipe created for the following Refaster template: java static final class AbstractBooleanAssertIsTrue { @BeforeTemplate AbstractBooleanAssert&lt;?&gt; before(AbstractBooleanAssert&lt;?&gt; boolAssert) { return Refaster.anyOf(boolAssert.isEqualTo(true), boolAssert.isNotEqualTo(false)); } @AfterTemplate AbstractBooleanAssert&lt;?&gt; after(AbstractBooleanAssert&lt;?&gt; boolAssert) { return boolAssert.isTrue(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJBooleanRules.AssertThatBooleanIsFalse

tech.picnic.errorprone.refasterrules.AssertJBooleanRulesRecipes$AssertThatBooleanIsFalseRecipe

Recipe created for the following Refaster template: java static final class AssertThatBooleanIsFalse { @BeforeTemplate AbstractBooleanAssert&lt;?&gt; before(boolean b) { return assertThat(!b).isTrue(); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractBooleanAssert&lt;?&gt; after(boolean b) { return assertThat(b).isFalse(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJBooleanRules.AssertThatBooleanIsTrue

tech.picnic.errorprone.refasterrules.AssertJBooleanRulesRecipes$AssertThatBooleanIsTrueRecipe

Recipe created for the following Refaster template: java static final class AssertThatBooleanIsTrue { @BeforeTemplate AbstractBooleanAssert&lt;?&gt; before(boolean b) { return assertThat(!b).isFalse(); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractBooleanAssert&lt;?&gt; after(boolean b) { return assertThat(b).isTrue(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

AssertJByteRules Refaster recipes

tech.picnic.errorprone.refasterrules.AssertJByteRulesRecipes

Refaster template recipes for tech.picnic.errorprone.refasterrules.AssertJByteRules. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJByteRules.AbstractByteAssertIsEqualTo

tech.picnic.errorprone.refasterrules.AssertJByteRulesRecipes$AbstractByteAssertIsEqualToRecipe

Recipe created for the following Refaster template: java static final class AbstractByteAssertIsEqualTo { @BeforeTemplate AbstractByteAssert&lt;?&gt; before(AbstractByteAssert&lt;?&gt; byteAssert, byte n) { return Refaster.anyOf(byteAssert.isCloseTo(n, offset((byte)0)), byteAssert.isCloseTo(n, withPercentage(0))); } @AfterTemplate AbstractByteAssert&lt;?&gt; after(AbstractByteAssert&lt;?&gt; byteAssert, byte n) { return byteAssert.isEqualTo(n); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJByteRules.AbstractByteAssertIsNotEqualTo

tech.picnic.errorprone.refasterrules.AssertJByteRulesRecipes$AbstractByteAssertIsNotEqualToRecipe

Recipe created for the following Refaster template: java static final class AbstractByteAssertIsNotEqualTo { @BeforeTemplate AbstractByteAssert&lt;?&gt; before(AbstractByteAssert&lt;?&gt; byteAssert, byte n) { return Refaster.anyOf(byteAssert.isNotCloseTo(n, offset((byte)0)), byteAssert.isNotCloseTo(n, withPercentage(0))); } @AfterTemplate AbstractByteAssert&lt;?&gt; after(AbstractByteAssert&lt;?&gt; byteAssert, byte n) { return byteAssert.isNotEqualTo(n); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJByteRules.AbstractByteAssertIsNotZero

tech.picnic.errorprone.refasterrules.AssertJByteRulesRecipes$AbstractByteAssertIsNotZeroRecipe

Recipe created for the following Refaster template: java static final class AbstractByteAssertIsNotZero { @BeforeTemplate AbstractByteAssert&lt;?&gt; before(AbstractByteAssert&lt;?&gt; byteAssert) { return byteAssert.isNotZero(); } @AfterTemplate AbstractByteAssert&lt;?&gt; after(AbstractByteAssert&lt;?&gt; byteAssert) { return byteAssert.isNotEqualTo((byte)0); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJByteRules.AbstractByteAssertIsOne

tech.picnic.errorprone.refasterrules.AssertJByteRulesRecipes$AbstractByteAssertIsOneRecipe

Recipe created for the following Refaster template: java static final class AbstractByteAssertIsOne { @BeforeTemplate AbstractByteAssert&lt;?&gt; before(AbstractByteAssert&lt;?&gt; byteAssert) { return byteAssert.isOne(); } @AfterTemplate AbstractByteAssert&lt;?&gt; after(AbstractByteAssert&lt;?&gt; byteAssert) { return byteAssert.isEqualTo((byte)1); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJByteRules.AbstractByteAssertIsZero

tech.picnic.errorprone.refasterrules.AssertJByteRulesRecipes$AbstractByteAssertIsZeroRecipe

Recipe created for the following Refaster template: java static final class AbstractByteAssertIsZero { @BeforeTemplate AbstractByteAssert&lt;?&gt; before(AbstractByteAssert&lt;?&gt; byteAssert) { return byteAssert.isZero(); } @AfterTemplate AbstractByteAssert&lt;?&gt; after(AbstractByteAssert&lt;?&gt; byteAssert) { return byteAssert.isEqualTo((byte)0); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

AssertJCharSequenceRules Refaster recipes

tech.picnic.errorprone.refasterrules.AssertJCharSequenceRulesRecipes

Refaster template recipes for tech.picnic.errorprone.refasterrules.AssertJCharSequenceRules. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJCharSequenceRules.AssertThatCharSequenceHasSize

tech.picnic.errorprone.refasterrules.AssertJCharSequenceRulesRecipes$AssertThatCharSequenceHasSizeRecipe

Recipe created for the following Refaster template: java static final class AssertThatCharSequenceHasSize { @BeforeTemplate AbstractAssert&lt;?, ?&gt; before(CharSequence charSequence, int length) { return assertThat(charSequence.length()).isEqualTo(length); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractAssert&lt;?, ?&gt; after(CharSequence charSequence, int length) { return assertThat(charSequence).hasSize(length); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJCharSequenceRules.AssertThatCharSequenceIsEmpty

tech.picnic.errorprone.refasterrules.AssertJCharSequenceRulesRecipes$AssertThatCharSequenceIsEmptyRecipe

Recipe created for the following Refaster template: java 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(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJCharSequenceRules.AssertThatCharSequenceIsNotEmpty

tech.picnic.errorprone.refasterrules.AssertJCharSequenceRulesRecipes$AssertThatCharSequenceIsNotEmptyRecipe

Recipe created for the following Refaster template: java static final class AssertThatCharSequenceIsNotEmpty { @BeforeTemplate AbstractAssert&lt;?, ?&gt; 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&lt;?, ?&gt; after(CharSequence charSequence) { return assertThat(charSequence).isNotEmpty(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

AssertJComparableRules Refaster recipes

tech.picnic.errorprone.refasterrules.AssertJComparableRulesRecipes

Refaster template recipes for tech.picnic.errorprone.refasterrules.AssertJComparableRules. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJComparableRules.AssertThatIsEqualByComparingTo

tech.picnic.errorprone.refasterrules.AssertJComparableRulesRecipes$AssertThatIsEqualByComparingToRecipe

Recipe created for the following Refaster template: java static final class AssertThatIsEqualByComparingTo&lt;T extends Comparable&lt;? super T&gt;&gt; { @BeforeTemplate AbstractIntegerAssert&lt;?&gt; before(T actual, T expected) { return assertThat(actual.compareTo(expected)).isEqualTo(0); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractComparableAssert&lt;?, ?&gt; after(T actual, T expected) { return assertThat(actual).isEqualByComparingTo(expected); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJComparableRules.AssertThatIsGreaterThanOrEqualTo

tech.picnic.errorprone.refasterrules.AssertJComparableRulesRecipes$AssertThatIsGreaterThanOrEqualToRecipe

Recipe created for the following Refaster template: java static final class AssertThatIsGreaterThanOrEqualTo&lt;T extends Comparable&lt;? super T&gt;&gt; { @BeforeTemplate AbstractIntegerAssert&lt;?&gt; before(T actual, T expected) { return assertThat(actual.compareTo(expected)).isNotNegative(); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractComparableAssert&lt;?, ?&gt; after(T actual, T expected) { return assertThat(actual).isGreaterThanOrEqualTo(expected); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJComparableRules.AssertThatIsGreaterThan

tech.picnic.errorprone.refasterrules.AssertJComparableRulesRecipes$AssertThatIsGreaterThanRecipe

Recipe created for the following Refaster template: java static final class AssertThatIsGreaterThan&lt;T extends Comparable&lt;? super T&gt;&gt; { @BeforeTemplate AbstractIntegerAssert&lt;?&gt; before(T actual, T expected) { return assertThat(actual.compareTo(expected)).isPositive(); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractComparableAssert&lt;?, ?&gt; after(T actual, T expected) { return assertThat(actual).isGreaterThan(expected); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJComparableRules.AssertThatIsLessThanOrEqualTo

tech.picnic.errorprone.refasterrules.AssertJComparableRulesRecipes$AssertThatIsLessThanOrEqualToRecipe

Recipe created for the following Refaster template: java static final class AssertThatIsLessThanOrEqualTo&lt;T extends Comparable&lt;? super T&gt;&gt; { @BeforeTemplate AbstractIntegerAssert&lt;?&gt; before(T actual, T expected) { return assertThat(actual.compareTo(expected)).isNotPositive(); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractComparableAssert&lt;?, ?&gt; after(T actual, T expected) { return assertThat(actual).isLessThanOrEqualTo(expected); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJComparableRules.AssertThatIsLessThan

tech.picnic.errorprone.refasterrules.AssertJComparableRulesRecipes$AssertThatIsLessThanRecipe

Recipe created for the following Refaster template: java static final class AssertThatIsLessThan&lt;T extends Comparable&lt;? super T&gt;&gt; { @BeforeTemplate AbstractIntegerAssert&lt;?&gt; before(T actual, T expected) { return assertThat(actual.compareTo(expected)).isNegative(); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractComparableAssert&lt;?, ?&gt; after(T actual, T expected) { return assertThat(actual).isLessThan(expected); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJComparableRules.AssertThatIsNotEqualByComparingTo

tech.picnic.errorprone.refasterrules.AssertJComparableRulesRecipes$AssertThatIsNotEqualByComparingToRecipe

Recipe created for the following Refaster template: java static final class AssertThatIsNotEqualByComparingTo&lt;T extends Comparable&lt;? super T&gt;&gt; { @BeforeTemplate AbstractIntegerAssert&lt;?&gt; before(T actual, T expected) { return assertThat(actual.compareTo(expected)).isNotEqualTo(0); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractComparableAssert&lt;?, ?&gt; after(T actual, T expected) { return assertThat(actual).isNotEqualByComparingTo(expected); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

AssertJDoubleRules Refaster recipes

tech.picnic.errorprone.refasterrules.AssertJDoubleRulesRecipes

Refaster template recipes for tech.picnic.errorprone.refasterrules.AssertJDoubleRules. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJDoubleRules.AbstractDoubleAssertIsCloseToWithOffset

tech.picnic.errorprone.refasterrules.AssertJDoubleRulesRecipes$AbstractDoubleAssertIsCloseToWithOffsetRecipe

Recipe created for the following Refaster template: java static final class AbstractDoubleAssertIsCloseToWithOffset { @BeforeTemplate AbstractDoubleAssert&lt;?&gt; before(AbstractDoubleAssert&lt;?&gt; doubleAssert, double n, Offset&lt;Double&gt; offset) { return doubleAssert.isEqualTo(n, offset); } @BeforeTemplate AbstractDoubleAssert&lt;?&gt; before(AbstractDoubleAssert&lt;?&gt; doubleAssert, Double n, Offset&lt;Double&gt; offset) { return doubleAssert.isEqualTo(n, offset); } @AfterTemplate AbstractDoubleAssert&lt;?&gt; after(AbstractDoubleAssert&lt;?&gt; doubleAssert, double n, Offset&lt;Double&gt; offset) { return doubleAssert.isCloseTo(n, offset); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJDoubleRules.AbstractDoubleAssertIsEqualTo

tech.picnic.errorprone.refasterrules.AssertJDoubleRulesRecipes$AbstractDoubleAssertIsEqualToRecipe

Recipe created for the following Refaster template: java static final class AbstractDoubleAssertIsEqualTo { @BeforeTemplate AbstractDoubleAssert&lt;?&gt; before(AbstractDoubleAssert&lt;?&gt; doubleAssert, double n) { return Refaster.anyOf(doubleAssert.isCloseTo(n, offset(0.0)), doubleAssert.isCloseTo(n, withPercentage(0.0))); } @AfterTemplate AbstractDoubleAssert&lt;?&gt; after(AbstractDoubleAssert&lt;?&gt; doubleAssert, double n) { return doubleAssert.isEqualTo(n); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJDoubleRules.AbstractDoubleAssertIsNotEqualTo

tech.picnic.errorprone.refasterrules.AssertJDoubleRulesRecipes$AbstractDoubleAssertIsNotEqualToRecipe

Recipe created for the following Refaster template: java static final class AbstractDoubleAssertIsNotEqualTo { @BeforeTemplate AbstractDoubleAssert&lt;?&gt; before(AbstractDoubleAssert&lt;?&gt; doubleAssert, double n) { return Refaster.anyOf(doubleAssert.isNotCloseTo(n, offset(0.0)), doubleAssert.isNotCloseTo(n, withPercentage(0.0))); } @AfterTemplate AbstractDoubleAssert&lt;?&gt; after(AbstractDoubleAssert&lt;?&gt; doubleAssert, double n) { return doubleAssert.isNotEqualTo(n); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJDoubleRules.AbstractDoubleAssertIsNotZero

tech.picnic.errorprone.refasterrules.AssertJDoubleRulesRecipes$AbstractDoubleAssertIsNotZeroRecipe

Recipe created for the following Refaster template: java static final class AbstractDoubleAssertIsNotZero { @BeforeTemplate AbstractDoubleAssert&lt;?&gt; before(AbstractDoubleAssert&lt;?&gt; doubleAssert) { return doubleAssert.isNotZero(); } @AfterTemplate AbstractDoubleAssert&lt;?&gt; after(AbstractDoubleAssert&lt;?&gt; doubleAssert) { return doubleAssert.isNotEqualTo(0); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJDoubleRules.AbstractDoubleAssertIsOne

tech.picnic.errorprone.refasterrules.AssertJDoubleRulesRecipes$AbstractDoubleAssertIsOneRecipe

Recipe created for the following Refaster template: java static final class AbstractDoubleAssertIsOne { @BeforeTemplate AbstractDoubleAssert&lt;?&gt; before(AbstractDoubleAssert&lt;?&gt; doubleAssert) { return doubleAssert.isOne(); } @AfterTemplate AbstractDoubleAssert&lt;?&gt; after(AbstractDoubleAssert&lt;?&gt; doubleAssert) { return doubleAssert.isEqualTo(1); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJDoubleRules.AbstractDoubleAssertIsZero

tech.picnic.errorprone.refasterrules.AssertJDoubleRulesRecipes$AbstractDoubleAssertIsZeroRecipe

Recipe created for the following Refaster template: java static final class AbstractDoubleAssertIsZero { @BeforeTemplate AbstractDoubleAssert&lt;?&gt; before(AbstractDoubleAssert&lt;?&gt; doubleAssert) { return doubleAssert.isZero(); } @AfterTemplate AbstractDoubleAssert&lt;?&gt; after(AbstractDoubleAssert&lt;?&gt; doubleAssert) { return doubleAssert.isEqualTo(0); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

tech.picnic.errorprone.refasterrules.AssertJDurationRulesRecipes

These rules simplify and improve the readability of tests by using Duration-specific AssertJ assertion methods instead of generic assertions. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJDurationRules.AssertThatHasDays

tech.picnic.errorprone.refasterrules.AssertJDurationRulesRecipes$AssertThatHasDaysRecipe

Recipe created for the following Refaster template: java static final class AssertThatHasDays { @BeforeTemplate AbstractLongAssert&lt;?&gt; before(Duration duration, long days) { return assertThat(duration.toDays()).isEqualTo(days); } @AfterTemplate AbstractDurationAssert&lt;?&gt; after(Duration duration, long days) { return assertThat(duration).hasDays(days); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJDurationRules.AssertThatHasHours

tech.picnic.errorprone.refasterrules.AssertJDurationRulesRecipes$AssertThatHasHoursRecipe

Recipe created for the following Refaster template: java static final class AssertThatHasHours { @BeforeTemplate AbstractLongAssert&lt;?&gt; before(Duration duration, long hours) { return assertThat(duration.toHours()).isEqualTo(hours); } @AfterTemplate AbstractDurationAssert&lt;?&gt; after(Duration duration, long hours) { return assertThat(duration).hasHours(hours); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJDurationRules.AssertThatHasMillis

tech.picnic.errorprone.refasterrules.AssertJDurationRulesRecipes$AssertThatHasMillisRecipe

Recipe created for the following Refaster template: java static final class AssertThatHasMillis { @BeforeTemplate AbstractLongAssert&lt;?&gt; before(Duration duration, long millis) { return assertThat(duration.toMillis()).isEqualTo(millis); } @AfterTemplate AbstractDurationAssert&lt;?&gt; after(Duration duration, long millis) { return assertThat(duration).hasMillis(millis); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJDurationRules.AssertThatHasMinutes

tech.picnic.errorprone.refasterrules.AssertJDurationRulesRecipes$AssertThatHasMinutesRecipe

Recipe created for the following Refaster template: java static final class AssertThatHasMinutes { @BeforeTemplate AbstractLongAssert&lt;?&gt; before(Duration duration, long minutes) { return assertThat(duration.toMinutes()).isEqualTo(minutes); } @AfterTemplate AbstractDurationAssert&lt;?&gt; after(Duration duration, long minutes) { return assertThat(duration).hasMinutes(minutes); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJDurationRules.AssertThatHasNanos

tech.picnic.errorprone.refasterrules.AssertJDurationRulesRecipes$AssertThatHasNanosRecipe

Recipe created for the following Refaster template: java static final class AssertThatHasNanos { @BeforeTemplate AbstractLongAssert&lt;?&gt; before(Duration duration, long nanos) { return assertThat(duration.toNanos()).isEqualTo(nanos); } @AfterTemplate AbstractDurationAssert&lt;?&gt; after(Duration duration, long nanos) { return assertThat(duration).hasNanos(nanos); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJDurationRules.AssertThatHasSeconds

tech.picnic.errorprone.refasterrules.AssertJDurationRulesRecipes$AssertThatHasSecondsRecipe

Recipe created for the following Refaster template: java static final class AssertThatHasSeconds { @BeforeTemplate AbstractLongAssert&lt;?&gt; before(Duration duration, long seconds) { return assertThat(duration.toSeconds()).isEqualTo(seconds); } @AfterTemplate AbstractDurationAssert&lt;?&gt; after(Duration duration, long seconds) { return assertThat(duration).hasSeconds(seconds); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJDurationRules.AssertThatIsNegative

tech.picnic.errorprone.refasterrules.AssertJDurationRulesRecipes$AssertThatIsNegativeRecipe

Recipe created for the following Refaster template: java static final class AssertThatIsNegative { @BeforeTemplate AbstractBooleanAssert&lt;?&gt; before(Duration duration) { return assertThat(duration.isNegative()).isTrue(); } @BeforeTemplate AbstractDurationAssert&lt;?&gt; before2(Duration duration) { return assertThat(duration).isLessThan(Duration.ZERO); } @AfterTemplate AbstractDurationAssert&lt;?&gt; after(Duration duration) { return assertThat(duration).isNegative(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJDurationRules.AssertThatIsPositive

tech.picnic.errorprone.refasterrules.AssertJDurationRulesRecipes$AssertThatIsPositiveRecipe

Recipe created for the following Refaster template: java static final class AssertThatIsPositive { @BeforeTemplate AbstractBooleanAssert&lt;?&gt; before(Duration duration) { return assertThat(duration.isPositive()).isTrue(); } @BeforeTemplate AbstractDurationAssert&lt;?&gt; before2(Duration duration) { return assertThat(duration).isGreaterThan(Duration.ZERO); } @AfterTemplate AbstractDurationAssert&lt;?&gt; after(Duration duration) { return assertThat(duration).isPositive(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJDurationRules.AssertThatIsZero

tech.picnic.errorprone.refasterrules.AssertJDurationRulesRecipes$AssertThatIsZeroRecipe

Recipe created for the following Refaster template: java static final class AssertThatIsZero { @BeforeTemplate AbstractBooleanAssert&lt;?&gt; before(Duration duration) { return assertThat(duration.isZero()).isTrue(); } @BeforeTemplate AbstractDurationAssert&lt;?&gt; before2(Duration duration) { return assertThat(duration).isEqualTo(Duration.ZERO); } @AfterTemplate AbstractDurationAssert&lt;?&gt; after(Duration duration) { return assertThat(duration).isZero(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

AssertJEnumerableRules Refaster recipes

tech.picnic.errorprone.refasterrules.AssertJEnumerableRulesRecipes

Refaster template recipes for tech.picnic.errorprone.refasterrules.AssertJEnumerableRules. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJEnumerableRules.EnumerableAssertHasSameSizeAs

tech.picnic.errorprone.refasterrules.AssertJEnumerableRulesRecipes$EnumerableAssertHasSameSizeAsRecipe

Recipe created for the following Refaster template: java static final class EnumerableAssertHasSameSizeAs&lt;S, E&gt; { @BeforeTemplate EnumerableAssert&lt;?, S&gt; before(EnumerableAssert&lt;?, S&gt; enumAssert, Iterable&lt;E&gt; iterable) { return enumAssert.hasSize(Iterables.size(iterable)); } @BeforeTemplate EnumerableAssert&lt;?, S&gt; before(EnumerableAssert&lt;?, S&gt; enumAssert, Collection&lt;E&gt; iterable) { return enumAssert.hasSize(iterable.size()); } @BeforeTemplate EnumerableAssert&lt;?, S&gt; before(EnumerableAssert&lt;?, S&gt; enumAssert, E[] iterable) { return enumAssert.hasSize(iterable.length); } @BeforeTemplate EnumerableAssert&lt;?, S&gt; before(EnumerableAssert&lt;?, S&gt; enumAssert, CharSequence iterable) { return enumAssert.hasSize(iterable.length()); } @AfterTemplate EnumerableAssert&lt;?, S&gt; after(EnumerableAssert&lt;?, S&gt; enumAssert, Iterable&lt;E&gt; iterable) { return enumAssert.hasSameSizeAs(iterable); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJEnumerableRules.EnumerableAssertHasSizeBetween

tech.picnic.errorprone.refasterrules.AssertJEnumerableRulesRecipes$EnumerableAssertHasSizeBetweenRecipe

Recipe created for the following Refaster template: java static final class EnumerableAssertHasSizeBetween&lt;E&gt; { @BeforeTemplate AbstractIterableAssert&lt;?, ?, E, ?&gt; before(AbstractIterableAssert&lt;?, ?, E, ?&gt; enumAssert, int lower, int upper) { return enumAssert.size().isBetween(lower, upper).returnToIterable(); } @BeforeTemplate AbstractIterableSizeAssert&lt;?, ?, E, ?&gt; before2(AbstractIterableAssert&lt;?, ?, E, ?&gt; enumAssert, int lower, int upper) { return enumAssert.size().isBetween(lower, upper); } @AfterTemplate EnumerableAssert&lt;?, E&gt; after(EnumerableAssert&lt;?, E&gt; enumAssert, int lower, int upper) { return enumAssert.hasSizeBetween(lower, upper); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJEnumerableRules.EnumerableAssertHasSizeGreaterThanOrEqualTo

tech.picnic.errorprone.refasterrules.AssertJEnumerableRulesRecipes$EnumerableAssertHasSizeGreaterThanOrEqualToRecipe

Recipe created for the following Refaster template: java static final class EnumerableAssertHasSizeGreaterThanOrEqualTo&lt;E&gt; { @BeforeTemplate AbstractIterableAssert&lt;?, ?, E, ?&gt; before(AbstractIterableAssert&lt;?, ?, E, ?&gt; enumAssert, int size) { return enumAssert.size().isGreaterThanOrEqualTo(size).returnToIterable(); } @BeforeTemplate AbstractIterableSizeAssert&lt;?, ?, E, ?&gt; before2(AbstractIterableAssert&lt;?, ?, E, ?&gt; enumAssert, int size) { return enumAssert.size().isGreaterThanOrEqualTo(size); } @AfterTemplate EnumerableAssert&lt;?, E&gt; after(EnumerableAssert&lt;?, E&gt; enumAssert, int size) { return enumAssert.hasSizeGreaterThanOrEqualTo(size); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJEnumerableRules.EnumerableAssertHasSizeGreaterThan

tech.picnic.errorprone.refasterrules.AssertJEnumerableRulesRecipes$EnumerableAssertHasSizeGreaterThanRecipe

Recipe created for the following Refaster template: java static final class EnumerableAssertHasSizeGreaterThan&lt;E&gt; { @BeforeTemplate AbstractIterableAssert&lt;?, ?, E, ?&gt; before(AbstractIterableAssert&lt;?, ?, E, ?&gt; enumAssert, int size) { return enumAssert.size().isGreaterThan(size).returnToIterable(); } @BeforeTemplate AbstractIterableSizeAssert&lt;?, ?, E, ?&gt; before2(AbstractIterableAssert&lt;?, ?, E, ?&gt; enumAssert, int size) { return enumAssert.size().isGreaterThan(size); } @AfterTemplate EnumerableAssert&lt;?, E&gt; after(EnumerableAssert&lt;?, E&gt; enumAssert, int size) { return enumAssert.hasSizeGreaterThan(size); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJEnumerableRules.EnumerableAssertHasSizeLessThanOrEqualTo

tech.picnic.errorprone.refasterrules.AssertJEnumerableRulesRecipes$EnumerableAssertHasSizeLessThanOrEqualToRecipe

Recipe created for the following Refaster template: java static final class EnumerableAssertHasSizeLessThanOrEqualTo&lt;E&gt; { @BeforeTemplate AbstractIterableAssert&lt;?, ?, E, ?&gt; before(AbstractIterableAssert&lt;?, ?, E, ?&gt; enumAssert, int size) { return enumAssert.size().isLessThanOrEqualTo(size).returnToIterable(); } @BeforeTemplate AbstractIterableSizeAssert&lt;?, ?, E, ?&gt; before2(AbstractIterableAssert&lt;?, ?, E, ?&gt; enumAssert, int size) { return enumAssert.size().isLessThanOrEqualTo(size); } @AfterTemplate EnumerableAssert&lt;?, E&gt; after(EnumerableAssert&lt;?, E&gt; enumAssert, int size) { return enumAssert.hasSizeLessThanOrEqualTo(size); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJEnumerableRules.EnumerableAssertHasSizeLessThan

tech.picnic.errorprone.refasterrules.AssertJEnumerableRulesRecipes$EnumerableAssertHasSizeLessThanRecipe

Recipe created for the following Refaster template: java static final class EnumerableAssertHasSizeLessThan&lt;E&gt; { @BeforeTemplate AbstractIterableAssert&lt;?, ?, E, ?&gt; before(AbstractIterableAssert&lt;?, ?, E, ?&gt; enumAssert, int size) { return enumAssert.size().isLessThan(size).returnToIterable(); } @BeforeTemplate AbstractIterableSizeAssert&lt;?, ?, E, ?&gt; before2(AbstractIterableAssert&lt;?, ?, E, ?&gt; enumAssert, int size) { return enumAssert.size().isLessThan(size); } @AfterTemplate EnumerableAssert&lt;?, E&gt; after(EnumerableAssert&lt;?, E&gt; enumAssert, int size) { return enumAssert.hasSizeLessThan(size); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJEnumerableRules.EnumerableAssertHasSize

tech.picnic.errorprone.refasterrules.AssertJEnumerableRulesRecipes$EnumerableAssertHasSizeRecipe

Recipe created for the following Refaster template: java static final class EnumerableAssertHasSize&lt;E&gt; { @BeforeTemplate AbstractIterableAssert&lt;?, ?, E, ?&gt; before(AbstractIterableAssert&lt;?, ?, E, ?&gt; enumAssert, int size) { return enumAssert.size().isEqualTo(size).returnToIterable(); } @BeforeTemplate AbstractIterableSizeAssert&lt;?, ?, E, ?&gt; before2(AbstractIterableAssert&lt;?, ?, E, ?&gt; enumAssert, int size) { return enumAssert.size().isEqualTo(size); } @AfterTemplate EnumerableAssert&lt;?, E&gt; after(EnumerableAssert&lt;?, E&gt; enumAssert, int size) { return enumAssert.hasSize(size); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJEnumerableRules.EnumerableAssertIsNotEmpty

tech.picnic.errorprone.refasterrules.AssertJEnumerableRulesRecipes$EnumerableAssertIsNotEmptyRecipe

Recipe created for the following Refaster template: java static final class EnumerableAssertIsNotEmpty&lt;E&gt; { @BeforeTemplate EnumerableAssert&lt;?, E&gt; before(EnumerableAssert&lt;?, E&gt; enumAssert) { return Refaster.anyOf(enumAssert.hasSizeGreaterThan(0), enumAssert.hasSizeGreaterThanOrEqualTo(1)); } @BeforeTemplate AbstractIterableAssert&lt;?, ?, E, ?&gt; before(AbstractIterableAssert&lt;?, ?, E, ?&gt; enumAssert) { return Refaster.anyOf(enumAssert.size().isNotEqualTo(0).returnToIterable(), enumAssert.size().isPositive().returnToIterable()); } @BeforeTemplate AbstractIntegerAssert&lt;?&gt; before2(AbstractIterableAssert&lt;?, ?, E, ?&gt; enumAssert) { return Refaster.anyOf(enumAssert.size().isNotEqualTo(0), enumAssert.size().isPositive()); } @AfterTemplate EnumerableAssert&lt;?, E&gt; after(EnumerableAssert&lt;?, E&gt; enumAssert) { return enumAssert.isNotEmpty(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

tech.picnic.errorprone.refasterrules.AssertJFileRulesRecipes

These rules simplify and improve the readability of tests by using File-specific AssertJ assertion methods instead of generic assertions. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJFileRules.AssertThatDoesNotExist

tech.picnic.errorprone.refasterrules.AssertJFileRulesRecipes$AssertThatDoesNotExistRecipe

Recipe created for the following Refaster template: java static final class AssertThatDoesNotExist { @BeforeTemplate AbstractBooleanAssert&lt;?&gt; before(File actual) { return assertThat(actual.exists()).isFalse(); } @AfterTemplate AbstractFileAssert&lt;?&gt; after(File actual) { return assertThat(actual).doesNotExist(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJFileRules.AssertThatExists

tech.picnic.errorprone.refasterrules.AssertJFileRulesRecipes$AssertThatExistsRecipe

Recipe created for the following Refaster template: java static final class AssertThatExists { @BeforeTemplate AbstractBooleanAssert&lt;?&gt; before(File actual) { return assertThat(actual.exists()).isTrue(); } @AfterTemplate AbstractFileAssert&lt;?&gt; after(File actual) { return assertThat(actual).exists(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJFileRules.AssertThatHasFileName

tech.picnic.errorprone.refasterrules.AssertJFileRulesRecipes$AssertThatHasFileNameRecipe

Recipe created for the following Refaster template: java static final class AssertThatHasFileName { @BeforeTemplate AbstractStringAssert&lt;?&gt; before(File actual, String fileName) { return assertThat(actual.getName()).isEqualTo(fileName); } @AfterTemplate AbstractFileAssert&lt;?&gt; after(File actual, String fileName) { return assertThat(actual).hasFileName(fileName); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJFileRules.AssertThatHasNoParent

tech.picnic.errorprone.refasterrules.AssertJFileRulesRecipes$AssertThatHasNoParentRecipe

Recipe created for the following Refaster template: java static final class AssertThatHasNoParent { @BeforeTemplate void before(File actual) { assertThat(actual.getParent()).isNull(); } @AfterTemplate void after(File actual) { assertThat(actual).hasNoParent(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJFileRules.AssertThatHasParentFile

tech.picnic.errorprone.refasterrules.AssertJFileRulesRecipes$AssertThatHasParentFileRecipe

Recipe created for the following Refaster template: java static final class AssertThatHasParentFile { @BeforeTemplate AbstractFileAssert&lt;?&gt; before(File actual, File expected) { return assertThat(actual.getParentFile()).isEqualTo(expected); } @AfterTemplate AbstractFileAssert&lt;?&gt; after(File actual, File expected) { return assertThat(actual).hasParent(expected); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJFileRules.AssertThatHasParentString

tech.picnic.errorprone.refasterrules.AssertJFileRulesRecipes$AssertThatHasParentStringRecipe

Recipe created for the following Refaster template: java static final class AssertThatHasParentString { @BeforeTemplate AbstractFileAssert&lt;?&gt; before(File actual, String expected) { return assertThat(actual.getParentFile()).hasFileName(expected); } @AfterTemplate AbstractFileAssert&lt;?&gt; after(File actual, String expected) { return assertThat(actual).hasParent(expected); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJFileRules.AssertThatIsAbsolute

tech.picnic.errorprone.refasterrules.AssertJFileRulesRecipes$AssertThatIsAbsoluteRecipe

Recipe created for the following Refaster template: java static final class AssertThatIsAbsolute { @BeforeTemplate AbstractBooleanAssert&lt;?&gt; before(File actual) { return assertThat(actual.isAbsolute()).isTrue(); } @AfterTemplate AbstractFileAssert&lt;?&gt; after(File actual) { return assertThat(actual).isAbsolute(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJFileRules.AssertThatIsDirectory

tech.picnic.errorprone.refasterrules.AssertJFileRulesRecipes$AssertThatIsDirectoryRecipe

Recipe created for the following Refaster template: java static final class AssertThatIsDirectory { @BeforeTemplate AbstractBooleanAssert&lt;?&gt; before(File actual) { return assertThat(actual.isDirectory()).isTrue(); } @AfterTemplate AbstractFileAssert&lt;?&gt; after(File actual) { return assertThat(actual).isDirectory(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJFileRules.AssertThatIsExecutable

tech.picnic.errorprone.refasterrules.AssertJFileRulesRecipes$AssertThatIsExecutableRecipe

Recipe created for the following Refaster template: java static final class AssertThatIsExecutable { @BeforeTemplate AbstractBooleanAssert&lt;?&gt; before(File actual) { return assertThat(actual.canExecute()).isTrue(); } @AfterTemplate AbstractFileAssert&lt;?&gt; after(File actual) { return assertThat(actual).isExecutable(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJFileRules.AssertThatIsFile

tech.picnic.errorprone.refasterrules.AssertJFileRulesRecipes$AssertThatIsFileRecipe

Recipe created for the following Refaster template: java static final class AssertThatIsFile { @BeforeTemplate AbstractBooleanAssert&lt;?&gt; before(File actual) { return assertThat(actual.isFile()).isTrue(); } @AfterTemplate AbstractFileAssert&lt;?&gt; after(File actual) { return assertThat(actual).isFile(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJFileRules.AssertThatIsReadable

tech.picnic.errorprone.refasterrules.AssertJFileRulesRecipes$AssertThatIsReadableRecipe

Recipe created for the following Refaster template: java static final class AssertThatIsReadable { @BeforeTemplate AbstractBooleanAssert&lt;?&gt; before(File actual) { return assertThat(actual.canRead()).isTrue(); } @AfterTemplate AbstractFileAssert&lt;?&gt; after(File actual) { return assertThat(actual).isReadable(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJFileRules.AssertThatIsRelative

tech.picnic.errorprone.refasterrules.AssertJFileRulesRecipes$AssertThatIsRelativeRecipe

Recipe created for the following Refaster template: java static final class AssertThatIsRelative { @BeforeTemplate AbstractBooleanAssert&lt;?&gt; before(File actual) { return assertThat(actual.isAbsolute()).isFalse(); } @AfterTemplate AbstractFileAssert&lt;?&gt; after(File actual) { return assertThat(actual).isRelative(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJFileRules.AssertThatIsWritable

tech.picnic.errorprone.refasterrules.AssertJFileRulesRecipes$AssertThatIsWritableRecipe

Recipe created for the following Refaster template: java static final class AssertThatIsWritable { @BeforeTemplate AbstractBooleanAssert&lt;?&gt; before(File actual) { return assertThat(actual.canWrite()).isTrue(); } @AfterTemplate AbstractFileAssert&lt;?&gt; after(File actual) { return assertThat(actual).isWritable(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

AssertJFloatRules Refaster recipes

tech.picnic.errorprone.refasterrules.AssertJFloatRulesRecipes

Refaster template recipes for tech.picnic.errorprone.refasterrules.AssertJFloatRules. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJFloatRules.AbstractFloatAssertIsCloseToWithOffset

tech.picnic.errorprone.refasterrules.AssertJFloatRulesRecipes$AbstractFloatAssertIsCloseToWithOffsetRecipe

Recipe created for the following Refaster template: java static final class AbstractFloatAssertIsCloseToWithOffset { @BeforeTemplate AbstractFloatAssert&lt;?&gt; before(AbstractFloatAssert&lt;?&gt; floatAssert, float n, Offset&lt;Float&gt; offset) { return floatAssert.isEqualTo(n, offset); } @BeforeTemplate AbstractFloatAssert&lt;?&gt; before(AbstractFloatAssert&lt;?&gt; floatAssert, Float n, Offset&lt;Float&gt; offset) { return floatAssert.isEqualTo(n, offset); } @AfterTemplate AbstractFloatAssert&lt;?&gt; after(AbstractFloatAssert&lt;?&gt; floatAssert, float n, Offset&lt;Float&gt; offset) { return floatAssert.isCloseTo(n, offset); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJFloatRules.AbstractFloatAssertIsEqualTo

tech.picnic.errorprone.refasterrules.AssertJFloatRulesRecipes$AbstractFloatAssertIsEqualToRecipe

Recipe created for the following Refaster template: java static final class AbstractFloatAssertIsEqualTo { @BeforeTemplate AbstractFloatAssert&lt;?&gt; before(AbstractFloatAssert&lt;?&gt; floatAssert, float n) { return Refaster.anyOf(floatAssert.isCloseTo(n, offset(0.0F)), floatAssert.isCloseTo(n, withPercentage(0))); } @AfterTemplate AbstractFloatAssert&lt;?&gt; after(AbstractFloatAssert&lt;?&gt; floatAssert, float n) { return floatAssert.isEqualTo(n); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJFloatRules.AbstractFloatAssertIsNotEqualTo

tech.picnic.errorprone.refasterrules.AssertJFloatRulesRecipes$AbstractFloatAssertIsNotEqualToRecipe

Recipe created for the following Refaster template: java static final class AbstractFloatAssertIsNotEqualTo { @BeforeTemplate AbstractFloatAssert&lt;?&gt; before(AbstractFloatAssert&lt;?&gt; floatAssert, float n) { return Refaster.anyOf(floatAssert.isNotCloseTo(n, offset(0.0F)), floatAssert.isNotCloseTo(n, withPercentage(0))); } @AfterTemplate AbstractFloatAssert&lt;?&gt; after(AbstractFloatAssert&lt;?&gt; floatAssert, float n) { return floatAssert.isNotEqualTo(n); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJFloatRules.AbstractFloatAssertIsNotZero

tech.picnic.errorprone.refasterrules.AssertJFloatRulesRecipes$AbstractFloatAssertIsNotZeroRecipe

Recipe created for the following Refaster template: java static final class AbstractFloatAssertIsNotZero { @BeforeTemplate AbstractFloatAssert&lt;?&gt; before(AbstractFloatAssert&lt;?&gt; floatAssert) { return floatAssert.isNotZero(); } @AfterTemplate AbstractFloatAssert&lt;?&gt; after(AbstractFloatAssert&lt;?&gt; floatAssert) { return floatAssert.isNotEqualTo(0); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJFloatRules.AbstractFloatAssertIsOne

tech.picnic.errorprone.refasterrules.AssertJFloatRulesRecipes$AbstractFloatAssertIsOneRecipe

Recipe created for the following Refaster template: java static final class AbstractFloatAssertIsOne { @BeforeTemplate AbstractFloatAssert&lt;?&gt; before(AbstractFloatAssert&lt;?&gt; floatAssert) { return floatAssert.isOne(); } @AfterTemplate AbstractFloatAssert&lt;?&gt; after(AbstractFloatAssert&lt;?&gt; floatAssert) { return floatAssert.isEqualTo(1); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJFloatRules.AbstractFloatAssertIsZero

tech.picnic.errorprone.refasterrules.AssertJFloatRulesRecipes$AbstractFloatAssertIsZeroRecipe

Recipe created for the following Refaster template: java static final class AbstractFloatAssertIsZero { @BeforeTemplate AbstractFloatAssert&lt;?&gt; before(AbstractFloatAssert&lt;?&gt; floatAssert) { return floatAssert.isZero(); } @AfterTemplate AbstractFloatAssert&lt;?&gt; after(AbstractFloatAssert&lt;?&gt; floatAssert) { return floatAssert.isEqualTo(0); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

tech.picnic.errorprone.refasterrules.AssertJInstantRulesRecipes

These rules simplify and improve the readability of tests by using Instant-specific AssertJ assertion methods instead of generic assertions. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJInstantRules.AssertThatIsAfterOrEqualTo

tech.picnic.errorprone.refasterrules.AssertJInstantRulesRecipes$AssertThatIsAfterOrEqualToRecipe

Recipe created for the following Refaster template: java static final class AssertThatIsAfterOrEqualTo { @BeforeTemplate AbstractBooleanAssert&lt;?&gt; before(Instant actual, Instant other) { return assertThat(actual.isBefore(other)).isFalse(); } @AfterTemplate AbstractInstantAssert&lt;?&gt; after(Instant actual, Instant other) { return assertThat(actual).isAfterOrEqualTo(other); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJInstantRules.AssertThatIsAfter

tech.picnic.errorprone.refasterrules.AssertJInstantRulesRecipes$AssertThatIsAfterRecipe

Recipe created for the following Refaster template: java static final class AssertThatIsAfter { @BeforeTemplate AbstractBooleanAssert&lt;?&gt; before(Instant actual, Instant other) { return assertThat(actual.isAfter(other)).isTrue(); } @AfterTemplate AbstractInstantAssert&lt;?&gt; after(Instant actual, Instant other) { return assertThat(actual).isAfter(other); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJInstantRules.AssertThatIsBeforeOrEqualTo

tech.picnic.errorprone.refasterrules.AssertJInstantRulesRecipes$AssertThatIsBeforeOrEqualToRecipe

Recipe created for the following Refaster template: java static final class AssertThatIsBeforeOrEqualTo { @BeforeTemplate AbstractBooleanAssert&lt;?&gt; before(Instant actual, Instant other) { return assertThat(actual.isAfter(other)).isFalse(); } @AfterTemplate AbstractInstantAssert&lt;?&gt; after(Instant actual, Instant other) { return assertThat(actual).isBeforeOrEqualTo(other); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJInstantRules.AssertThatIsBefore

tech.picnic.errorprone.refasterrules.AssertJInstantRulesRecipes$AssertThatIsBeforeRecipe

Recipe created for the following Refaster template: java static final class AssertThatIsBefore { @BeforeTemplate AbstractBooleanAssert&lt;?&gt; before(Instant actual, Instant other) { return assertThat(actual.isBefore(other)).isTrue(); } @AfterTemplate AbstractInstantAssert&lt;?&gt; after(Instant actual, Instant other) { return assertThat(actual).isBefore(other); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJInstantRules.AssertThatIsBetween

tech.picnic.errorprone.refasterrules.AssertJInstantRulesRecipes$AssertThatIsBetweenRecipe

Recipe created for the following Refaster template: java static final class AssertThatIsBetween { @BeforeTemplate AbstractInstantAssert&lt;?&gt; before(Instant actual, Instant start, Instant end) { return Refaster.anyOf(assertThat(actual).isAfterOrEqualTo(start).isBeforeOrEqualTo(end), assertThat(actual).isBeforeOrEqualTo(end).isAfterOrEqualTo(start)); } @AfterTemplate AbstractInstantAssert&lt;?&gt; after(Instant actual, Instant start, Instant end) { return assertThat(actual).isBetween(start, end); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJInstantRules.AssertThatIsStrictlyBetween

tech.picnic.errorprone.refasterrules.AssertJInstantRulesRecipes$AssertThatIsStrictlyBetweenRecipe

Recipe created for the following Refaster template: java static final class AssertThatIsStrictlyBetween { @BeforeTemplate AbstractInstantAssert&lt;?&gt; before(Instant actual, Instant start, Instant end) { return Refaster.anyOf(assertThat(actual).isAfter(start).isBefore(end), assertThat(actual).isBefore(end).isAfter(start)); } @AfterTemplate AbstractInstantAssert&lt;?&gt; after(Instant actual, Instant start, Instant end) { return assertThat(actual).isStrictlyBetween(start, end); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

AssertJIntegerRules Refaster recipes

tech.picnic.errorprone.refasterrules.AssertJIntegerRulesRecipes

Refaster template recipes for tech.picnic.errorprone.refasterrules.AssertJIntegerRules. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJIntegerRules.AbstractIntegerAssertIsEqualTo

tech.picnic.errorprone.refasterrules.AssertJIntegerRulesRecipes$AbstractIntegerAssertIsEqualToRecipe

Recipe created for the following Refaster template: java static final class AbstractIntegerAssertIsEqualTo { @BeforeTemplate AbstractIntegerAssert&lt;?&gt; before(AbstractIntegerAssert&lt;?&gt; intAssert, int n) { return Refaster.anyOf(intAssert.isCloseTo(n, offset(0)), intAssert.isCloseTo(n, withPercentage(0))); } @AfterTemplate AbstractIntegerAssert&lt;?&gt; after(AbstractIntegerAssert&lt;?&gt; intAssert, int n) { return intAssert.isEqualTo(n); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJIntegerRules.AbstractIntegerAssertIsNotEqualTo

tech.picnic.errorprone.refasterrules.AssertJIntegerRulesRecipes$AbstractIntegerAssertIsNotEqualToRecipe

Recipe created for the following Refaster template: java static final class AbstractIntegerAssertIsNotEqualTo { @BeforeTemplate AbstractIntegerAssert&lt;?&gt; before(AbstractIntegerAssert&lt;?&gt; intAssert, int n) { return Refaster.anyOf(intAssert.isNotCloseTo(n, offset(0)), intAssert.isNotCloseTo(n, withPercentage(0))); } @AfterTemplate AbstractIntegerAssert&lt;?&gt; after(AbstractIntegerAssert&lt;?&gt; intAssert, int n) { return intAssert.isNotEqualTo(n); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJIntegerRules.AbstractIntegerAssertIsNotZero

tech.picnic.errorprone.refasterrules.AssertJIntegerRulesRecipes$AbstractIntegerAssertIsNotZeroRecipe

Recipe created for the following Refaster template: java static final class AbstractIntegerAssertIsNotZero { @BeforeTemplate AbstractIntegerAssert&lt;?&gt; before(AbstractIntegerAssert&lt;?&gt; intAssert) { return intAssert.isNotZero(); } @AfterTemplate AbstractIntegerAssert&lt;?&gt; after(AbstractIntegerAssert&lt;?&gt; intAssert) { return intAssert.isNotEqualTo(0); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJIntegerRules.AbstractIntegerAssertIsOne

tech.picnic.errorprone.refasterrules.AssertJIntegerRulesRecipes$AbstractIntegerAssertIsOneRecipe

Recipe created for the following Refaster template: java static final class AbstractIntegerAssertIsOne { @BeforeTemplate AbstractIntegerAssert&lt;?&gt; before(AbstractIntegerAssert&lt;?&gt; intAssert) { return intAssert.isOne(); } @AfterTemplate AbstractIntegerAssert&lt;?&gt; after(AbstractIntegerAssert&lt;?&gt; intAssert) { return intAssert.isEqualTo(1); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJIntegerRules.AbstractIntegerAssertIsZero

tech.picnic.errorprone.refasterrules.AssertJIntegerRulesRecipes$AbstractIntegerAssertIsZeroRecipe

Recipe created for the following Refaster template: java static final class AbstractIntegerAssertIsZero { @BeforeTemplate AbstractIntegerAssert&lt;?&gt; before(AbstractIntegerAssert&lt;?&gt; intAssert) { return intAssert.isZero(); } @AfterTemplate AbstractIntegerAssert&lt;?&gt; after(AbstractIntegerAssert&lt;?&gt; intAssert) { return intAssert.isEqualTo(0); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

AssertJIterableRules Refaster recipes

tech.picnic.errorprone.refasterrules.AssertJIterableRulesRecipes

Refaster template recipes for tech.picnic.errorprone.refasterrules.AssertJIterableRules. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJIterableRules.AssertThatIterableHasOneElementEqualTo

tech.picnic.errorprone.refasterrules.AssertJIterableRulesRecipes$AssertThatIterableHasOneElementEqualToRecipe

Recipe created for the following Refaster template: java static final class AssertThatIterableHasOneElementEqualTo&lt;S, E extends S&gt; { @BeforeTemplate ObjectAssert&lt;S&gt; before(Iterable&lt;S&gt; iterable, E element) { return assertThat(Iterables.getOnlyElement(iterable)).isEqualTo(element); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) IterableAssert&lt;S&gt; after(Iterable&lt;S&gt; iterable, E element) { return assertThat(iterable).containsExactly(element); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJIterableRules.AssertThatIterableIsEmpty

tech.picnic.errorprone.refasterrules.AssertJIterableRulesRecipes$AssertThatIterableIsEmptyRecipe

Recipe created for the following Refaster template: java static final class AssertThatIterableIsEmpty&lt;E&gt; { @BeforeTemplate void before(Iterable&lt;E&gt; iterable) { assertThat(iterable.iterator()).isExhausted(); } @BeforeTemplate void before(Collection&lt;E&gt; iterable) { assertThat(iterable.isEmpty()).isTrue(); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(Iterable&lt;E&gt; iterable) { assertThat(iterable).isEmpty(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJIterableRules.AssertThatIterableIsNotEmpty

tech.picnic.errorprone.refasterrules.AssertJIterableRulesRecipes$AssertThatIterableIsNotEmptyRecipe

Recipe created for the following Refaster template: java static final class AssertThatIterableIsNotEmpty&lt;E&gt; { @BeforeTemplate AbstractAssert&lt;?, ?&gt; before(Iterable&lt;E&gt; iterable) { return assertThat(iterable.iterator()).hasNext(); } @BeforeTemplate AbstractAssert&lt;?, ?&gt; before(Collection&lt;E&gt; iterable) { return assertThat(iterable.isEmpty()).isFalse(); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) IterableAssert&lt;E&gt; after(Iterable&lt;E&gt; iterable) { return assertThat(iterable).isNotEmpty(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJIterableRules.AssertThatIterableSize

tech.picnic.errorprone.refasterrules.AssertJIterableRulesRecipes$AssertThatIterableSizeRecipe

Recipe created for the following Refaster template: java static final class AssertThatIterableSize&lt;E&gt; { @BeforeTemplate AbstractIntegerAssert&lt;?&gt; before(Iterable&lt;E&gt; iterable) { return assertThat(Iterables.size(iterable)); } @BeforeTemplate AbstractIntegerAssert&lt;?&gt; before(Collection&lt;E&gt; iterable) { return assertThat(iterable.size()); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractIntegerAssert&lt;?&gt; after(Iterable&lt;E&gt; iterable) { return assertThat(iterable).size(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

AssertJIteratorRules Refaster recipes

tech.picnic.errorprone.refasterrules.AssertJIteratorRulesRecipes

Refaster template recipes for tech.picnic.errorprone.refasterrules.AssertJIteratorRules. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJIteratorRules.AssertThatHasNext

tech.picnic.errorprone.refasterrules.AssertJIteratorRulesRecipes$AssertThatHasNextRecipe

Recipe created for the following Refaster template: java static final class AssertThatHasNext&lt;T&gt; { @BeforeTemplate AbstractBooleanAssert&lt;?&gt; before(Iterator&lt;T&gt; iterator) { return assertThat(iterator.hasNext()).isTrue(); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) IteratorAssert&lt;T&gt; after(Iterator&lt;T&gt; iterator) { return assertThat(iterator).hasNext(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJIteratorRules.AssertThatIsExhausted

tech.picnic.errorprone.refasterrules.AssertJIteratorRulesRecipes$AssertThatIsExhaustedRecipe

Recipe created for the following Refaster template: java static final class AssertThatIsExhausted&lt;T&gt; { @BeforeTemplate AbstractBooleanAssert&lt;?&gt; before(Iterator&lt;T&gt; iterator) { return assertThat(iterator.hasNext()).isFalse(); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) IteratorAssert&lt;T&gt; after(Iterator&lt;T&gt; iterator) { return assertThat(iterator).isExhausted(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

AssertJLongRules Refaster recipes

tech.picnic.errorprone.refasterrules.AssertJLongRulesRecipes

Refaster template recipes for tech.picnic.errorprone.refasterrules.AssertJLongRules. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJLongRules.AbstractLongAssertIsEqualTo

tech.picnic.errorprone.refasterrules.AssertJLongRulesRecipes$AbstractLongAssertIsEqualToRecipe

Recipe created for the following Refaster template: java static final class AbstractLongAssertIsEqualTo { @BeforeTemplate AbstractLongAssert&lt;?&gt; before(AbstractLongAssert&lt;?&gt; longAssert, long n) { return Refaster.anyOf(longAssert.isCloseTo(n, offset(0L)), longAssert.isCloseTo(n, withPercentage(0))); } @AfterTemplate AbstractLongAssert&lt;?&gt; after(AbstractLongAssert&lt;?&gt; longAssert, long n) { return longAssert.isEqualTo(n); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJLongRules.AbstractLongAssertIsNotEqualTo

tech.picnic.errorprone.refasterrules.AssertJLongRulesRecipes$AbstractLongAssertIsNotEqualToRecipe

Recipe created for the following Refaster template: java static final class AbstractLongAssertIsNotEqualTo { @BeforeTemplate AbstractLongAssert&lt;?&gt; before(AbstractLongAssert&lt;?&gt; longAssert, long n) { return Refaster.anyOf(longAssert.isNotCloseTo(n, offset(0L)), longAssert.isNotCloseTo(n, withPercentage(0))); } @AfterTemplate AbstractLongAssert&lt;?&gt; after(AbstractLongAssert&lt;?&gt; longAssert, long n) { return longAssert.isNotEqualTo(n); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJLongRules.AbstractLongAssertIsNotZero

tech.picnic.errorprone.refasterrules.AssertJLongRulesRecipes$AbstractLongAssertIsNotZeroRecipe

Recipe created for the following Refaster template: java static final class AbstractLongAssertIsNotZero { @BeforeTemplate AbstractLongAssert&lt;?&gt; before(AbstractLongAssert&lt;?&gt; longAssert) { return longAssert.isNotZero(); } @AfterTemplate AbstractLongAssert&lt;?&gt; after(AbstractLongAssert&lt;?&gt; longAssert) { return longAssert.isNotEqualTo(0); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJLongRules.AbstractLongAssertIsOne

tech.picnic.errorprone.refasterrules.AssertJLongRulesRecipes$AbstractLongAssertIsOneRecipe

Recipe created for the following Refaster template: java static final class AbstractLongAssertIsOne { @BeforeTemplate AbstractLongAssert&lt;?&gt; before(AbstractLongAssert&lt;?&gt; longAssert) { return longAssert.isOne(); } @AfterTemplate AbstractLongAssert&lt;?&gt; after(AbstractLongAssert&lt;?&gt; longAssert) { return longAssert.isEqualTo(1); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJLongRules.AbstractLongAssertIsZero

tech.picnic.errorprone.refasterrules.AssertJLongRulesRecipes$AbstractLongAssertIsZeroRecipe

Recipe created for the following Refaster template: java static final class AbstractLongAssertIsZero { @BeforeTemplate AbstractLongAssert&lt;?&gt; before(AbstractLongAssert&lt;?&gt; longAssert) { return longAssert.isZero(); } @AfterTemplate AbstractLongAssert&lt;?&gt; after(AbstractLongAssert&lt;?&gt; longAssert) { return longAssert.isEqualTo(0); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

AssertJMapRules Refaster recipes

tech.picnic.errorprone.refasterrules.AssertJMapRulesRecipes

Refaster template recipes for tech.picnic.errorprone.refasterrules.AssertJMapRules. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJMapRules.AbstractMapAssertContainsExactlyEntriesOf

tech.picnic.errorprone.refasterrules.AssertJMapRulesRecipes$AbstractMapAssertContainsExactlyEntriesOfRecipe

Recipe created for the following Refaster template: java static final class AbstractMapAssertContainsExactlyEntriesOf&lt;K, V&gt; { @BeforeTemplate AbstractMapAssert&lt;?, ?, K, V&gt; before(AbstractMapAssert&lt;?, ?, K, V&gt; mapAssert, K key, V value) { return mapAssert.containsExactlyInAnyOrderEntriesOf(ImmutableMap.of(key, value)); } @AfterTemplate AbstractMapAssert&lt;?, ?, K, V&gt; after(AbstractMapAssert&lt;?, ?, K, V&gt; mapAssert, K key, V value) { return mapAssert.containsExactlyEntriesOf(ImmutableMap.of(key, value)); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJMapRules.AbstractMapAssertContainsExactlyInAnyOrderEntriesOf

tech.picnic.errorprone.refasterrules.AssertJMapRulesRecipes$AbstractMapAssertContainsExactlyInAnyOrderEntriesOfRecipe

Recipe created for the following Refaster template: java static final class AbstractMapAssertContainsExactlyInAnyOrderEntriesOf&lt;K, V&gt; { @BeforeTemplate AbstractMapAssert&lt;?, ?, K, V&gt; before(AbstractMapAssert&lt;?, ?, K, V&gt; mapAssert, Map&lt;? extends K, ? extends V&gt; map) { return mapAssert.isEqualTo(map); } @AfterTemplate AbstractMapAssert&lt;?, ?, K, V&gt; after(AbstractMapAssert&lt;?, ?, K, V&gt; mapAssert, Map&lt;? extends K, ? extends V&gt; map) { return mapAssert.containsExactlyInAnyOrderEntriesOf(map); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJMapRules.AbstractMapAssertHasSameSizeAs

tech.picnic.errorprone.refasterrules.AssertJMapRulesRecipes$AbstractMapAssertHasSameSizeAsRecipe

Recipe created for the following Refaster template: java static final class AbstractMapAssertHasSameSizeAs&lt;K, V&gt; { @BeforeTemplate AbstractMapAssert&lt;?, ?, K, V&gt; before(AbstractMapAssert&lt;?, ?, K, V&gt; mapAssert, Map&lt;?, ?&gt; map) { return mapAssert.hasSize(map.size()); } @AfterTemplate AbstractMapAssert&lt;?, ?, K, V&gt; after(AbstractMapAssert&lt;?, ?, K, V&gt; mapAssert, Map&lt;?, ?&gt; map) { return mapAssert.hasSameSizeAs(map); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJMapRules.AssertThatMapContainsKey

tech.picnic.errorprone.refasterrules.AssertJMapRulesRecipes$AssertThatMapContainsKeyRecipe

Recipe created for the following Refaster template: java static final class AssertThatMapContainsKey&lt;K, V&gt; { @BeforeTemplate AbstractAssert&lt;?, ?&gt; before(Map&lt;K, V&gt; map, K key) { return Refaster.anyOf(assertThat(map.containsKey(key)).isTrue(), assertThat(map.keySet()).contains(key)); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) MapAssert&lt;K, V&gt; after(Map&lt;K, V&gt; map, K key) { return assertThat(map).containsKey(key); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJMapRules.AssertThatMapContainsOnlyKey

tech.picnic.errorprone.refasterrules.AssertJMapRulesRecipes$AssertThatMapContainsOnlyKeyRecipe

Recipe created for the following Refaster template: java static final class AssertThatMapContainsOnlyKey&lt;K, V&gt; { @BeforeTemplate AbstractCollectionAssert&lt;?, Collection&lt;? extends K&gt;, K, ?&gt; before(Map&lt;K, V&gt; map, K key) { return assertThat(map.keySet()).containsExactly(key); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) MapAssert&lt;K, V&gt; after(Map&lt;K, V&gt; map, K key) { return assertThat(map).containsOnlyKeys(key); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJMapRules.AssertThatMapContainsOnlyKeys

tech.picnic.errorprone.refasterrules.AssertJMapRulesRecipes$AssertThatMapContainsOnlyKeysRecipe

Recipe created for the following Refaster template: java static final class AssertThatMapContainsOnlyKeys&lt;K, V&gt; { @BeforeTemplate AbstractCollectionAssert&lt;?, Collection&lt;? extends K&gt;, K, ?&gt; before(Map&lt;K, V&gt; map, Iterable&lt;? extends K&gt; keys) { return assertThat(map.keySet()).hasSameElementsAs(keys); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) MapAssert&lt;K, V&gt; after(Map&lt;K, V&gt; map, Iterable&lt;? extends K&gt; keys) { return assertThat(map).containsOnlyKeys(keys); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJMapRules.AssertThatMapContainsValue

tech.picnic.errorprone.refasterrules.AssertJMapRulesRecipes$AssertThatMapContainsValueRecipe

Recipe created for the following Refaster template: java static final class AssertThatMapContainsValue&lt;K, V&gt; { @BeforeTemplate AbstractAssert&lt;? extends AbstractAssert&lt;?, ?&gt;, ? extends Object&gt; before(Map&lt;K, V&gt; map, V value) { return Refaster.anyOf(assertThat(map.containsValue(value)).isTrue(), assertThat(map.values()).contains(value)); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) MapAssert&lt;K, V&gt; after(Map&lt;K, V&gt; map, V value) { return assertThat(map).containsValue(value); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJMapRules.AssertThatMapDoesNotContainKey

tech.picnic.errorprone.refasterrules.AssertJMapRulesRecipes$AssertThatMapDoesNotContainKeyRecipe

Recipe created for the following Refaster template: java static final class AssertThatMapDoesNotContainKey&lt;K, V&gt; { @BeforeTemplate AbstractAssert&lt;?, ?&gt; before(Map&lt;K, V&gt; map, K key) { return Refaster.anyOf(assertThat(map.containsKey(key)).isFalse(), assertThat(map.keySet()).doesNotContain(key)); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) MapAssert&lt;K, V&gt; after(Map&lt;K, V&gt; map, K key) { return assertThat(map).doesNotContainKey(key); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJMapRules.AssertThatMapDoesNotContainValue

tech.picnic.errorprone.refasterrules.AssertJMapRulesRecipes$AssertThatMapDoesNotContainValueRecipe

Recipe created for the following Refaster template: java static final class AssertThatMapDoesNotContainValue&lt;K, V&gt; { @BeforeTemplate AbstractAssert&lt;?, ?&gt; before(Map&lt;K, V&gt; map, V value) { return Refaster.anyOf(assertThat(map.containsValue(value)).isFalse(), assertThat(map.values()).doesNotContain(value)); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) MapAssert&lt;K, V&gt; after(Map&lt;K, V&gt; map, V value) { return assertThat(map).doesNotContainValue(value); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJMapRules.AssertThatMapIsEmpty

tech.picnic.errorprone.refasterrules.AssertJMapRulesRecipes$AssertThatMapIsEmptyRecipe

Recipe created for the following Refaster template: java static final class AssertThatMapIsEmpty&lt;K, V&gt; { @BeforeTemplate void before(Map&lt;K, V&gt; map) { Refaster.anyOf(assertThat(map).hasSize(0), assertThat(map.isEmpty()).isTrue(), assertThat(map.size()).isEqualTo(0L), assertThat(map.size()).isNotPositive()); } @BeforeTemplate void before2(Map&lt;K, V&gt; map) { assertThat(Refaster.anyOf(map.keySet(), map.values(), map.entrySet())).isEmpty(); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(Map&lt;K, V&gt; map) { assertThat(map).isEmpty(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

AssertJNumberRules Refaster recipes

tech.picnic.errorprone.refasterrules.AssertJNumberRulesRecipes

Refaster template recipes for tech.picnic.errorprone.refasterrules.AssertJNumberRules. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJNumberRules.NumberAssertIsNegative

tech.picnic.errorprone.refasterrules.AssertJNumberRulesRecipes$NumberAssertIsNegativeRecipe

Recipe created for the following Refaster template: java static final class NumberAssertIsNegative { @BeforeTemplate AbstractByteAssert&lt;?&gt; before(AbstractByteAssert&lt;?&gt; numberAssert) { return Refaster.anyOf(numberAssert.isLessThan((byte)0), numberAssert.isLessThanOrEqualTo((byte)-1)); } @BeforeTemplate AbstractShortAssert&lt;?&gt; before(AbstractShortAssert&lt;?&gt; numberAssert) { return Refaster.anyOf(numberAssert.isLessThan((short)0), numberAssert.isLessThanOrEqualTo((short)-1)); } @BeforeTemplate AbstractIntegerAssert&lt;?&gt; before(AbstractIntegerAssert&lt;?&gt; numberAssert) { return Refaster.anyOf(numberAssert.isLessThan(0), numberAssert.isLessThanOrEqualTo(-1)); } @BeforeTemplate AbstractLongAssert&lt;?&gt; before(AbstractLongAssert&lt;?&gt; numberAssert) { return Refaster.anyOf(numberAssert.isLessThan(0), numberAssert.isLessThanOrEqualTo(-1)); } @BeforeTemplate AbstractFloatAssert&lt;?&gt; before(AbstractFloatAssert&lt;?&gt; numberAssert) { return numberAssert.isLessThan(0); } @BeforeTemplate AbstractDoubleAssert&lt;?&gt; before(AbstractDoubleAssert&lt;?&gt; numberAssert) { return numberAssert.isLessThan(0); } @BeforeTemplate AbstractBigIntegerAssert&lt;?&gt; before(AbstractBigIntegerAssert&lt;?&gt; numberAssert) { return Refaster.anyOf(numberAssert.isLessThan(BigInteger.ZERO), numberAssert.isLessThanOrEqualTo(BigInteger.valueOf(-1))); } @BeforeTemplate AbstractBigDecimalAssert&lt;?&gt; before(AbstractBigDecimalAssert&lt;?&gt; numberAssert) { return numberAssert.isLessThan(BigDecimal.ZERO); } @AfterTemplate NumberAssert&lt;?, ?&gt; after(NumberAssert&lt;?, ?&gt; numberAssert) { return numberAssert.isNegative(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJNumberRules.NumberAssertIsNotNegative

tech.picnic.errorprone.refasterrules.AssertJNumberRulesRecipes$NumberAssertIsNotNegativeRecipe

Recipe created for the following Refaster template: java static final class NumberAssertIsNotNegative { @BeforeTemplate AbstractByteAssert&lt;?&gt; before(AbstractByteAssert&lt;?&gt; numberAssert) { return Refaster.anyOf(numberAssert.isGreaterThanOrEqualTo((byte)0), numberAssert.isGreaterThan((byte)-1)); } @BeforeTemplate AbstractShortAssert&lt;?&gt; before(AbstractShortAssert&lt;?&gt; numberAssert) { return Refaster.anyOf(numberAssert.isGreaterThanOrEqualTo((short)0), numberAssert.isGreaterThan((short)-1)); } @BeforeTemplate AbstractIntegerAssert&lt;?&gt; before(AbstractIntegerAssert&lt;?&gt; numberAssert) { return Refaster.anyOf(numberAssert.isGreaterThanOrEqualTo(0), numberAssert.isGreaterThan(-1)); } @BeforeTemplate AbstractLongAssert&lt;?&gt; before(AbstractLongAssert&lt;?&gt; numberAssert) { return Refaster.anyOf(numberAssert.isGreaterThanOrEqualTo(0), numberAssert.isGreaterThan(-1)); } @BeforeTemplate AbstractFloatAssert&lt;?&gt; before(AbstractFloatAssert&lt;?&gt; numberAssert) { return numberAssert.isGreaterThanOrEqualTo(0); } @BeforeTemplate AbstractDoubleAssert&lt;?&gt; before(AbstractDoubleAssert&lt;?&gt; numberAssert) { return numberAssert.isGreaterThanOrEqualTo(0); } @BeforeTemplate AbstractBigIntegerAssert&lt;?&gt; before(AbstractBigIntegerAssert&lt;?&gt; numberAssert) { return Refaster.anyOf(numberAssert.isGreaterThanOrEqualTo(BigInteger.ZERO), numberAssert.isGreaterThan(BigInteger.valueOf(-1))); } @BeforeTemplate AbstractBigDecimalAssert&lt;?&gt; before(AbstractBigDecimalAssert&lt;?&gt; numberAssert) { return numberAssert.isGreaterThanOrEqualTo(BigDecimal.ZERO); } @AfterTemplate NumberAssert&lt;?, ?&gt; after(NumberAssert&lt;?, ?&gt; numberAssert) { return numberAssert.isNotNegative(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJNumberRules.NumberAssertIsNotPositive

tech.picnic.errorprone.refasterrules.AssertJNumberRulesRecipes$NumberAssertIsNotPositiveRecipe

Recipe created for the following Refaster template: java static final class NumberAssertIsNotPositive { @BeforeTemplate AbstractByteAssert&lt;?&gt; before(AbstractByteAssert&lt;?&gt; numberAssert) { return Refaster.anyOf(numberAssert.isLessThanOrEqualTo((byte)0), numberAssert.isLessThan((byte)1)); } @BeforeTemplate AbstractShortAssert&lt;?&gt; before(AbstractShortAssert&lt;?&gt; numberAssert) { return Refaster.anyOf(numberAssert.isLessThanOrEqualTo((short)0), numberAssert.isLessThan((short)1)); } @BeforeTemplate AbstractIntegerAssert&lt;?&gt; before(AbstractIntegerAssert&lt;?&gt; numberAssert) { return Refaster.anyOf(numberAssert.isLessThanOrEqualTo(0), numberAssert.isLessThan(1)); } @BeforeTemplate AbstractLongAssert&lt;?&gt; before(AbstractLongAssert&lt;?&gt; numberAssert) { return Refaster.anyOf(numberAssert.isLessThanOrEqualTo(0), numberAssert.isLessThan(1)); } @BeforeTemplate AbstractFloatAssert&lt;?&gt; before(AbstractFloatAssert&lt;?&gt; numberAssert) { return numberAssert.isLessThanOrEqualTo(0); } @BeforeTemplate AbstractDoubleAssert&lt;?&gt; before(AbstractDoubleAssert&lt;?&gt; numberAssert) { return numberAssert.isLessThanOrEqualTo(0); } @BeforeTemplate AbstractBigIntegerAssert&lt;?&gt; before(AbstractBigIntegerAssert&lt;?&gt; numberAssert) { return Refaster.anyOf(numberAssert.isLessThanOrEqualTo(BigInteger.ZERO), numberAssert.isLessThan(BigInteger.valueOf(1))); } @BeforeTemplate AbstractBigDecimalAssert&lt;?&gt; before(AbstractBigDecimalAssert&lt;?&gt; numberAssert) { return numberAssert.isLessThanOrEqualTo(BigDecimal.ZERO); } @AfterTemplate NumberAssert&lt;?, ?&gt; after(NumberAssert&lt;?, ?&gt; numberAssert) { return numberAssert.isNotPositive(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJNumberRules.NumberAssertIsPositive

tech.picnic.errorprone.refasterrules.AssertJNumberRulesRecipes$NumberAssertIsPositiveRecipe

Recipe created for the following Refaster template: java static final class NumberAssertIsPositive { @BeforeTemplate AbstractByteAssert&lt;?&gt; before(AbstractByteAssert&lt;?&gt; numberAssert) { return Refaster.anyOf(numberAssert.isGreaterThan((byte)0), numberAssert.isGreaterThanOrEqualTo((byte)1)); } @BeforeTemplate AbstractShortAssert&lt;?&gt; before(AbstractShortAssert&lt;?&gt; numberAssert) { return Refaster.anyOf(numberAssert.isGreaterThan((short)0), numberAssert.isGreaterThanOrEqualTo((short)1)); } @BeforeTemplate AbstractIntegerAssert&lt;?&gt; before(AbstractIntegerAssert&lt;?&gt; numberAssert) { return Refaster.anyOf(numberAssert.isGreaterThan(0), numberAssert.isGreaterThanOrEqualTo(1)); } @BeforeTemplate AbstractLongAssert&lt;?&gt; before(AbstractLongAssert&lt;?&gt; numberAssert) { return Refaster.anyOf(numberAssert.isGreaterThan(0), numberAssert.isGreaterThanOrEqualTo(1)); } @BeforeTemplate AbstractFloatAssert&lt;?&gt; before(AbstractFloatAssert&lt;?&gt; numberAssert) { return numberAssert.isGreaterThan(0); } @BeforeTemplate AbstractDoubleAssert&lt;?&gt; before(AbstractDoubleAssert&lt;?&gt; numberAssert) { return numberAssert.isGreaterThan(0); } @BeforeTemplate AbstractBigIntegerAssert&lt;?&gt; before(AbstractBigIntegerAssert&lt;?&gt; numberAssert) { return Refaster.anyOf(numberAssert.isGreaterThan(BigInteger.ZERO), numberAssert.isGreaterThanOrEqualTo(BigInteger.valueOf(1))); } @BeforeTemplate AbstractBigDecimalAssert&lt;?&gt; before(AbstractBigDecimalAssert&lt;?&gt; numberAssert) { return numberAssert.isGreaterThan(BigDecimal.ZERO); } @AfterTemplate NumberAssert&lt;?, ?&gt; after(NumberAssert&lt;?, ?&gt; numberAssert) { return numberAssert.isPositive(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

AssertJObjectRules Refaster recipes

tech.picnic.errorprone.refasterrules.AssertJObjectRulesRecipes

Refaster template recipes for tech.picnic.errorprone.refasterrules.AssertJObjectRules. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJObjectRules.AssertThatHasSameHashCodeAs

tech.picnic.errorprone.refasterrules.AssertJObjectRulesRecipes$AssertThatHasSameHashCodeAsRecipe

Recipe created for the following Refaster template: java static final class AssertThatHasSameHashCodeAs&lt;T&gt; { @BeforeTemplate AbstractIntegerAssert&lt;?&gt; before(T object1, T object2) { return assertThat(object1.hashCode()).isEqualTo(object2.hashCode()); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) ObjectAssert&lt;T&gt; after(T object1, T object2) { return assertThat(object1).hasSameHashCodeAs(object2); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJObjectRules.AssertThatHasToString

tech.picnic.errorprone.refasterrules.AssertJObjectRulesRecipes$AssertThatHasToStringRecipe

Recipe created for the following Refaster template: java static final class AssertThatHasToString&lt;T&gt; { @BeforeTemplate AbstractStringAssert&lt;?&gt; before(T object, String str) { return assertThat(object.toString()).isEqualTo(str); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) ObjectAssert&lt;T&gt; after(T object, String str) { return assertThat(object).hasToString(str); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJObjectRules.AssertThatIsInstanceOf2

tech.picnic.errorprone.refasterrules.AssertJObjectRulesRecipes$AssertThatIsInstanceOf2Recipe

Recipe created for the following Refaster template: java static final class AssertThatIsInstanceOf2&lt;S, T&gt; { @BeforeTemplate AbstractBooleanAssert&lt;?&gt; before(T object, Class&lt;S&gt; clazz) { return assertThat(clazz.isInstance(object)).isTrue(); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) ObjectAssert&lt;T&gt; after(T object, Class&lt;S&gt; clazz) { return assertThat(object).isInstanceOf(clazz); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJObjectRules.AssertThatIsIsEqualTo

tech.picnic.errorprone.refasterrules.AssertJObjectRulesRecipes$AssertThatIsIsEqualToRecipe

Recipe created for the following Refaster template: java static final class AssertThatIsIsEqualTo&lt;S, T&gt; { @BeforeTemplate AbstractBooleanAssert&lt;?&gt; before(S object1, T object2) { return assertThat(object1.equals(object2)).isTrue(); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) ObjectAssert&lt;S&gt; after(S object1, T object2) { return assertThat(object1).isEqualTo(object2); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJObjectRules.AssertThatIsIsNotEqualTo

tech.picnic.errorprone.refasterrules.AssertJObjectRulesRecipes$AssertThatIsIsNotEqualToRecipe

Recipe created for the following Refaster template: java static final class AssertThatIsIsNotEqualTo&lt;S, T&gt; { @BeforeTemplate AbstractBooleanAssert&lt;?&gt; before(S object1, T object2) { return assertThat(object1.equals(object2)).isFalse(); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) ObjectAssert&lt;S&gt; after(S object1, T object2) { return assertThat(object1).isNotEqualTo(object2); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJObjectRules.AssertThatIsNotNull

tech.picnic.errorprone.refasterrules.AssertJObjectRulesRecipes$AssertThatIsNotNullRecipe

Recipe created for the following Refaster template: java static final class AssertThatIsNotNull&lt;T&gt; { @BeforeTemplate @SuppressWarnings(value = &quot;AssertThatIsNotSameAs&quot;) AbstractBooleanAssert&lt;? extends AbstractBooleanAssert&lt;?&gt;&gt; before(T object) { return Refaster.anyOf(assertThat(object == null).isFalse(), assertThat(object != null).isTrue()); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) ObjectAssert&lt;T&gt; after(T object) { return assertThat(object).isNotNull(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJObjectRules.AssertThatIsNotSameAs

tech.picnic.errorprone.refasterrules.AssertJObjectRulesRecipes$AssertThatIsNotSameAsRecipe

Recipe created for the following Refaster template: java static final class AssertThatIsNotSameAs&lt;T&gt; { @BeforeTemplate AbstractBooleanAssert&lt;?&gt; before(T object1, T object2) { return Refaster.anyOf(assertThat(object1 == object2).isFalse(), assertThat(object1 != object2).isTrue()); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) ObjectAssert&lt;T&gt; after(T object1, T object2) { return assertThat(object1).isNotSameAs(object2); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJObjectRules.AssertThatIsNull

tech.picnic.errorprone.refasterrules.AssertJObjectRulesRecipes$AssertThatIsNullRecipe

Recipe created for the following Refaster template: java static final class AssertThatIsNull&lt;T&gt; { @BeforeTemplate @SuppressWarnings(value = &quot;AssertThatIsSameAs&quot;) void before(T object) { assertThat(object == null).isTrue(); } @BeforeTemplate @SuppressWarnings(value = &quot;AssertThatIsSameAs&quot;) void before2(T object) { assertThat(object != null).isFalse(); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(T object) { assertThat(object).isNull(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJObjectRules.AssertThatIsSameAs

tech.picnic.errorprone.refasterrules.AssertJObjectRulesRecipes$AssertThatIsSameAsRecipe

Recipe created for the following Refaster template: java static final class AssertThatIsSameAs&lt;T&gt; { @BeforeTemplate AbstractBooleanAssert&lt;?&gt; before(T object1, T object2) { return Refaster.anyOf(assertThat(object1 == object2).isTrue(), assertThat(object1 != object2).isFalse()); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) ObjectAssert&lt;T&gt; after(T object1, T object2) { return assertThat(object1).isSameAs(object2); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

AssertJOptionalRules Refaster recipes

tech.picnic.errorprone.refasterrules.AssertJOptionalRulesRecipes

Refaster template recipes for tech.picnic.errorprone.refasterrules.AssertJOptionalRules. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJOptionalRules.AbstractOptionalAssertContainsSame

tech.picnic.errorprone.refasterrules.AssertJOptionalRulesRecipes$AbstractOptionalAssertContainsSameRecipe

Recipe created for the following Refaster template: java static final class AbstractOptionalAssertContainsSame&lt;T&gt; { @BeforeTemplate AbstractAssert&lt;?, ?&gt; before(AbstractOptionalAssert&lt;?, T&gt; optionalAssert, T value) { return Refaster.anyOf(optionalAssert.get().isSameAs(value), optionalAssert.isPresent().isSameAs(value)); } @AfterTemplate AbstractOptionalAssert&lt;?, T&gt; after(AbstractOptionalAssert&lt;?, T&gt; optionalAssert, T value) { return optionalAssert.containsSame(value); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJOptionalRules.AbstractOptionalAssertHasValue

tech.picnic.errorprone.refasterrules.AssertJOptionalRulesRecipes$AbstractOptionalAssertHasValueRecipe

Recipe created for the following Refaster template: java static final class AbstractOptionalAssertHasValue&lt;T&gt; { @BeforeTemplate AbstractAssert&lt;?, ?&gt; before(AbstractOptionalAssert&lt;?, T&gt; optionalAssert, T value) { return Refaster.anyOf(optionalAssert.get().isEqualTo(value), optionalAssert.isEqualTo(Optional.of(value)), optionalAssert.contains(value), optionalAssert.isPresent().hasValue(value)); } @AfterTemplate AbstractOptionalAssert&lt;?, T&gt; after(AbstractOptionalAssert&lt;?, T&gt; optionalAssert, T value) { return optionalAssert.hasValue(value); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJOptionalRules.AbstractOptionalAssertIsEmpty

tech.picnic.errorprone.refasterrules.AssertJOptionalRulesRecipes$AbstractOptionalAssertIsEmptyRecipe

Recipe created for the following Refaster template: java static final class AbstractOptionalAssertIsEmpty&lt;T&gt; { @BeforeTemplate AbstractAssert&lt;?, ?&gt; before(AbstractOptionalAssert&lt;?, T&gt; optionalAssert) { return Refaster.anyOf(optionalAssert.isNotPresent(), optionalAssert.isEqualTo(Optional.empty())); } @AfterTemplate AbstractOptionalAssert&lt;?, T&gt; after(AbstractOptionalAssert&lt;?, T&gt; optionalAssert) { return optionalAssert.isEmpty(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJOptionalRules.AbstractOptionalAssertIsPresent

tech.picnic.errorprone.refasterrules.AssertJOptionalRulesRecipes$AbstractOptionalAssertIsPresentRecipe

Recipe created for the following Refaster template: java static final class AbstractOptionalAssertIsPresent&lt;T&gt; { @BeforeTemplate AbstractAssert&lt;?, ?&gt; before(AbstractOptionalAssert&lt;?, T&gt; optionalAssert) { return Refaster.anyOf(optionalAssert.isNotEmpty(), optionalAssert.isNotEqualTo(Optional.empty())); } @AfterTemplate AbstractOptionalAssert&lt;?, T&gt; after(AbstractOptionalAssert&lt;?, T&gt; optionalAssert) { return optionalAssert.isPresent(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJOptionalRules.AssertThatOptionalHasValueMatching

tech.picnic.errorprone.refasterrules.AssertJOptionalRulesRecipes$AssertThatOptionalHasValueMatchingRecipe

Recipe created for the following Refaster template: java static final class AssertThatOptionalHasValueMatching&lt;T&gt; { @BeforeTemplate AbstractOptionalAssert&lt;?, T&gt; before(Optional&lt;T&gt; optional, Predicate&lt;? super T&gt; predicate) { return assertThat(optional.filter(predicate)).isPresent(); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractObjectAssert&lt;?, T&gt; after(Optional&lt;T&gt; optional, Predicate&lt;? super T&gt; predicate) { return assertThat(optional).get().matches(predicate); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJOptionalRules.AssertThatOptionalIsEmpty

tech.picnic.errorprone.refasterrules.AssertJOptionalRulesRecipes$AssertThatOptionalIsEmptyRecipe

Recipe created for the following Refaster template: java static final class AssertThatOptionalIsEmpty&lt;T&gt; { @BeforeTemplate AbstractAssert&lt;?, ?&gt; before(Optional&lt;T&gt; optional) { return Refaster.anyOf(assertThat(optional.isEmpty()).isTrue(), assertThat(optional.isPresent()).isFalse()); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) OptionalAssert&lt;T&gt; after(Optional&lt;T&gt; optional) { return assertThat(optional).isEmpty(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJOptionalRules.AssertThatOptionalIsPresent

tech.picnic.errorprone.refasterrules.AssertJOptionalRulesRecipes$AssertThatOptionalIsPresentRecipe

Recipe created for the following Refaster template: java static final class AssertThatOptionalIsPresent&lt;T&gt; { @BeforeTemplate AbstractAssert&lt;?, ?&gt; before(Optional&lt;T&gt; optional) { return Refaster.anyOf(assertThat(optional.isPresent()).isTrue(), assertThat(optional.isEmpty()).isFalse()); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) OptionalAssert&lt;T&gt; after(Optional&lt;T&gt; optional) { return assertThat(optional).isPresent(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJOptionalRules.AssertThatOptional

tech.picnic.errorprone.refasterrules.AssertJOptionalRulesRecipes$AssertThatOptionalRecipe

Recipe created for the following Refaster template: java static final class AssertThatOptional&lt;T&gt; { @BeforeTemplate ObjectAssert&lt;T&gt; before(Optional&lt;T&gt; optional) { return assertThat(optional.orElseThrow()); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractObjectAssert&lt;?, T&gt; after(Optional&lt;T&gt; optional) { return assertThat(optional).get(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

tech.picnic.errorprone.refasterrules.AssertJPathRulesRecipes

These rules simplify and improve the readability of tests by using Path-specific AssertJ assertion methods instead of generic assertions. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJPathRules.AssertThatDoesNotExist

tech.picnic.errorprone.refasterrules.AssertJPathRulesRecipes$AssertThatDoesNotExistRecipe

Recipe created for the following Refaster template: java static final class AssertThatDoesNotExist { @BeforeTemplate AbstractBooleanAssert&lt;?&gt; before(Path actual) { return assertThat(Files.exists(actual)).isFalse(); } @AfterTemplate AbstractPathAssert&lt;?&gt; after(Path actual) { return assertThat(actual).doesNotExist(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJPathRules.AssertThatEndsWithRaw

tech.picnic.errorprone.refasterrules.AssertJPathRulesRecipes$AssertThatEndsWithRawRecipe

Recipe created for the following Refaster template: java static final class AssertThatEndsWithRaw { @BeforeTemplate AbstractBooleanAssert&lt;?&gt; before(Path actual, Path other) { return assertThat(actual.endsWith(other)).isTrue(); } @AfterTemplate AbstractPathAssert&lt;?&gt; after(Path actual, Path other) { return assertThat(actual).endsWithRaw(other); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJPathRules.AssertThatExists

tech.picnic.errorprone.refasterrules.AssertJPathRulesRecipes$AssertThatExistsRecipe

Recipe created for the following Refaster template: java static final class AssertThatExists { @BeforeTemplate AbstractBooleanAssert&lt;?&gt; before(Path actual) { return assertThat(Files.exists(actual)).isTrue(); } @AfterTemplate AbstractPathAssert&lt;?&gt; after(Path actual) { return assertThat(actual).exists(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJPathRules.AssertThatHasFileName

tech.picnic.errorprone.refasterrules.AssertJPathRulesRecipes$AssertThatHasFileNameRecipe

Recipe created for the following Refaster template: java static final class AssertThatHasFileName { @BeforeTemplate AbstractPathAssert&lt;?&gt; before(Path actual, String fileName) { return assertThat(actual.getFileName()).hasToString(fileName); } @AfterTemplate AbstractPathAssert&lt;?&gt; after(Path actual, String fileName) { return assertThat(actual).hasFileName(fileName); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJPathRules.AssertThatHasNoParent

tech.picnic.errorprone.refasterrules.AssertJPathRulesRecipes$AssertThatHasNoParentRecipe

Recipe created for the following Refaster template: java static final class AssertThatHasNoParent { @BeforeTemplate void before(Path actual) { assertThat(actual.getParent()).isNull(); } @AfterTemplate void after(Path actual) { assertThat(actual).hasNoParent(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJPathRules.AssertThatHasParentRaw

tech.picnic.errorprone.refasterrules.AssertJPathRulesRecipes$AssertThatHasParentRawRecipe

Recipe created for the following Refaster template: java static final class AssertThatHasParentRaw { @BeforeTemplate AbstractPathAssert&lt;?&gt; before(Path actual, Path expected) { return assertThat(actual.getParent()).isEqualTo(expected); } @AfterTemplate AbstractPathAssert&lt;?&gt; after(Path actual, Path expected) { return assertThat(actual).hasParentRaw(expected); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJPathRules.AssertThatIsAbsolute

tech.picnic.errorprone.refasterrules.AssertJPathRulesRecipes$AssertThatIsAbsoluteRecipe

Recipe created for the following Refaster template: java static final class AssertThatIsAbsolute { @BeforeTemplate AbstractBooleanAssert&lt;?&gt; before(Path actual) { return assertThat(actual.isAbsolute()).isTrue(); } @AfterTemplate AbstractPathAssert&lt;?&gt; after(Path actual) { return assertThat(actual).isAbsolute(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJPathRules.AssertThatIsDirectory

tech.picnic.errorprone.refasterrules.AssertJPathRulesRecipes$AssertThatIsDirectoryRecipe

Recipe created for the following Refaster template: java static final class AssertThatIsDirectory { @BeforeTemplate AbstractBooleanAssert&lt;?&gt; before(Path actual) { return assertThat(Files.isDirectory(actual)).isTrue(); } @AfterTemplate AbstractPathAssert&lt;?&gt; after(Path actual) { return assertThat(actual).isDirectory(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJPathRules.AssertThatIsExecutable

tech.picnic.errorprone.refasterrules.AssertJPathRulesRecipes$AssertThatIsExecutableRecipe

Recipe created for the following Refaster template: java static final class AssertThatIsExecutable { @BeforeTemplate AbstractBooleanAssert&lt;?&gt; before(Path actual) { return assertThat(Files.isExecutable(actual)).isTrue(); } @AfterTemplate AbstractPathAssert&lt;?&gt; after(Path actual) { return assertThat(actual).isExecutable(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJPathRules.AssertThatIsReadable

tech.picnic.errorprone.refasterrules.AssertJPathRulesRecipes$AssertThatIsReadableRecipe

Recipe created for the following Refaster template: java static final class AssertThatIsReadable { @BeforeTemplate AbstractBooleanAssert&lt;?&gt; before(Path actual) { return assertThat(Files.isReadable(actual)).isTrue(); } @AfterTemplate AbstractPathAssert&lt;?&gt; after(Path actual) { return assertThat(actual).isReadable(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJPathRules.AssertThatIsRegularFile

tech.picnic.errorprone.refasterrules.AssertJPathRulesRecipes$AssertThatIsRegularFileRecipe

Recipe created for the following Refaster template: java static final class AssertThatIsRegularFile { @BeforeTemplate AbstractBooleanAssert&lt;?&gt; before(Path actual) { return assertThat(Files.isRegularFile(actual)).isTrue(); } @AfterTemplate AbstractPathAssert&lt;?&gt; after(Path actual) { return assertThat(actual).isRegularFile(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJPathRules.AssertThatIsRelative

tech.picnic.errorprone.refasterrules.AssertJPathRulesRecipes$AssertThatIsRelativeRecipe

Recipe created for the following Refaster template: java static final class AssertThatIsRelative { @BeforeTemplate AbstractBooleanAssert&lt;?&gt; before(Path actual) { return assertThat(actual.isAbsolute()).isFalse(); } @AfterTemplate AbstractPathAssert&lt;?&gt; after(Path actual) { return assertThat(actual).isRelative(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

tech.picnic.errorprone.refasterrules.AssertJPathRulesRecipes$AssertThatIsSymbolicLinkRecipe

Recipe created for the following Refaster template: java static final class AssertThatIsSymbolicLink { @BeforeTemplate AbstractBooleanAssert&lt;?&gt; before(Path actual) { return assertThat(Files.isSymbolicLink(actual)).isTrue(); } @AfterTemplate AbstractPathAssert&lt;?&gt; after(Path actual) { return assertThat(actual).isSymbolicLink(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJPathRules.AssertThatIsWritable

tech.picnic.errorprone.refasterrules.AssertJPathRulesRecipes$AssertThatIsWritableRecipe

Recipe created for the following Refaster template: java static final class AssertThatIsWritable { @BeforeTemplate AbstractBooleanAssert&lt;?&gt; before(Path actual) { return assertThat(Files.isWritable(actual)).isTrue(); } @AfterTemplate AbstractPathAssert&lt;?&gt; after(Path actual) { return assertThat(actual).isWritable(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJPathRules.AssertThatStartsWithRaw

tech.picnic.errorprone.refasterrules.AssertJPathRulesRecipes$AssertThatStartsWithRawRecipe

Recipe created for the following Refaster template: java static final class AssertThatStartsWithRaw { @BeforeTemplate AbstractBooleanAssert&lt;?&gt; before(Path actual, Path other) { return assertThat(actual.startsWith(other)).isTrue(); } @AfterTemplate AbstractPathAssert&lt;?&gt; after(Path actual, Path other) { return assertThat(actual).startsWithRaw(other); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

AssertJPrimitiveRules Refaster recipes

tech.picnic.errorprone.refasterrules.AssertJPrimitiveRulesRecipes

Refaster template recipes for tech.picnic.errorprone.refasterrules.AssertJPrimitiveRules. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJPrimitiveRules.AssertThatIsEqualTo

tech.picnic.errorprone.refasterrules.AssertJPrimitiveRulesRecipes$AssertThatIsEqualToRecipe

Recipe created for the following Refaster template: java static final class AssertThatIsEqualTo { @BeforeTemplate AbstractBooleanAssert&lt;?&gt; before(boolean actual, boolean expected) { return Refaster.anyOf(assertThat(actual).isSameAs(expected), assertThat(actual).isSameAs(expected)); } @BeforeTemplate AbstractByteAssert&lt;?&gt; before(byte actual, byte expected) { return Refaster.anyOf(assertThat(actual).isSameAs(expected), assertThat(actual).isSameAs(expected)); } @BeforeTemplate AbstractCharacterAssert&lt;?&gt; before(char actual, char expected) { return Refaster.anyOf(assertThat(actual).isSameAs(expected), assertThat(actual).isSameAs(expected)); } @BeforeTemplate AbstractShortAssert&lt;?&gt; before(short actual, short expected) { return Refaster.anyOf(assertThat(actual).isSameAs(expected), assertThat(actual).isSameAs(expected)); } @BeforeTemplate AbstractIntegerAssert&lt;?&gt; before(int actual, int expected) { return Refaster.anyOf(assertThat(actual).isSameAs(expected), assertThat(actual).isSameAs(expected)); } @BeforeTemplate AbstractLongAssert&lt;?&gt; before(long actual, long expected) { return Refaster.anyOf(assertThat(actual).isSameAs(expected), assertThat(actual).isSameAs(expected)); } @BeforeTemplate AbstractFloatAssert&lt;?&gt; before(float actual, float expected) { return Refaster.anyOf(assertThat(actual).isSameAs(expected), assertThat(actual).isSameAs(expected)); } @BeforeTemplate AbstractDoubleAssert&lt;?&gt; before(double actual, double expected) { return Refaster.anyOf(assertThat(actual).isSameAs(expected), assertThat(actual).isSameAs(expected)); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractBooleanAssert&lt;?&gt; after(boolean actual, boolean expected) { return assertThat(actual).isEqualTo(expected); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJPrimitiveRules.AssertThatIsGreaterThanOrEqualTo

tech.picnic.errorprone.refasterrules.AssertJPrimitiveRulesRecipes$AssertThatIsGreaterThanOrEqualToRecipe

Recipe created for the following Refaster template: java static final class AssertThatIsGreaterThanOrEqualTo { @BeforeTemplate AbstractBooleanAssert&lt;?&gt; before(double actual, double expected) { return Refaster.anyOf(assertThat(actual &gt;= expected).isTrue(), assertThat(actual &lt; expected).isFalse()); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractDoubleAssert&lt;?&gt; after(double actual, double expected) { return assertThat(actual).isGreaterThanOrEqualTo(expected); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJPrimitiveRules.AssertThatIsGreaterThan

tech.picnic.errorprone.refasterrules.AssertJPrimitiveRulesRecipes$AssertThatIsGreaterThanRecipe

Recipe created for the following Refaster template: java static final class AssertThatIsGreaterThan { @BeforeTemplate AbstractBooleanAssert&lt;?&gt; before(double actual, double expected) { return Refaster.anyOf(assertThat(actual &gt; expected).isTrue(), assertThat(actual &lt;= expected).isFalse()); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractDoubleAssert&lt;?&gt; after(double actual, double expected) { return assertThat(actual).isGreaterThan(expected); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJPrimitiveRules.AssertThatIsLessThanOrEqualTo

tech.picnic.errorprone.refasterrules.AssertJPrimitiveRulesRecipes$AssertThatIsLessThanOrEqualToRecipe

Recipe created for the following Refaster template: java static final class AssertThatIsLessThanOrEqualTo { @BeforeTemplate AbstractBooleanAssert&lt;?&gt; before(double actual, double expected) { return Refaster.anyOf(assertThat(actual &lt;= expected).isTrue(), assertThat(actual &gt; expected).isFalse()); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractDoubleAssert&lt;?&gt; after(double actual, double expected) { return assertThat(actual).isLessThanOrEqualTo(expected); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJPrimitiveRules.AssertThatIsLessThan

tech.picnic.errorprone.refasterrules.AssertJPrimitiveRulesRecipes$AssertThatIsLessThanRecipe

Recipe created for the following Refaster template: java static final class AssertThatIsLessThan { @BeforeTemplate AbstractBooleanAssert&lt;?&gt; before(double actual, double expected) { return Refaster.anyOf(assertThat(actual &lt; expected).isTrue(), assertThat(actual &gt;= expected).isFalse()); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractDoubleAssert&lt;?&gt; after(double actual, double expected) { return assertThat(actual).isLessThan(expected); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJPrimitiveRules.AssertThatIsNotEqualTo

tech.picnic.errorprone.refasterrules.AssertJPrimitiveRulesRecipes$AssertThatIsNotEqualToRecipe

Recipe created for the following Refaster template: java static final class AssertThatIsNotEqualTo { @BeforeTemplate AbstractBooleanAssert&lt;?&gt; before(boolean actual, boolean expected) { return Refaster.anyOf(assertThat(actual).isNotSameAs(expected), assertThat(actual).isNotSameAs(expected)); } @BeforeTemplate AbstractByteAssert&lt;?&gt; before(byte actual, byte expected) { return Refaster.anyOf(assertThat(actual).isNotSameAs(expected), assertThat(actual).isNotSameAs(expected)); } @BeforeTemplate AbstractCharacterAssert&lt;?&gt; before(char actual, char expected) { return Refaster.anyOf(assertThat(actual).isNotSameAs(expected), assertThat(actual).isNotSameAs(expected)); } @BeforeTemplate AbstractShortAssert&lt;?&gt; before(short actual, short expected) { return Refaster.anyOf(assertThat(actual).isNotSameAs(expected), assertThat(actual).isNotSameAs(expected)); } @BeforeTemplate AbstractIntegerAssert&lt;?&gt; before(int actual, int expected) { return Refaster.anyOf(assertThat(actual).isNotSameAs(expected), assertThat(actual).isNotSameAs(expected)); } @BeforeTemplate AbstractLongAssert&lt;?&gt; before(long actual, long expected) { return Refaster.anyOf(assertThat(actual).isNotSameAs(expected), assertThat(actual).isNotSameAs(expected)); } @BeforeTemplate AbstractFloatAssert&lt;?&gt; before(float actual, float expected) { return Refaster.anyOf(assertThat(actual).isNotSameAs(expected), assertThat(actual).isNotSameAs(expected)); } @BeforeTemplate AbstractDoubleAssert&lt;? extends AbstractDoubleAssert&lt;?&gt;&gt; before(double actual, double expected) { return Refaster.anyOf(assertThat(actual).isNotSameAs(expected), assertThat(actual).isNotSameAs(expected)); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractBooleanAssert&lt;?&gt; after(boolean actual, boolean expected) { return assertThat(actual).isNotEqualTo(expected); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

AssertJRules Refaster recipes

tech.picnic.errorprone.refasterrules.AssertJRulesRecipes

Refaster rules related to AssertJ expressions and statements. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJRules.AssertThatListsAreEqual

tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatListsAreEqualRecipe

Recipe created for the following Refaster template: java static final class AssertThatListsAreEqual&lt;S, T extends S&gt; { @BeforeTemplate ListAssert&lt;S&gt; before(List&lt;S&gt; list1, Iterable&lt;T&gt; list2) { return assertThat(list1).isEqualTo(list2); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) ListAssert&lt;S&gt; after(List&lt;S&gt; list1, Iterable&lt;T&gt; list2) { return assertThat(list1).containsExactlyElementsOf(list2); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJRules.AssertThatMapContainsEntry

tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatMapContainsEntryRecipe

Recipe created for the following Refaster template: java static final class AssertThatMapContainsEntry&lt;K, V&gt; { @BeforeTemplate ObjectAssert&lt;V&gt; before(Map&lt;K, V&gt; map, K key, V value) { return assertThat(map.get(key)).isEqualTo(value); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) MapAssert&lt;K, V&gt; after(Map&lt;K, V&gt; map, K key, V value) { return assertThat(map).containsEntry(key, value); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJRules.AssertThatMultisetsAreEqual

tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatMultisetsAreEqualRecipe

Recipe created for the following Refaster template: java static final class AssertThatMultisetsAreEqual&lt;S, T extends S&gt; { @BeforeTemplate AbstractCollectionAssert&lt;?, ?, S, ?&gt; before(Multiset&lt;S&gt; multiset1, Iterable&lt;T&gt; multiset2) { return assertThat(multiset1).isEqualTo(multiset2); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractCollectionAssert&lt;?, ?, S, ?&gt; after(Multiset&lt;S&gt; multiset1, Iterable&lt;T&gt; multiset2) { return assertThat(multiset1).containsExactlyInAnyOrderElementsOf(multiset2); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJRules.AssertThatOptionalDouble

tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatOptionalDoubleRecipe

Recipe created for the following Refaster template: java static final class AssertThatOptionalDouble { @BeforeTemplate AbstractDoubleAssert&lt;?&gt; 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); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJRules.AssertThatOptionalInt

tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatOptionalIntRecipe

Recipe created for the following Refaster template: java static final class AssertThatOptionalInt { @BeforeTemplate AbstractIntegerAssert&lt;?&gt; 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); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJRules.AssertThatOptionalLong

tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatOptionalLongRecipe

Recipe created for the following Refaster template: java static final class AssertThatOptionalLong { @BeforeTemplate AbstractLongAssert&lt;?&gt; 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); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJRules.AssertThatPredicateAccepts

tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatPredicateAcceptsRecipe

Recipe created for the following Refaster template: java static final class AssertThatPredicateAccepts&lt;T&gt; { @BeforeTemplate void before(Predicate&lt;T&gt; predicate, T object) { assertThat(predicate.test(object)).isTrue(); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(Predicate&lt;T&gt; predicate, T object) { assertThat(predicate).accepts(object); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJRules.AssertThatPredicateRejects

tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatPredicateRejectsRecipe

Recipe created for the following Refaster template: java static final class AssertThatPredicateRejects&lt;T&gt; { @BeforeTemplate void before(Predicate&lt;T&gt; predicate, T object) { assertThat(predicate.test(object)).isFalse(); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(Predicate&lt;T&gt; predicate, T object) { assertThat(predicate).rejects(object); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJRules.AssertThatSetContainsExactlyOneElement

tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatSetContainsExactlyOneElementRecipe

Recipe created for the following Refaster template: java static final class AssertThatSetContainsExactlyOneElement&lt;S, T extends S&gt; { @BeforeTemplate ObjectEnumerableAssert&lt;?, S&gt; before(Set&lt;S&gt; set, T element) { return assertThat(set).containsOnly(element); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) ObjectEnumerableAssert&lt;?, S&gt; after(Set&lt;S&gt; set, T element) { return assertThat(set).containsExactly(element); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJRules.AssertThatSetsAreEqual

tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatSetsAreEqualRecipe

Recipe created for the following Refaster template: java static final class AssertThatSetsAreEqual&lt;S, T extends S&gt; { @BeforeTemplate AbstractCollectionAssert&lt;?, ?, S, ?&gt; before(Set&lt;S&gt; set1, Iterable&lt;T&gt; set2) { return Refaster.anyOf(assertThat(set1).isEqualTo(set2), assertThat(set1).containsExactlyInAnyOrderElementsOf(set2)); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractCollectionAssert&lt;?, ?, S, ?&gt; after(Set&lt;S&gt; set1, Iterable&lt;T&gt; set2) { return assertThat(set1).hasSameElementsAs(set2); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJRules.AssertThatStreamContainsAll

tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatStreamContainsAllRecipe

Recipe created for the following Refaster template: java static final class AssertThatStreamContainsAll&lt;S, T extends S, U extends T&gt; { @BeforeTemplate IterableAssert&lt;T&gt; before(Stream&lt;S&gt; stream, Iterable&lt;U&gt; iterable, Collector&lt;S, ?, ? extends Iterable&lt;T&gt;&gt; collector) { return assertThat(stream.collect(collector)).containsAll(iterable); } @BeforeTemplate ListAssert&lt;T&gt; before2(Stream&lt;S&gt; stream, Iterable&lt;U&gt; iterable, Collector&lt;S, ?, ? extends List&lt;T&gt;&gt; collector) { return assertThat(stream.collect(collector)).containsAll(iterable); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) ListAssert&lt;S&gt; after(Stream&lt;S&gt; stream, Iterable&lt;U&gt; iterable) { return assertThat(stream).containsAll(iterable); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJRules.AssertThatStreamContainsAnyElementsOf

tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatStreamContainsAnyElementsOfRecipe

Recipe created for the following Refaster template: java static final class AssertThatStreamContainsAnyElementsOf&lt;S, T extends S, U extends T&gt; { @BeforeTemplate IterableAssert&lt;T&gt; before(Stream&lt;S&gt; stream, Iterable&lt;U&gt; iterable, Collector&lt;S, ?, ? extends Iterable&lt;T&gt;&gt; collector) { return assertThat(stream.collect(collector)).containsAnyElementsOf(iterable); } @BeforeTemplate ListAssert&lt;T&gt; before2(Stream&lt;S&gt; stream, Iterable&lt;U&gt; iterable, Collector&lt;S, ?, ? extends List&lt;T&gt;&gt; collector) { return assertThat(stream.collect(collector)).containsAnyElementsOf(iterable); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) ListAssert&lt;S&gt; after(Stream&lt;S&gt; stream, Iterable&lt;U&gt; iterable) { return assertThat(stream).containsAnyElementsOf(iterable); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJRules.AssertThatStreamContainsAnyOf

tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatStreamContainsAnyOfRecipe

Recipe created for the following Refaster template: java static final class AssertThatStreamContainsAnyOf&lt;S, T extends S, U extends T&gt; { @BeforeTemplate IterableAssert&lt;T&gt; before(Stream&lt;S&gt; stream, U[] array, Collector&lt;S, ?, ? extends Iterable&lt;T&gt;&gt; collector) { return assertThat(stream.collect(collector)).containsAnyOf(array); } @BeforeTemplate ListAssert&lt;T&gt; before2(Stream&lt;S&gt; stream, U[] array, Collector&lt;S, ?, ? extends List&lt;T&gt;&gt; collector) { return assertThat(stream.collect(collector)).containsAnyOf(array); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) ListAssert&lt;S&gt; after(Stream&lt;S&gt; stream, U[] array) { return assertThat(stream).containsAnyOf(array); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJRules.AssertThatStreamContainsExactlyElementsOf

tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatStreamContainsExactlyElementsOfRecipe

Recipe created for the following Refaster template: java static final class AssertThatStreamContainsExactlyElementsOf&lt;S, T extends S, U extends T&gt; { @BeforeTemplate ListAssert&lt;T&gt; before(Stream&lt;S&gt; stream, Iterable&lt;U&gt; iterable, Collector&lt;S, ?, ? extends List&lt;T&gt;&gt; collector) { return assertThat(stream.collect(collector)).containsExactlyElementsOf(iterable); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) ListAssert&lt;S&gt; after(Stream&lt;S&gt; stream, Iterable&lt;U&gt; iterable) { return assertThat(stream).containsExactlyElementsOf(iterable); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJRules.AssertThatStreamContainsExactlyInAnyOrderElementsOf

tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatStreamContainsExactlyInAnyOrderElementsOfRecipe

Recipe created for the following Refaster template: java static final class AssertThatStreamContainsExactlyInAnyOrderElementsOf&lt;S, T extends S, U extends T&gt; { @BeforeTemplate ListAssert&lt;T&gt; before(Stream&lt;S&gt; stream, Iterable&lt;U&gt; iterable, Collector&lt;S, ?, ? extends List&lt;T&gt;&gt; collector) { return assertThat(stream.collect(collector)).containsExactlyInAnyOrderElementsOf(iterable); } @BeforeTemplate AbstractCollectionAssert&lt;?, ?, T, ?&gt; before2(Stream&lt;S&gt; stream, Iterable&lt;U&gt; iterable, Collector&lt;S, ?, ? extends Multiset&lt;T&gt;&gt; collector) { return assertThat(stream.collect(collector)).containsExactlyInAnyOrderElementsOf(iterable); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) ListAssert&lt;S&gt; after(Stream&lt;S&gt; stream, Iterable&lt;U&gt; iterable) { return assertThat(stream).containsExactlyInAnyOrderElementsOf(iterable); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJRules.AssertThatStreamContainsExactlyInAnyOrder

tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatStreamContainsExactlyInAnyOrderRecipe

Recipe created for the following Refaster template: java static final class AssertThatStreamContainsExactlyInAnyOrder&lt;S, T extends S, U extends T&gt; { @BeforeTemplate ListAssert&lt;T&gt; before(Stream&lt;S&gt; stream, U[] array, Collector&lt;S, ?, ? extends List&lt;T&gt;&gt; collector) { return assertThat(stream.collect(collector)).containsExactlyInAnyOrder(array); } @BeforeTemplate AbstractCollectionAssert&lt;?, ?, T, ?&gt; before2(Stream&lt;S&gt; stream, U[] array, Collector&lt;S, ?, ? extends Multiset&lt;T&gt;&gt; collector) { return assertThat(stream.collect(collector)).containsExactlyInAnyOrder(array); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) ListAssert&lt;S&gt; after(Stream&lt;S&gt; stream, U[] array) { return assertThat(stream).containsExactlyInAnyOrder(array); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJRules.AssertThatStreamContainsExactly

tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatStreamContainsExactlyRecipe

Recipe created for the following Refaster template: java static final class AssertThatStreamContainsExactly&lt;S, T extends S, U extends T&gt; { @BeforeTemplate ListAssert&lt;T&gt; before(Stream&lt;S&gt; stream, U[] array, Collector&lt;S, ?, ? extends List&lt;T&gt;&gt; collector) { return assertThat(stream.collect(collector)).containsExactly(array); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) ListAssert&lt;S&gt; after(Stream&lt;S&gt; stream, U[] array) { return assertThat(stream).containsExactly(array); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJRules.AssertThatStreamContainsOnly

tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatStreamContainsOnlyRecipe

Recipe created for the following Refaster template: java static final class AssertThatStreamContainsOnly&lt;S, T extends S, U extends T&gt; { @BeforeTemplate IterableAssert&lt;T&gt; before(Stream&lt;S&gt; stream, U[] array, Collector&lt;S, ?, ? extends Iterable&lt;T&gt;&gt; collector) { return assertThat(stream.collect(collector)).containsOnly(array); } @BeforeTemplate ListAssert&lt;T&gt; before2(Stream&lt;S&gt; stream, U[] array, Collector&lt;S, ?, ? extends List&lt;T&gt;&gt; collector) { return assertThat(stream.collect(collector)).containsOnly(array); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) ListAssert&lt;S&gt; after(Stream&lt;S&gt; stream, U[] array) { return assertThat(stream).containsOnly(array); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJRules.AssertThatStreamContains

tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatStreamContainsRecipe

Recipe created for the following Refaster template: java static final class AssertThatStreamContains&lt;S, T extends S, U extends T&gt; { @BeforeTemplate IterableAssert&lt;T&gt; before(Stream&lt;S&gt; stream, U[] array, Collector&lt;S, ?, ? extends Iterable&lt;T&gt;&gt; collector) { return assertThat(stream.collect(collector)).contains(array); } @BeforeTemplate ListAssert&lt;T&gt; before2(Stream&lt;S&gt; stream, U[] array, Collector&lt;S, ?, ? extends List&lt;T&gt;&gt; collector) { return assertThat(stream.collect(collector)).contains(array); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) ListAssert&lt;S&gt; after(Stream&lt;S&gt; stream, U[] array) { return assertThat(stream).contains(array); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJRules.AssertThatStreamContainsSequence

tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatStreamContainsSequenceRecipe

Recipe created for the following Refaster template: java static final class AssertThatStreamContainsSequence&lt;S, T extends S, U extends T&gt; { @BeforeTemplate ListAssert&lt;T&gt; before(Stream&lt;S&gt; stream, Iterable&lt;U&gt; iterable, Collector&lt;S, ?, ? extends List&lt;T&gt;&gt; collector) { return assertThat(stream.collect(collector)).containsSequence(iterable); } @BeforeTemplate ListAssert&lt;T&gt; before(Stream&lt;S&gt; stream, U[] iterable, Collector&lt;S, ?, ? extends List&lt;T&gt;&gt; collector) { return assertThat(stream.collect(collector)).containsSequence(iterable); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) ListAssert&lt;S&gt; after(Stream&lt;S&gt; stream, Iterable&lt;U&gt; iterable) { return assertThat(stream).containsSequence(iterable); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJRules.AssertThatStreamContainsSubsequence

tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatStreamContainsSubsequenceRecipe

Recipe created for the following Refaster template: java static final class AssertThatStreamContainsSubsequence&lt;S, T extends S, U extends T&gt; { @BeforeTemplate ListAssert&lt;T&gt; before(Stream&lt;S&gt; stream, Iterable&lt;U&gt; iterable, Collector&lt;S, ?, ? extends List&lt;T&gt;&gt; collector) { return assertThat(stream.collect(collector)).containsSubsequence(iterable); } @BeforeTemplate ListAssert&lt;T&gt; before(Stream&lt;S&gt; stream, U[] iterable, Collector&lt;S, ?, ? extends List&lt;T&gt;&gt; collector) { return assertThat(stream.collect(collector)).containsSubsequence(iterable); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) ListAssert&lt;S&gt; after(Stream&lt;S&gt; stream, Iterable&lt;U&gt; iterable) { return assertThat(stream).containsSubsequence(iterable); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJRules.AssertThatStreamDoesNotContainAnyElementsOf

tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatStreamDoesNotContainAnyElementsOfRecipe

Recipe created for the following Refaster template: java static final class AssertThatStreamDoesNotContainAnyElementsOf&lt;S, T extends S, U extends T&gt; { @BeforeTemplate IterableAssert&lt;T&gt; before(Stream&lt;S&gt; stream, Iterable&lt;U&gt; iterable, Collector&lt;S, ?, ? extends Iterable&lt;T&gt;&gt; collector) { return assertThat(stream.collect(collector)).doesNotContainAnyElementsOf(iterable); } @BeforeTemplate ListAssert&lt;T&gt; before2(Stream&lt;S&gt; stream, Iterable&lt;U&gt; iterable, Collector&lt;S, ?, ? extends List&lt;T&gt;&gt; collector) { return assertThat(stream.collect(collector)).doesNotContainAnyElementsOf(iterable); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) ListAssert&lt;S&gt; after(Stream&lt;S&gt; stream, Iterable&lt;U&gt; iterable) { return assertThat(stream).doesNotContainAnyElementsOf(iterable); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJRules.AssertThatStreamDoesNotContain

tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatStreamDoesNotContainRecipe

Recipe created for the following Refaster template: java static final class AssertThatStreamDoesNotContain&lt;S, T extends S, U extends T&gt; { @BeforeTemplate IterableAssert&lt;T&gt; before(Stream&lt;S&gt; stream, U[] array, Collector&lt;S, ?, ? extends Iterable&lt;T&gt;&gt; collector) { return assertThat(stream.collect(collector)).doesNotContain(array); } @BeforeTemplate ListAssert&lt;T&gt; before2(Stream&lt;S&gt; stream, U[] array, Collector&lt;S, ?, ? extends List&lt;T&gt;&gt; collector) { return assertThat(stream.collect(collector)).doesNotContain(array); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) ListAssert&lt;S&gt; after(Stream&lt;S&gt; stream, U[] array) { return assertThat(stream).doesNotContain(array); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJRules.AssertThatStreamDoesNotContainSequence

tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatStreamDoesNotContainSequenceRecipe

Recipe created for the following Refaster template: java static final class AssertThatStreamDoesNotContainSequence&lt;S, T extends S, U extends T&gt; { @BeforeTemplate ListAssert&lt;T&gt; before(Stream&lt;S&gt; stream, Iterable&lt;U&gt; iterable, Collector&lt;S, ?, ? extends List&lt;T&gt;&gt; collector) { return assertThat(stream.collect(collector)).doesNotContainSequence(iterable); } @BeforeTemplate ListAssert&lt;T&gt; before(Stream&lt;S&gt; stream, U[] iterable, Collector&lt;S, ?, ? extends List&lt;T&gt;&gt; collector) { return assertThat(stream.collect(collector)).doesNotContainSequence(iterable); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) ListAssert&lt;S&gt; after(Stream&lt;S&gt; stream, Iterable&lt;U&gt; iterable) { return assertThat(stream).doesNotContainSequence(iterable); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJRules.AssertThatStreamHasSameElementsAs

tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatStreamHasSameElementsAsRecipe

Recipe created for the following Refaster template: java static final class AssertThatStreamHasSameElementsAs&lt;S, T extends S, U extends T&gt; { @BeforeTemplate IterableAssert&lt;T&gt; before(Stream&lt;S&gt; stream, Iterable&lt;U&gt; iterable, Collector&lt;S, ?, ? extends Iterable&lt;T&gt;&gt; collector) { return assertThat(stream.collect(collector)).hasSameElementsAs(iterable); } @BeforeTemplate ListAssert&lt;T&gt; before2(Stream&lt;S&gt; stream, Iterable&lt;U&gt; iterable, Collector&lt;S, ?, ? extends List&lt;T&gt;&gt; collector) { return assertThat(stream.collect(collector)).hasSameElementsAs(iterable); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) ListAssert&lt;S&gt; after(Stream&lt;S&gt; stream, Iterable&lt;U&gt; iterable) { return assertThat(stream).hasSameElementsAs(iterable); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJRules.AssertThatStreamHasSize

tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatStreamHasSizeRecipe

Recipe created for the following Refaster template: java static final class AssertThatStreamHasSize&lt;T&gt; { @BeforeTemplate void before(Stream&lt;T&gt; stream, int size) { assertThat(stream.count()).isEqualTo(size); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(Stream&lt;T&gt; stream, int size) { assertThat(stream).hasSize(size); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJRules.AssertThatStreamIsEmpty

tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatStreamIsEmptyRecipe

Recipe created for the following Refaster template: java static final class AssertThatStreamIsEmpty&lt;S, T extends S&gt; { @BeforeTemplate void before(Stream&lt;S&gt; stream, Collector&lt;S, ?, ? extends Iterable&lt;T&gt;&gt; collector) { assertThat(stream.collect(collector)).isEmpty(); } @BeforeTemplate void before2(Stream&lt;S&gt; stream, Collector&lt;S, ?, ? extends List&lt;T&gt;&gt; collector) { assertThat(stream.collect(collector)).isEmpty(); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(Stream&lt;S&gt; stream) { assertThat(stream).isEmpty(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJRules.AssertThatStreamIsNotEmpty

tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatStreamIsNotEmptyRecipe

Recipe created for the following Refaster template: java static final class AssertThatStreamIsNotEmpty&lt;S, T extends S&gt; { @BeforeTemplate void before(Stream&lt;S&gt; stream, Collector&lt;S, ?, ? extends Iterable&lt;T&gt;&gt; collector) { assertThat(stream.collect(collector)).isNotEmpty(); } @BeforeTemplate void before2(Stream&lt;S&gt; stream, Collector&lt;S, ?, ? extends List&lt;T&gt;&gt; collector) { assertThat(stream.collect(collector)).isNotEmpty(); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(Stream&lt;S&gt; stream) { assertThat(stream).isNotEmpty(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJRules.AssertThatStreamIsSubsetOf

tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$AssertThatStreamIsSubsetOfRecipe

Recipe created for the following Refaster template: java static final class AssertThatStreamIsSubsetOf&lt;S, T extends S, U extends T&gt; { @BeforeTemplate IterableAssert&lt;T&gt; before(Stream&lt;S&gt; stream, Iterable&lt;U&gt; iterable, Collector&lt;S, ?, ? extends Iterable&lt;T&gt;&gt; collector) { return assertThat(stream.collect(collector)).isSubsetOf(iterable); } @BeforeTemplate IterableAssert&lt;T&gt; before(Stream&lt;S&gt; stream, U[] iterable, Collector&lt;S, ?, ? extends Iterable&lt;T&gt;&gt; collector) { return assertThat(stream.collect(collector)).isSubsetOf(iterable); } @BeforeTemplate ListAssert&lt;T&gt; before2(Stream&lt;S&gt; stream, Iterable&lt;U&gt; iterable, Collector&lt;S, ?, ? extends List&lt;T&gt;&gt; collector) { return assertThat(stream.collect(collector)).isSubsetOf(iterable); } @BeforeTemplate ListAssert&lt;T&gt; before2(Stream&lt;S&gt; stream, U[] iterable, Collector&lt;S, ?, ? extends List&lt;T&gt;&gt; collector) { return assertThat(stream.collect(collector)).isSubsetOf(iterable); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) ListAssert&lt;S&gt; after(Stream&lt;S&gt; stream, U[] iterable) { return assertThat(stream).isSubsetOf(iterable); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJRules.ObjectEnumerableContainsOneElement

tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$ObjectEnumerableContainsOneElementRecipe

Recipe created for the following Refaster template: java static final class ObjectEnumerableContainsOneElement&lt;S, T extends S&gt; { @BeforeTemplate @SuppressWarnings(value = &quot;unchecked&quot;) ObjectEnumerableAssert&lt;?, S&gt; before(ObjectEnumerableAssert&lt;?, S&gt; iterAssert, T element) { return Refaster.anyOf(iterAssert.containsAnyOf(element), iterAssert.containsSequence(element), iterAssert.containsSubsequence(element)); } @AfterTemplate @SuppressWarnings(value = &quot;unchecked&quot;) ObjectEnumerableAssert&lt;?, S&gt; after(ObjectEnumerableAssert&lt;?, S&gt; iterAssert, T element) { return iterAssert.contains(element); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJRules.ObjectEnumerableDoesNotContainOneElement

tech.picnic.errorprone.refasterrules.AssertJRulesRecipes$ObjectEnumerableDoesNotContainOneElementRecipe

Recipe created for the following Refaster template: java static final class ObjectEnumerableDoesNotContainOneElement&lt;S, T extends S&gt; { @BeforeTemplate @SuppressWarnings(value = &quot;unchecked&quot;) ObjectEnumerableAssert&lt;?, S&gt; before(ObjectEnumerableAssert&lt;?, S&gt; iterAssert, T element) { return iterAssert.doesNotContainSequence(element); } @AfterTemplate @SuppressWarnings(value = &quot;unchecked&quot;) ObjectEnumerableAssert&lt;?, S&gt; after(ObjectEnumerableAssert&lt;?, S&gt; iterAssert, T element) { return iterAssert.doesNotContain(element); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

AssertJShortRules Refaster recipes

tech.picnic.errorprone.refasterrules.AssertJShortRulesRecipes

Refaster template recipes for tech.picnic.errorprone.refasterrules.AssertJShortRules. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJShortRules.AbstractShortAssertIsEqualTo

tech.picnic.errorprone.refasterrules.AssertJShortRulesRecipes$AbstractShortAssertIsEqualToRecipe

Recipe created for the following Refaster template: java static final class AbstractShortAssertIsEqualTo { @BeforeTemplate AbstractShortAssert&lt;?&gt; before(AbstractShortAssert&lt;?&gt; shortAssert, short n) { return Refaster.anyOf(shortAssert.isCloseTo(n, offset((short)0)), shortAssert.isCloseTo(n, withPercentage(0))); } @AfterTemplate AbstractShortAssert&lt;?&gt; after(AbstractShortAssert&lt;?&gt; shortAssert, short n) { return shortAssert.isEqualTo(n); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJShortRules.AbstractShortAssertIsNotEqualTo

tech.picnic.errorprone.refasterrules.AssertJShortRulesRecipes$AbstractShortAssertIsNotEqualToRecipe

Recipe created for the following Refaster template: java static final class AbstractShortAssertIsNotEqualTo { @BeforeTemplate AbstractShortAssert&lt;?&gt; before(AbstractShortAssert&lt;?&gt; shortAssert, short n) { return Refaster.anyOf(shortAssert.isNotCloseTo(n, offset((short)0)), shortAssert.isNotCloseTo(n, withPercentage(0))); } @AfterTemplate AbstractShortAssert&lt;?&gt; after(AbstractShortAssert&lt;?&gt; shortAssert, short n) { return shortAssert.isNotEqualTo(n); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJShortRules.AbstractShortAssertIsNotZero

tech.picnic.errorprone.refasterrules.AssertJShortRulesRecipes$AbstractShortAssertIsNotZeroRecipe

Recipe created for the following Refaster template: java static final class AbstractShortAssertIsNotZero { @BeforeTemplate AbstractShortAssert&lt;?&gt; before(AbstractShortAssert&lt;?&gt; shortAssert) { return shortAssert.isNotZero(); } @AfterTemplate AbstractShortAssert&lt;?&gt; after(AbstractShortAssert&lt;?&gt; shortAssert) { return shortAssert.isNotEqualTo((short)0); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJShortRules.AbstractShortAssertIsOne

tech.picnic.errorprone.refasterrules.AssertJShortRulesRecipes$AbstractShortAssertIsOneRecipe

Recipe created for the following Refaster template: java static final class AbstractShortAssertIsOne { @BeforeTemplate AbstractShortAssert&lt;?&gt; before(AbstractShortAssert&lt;?&gt; shortAssert) { return shortAssert.isOne(); } @AfterTemplate AbstractShortAssert&lt;?&gt; after(AbstractShortAssert&lt;?&gt; shortAssert) { return shortAssert.isEqualTo((short)1); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJShortRules.AbstractShortAssertIsZero

tech.picnic.errorprone.refasterrules.AssertJShortRulesRecipes$AbstractShortAssertIsZeroRecipe

Recipe created for the following Refaster template: java static final class AbstractShortAssertIsZero { @BeforeTemplate AbstractShortAssert&lt;?&gt; before(AbstractShortAssert&lt;?&gt; shortAssert) { return shortAssert.isZero(); } @AfterTemplate AbstractShortAssert&lt;?&gt; after(AbstractShortAssert&lt;?&gt; shortAssert) { return shortAssert.isEqualTo((short)0); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

AssertJStreamRules Refaster recipes

tech.picnic.errorprone.refasterrules.AssertJStreamRulesRecipes

Refaster template recipes for tech.picnic.errorprone.refasterrules.AssertJStreamRules. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJStreamRules.AssertThatAnyMatch

tech.picnic.errorprone.refasterrules.AssertJStreamRulesRecipes$AssertThatAnyMatchRecipe

Recipe created for the following Refaster template: java static final class AssertThatAnyMatch&lt;T&gt; { @BeforeTemplate ListAssert&lt;T&gt; before(Stream&lt;T&gt; stream, Predicate&lt;? super T&gt; predicate) { return assertThat(stream).filteredOn(predicate).isNotEmpty(); } @BeforeTemplate AbstractBooleanAssert&lt;?&gt; before2(Stream&lt;T&gt; stream, Predicate&lt;? super T&gt; predicate) { return Refaster.anyOf(assertThat(stream.anyMatch(predicate)).isTrue(), assertThat(stream.noneMatch(predicate)).isFalse()); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) ListAssert&lt;T&gt; after(Stream&lt;T&gt; stream, Predicate&lt;? super T&gt; predicate) { return assertThat(stream).anyMatch(predicate); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJStreamRules.AssertThatCollection

tech.picnic.errorprone.refasterrules.AssertJStreamRulesRecipes$AssertThatCollectionRecipe

Recipe created for the following Refaster template: java static final class AssertThatCollection&lt;T&gt; { @BeforeTemplate ListAssert&lt;T&gt; before(Collection&lt;T&gt; collection) { return assertThat(collection.stream()); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractCollectionAssert&lt;?, ?, T, ?&gt; after(Collection&lt;T&gt; collection) { return assertThat(collection); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJStreamRules.AssertThatFilteredOn

tech.picnic.errorprone.refasterrules.AssertJStreamRulesRecipes$AssertThatFilteredOnRecipe

Recipe created for the following Refaster template: java static final class AssertThatFilteredOn&lt;T&gt; { @BeforeTemplate ListAssert&lt;T&gt; before(Stream&lt;T&gt; stream, Predicate&lt;? super T&gt; predicate) { return assertThat(stream.filter(predicate)); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) ListAssert&lt;T&gt; after(Stream&lt;T&gt; stream, Predicate&lt;? super T&gt; predicate) { return assertThat(stream).filteredOn(predicate); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJStreamRules.AssertThatNoneMatch

tech.picnic.errorprone.refasterrules.AssertJStreamRulesRecipes$AssertThatNoneMatchRecipe

Recipe created for the following Refaster template: java static final class AssertThatNoneMatch&lt;T&gt; { @BeforeTemplate void before(Stream&lt;T&gt; stream, Predicate&lt;? super T&gt; predicate) { assertThat(stream).filteredOn(predicate).isEmpty(); } @BeforeTemplate void before2(Stream&lt;T&gt; stream, Predicate&lt;? super T&gt; predicate) { Refaster.anyOf(assertThat(stream.anyMatch(predicate)).isFalse(), assertThat(stream.noneMatch(predicate)).isTrue()); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(Stream&lt;T&gt; stream, Predicate&lt;? super T&gt; predicate) { assertThat(stream).noneMatch(predicate); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

AssertJStringRules Refaster recipes

tech.picnic.errorprone.refasterrules.AssertJStringRulesRecipes

Refaster template recipes for tech.picnic.errorprone.refasterrules.AssertJStringRules. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJStringRules.AbstractStringAssertStringIsEmpty

tech.picnic.errorprone.refasterrules.AssertJStringRulesRecipes$AbstractStringAssertStringIsEmptyRecipe

Recipe created for the following Refaster template: java static final class AbstractStringAssertStringIsEmpty { @BeforeTemplate void before(AbstractStringAssert&lt;?&gt; stringAssert) { stringAssert.isEqualTo(&quot;&quot;); } @AfterTemplate void after(AbstractStringAssert&lt;?&gt; stringAssert) { stringAssert.isEmpty(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJStringRules.AbstractStringAssertStringIsNotEmpty

tech.picnic.errorprone.refasterrules.AssertJStringRulesRecipes$AbstractStringAssertStringIsNotEmptyRecipe

Recipe created for the following Refaster template: java static final class AbstractStringAssertStringIsNotEmpty { @BeforeTemplate AbstractStringAssert&lt;?&gt; before(AbstractStringAssert&lt;?&gt; stringAssert) { return stringAssert.isNotEqualTo(&quot;&quot;); } @AfterTemplate AbstractStringAssert&lt;?&gt; after(AbstractStringAssert&lt;?&gt; stringAssert) { return stringAssert.isNotEmpty(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJStringRules.AssertThatDoesNotMatch

tech.picnic.errorprone.refasterrules.AssertJStringRulesRecipes$AssertThatDoesNotMatchRecipe

Recipe created for the following Refaster template: java static final class AssertThatDoesNotMatch { @BeforeTemplate AbstractAssert&lt;?, ?&gt; before(String string, String regex) { return assertThat(string.matches(regex)).isFalse(); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractAssert&lt;?, ?&gt; after(String string, String regex) { return assertThat(string).doesNotMatch(regex); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJStringRules.AssertThatMatches

tech.picnic.errorprone.refasterrules.AssertJStringRulesRecipes$AssertThatMatchesRecipe

Recipe created for the following Refaster template: java static final class AssertThatMatches { @BeforeTemplate AbstractAssert&lt;?, ?&gt; before(String string, String regex) { return assertThat(string.matches(regex)).isTrue(); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractAssert&lt;?, ?&gt; after(String string, String regex) { return assertThat(string).matches(regex); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJStringRules.AssertThatPathContent

tech.picnic.errorprone.refasterrules.AssertJStringRulesRecipes$AssertThatPathContentRecipe

Recipe created for the following Refaster template: java static final class AssertThatPathContent { @BeforeTemplate AbstractStringAssert&lt;?&gt; before(Path path, Charset charset) throws IOException { return assertThat(Files.readString(path, charset)); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractStringAssert&lt;?&gt; after(Path path, Charset charset) { return assertThat(path).content(charset); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJStringRules.AssertThatPathContentUtf8

tech.picnic.errorprone.refasterrules.AssertJStringRulesRecipes$AssertThatPathContentUtf8Recipe

Recipe created for the following Refaster template: java static final class AssertThatPathContentUtf8 { @BeforeTemplate AbstractStringAssert&lt;?&gt; before(Path path) throws IOException { return assertThat(Files.readString(path)); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractStringAssert&lt;?&gt; after(Path path) { return assertThat(path).content(UTF_8); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJStringRules.AssertThatStringContains

tech.picnic.errorprone.refasterrules.AssertJStringRulesRecipes$AssertThatStringContainsRecipe

Recipe created for the following Refaster template: java static final class AssertThatStringContains { @BeforeTemplate AbstractBooleanAssert&lt;?&gt; before(String string, CharSequence substring) { return assertThat(string.contains(substring)).isTrue(); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractStringAssert&lt;?&gt; after(String string, CharSequence substring) { return assertThat(string).contains(substring); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJStringRules.AssertThatStringDoesNotContain

tech.picnic.errorprone.refasterrules.AssertJStringRulesRecipes$AssertThatStringDoesNotContainRecipe

Recipe created for the following Refaster template: java static final class AssertThatStringDoesNotContain { @BeforeTemplate AbstractBooleanAssert&lt;?&gt; before(String string, CharSequence substring) { return assertThat(string.contains(substring)).isFalse(); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractStringAssert&lt;?&gt; after(String string, CharSequence substring) { return assertThat(string).doesNotContain(substring); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJStringRules.AssertThatStringDoesNotEndWith

tech.picnic.errorprone.refasterrules.AssertJStringRulesRecipes$AssertThatStringDoesNotEndWithRecipe

Recipe created for the following Refaster template: java static final class AssertThatStringDoesNotEndWith { @BeforeTemplate AbstractBooleanAssert&lt;?&gt; before(String string, String prefix) { return assertThat(string.endsWith(prefix)).isFalse(); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractStringAssert&lt;?&gt; after(String string, String prefix) { return assertThat(string).doesNotEndWith(prefix); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJStringRules.AssertThatStringDoesNotStartWith

tech.picnic.errorprone.refasterrules.AssertJStringRulesRecipes$AssertThatStringDoesNotStartWithRecipe

Recipe created for the following Refaster template: java static final class AssertThatStringDoesNotStartWith { @BeforeTemplate AbstractBooleanAssert&lt;?&gt; before(String string, String prefix) { return assertThat(string.startsWith(prefix)).isFalse(); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractStringAssert&lt;?&gt; after(String string, String prefix) { return assertThat(string).doesNotStartWith(prefix); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJStringRules.AssertThatStringEndsWith

tech.picnic.errorprone.refasterrules.AssertJStringRulesRecipes$AssertThatStringEndsWithRecipe

Recipe created for the following Refaster template: java static final class AssertThatStringEndsWith { @BeforeTemplate AbstractBooleanAssert&lt;?&gt; before(String string, String prefix) { return assertThat(string.endsWith(prefix)).isTrue(); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractStringAssert&lt;?&gt; after(String string, String prefix) { return assertThat(string).endsWith(prefix); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJStringRules.AssertThatStringStartsWith

tech.picnic.errorprone.refasterrules.AssertJStringRulesRecipes$AssertThatStringStartsWithRecipe

Recipe created for the following Refaster template: java static final class AssertThatStringStartsWith { @BeforeTemplate AbstractBooleanAssert&lt;?&gt; before(String string, String prefix) { return assertThat(string.startsWith(prefix)).isTrue(); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractStringAssert&lt;?&gt; after(String string, String prefix) { return assertThat(string).startsWith(prefix); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes

For reasons of consistency we prefer org.assertj.core.api.Assertions#assertThatThrownBy over static methods for specific exception types. Note that only the most common assertion expressions are rewritten here; covering all cases would require the implementation of an Error Prone check instead. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJThrowingCallableRules.AbstractThrowableAssertCauseIsSameAs

tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AbstractThrowableAssertCauseIsSameAsRecipe

Recipe created for the following Refaster template: java static final class AbstractThrowableAssertCauseIsSameAs { @BeforeTemplate @SuppressWarnings(value = &quot;deprecation&quot;) AbstractThrowableAssert&lt;?, ? extends Throwable&gt; before(AbstractThrowableAssert&lt;?, ? extends Throwable&gt; throwableAssert, Throwable expected) { return throwableAssert.hasCauseReference(expected); } @AfterTemplate AbstractThrowableAssert&lt;?, ? extends Throwable&gt; after(AbstractThrowableAssert&lt;?, ? extends Throwable&gt; throwableAssert, Throwable expected) { return throwableAssert.cause().isSameAs(expected); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJThrowingCallableRules.AssertThatThrownByAsInstanceOfThrowable

tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByAsInstanceOfThrowableRecipe

Recipe created for the following Refaster template: java static final class AssertThatThrownByAsInstanceOfThrowable&lt;T extends Throwable&gt; { @BeforeTemplate ThrowableAssertAlternative&lt;T&gt; before(ThrowingCallable throwingCallable, Class&lt;T&gt; exceptionType) { return assertThatExceptionOfType(exceptionType).isThrownBy(throwingCallable); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractThrowableAssert&lt;?, T&gt; after(ThrowingCallable throwingCallable, Class&lt;T&gt; exceptionType) { return assertThatThrownBy(throwingCallable).asInstanceOf(throwable(exceptionType)); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJThrowingCallableRules.AssertThatThrownByHasMessageContaining

tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByHasMessageContainingRecipe

Recipe created for the following Refaster template: java static final class AssertThatThrownByHasMessageContaining { @BeforeTemplate @SuppressWarnings(value = &quot;AssertThatThrownByAsInstanceOfThrowable&quot;) AbstractObjectAssert&lt;?, ?&gt; before(ThrowingCallable throwingCallable, Class&lt;? extends Throwable&gt; exceptionType, String message) { return assertThatExceptionOfType(exceptionType).isThrownBy(throwingCallable).withMessageContaining(message); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractObjectAssert&lt;?, ?&gt; after(ThrowingCallable throwingCallable, Class&lt;? extends Throwable&gt; exceptionType, String message) { return assertThatThrownBy(throwingCallable).isInstanceOf(exceptionType).hasMessageContaining(message); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJThrowingCallableRules.AssertThatThrownByHasMessageNotContaining

tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByHasMessageNotContainingRecipe

Recipe created for the following Refaster template: java static final class AssertThatThrownByHasMessageNotContaining { @BeforeTemplate @SuppressWarnings(value = &quot;AssertThatThrownByAsInstanceOfThrowable&quot;) AbstractObjectAssert&lt;?, ?&gt; before(ThrowingCallable throwingCallable, Class&lt;? extends Throwable&gt; exceptionType, String message) { return assertThatExceptionOfType(exceptionType).isThrownBy(throwingCallable).withMessageNotContaining(message); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractObjectAssert&lt;?, ?&gt; after(ThrowingCallable throwingCallable, Class&lt;? extends Throwable&gt; exceptionType, String message) { return assertThatThrownBy(throwingCallable).isInstanceOf(exceptionType).hasMessageNotContaining(message); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJThrowingCallableRules.AssertThatThrownByHasMessage

tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByHasMessageRecipe

Recipe created for the following Refaster template: java static final class AssertThatThrownByHasMessage { @BeforeTemplate @SuppressWarnings(value = &quot;AssertThatThrownByAsInstanceOfThrowable&quot;) AbstractObjectAssert&lt;?, ?&gt; before(ThrowingCallable throwingCallable, Class&lt;? extends Throwable&gt; exceptionType, String message) { return assertThatExceptionOfType(exceptionType).isThrownBy(throwingCallable).withMessage(message); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractObjectAssert&lt;?, ?&gt; after(ThrowingCallable throwingCallable, Class&lt;? extends Throwable&gt; exceptionType, String message) { return assertThatThrownBy(throwingCallable).isInstanceOf(exceptionType).hasMessage(message); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJThrowingCallableRules.AssertThatThrownByHasMessageStartingWith

tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByHasMessageStartingWithRecipe

Recipe created for the following Refaster template: java static final class AssertThatThrownByHasMessageStartingWith { @BeforeTemplate @SuppressWarnings(value = &quot;AssertThatThrownByAsInstanceOfThrowable&quot;) AbstractObjectAssert&lt;?, ?&gt; before(ThrowingCallable throwingCallable, Class&lt;? extends Throwable&gt; exceptionType, String message) { return assertThatExceptionOfType(exceptionType).isThrownBy(throwingCallable).withMessageStartingWith(message); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractObjectAssert&lt;?, ?&gt; after(ThrowingCallable throwingCallable, Class&lt;? extends Throwable&gt; exceptionType, String message) { return assertThatThrownBy(throwingCallable).isInstanceOf(exceptionType).hasMessageStartingWith(message); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJThrowingCallableRules.AssertThatThrownByIOExceptionHasMessageContaining

tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIOExceptionHasMessageContainingRecipe

Recipe created for the following Refaster template: java static final class AssertThatThrownByIOExceptionHasMessageContaining { @BeforeTemplate @SuppressWarnings(value = &quot;AssertThatThrownByIOException&quot;) AbstractObjectAssert&lt;?, ?&gt; before(ThrowingCallable throwingCallable, String message) { return assertThatIOException().isThrownBy(throwingCallable).withMessageContaining(message); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractObjectAssert&lt;?, ?&gt; after(ThrowingCallable throwingCallable, String message) { return assertThatThrownBy(throwingCallable).isInstanceOf(IOException.class).hasMessageContaining(message); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJThrowingCallableRules.AssertThatThrownByIOExceptionHasMessageNotContaining

tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIOExceptionHasMessageNotContainingRecipe

Recipe created for the following Refaster template: java static final class AssertThatThrownByIOExceptionHasMessageNotContaining { @BeforeTemplate @SuppressWarnings(value = &quot;AssertThatThrownByIOException&quot;) AbstractObjectAssert&lt;?, ?&gt; before(ThrowingCallable throwingCallable, String message) { return assertThatIOException().isThrownBy(throwingCallable).withMessageNotContaining(message); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractObjectAssert&lt;?, ?&gt; after(ThrowingCallable throwingCallable, String message) { return assertThatThrownBy(throwingCallable).isInstanceOf(IOException.class).hasMessageNotContaining(message); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJThrowingCallableRules.AssertThatThrownByIOExceptionHasMessage

tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIOExceptionHasMessageRecipe

Recipe created for the following Refaster template: java static final class AssertThatThrownByIOExceptionHasMessage { @BeforeTemplate @SuppressWarnings(value = &quot;AssertThatThrownByIOException&quot;) AbstractObjectAssert&lt;?, ?&gt; before(ThrowingCallable throwingCallable, String message) { return assertThatIOException().isThrownBy(throwingCallable).withMessage(message); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractObjectAssert&lt;?, ?&gt; after(ThrowingCallable throwingCallable, String message) { return assertThatThrownBy(throwingCallable).isInstanceOf(IOException.class).hasMessage(message); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJThrowingCallableRules.AssertThatThrownByIOExceptionHasMessageStartingWith

tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIOExceptionHasMessageStartingWithRecipe

Recipe created for the following Refaster template: java static final class AssertThatThrownByIOExceptionHasMessageStartingWith { @BeforeTemplate @SuppressWarnings(value = &quot;AssertThatThrownByIOException&quot;) AbstractObjectAssert&lt;?, ?&gt; before(ThrowingCallable throwingCallable, String message) { return assertThatIOException().isThrownBy(throwingCallable).withMessageStartingWith(message); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractObjectAssert&lt;?, ?&gt; after(ThrowingCallable throwingCallable, String message) { return assertThatThrownBy(throwingCallable).isInstanceOf(IOException.class).hasMessageStartingWith(message); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJThrowingCallableRules.AssertThatThrownByIOException

tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIOExceptionRecipe

Recipe created for the following Refaster template: java static final class AssertThatThrownByIOException { @BeforeTemplate AbstractObjectAssert&lt;?, ?&gt; before(ThrowingCallable throwingCallable) { return assertThatIOException().isThrownBy(throwingCallable); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractObjectAssert&lt;?, ?&gt; after(ThrowingCallable throwingCallable) { return assertThatThrownBy(throwingCallable).isInstanceOf(IOException.class); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJThrowingCallableRules.AssertThatThrownByIOExceptionRootCauseHasMessage

tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIOExceptionRootCauseHasMessageRecipe

Recipe created for the following Refaster template: java static final class AssertThatThrownByIOExceptionRootCauseHasMessage { @BeforeTemplate @SuppressWarnings(value = &quot;AssertThatThrownByIOException&quot;) AbstractObjectAssert&lt;?, ?&gt; before(ThrowingCallable throwingCallable, String message) { return assertThatIOException().isThrownBy(throwingCallable).havingRootCause().withMessage(message); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractObjectAssert&lt;?, ?&gt; after(ThrowingCallable throwingCallable, String message) { return assertThatThrownBy(throwingCallable).isInstanceOf(IOException.class).rootCause().hasMessage(message); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJThrowingCallableRules.AssertThatThrownByIllegalArgumentExceptionHasMessageContaining

tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIllegalArgumentExceptionHasMessageContainingRecipe

Recipe created for the following Refaster template: java static final class AssertThatThrownByIllegalArgumentExceptionHasMessageContaining { @BeforeTemplate @SuppressWarnings(value = &quot;AssertThatThrownByIllegalArgumentException&quot;) AbstractObjectAssert&lt;?, ?&gt; before(ThrowingCallable throwingCallable, String message) { return assertThatIllegalArgumentException().isThrownBy(throwingCallable).withMessageContaining(message); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractObjectAssert&lt;?, ?&gt; after(ThrowingCallable throwingCallable, String message) { return assertThatThrownBy(throwingCallable).isInstanceOf(IllegalArgumentException.class).hasMessageContaining(message); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJThrowingCallableRules.AssertThatThrownByIllegalArgumentExceptionHasMessage

tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIllegalArgumentExceptionHasMessageRecipe

Recipe created for the following Refaster template: java static final class AssertThatThrownByIllegalArgumentExceptionHasMessage { @BeforeTemplate @SuppressWarnings(value = &quot;AssertThatThrownByIllegalArgumentException&quot;) AbstractObjectAssert&lt;?, ?&gt; before(ThrowingCallable throwingCallable, String message) { return assertThatIllegalArgumentException().isThrownBy(throwingCallable).withMessage(message); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractObjectAssert&lt;?, ?&gt; after(ThrowingCallable throwingCallable, String message) { return assertThatThrownBy(throwingCallable).isInstanceOf(IllegalArgumentException.class).hasMessage(message); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJThrowingCallableRules.AssertThatThrownByIllegalArgumentExceptionHasMessageStartingWith

tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIllegalArgumentExceptionHasMessageStartingWithRecipe

Recipe created for the following Refaster template: java static final class AssertThatThrownByIllegalArgumentExceptionHasMessageStartingWith { @BeforeTemplate @SuppressWarnings(value = &quot;AssertThatThrownByIllegalArgumentException&quot;) AbstractObjectAssert&lt;?, ?&gt; before(ThrowingCallable throwingCallable, String message) { return assertThatIllegalArgumentException().isThrownBy(throwingCallable).withMessageStartingWith(message); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractObjectAssert&lt;?, ?&gt; after(ThrowingCallable throwingCallable, String message) { return assertThatThrownBy(throwingCallable).isInstanceOf(IllegalArgumentException.class).hasMessageStartingWith(message); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJThrowingCallableRules.AssertThatThrownByIllegalArgumentException

tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIllegalArgumentExceptionRecipe

Recipe created for the following Refaster template: java static final class AssertThatThrownByIllegalArgumentException { @BeforeTemplate AbstractObjectAssert&lt;?, ?&gt; before(ThrowingCallable throwingCallable) { return assertThatIllegalArgumentException().isThrownBy(throwingCallable); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractObjectAssert&lt;?, ?&gt; after(ThrowingCallable throwingCallable) { return assertThatThrownBy(throwingCallable).isInstanceOf(IllegalArgumentException.class); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJThrowingCallableRules.AssertThatThrownByIllegalArgumentExceptionRootCauseHasMessage

tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIllegalArgumentExceptionRootCauseHasMessageRecipe

Recipe created for the following Refaster template: java static final class AssertThatThrownByIllegalArgumentExceptionRootCauseHasMessage { @BeforeTemplate @SuppressWarnings(value = &quot;AssertThatThrownByIllegalArgumentException&quot;) AbstractObjectAssert&lt;?, ?&gt; before(ThrowingCallable throwingCallable, String message) { return assertThatIllegalArgumentException().isThrownBy(throwingCallable).havingRootCause().withMessage(message); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractObjectAssert&lt;?, ?&gt; after(ThrowingCallable throwingCallable, String message) { return assertThatThrownBy(throwingCallable).isInstanceOf(IllegalArgumentException.class).rootCause().hasMessage(message); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJThrowingCallableRules.AssertThatThrownByIllegalStateExceptionHasMessageContaining

tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIllegalStateExceptionHasMessageContainingRecipe

Recipe created for the following Refaster template: java static final class AssertThatThrownByIllegalStateExceptionHasMessageContaining { @BeforeTemplate @SuppressWarnings(value = &quot;AssertThatThrownByIllegalStateException&quot;) AbstractObjectAssert&lt;?, ?&gt; before(ThrowingCallable throwingCallable, String message) { return assertThatIllegalStateException().isThrownBy(throwingCallable).withMessageContaining(message); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractObjectAssert&lt;?, ?&gt; after(ThrowingCallable throwingCallable, String message) { return assertThatThrownBy(throwingCallable).isInstanceOf(IllegalStateException.class).hasMessageContaining(message); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJThrowingCallableRules.AssertThatThrownByIllegalStateExceptionHasMessageNotContaining

tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIllegalStateExceptionHasMessageNotContainingRecipe

Recipe created for the following Refaster template: java static final class AssertThatThrownByIllegalStateExceptionHasMessageNotContaining { @BeforeTemplate @SuppressWarnings(value = &quot;AssertThatThrownByIllegalStateException&quot;) AbstractObjectAssert&lt;?, ?&gt; before(ThrowingCallable throwingCallable, String message) { return assertThatIllegalStateException().isThrownBy(throwingCallable).withMessageNotContaining(message); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractObjectAssert&lt;?, ?&gt; after(ThrowingCallable throwingCallable, String message) { return assertThatThrownBy(throwingCallable).isInstanceOf(IllegalStateException.class).hasMessageNotContaining(message); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJThrowingCallableRules.AssertThatThrownByIllegalStateExceptionHasMessage

tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIllegalStateExceptionHasMessageRecipe

Recipe created for the following Refaster template: java static final class AssertThatThrownByIllegalStateExceptionHasMessage { @BeforeTemplate @SuppressWarnings(value = &quot;AssertThatThrownByIllegalStateException&quot;) AbstractObjectAssert&lt;?, ?&gt; before(ThrowingCallable throwingCallable, String message) { return assertThatIllegalStateException().isThrownBy(throwingCallable).withMessage(message); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractObjectAssert&lt;?, ?&gt; after(ThrowingCallable throwingCallable, String message) { return assertThatThrownBy(throwingCallable).isInstanceOf(IllegalStateException.class).hasMessage(message); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJThrowingCallableRules.AssertThatThrownByIllegalStateExceptionHasMessageStartingWith

tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIllegalStateExceptionHasMessageStartingWithRecipe

Recipe created for the following Refaster template: java static final class AssertThatThrownByIllegalStateExceptionHasMessageStartingWith { @BeforeTemplate @SuppressWarnings(value = &quot;AssertThatThrownByIllegalStateException&quot;) AbstractObjectAssert&lt;?, ?&gt; before(ThrowingCallable throwingCallable, String message) { return assertThatIllegalStateException().isThrownBy(throwingCallable).withMessageStartingWith(message); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractObjectAssert&lt;?, ?&gt; after(ThrowingCallable throwingCallable, String message) { return assertThatThrownBy(throwingCallable).isInstanceOf(IllegalStateException.class).hasMessageStartingWith(message); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJThrowingCallableRules.AssertThatThrownByIllegalStateException

tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIllegalStateExceptionRecipe

Recipe created for the following Refaster template: java static final class AssertThatThrownByIllegalStateException { @BeforeTemplate AbstractObjectAssert&lt;?, ?&gt; before(ThrowingCallable throwingCallable) { return assertThatIllegalStateException().isThrownBy(throwingCallable); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractObjectAssert&lt;?, ?&gt; after(ThrowingCallable throwingCallable) { return assertThatThrownBy(throwingCallable).isInstanceOf(IllegalStateException.class); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJThrowingCallableRules.AssertThatThrownByIllegalStateExceptionRootCauseHasMessage

tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIllegalStateExceptionRootCauseHasMessageRecipe

Recipe created for the following Refaster template: java static final class AssertThatThrownByIllegalStateExceptionRootCauseHasMessage { @BeforeTemplate @SuppressWarnings(value = &quot;AssertThatThrownByIllegalStateException&quot;) AbstractObjectAssert&lt;?, ?&gt; before(ThrowingCallable throwingCallable, String message) { return assertThatIllegalStateException().isThrownBy(throwingCallable).havingRootCause().withMessage(message); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractObjectAssert&lt;?, ?&gt; after(ThrowingCallable throwingCallable, String message) { return assertThatThrownBy(throwingCallable).isInstanceOf(IllegalStateException.class).rootCause().hasMessage(message); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJThrowingCallableRules.AssertThatThrownByIsInstanceOf

tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByIsInstanceOfRecipe

Recipe created for the following Refaster template: java static final class AssertThatThrownByIsInstanceOf&lt;T extends Throwable&gt; { @BeforeTemplate void before(ThrowingCallable throwingCallable, Class&lt;T&gt; exceptionType) { Refaster.anyOf(assertThatThrownBy(throwingCallable).asInstanceOf(throwable(exceptionType)), assertThatThrownBy(throwingCallable).asInstanceOf(type(exceptionType))); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(ThrowingCallable throwingCallable, Class&lt;T&gt; exceptionType) { assertThatThrownBy(throwingCallable).isInstanceOf(exceptionType); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJThrowingCallableRules.AssertThatThrownByNullPointerExceptionHasMessageContaining

tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByNullPointerExceptionHasMessageContainingRecipe

Recipe created for the following Refaster template: java static final class AssertThatThrownByNullPointerExceptionHasMessageContaining { @BeforeTemplate @SuppressWarnings(value = &quot;AssertThatThrownByNullPointerException&quot;) AbstractObjectAssert&lt;?, ?&gt; before(ThrowingCallable throwingCallable, String message) { return assertThatNullPointerException().isThrownBy(throwingCallable).withMessageContaining(message); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractObjectAssert&lt;?, ?&gt; after(ThrowingCallable throwingCallable, String message) { return assertThatThrownBy(throwingCallable).isInstanceOf(NullPointerException.class).hasMessageContaining(message); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJThrowingCallableRules.AssertThatThrownByNullPointerExceptionHasMessageNotContaining

tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByNullPointerExceptionHasMessageNotContainingRecipe

Recipe created for the following Refaster template: java static final class AssertThatThrownByNullPointerExceptionHasMessageNotContaining { @BeforeTemplate @SuppressWarnings(value = &quot;AssertThatThrownByNullPointerException&quot;) AbstractObjectAssert&lt;?, ?&gt; before(ThrowingCallable throwingCallable, String message) { return assertThatNullPointerException().isThrownBy(throwingCallable).withMessageNotContaining(message); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractObjectAssert&lt;?, ?&gt; after(ThrowingCallable throwingCallable, String message) { return assertThatThrownBy(throwingCallable).isInstanceOf(NullPointerException.class).hasMessageNotContaining(message); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJThrowingCallableRules.AssertThatThrownByNullPointerExceptionHasMessage

tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByNullPointerExceptionHasMessageRecipe

Recipe created for the following Refaster template: java static final class AssertThatThrownByNullPointerExceptionHasMessage { @BeforeTemplate @SuppressWarnings(value = &quot;AssertThatThrownByNullPointerException&quot;) AbstractObjectAssert&lt;?, ?&gt; before(ThrowingCallable throwingCallable, String message) { return assertThatNullPointerException().isThrownBy(throwingCallable).withMessage(message); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractObjectAssert&lt;?, ?&gt; after(ThrowingCallable throwingCallable, String message) { return assertThatThrownBy(throwingCallable).isInstanceOf(NullPointerException.class).hasMessage(message); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJThrowingCallableRules.AssertThatThrownByNullPointerExceptionHasMessageStartingWith

tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByNullPointerExceptionHasMessageStartingWithRecipe

Recipe created for the following Refaster template: java static final class AssertThatThrownByNullPointerExceptionHasMessageStartingWith { @BeforeTemplate @SuppressWarnings(value = &quot;AssertThatThrownByNullPointerException&quot;) AbstractObjectAssert&lt;?, ?&gt; before(ThrowingCallable throwingCallable, String message) { return assertThatNullPointerException().isThrownBy(throwingCallable).withMessageStartingWith(message); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractObjectAssert&lt;?, ?&gt; after(ThrowingCallable throwingCallable, String message) { return assertThatThrownBy(throwingCallable).isInstanceOf(NullPointerException.class).hasMessageStartingWith(message); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJThrowingCallableRules.AssertThatThrownByNullPointerException

tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByNullPointerExceptionRecipe

Recipe created for the following Refaster template: java static final class AssertThatThrownByNullPointerException { @BeforeTemplate AbstractObjectAssert&lt;?, ?&gt; before(ThrowingCallable throwingCallable) { return assertThatNullPointerException().isThrownBy(throwingCallable); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractObjectAssert&lt;?, ?&gt; after(ThrowingCallable throwingCallable) { return assertThatThrownBy(throwingCallable).isInstanceOf(NullPointerException.class); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJThrowingCallableRules.AssertThatThrownByNullPointerExceptionRootCauseHasMessage

tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByNullPointerExceptionRootCauseHasMessageRecipe

Recipe created for the following Refaster template: java static final class AssertThatThrownByNullPointerExceptionRootCauseHasMessage { @BeforeTemplate @SuppressWarnings(value = &quot;AssertThatThrownByNullPointerException&quot;) AbstractObjectAssert&lt;?, ?&gt; before(ThrowingCallable throwingCallable, String message) { return assertThatNullPointerException().isThrownBy(throwingCallable).havingRootCause().withMessage(message); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractObjectAssert&lt;?, ?&gt; after(ThrowingCallable throwingCallable, String message) { return assertThatThrownBy(throwingCallable).isInstanceOf(NullPointerException.class).rootCause().hasMessage(message); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssertJThrowingCallableRules.AssertThatThrownByRootCauseHasMessage

tech.picnic.errorprone.refasterrules.AssertJThrowingCallableRulesRecipes$AssertThatThrownByRootCauseHasMessageRecipe

Recipe created for the following Refaster template: java static final class AssertThatThrownByRootCauseHasMessage { @BeforeTemplate @SuppressWarnings(value = &quot;AssertThatThrownByAsInstanceOfThrowable&quot;) AbstractObjectAssert&lt;?, ?&gt; before(ThrowingCallable throwingCallable, Class&lt;? extends Throwable&gt; exceptionType, String message) { return assertThatExceptionOfType(exceptionType).isThrownBy(throwingCallable).havingRootCause().withMessage(message); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) AbstractObjectAssert&lt;?, ?&gt; after(ThrowingCallable throwingCallable, Class&lt;? extends Throwable&gt; exceptionType, String message) { return assertThatThrownBy(throwingCallable).isInstanceOf(exceptionType).rootCause().hasMessage(message); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

AssortedRules Refaster recipes

tech.picnic.errorprone.refasterrules.AssortedRulesRecipes

Assorted Refaster rules that do not (yet) belong in one of the other classes with more topical Refaster rules. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssortedRules.CheckIndex

tech.picnic.errorprone.refasterrules.AssortedRulesRecipes$CheckIndexRecipe

Prefer Objects#checkIndex(int, int) over the Guava alternative.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssortedRules.DisjointCollections

tech.picnic.errorprone.refasterrules.AssortedRulesRecipes$DisjointCollectionsRecipe

Don't unnecessarily copy collections before passing them to Collections#disjoint(Collection, Collection).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssortedRules.DisjointSets

tech.picnic.errorprone.refasterrules.AssortedRulesRecipes$DisjointSetsRecipe

Prefer Collections#disjoint(Collection, Collection) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssortedRules.IterableIsEmpty

tech.picnic.errorprone.refasterrules.AssortedRulesRecipes$IterableIsEmptyRecipe

Prefer Iterables#isEmpty(Iterable) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssortedRules.IteratorGetNextOrDefault

tech.picnic.errorprone.refasterrules.AssortedRulesRecipes$IteratorGetNextOrDefaultRecipe

Prefer Iterators#getNext(Iterator, Object) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssortedRules.LogicalImplication

tech.picnic.errorprone.refasterrules.AssortedRulesRecipes$LogicalImplicationRecipe

Don't unnecessarily repeat boolean expressions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssortedRules.SplitToStream

tech.picnic.errorprone.refasterrules.AssortedRulesRecipes$SplitToStreamRecipe

Prefer Splitter#splitToStream(CharSequence) over less efficient alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template AssortedRules.UnboundedSingleElementStream

tech.picnic.errorprone.refasterrules.AssortedRulesRecipes$UnboundedSingleElementStreamRecipe

Prefer Stream#generate(java.util.function.Supplier) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

BigDecimalRules Refaster recipes

tech.picnic.errorprone.refasterrules.BigDecimalRulesRecipes

Refaster rules related to expressions dealing with BigDecimals. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template BigDecimalRules.BigDecimalOne

tech.picnic.errorprone.refasterrules.BigDecimalRulesRecipes$BigDecimalOneRecipe

Prefer using the constant BigDecimal#ONE when possible.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template BigDecimalRules.BigDecimalSignumIsNegative

tech.picnic.errorprone.refasterrules.BigDecimalRulesRecipes$BigDecimalSignumIsNegativeRecipe

Prefer a BigDecimal#signum() comparison to -1 over more contrived or less clear alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template BigDecimalRules.BigDecimalSignumIsPositive

tech.picnic.errorprone.refasterrules.BigDecimalRulesRecipes$BigDecimalSignumIsPositiveRecipe

Prefer a BigDecimal#signum() comparison to 1 over more contrived or less clear alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template BigDecimalRules.BigDecimalSignumIsZero

tech.picnic.errorprone.refasterrules.BigDecimalRulesRecipes$BigDecimalSignumIsZeroRecipe

Prefer using BigDecimal#signum() over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template BigDecimalRules.BigDecimalTen

tech.picnic.errorprone.refasterrules.BigDecimalRulesRecipes$BigDecimalTenRecipe

Prefer using the constant BigDecimal#TEN when possible.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template BigDecimalRules.BigDecimalTwo

tech.picnic.errorprone.refasterrules.BigDecimalRulesRecipes$BigDecimalTwoRecipe

Prefer using the constant BigDecimal#TWO when possible.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template BigDecimalRules.BigDecimalValueOf

tech.picnic.errorprone.refasterrules.BigDecimalRulesRecipes$BigDecimalValueOfRecipe

Prefer BigDecimal#valueOf(double) over the associated constructor.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template BigDecimalRules.BigDecimalZero

tech.picnic.errorprone.refasterrules.BigDecimalRulesRecipes$BigDecimalZeroRecipe

Prefer using the constant BigDecimal#ZERO when possible.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

BugCheckerRules Refaster recipes

tech.picnic.errorprone.refasterrules.BugCheckerRulesRecipes

Refaster rules related to com.google.errorprone.bugpatterns.BugChecker classes. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template BugCheckerRules.ASTHelpersGetStartPosition

tech.picnic.errorprone.refasterrules.BugCheckerRulesRecipes$ASTHelpersGetStartPositionRecipe

Prefer ASTHelpers#getStartPosition(Tree) over alternatives that require casting.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template BugCheckerRules.BugCheckerRefactoringTestHelperAddInputLinesExpectUnchanged

tech.picnic.errorprone.refasterrules.BugCheckerRulesRecipes$BugCheckerRefactoringTestHelperAddInputLinesExpectUnchangedRecipe

Prefer BugCheckerRefactoringTestHelper.ExpectOutput#expectUnchanged() over repeating the input.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template BugCheckerRules.BugCheckerRefactoringTestHelperIdentity

tech.picnic.errorprone.refasterrules.BugCheckerRulesRecipes$BugCheckerRefactoringTestHelperIdentityRecipe

Avoid calling BugCheckerRefactoringTestHelper#setFixChooser(FixChooser) or BugCheckerRefactoringTestHelper#setImportOrder(String) with their respective default values.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template BugCheckerRules.NameContentEquals

tech.picnic.errorprone.refasterrules.BugCheckerRulesRecipes$NameContentEqualsRecipe

Prefer Name#contentEquals(CharSequence) over more verbose alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

CharSequenceRules Refaster recipes

tech.picnic.errorprone.refasterrules.CharSequenceRulesRecipes

Refaster rules related to expressions dealing with CharSequences. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template CharSequenceRules.CharSequenceIsEmpty

tech.picnic.errorprone.refasterrules.CharSequenceRulesRecipes$CharSequenceIsEmptyRecipe

Prefer CharSequence#isEmpty() over alternatives that consult the char sequence's length.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

ClassRules Refaster recipes

tech.picnic.errorprone.refasterrules.ClassRulesRecipes

Refaster rules related to expressions dealing with classes. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ClassRules.ClassIsInstance

tech.picnic.errorprone.refasterrules.ClassRulesRecipes$ClassIsInstanceRecipe

Prefer Class#isInstance(Object) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ClassRules.ClassReferenceCast

tech.picnic.errorprone.refasterrules.ClassRulesRecipes$ClassReferenceCastRecipe

Prefer Class#cast(Object) method references over lambda expressions that require naming a variable.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ClassRules.ClassReferenceIsInstancePredicate

tech.picnic.errorprone.refasterrules.ClassRulesRecipes$ClassReferenceIsInstancePredicateRecipe

Prefer Class#isInstance(Object) method references over lambda expressions that require naming a variable.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

CollectionRules Refaster recipes

tech.picnic.errorprone.refasterrules.CollectionRulesRecipes

Refaster rules related to expressions dealing with (arbitrary) collections. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template CollectionRules.CollectionAddAllToCollectionExpression

tech.picnic.errorprone.refasterrules.CollectionRulesRecipes$CollectionAddAllToCollectionExpressionRecipe

Don't call Iterables#addAll(Collection, Iterable) when the elements to be added are already part of a Collection.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template CollectionRules.CollectionContains

tech.picnic.errorprone.refasterrules.CollectionRulesRecipes$CollectionContainsRecipe

Prefer Collection#contains(Object) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template CollectionRules.CollectionForEach

tech.picnic.errorprone.refasterrules.CollectionRulesRecipes$CollectionForEachRecipe

Prefer Collection#forEach(Consumer) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template CollectionRules.CollectionIsEmpty

tech.picnic.errorprone.refasterrules.CollectionRulesRecipes$CollectionIsEmptyRecipe

Prefer Collection#isEmpty() over alternatives that consult the collection's size or are otherwise more contrived.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template CollectionRules.CollectionIteratorNext

tech.picnic.errorprone.refasterrules.CollectionRulesRecipes$CollectionIteratorNextRecipe

Prefer collection.iterator().next() over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template CollectionRules.CollectionIterator

tech.picnic.errorprone.refasterrules.CollectionRulesRecipes$CollectionIteratorRecipe

Prefer Collection#iterator() over more contrived or less efficient alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template CollectionRules.CollectionRemoveAllFromCollectionExpression

tech.picnic.errorprone.refasterrules.CollectionRulesRecipes$CollectionRemoveAllFromCollectionExpressionRecipe

Don't call Iterables#removeAll(Iterable, Collection) when the elements to be removed are already part of a Collection.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template CollectionRules.CollectionSize

tech.picnic.errorprone.refasterrules.CollectionRulesRecipes$CollectionSizeRecipe

Prefer Collection#size() over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template CollectionRules.CollectionToArray

tech.picnic.errorprone.refasterrules.CollectionRulesRecipes$CollectionToArrayRecipe

Prefer calling Collection#toArray() over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template CollectionRules.ImmutableCollectionAsList

tech.picnic.errorprone.refasterrules.CollectionRulesRecipes$ImmutableCollectionAsListRecipe

Prefer ImmutableCollection#asList() over the more verbose alternative.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template CollectionRules.ImmutableCollectionContains

tech.picnic.errorprone.refasterrules.CollectionRulesRecipes$ImmutableCollectionContainsRecipe

Don't call ImmutableCollection#asList() if Collection#contains(Object) is called on the result; call it directly.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template CollectionRules.ImmutableCollectionParallelStream

tech.picnic.errorprone.refasterrules.CollectionRulesRecipes$ImmutableCollectionParallelStreamRecipe

Don't call ImmutableCollection#asList() if ImmutableCollection#parallelStream() is called on the result; call it directly.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template CollectionRules.ImmutableCollectionStream

tech.picnic.errorprone.refasterrules.CollectionRulesRecipes$ImmutableCollectionStreamRecipe

Don't call ImmutableCollection#asList() if the result is going to be streamed; stream directly.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template CollectionRules.ImmutableCollectionToArrayWithArray

tech.picnic.errorprone.refasterrules.CollectionRulesRecipes$ImmutableCollectionToArrayWithArrayRecipe

Don't call ImmutableCollection#asList() if `ImmutableCollection#toArray(Object[])`` is called on the result; call it directly.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template CollectionRules.ImmutableCollectionToArrayWithGenerator

tech.picnic.errorprone.refasterrules.CollectionRulesRecipes$ImmutableCollectionToArrayWithGeneratorRecipe

Don't call ImmutableCollection#asList() if ImmutableCollection#toArray(IntFunction)} is called on the result; call it directly.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template CollectionRules.ImmutableCollectionToString

tech.picnic.errorprone.refasterrules.CollectionRulesRecipes$ImmutableCollectionToStringRecipe

Don't call ImmutableCollection#asList() if ImmutableCollection#toString() is called on the result; call it directly.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template CollectionRules.ListAddFirst

tech.picnic.errorprone.refasterrules.CollectionRulesRecipes$ListAddFirstRecipe

Prefer List#addFirst(Object) over less idiomatic alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template CollectionRules.ListAdd

tech.picnic.errorprone.refasterrules.CollectionRulesRecipes$ListAddRecipe

Prefer List#add(Object) over less idiomatic alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template CollectionRules.ListRemoveFirst

tech.picnic.errorprone.refasterrules.CollectionRulesRecipes$ListRemoveFirstRecipe

Prefer List#removeFirst()} over less idiomatic alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template CollectionRules.ListRemoveLast

tech.picnic.errorprone.refasterrules.CollectionRulesRecipes$ListRemoveLastRecipe

Prefer List#removeLast()} over less idiomatic alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template CollectionRules.NewArrayListFromCollection

tech.picnic.errorprone.refasterrules.CollectionRulesRecipes$NewArrayListFromCollectionRecipe

Prefer ArrayList#ArrayList(Collection) over the Guava alternative.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template CollectionRules.OptionalFirstCollectionElement

tech.picnic.errorprone.refasterrules.CollectionRulesRecipes$OptionalFirstCollectionElementRecipe

Don't use the ternary operator to extract the first element of a possibly-empty Collection as an Optional, and (when applicable) prefer Stream#findFirst() over Stream#findAny() to communicate that the collection's first element (if any, according to iteration order) will be returned.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template CollectionRules.RemoveOptionalFirstNavigableSetElement

tech.picnic.errorprone.refasterrules.CollectionRulesRecipes$RemoveOptionalFirstNavigableSetElementRecipe

Avoid contrived constructions when extracting the first element from a possibly empty NavigableSet.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template CollectionRules.SequencedCollectionGetFirst

tech.picnic.errorprone.refasterrules.CollectionRulesRecipes$SequencedCollectionGetFirstRecipe

Prefer SequencedCollection#getFirst() over less idiomatic alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template CollectionRules.SequencedCollectionGetLast

tech.picnic.errorprone.refasterrules.CollectionRulesRecipes$SequencedCollectionGetLastRecipe

Prefer SequencedCollection#getLast() over less idiomatic alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template CollectionRules.SetStream

tech.picnic.errorprone.refasterrules.CollectionRulesRecipes$SetStreamRecipe

Don't unnecessarily call Stream#distinct() on an already-unique stream of elements.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template CollectionRules.SortedSetFirst

tech.picnic.errorprone.refasterrules.CollectionRulesRecipes$SortedSetFirstRecipe

Prefer SortedSet#first() over more verbose alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template CollectionRules.SortedSetLast

tech.picnic.errorprone.refasterrules.CollectionRulesRecipes$SortedSetLastRecipe

Prefer SortedSet#last() over more verbose alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

ComparatorRules Refaster recipes

tech.picnic.errorprone.refasterrules.ComparatorRulesRecipes

Refaster rules related to expressions dealing with Comparators. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ComparatorRules.CollectionsMax

tech.picnic.errorprone.refasterrules.ComparatorRulesRecipes$CollectionsMaxRecipe

Prefer Collections#max(Collection) over more verbose alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ComparatorRules.CollectionsMaxWithComparator

tech.picnic.errorprone.refasterrules.ComparatorRulesRecipes$CollectionsMaxWithComparatorRecipe

Avoid unnecessary creation of a Stream to determine the maximum of a known collection of values.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ComparatorRules.CollectionsMin

tech.picnic.errorprone.refasterrules.ComparatorRulesRecipes$CollectionsMinRecipe

Prefer Collections#min(Collection) over more verbose alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ComparatorRules.CollectionsMinWithComparator

tech.picnic.errorprone.refasterrules.ComparatorRulesRecipes$CollectionsMinWithComparatorRecipe

Avoid unnecessary creation of a Stream to determine the minimum of a known collection of values.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ComparatorRules.CollectionsSort

tech.picnic.errorprone.refasterrules.ComparatorRulesRecipes$CollectionsSortRecipe

Prefer Collections#sort(List) over more verbose alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ComparatorRules.ComparatorsMax

tech.picnic.errorprone.refasterrules.ComparatorRulesRecipes$ComparatorsMaxRecipe

Prefer a method reference to Comparators#max(Comparable, Comparable) over calling BinaryOperator#minBy(Comparator) with Comparator#naturalOrder().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ComparatorRules.ComparatorsMin

tech.picnic.errorprone.refasterrules.ComparatorRulesRecipes$ComparatorsMinRecipe

Prefer a method reference to Comparators#min(Comparable, Comparable) over calling BinaryOperator#minBy(Comparator) with Comparator#naturalOrder().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ComparatorRules.CompareTo

tech.picnic.errorprone.refasterrules.ComparatorRulesRecipes$CompareToRecipe

Prefer Comparable#compareTo(Object)} over more verbose alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ComparatorRules.IsLessThanOrEqualTo

tech.picnic.errorprone.refasterrules.ComparatorRulesRecipes$IsLessThanOrEqualToRecipe

Don't explicitly compare enums by their ordinal.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ComparatorRules.IsLessThan

tech.picnic.errorprone.refasterrules.ComparatorRulesRecipes$IsLessThanRecipe

Don't explicitly compare enums by their ordinal.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ComparatorRules.MaxByNaturalOrder

tech.picnic.errorprone.refasterrules.ComparatorRulesRecipes$MaxByNaturalOrderRecipe

Prefer Comparator#naturalOrder() over Comparator#reverseOrder() where possible.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ComparatorRules.MaxOfArray

tech.picnic.errorprone.refasterrules.ComparatorRulesRecipes$MaxOfArrayRecipe

Avoid unnecessary creation of a Stream to determine the maximum of a known collection of values.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ComparatorRules.MinByNaturalOrder

tech.picnic.errorprone.refasterrules.ComparatorRulesRecipes$MinByNaturalOrderRecipe

Prefer Comparator#naturalOrder() over Comparator#reverseOrder() where possible.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ComparatorRules.MinOfArray

tech.picnic.errorprone.refasterrules.ComparatorRulesRecipes$MinOfArrayRecipe

Avoid unnecessary creation of a Stream to determine the minimum of a known collection of values.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ComparatorRules.ReverseOrder

tech.picnic.errorprone.refasterrules.ComparatorRulesRecipes$ReverseOrderRecipe

Prefer Comparator#reverseOrder() over more complicated constructs.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ComparatorRules.ThenComparingCustom

tech.picnic.errorprone.refasterrules.ComparatorRulesRecipes$ThenComparingCustomRecipe

Don't explicitly create Comparators unnecessarily.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ComparatorRules.ThenComparingCustomReversed

tech.picnic.errorprone.refasterrules.ComparatorRulesRecipes$ThenComparingCustomReversedRecipe

Don't explicitly create Comparators unnecessarily.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ComparatorRules.ThenComparingDouble

tech.picnic.errorprone.refasterrules.ComparatorRulesRecipes$ThenComparingDoubleRecipe

Don't explicitly create Comparators unnecessarily.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ComparatorRules.ThenComparingInt

tech.picnic.errorprone.refasterrules.ComparatorRulesRecipes$ThenComparingIntRecipe

Don't explicitly create Comparators unnecessarily.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ComparatorRules.ThenComparingLong

tech.picnic.errorprone.refasterrules.ComparatorRulesRecipes$ThenComparingLongRecipe

Don't explicitly create Comparators unnecessarily.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ComparatorRules.ThenComparing

tech.picnic.errorprone.refasterrules.ComparatorRulesRecipes$ThenComparingRecipe

Don't explicitly create Comparators unnecessarily.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ComparatorRules.ThenComparingReversed

tech.picnic.errorprone.refasterrules.ComparatorRulesRecipes$ThenComparingReversedRecipe

Don't explicitly create Comparators unnecessarily.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

DoubleStreamRules Refaster recipes

tech.picnic.errorprone.refasterrules.DoubleStreamRulesRecipes

Refaster rules related to expressions dealing with DoubleStreams. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template DoubleStreamRules.ConcatOneDoubleStream

tech.picnic.errorprone.refasterrules.DoubleStreamRulesRecipes$ConcatOneDoubleStreamRecipe

Don't unnecessarily call Streams#concat(DoubleStream...).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template DoubleStreamRules.ConcatTwoDoubleStreams

tech.picnic.errorprone.refasterrules.DoubleStreamRulesRecipes$ConcatTwoDoubleStreamsRecipe

Prefer DoubleStream#concat(DoubleStream, DoubleStream) over the Guava alternative.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template DoubleStreamRules.DoubleStreamAllMatch

tech.picnic.errorprone.refasterrules.DoubleStreamRulesRecipes$DoubleStreamAllMatchRecipe

Recipe created for the following Refaster template: java 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); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template DoubleStreamRules.DoubleStreamAnyMatch

tech.picnic.errorprone.refasterrules.DoubleStreamRulesRecipes$DoubleStreamAnyMatchRecipe

Prefer DoubleStream#anyMatch(DoublePredicate) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template DoubleStreamRules.DoubleStreamFilterSorted

tech.picnic.errorprone.refasterrules.DoubleStreamRulesRecipes$DoubleStreamFilterSortedRecipe

Apply DoubleStream#filter(DoublePredicate) before DoubleStream#sorted() to reduce the number of elements to sort.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template DoubleStreamRules.DoubleStreamIsEmpty

tech.picnic.errorprone.refasterrules.DoubleStreamRulesRecipes$DoubleStreamIsEmptyRecipe

In order to test whether a stream has any element, simply try to find one.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template DoubleStreamRules.DoubleStreamIsNotEmpty

tech.picnic.errorprone.refasterrules.DoubleStreamRulesRecipes$DoubleStreamIsNotEmptyRecipe

In order to test whether a stream has any element, simply try to find one.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template DoubleStreamRules.DoubleStreamMin

tech.picnic.errorprone.refasterrules.DoubleStreamRulesRecipes$DoubleStreamMinRecipe

Recipe created for the following Refaster template: java static final class DoubleStreamMin { @BeforeTemplate OptionalDouble before(DoubleStream stream) { return stream.sorted().findFirst(); } @AfterTemplate OptionalDouble after(DoubleStream stream) { return stream.min(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template DoubleStreamRules.DoubleStreamNoneMatch

tech.picnic.errorprone.refasterrules.DoubleStreamRulesRecipes$DoubleStreamNoneMatchRecipe

Prefer DoubleStream#noneMatch(DoublePredicate) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template DoubleStreamRules.DoubleStreamTakeWhile

tech.picnic.errorprone.refasterrules.DoubleStreamRulesRecipes$DoubleStreamTakeWhileRecipe

Recipe created for the following Refaster template: java static final class DoubleStreamTakeWhile { @BeforeTemplate DoubleStream before(DoubleStream stream, DoublePredicate predicate) { return stream.takeWhile(predicate).filter(predicate); } @AfterTemplate DoubleStream after(DoubleStream stream, DoublePredicate predicate) { return stream.takeWhile(predicate); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

EqualityRules Refaster recipes

tech.picnic.errorprone.refasterrules.EqualityRulesRecipes

Refaster rules related to expressions dealing with (in)equalities. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template EqualityRules.DoubleNegation

tech.picnic.errorprone.refasterrules.EqualityRulesRecipes$DoubleNegationRecipe

Avoid double negations; this is not Javascript.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template EqualityRules.EnumReferenceEqualityLambda

tech.picnic.errorprone.refasterrules.EqualityRulesRecipes$EnumReferenceEqualityLambdaRecipe

Prefer reference-based equality for enums.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template EqualityRules.EnumReferenceEquality

tech.picnic.errorprone.refasterrules.EqualityRulesRecipes$EnumReferenceEqualityRecipe

Prefer reference-based equality for enums.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template EqualityRules.EqualsPredicate

tech.picnic.errorprone.refasterrules.EqualityRulesRecipes$EqualsPredicateRecipe

Prefer Object#equals(Object) over the equivalent lambda function.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template EqualityRules.Equals

tech.picnic.errorprone.refasterrules.EqualityRulesRecipes$EqualsRecipe

Avoid contrived ways of handling null values during equality testing.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template EqualityRules.IndirectDoubleNegation

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.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template EqualityRules.Negation

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.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template EqualityRules.ObjectsEquals

tech.picnic.errorprone.refasterrules.EqualityRulesRecipes$ObjectsEqualsRecipe

Avoid contrived ways of handling null values during equality testing.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

FileRules Refaster recipes

tech.picnic.errorprone.refasterrules.FileRulesRecipes

Refaster rules related to expressions dealing with files. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template FileRules.FileMkDirsFileExists

tech.picnic.errorprone.refasterrules.FileRulesRecipes$FileMkDirsFileExistsRecipe

Invoke File#mkdirs() before File#exists() to avoid concurrency issues.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Files#createTempFile(Path, String, String, FileAttribute[]) over alternatives that create files with more liberal permissions

tech.picnic.errorprone.refasterrules.FileRulesRecipes$FilesCreateTempFileInCustomDirectoryToFileRecipe

Note that File#createTempFile treats 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 with Files#createTempFile, which will instead throw an IllegalArgumentException if the prefix contains any file separators.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Files#createTempFile(String, String, FileAttribute[]) over alternatives that create files with more liberal permissions

tech.picnic.errorprone.refasterrules.FileRulesRecipes$FilesCreateTempFileToFileRecipe

Note that File#createTempFile treats 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 with Files#createTempFile, which will instead throw an IllegalArgumentException if the prefix contains any file separators.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template FileRules.FilesNewBufferedReaderPathOf

tech.picnic.errorprone.refasterrules.FileRulesRecipes$FilesNewBufferedReaderPathOfRecipe

Prefer Files#newBufferedReader(Path) over more verbose or contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template FileRules.FilesNewBufferedReaderPathOfWithCharset

tech.picnic.errorprone.refasterrules.FileRulesRecipes$FilesNewBufferedReaderPathOfWithCharsetRecipe

Prefer Files#newBufferedReader(Path, Charset) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template FileRules.FilesNewBufferedReaderToPath

tech.picnic.errorprone.refasterrules.FileRulesRecipes$FilesNewBufferedReaderToPathRecipe

Prefer Files#newBufferedReader(Path) over more verbose or contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template FileRules.FilesNewBufferedReaderToPathWithCharset

tech.picnic.errorprone.refasterrules.FileRulesRecipes$FilesNewBufferedReaderToPathWithCharsetRecipe

Prefer Files#newBufferedReader(Path, Charset) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template FileRules.FilesReadString

tech.picnic.errorprone.refasterrules.FileRulesRecipes$FilesReadStringRecipe

Prefer Files#readString(Path) over more verbose alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template FileRules.FilesReadStringWithCharset

tech.picnic.errorprone.refasterrules.FileRulesRecipes$FilesReadStringWithCharsetRecipe

Prefer Files#readString(Path, Charset) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template FileRules.PathInstance

tech.picnic.errorprone.refasterrules.FileRulesRecipes$PathInstanceRecipe

Avoid redundant conversions from Path to File.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template FileRules.PathOfUri

tech.picnic.errorprone.refasterrules.FileRulesRecipes$PathOfUriRecipe

Prefer the more idiomatic Path#of(URI) over Paths#get(URI).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template FileRules.PathToFileMkDirsFilesExists

tech.picnic.errorprone.refasterrules.FileRulesRecipes$PathToFileMkDirsFilesExistsRecipe

Invoke File#mkdirs() before Files#exists(Path, LinkOption...) to avoid concurrency issues.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

ImmutableEnumSetRules Refaster recipes

tech.picnic.errorprone.refasterrules.ImmutableEnumSetRulesRecipes

Refaster rules related to expressions dealing with com.google.common.collect.ImmutableEnumSets. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableEnumSetRules.SetsImmutableEnumSet1

tech.picnic.errorprone.refasterrules.ImmutableEnumSetRulesRecipes$SetsImmutableEnumSet1Recipe

Prefer Sets#immutableEnumSet(Enum, Enum[]) for enum collections to take advantage of the internally used EnumSet.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Sets#immutableEnumSet(Enum, Enum[]) for enum collections to take advantage of the internally used EnumSet

tech.picnic.errorprone.refasterrules.ImmutableEnumSetRulesRecipes$SetsImmutableEnumSet2Recipe

<strong>Warning:</strong> this rule is not completely behavior preserving: while the ImmutableSet#of expression produces a set that iterates over its elements in the listed order, the replacement code iterates over the elements in enum definition order.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Sets#immutableEnumSet(Enum, Enum[]) for enum collections to take advantage of the internally used EnumSet

tech.picnic.errorprone.refasterrules.ImmutableEnumSetRulesRecipes$SetsImmutableEnumSet3Recipe

<strong>Warning:</strong> this rule is not completely behavior preserving: while the ImmutableSet#of expression produces a set that iterates over its elements in the listed order, the replacement code iterates over the elements in enum definition order.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Sets#immutableEnumSet(Enum, Enum[]) for enum collections to take advantage of the internally used EnumSet

tech.picnic.errorprone.refasterrules.ImmutableEnumSetRulesRecipes$SetsImmutableEnumSet4Recipe

<strong>Warning:</strong> this rule is not completely behavior preserving: while the ImmutableSet#of expression produces a set that iterates over its elements in the listed order, the replacement code iterates over the elements in enum definition order.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Sets#immutableEnumSet(Enum, Enum[]) for enum collections to take advantage of the internally used EnumSet

tech.picnic.errorprone.refasterrules.ImmutableEnumSetRulesRecipes$SetsImmutableEnumSet5Recipe

<strong>Warning:</strong> this rule is not completely behavior preserving: while the ImmutableSet#of expression produces a set that iterates over its elements in the listed order, the replacement code iterates over the elements in enum definition order.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Sets#immutableEnumSet(Enum, Enum[]) for enum collections to take advantage of the internally used EnumSet

tech.picnic.errorprone.refasterrules.ImmutableEnumSetRulesRecipes$SetsImmutableEnumSet6Recipe

<strong>Warning:</strong> this rule is not completely behavior preserving: while the original code produces a set that iterates over its elements in the listed order, the replacement code iterates over the elements in enum definition order.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Sets#immutableEnumSet(Iterable) for enum collections to take advantage of the internally used EnumSet

tech.picnic.errorprone.refasterrules.ImmutableEnumSetRulesRecipes$SetsImmutableEnumSetArraysAsListRecipe

<strong>Warning:</strong> this rule is not completely behavior preserving: while the original code produces a set that iterates over its elements in the same order as defined in the array, the replacement code iterates over the elements in enum definition order.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Sets#immutableEnumSet(Iterable) for enum collections to take advantage of the internally used EnumSet

tech.picnic.errorprone.refasterrules.ImmutableEnumSetRulesRecipes$SetsImmutableEnumSetIterableRecipe

<strong>Warning:</strong> this rule is not completely behavior preserving: while the original code produces a set that iterates over its elements in the same order as the input Iterable, the replacement code iterates over the elements in enum definition order.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use Sets#toImmutableEnumSet() when possible, as it is more efficient than ImmutableSet#toImmutableSet() and produces a more compact object

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.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

ImmutableListMultimapRules Refaster recipes

tech.picnic.errorprone.refasterrules.ImmutableListMultimapRulesRecipes

Refaster rules related to expressions dealing with ImmutableListMultimaps. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableListMultimapRules.EmptyImmutableListMultimap

tech.picnic.errorprone.refasterrules.ImmutableListMultimapRulesRecipes$EmptyImmutableListMultimapRecipe

Prefer ImmutableListMultimap#of() over more contrived or less-specific alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableListMultimapRules.EntryToImmutableListMultimap

tech.picnic.errorprone.refasterrules.ImmutableListMultimapRulesRecipes$EntryToImmutableListMultimapRecipe

Prefer ImmutableListMultimap#of(Object, Object) over more contrived or less-specific alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableListMultimapRules.ImmutableListMultimapBuilder

tech.picnic.errorprone.refasterrules.ImmutableListMultimapRulesRecipes$ImmutableListMultimapBuilderRecipe

Prefer ImmutableListMultimap#builder() over the associated constructor on constructions that produce a less-specific type.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableListMultimapRules.IterableToImmutableListMultimap

tech.picnic.errorprone.refasterrules.ImmutableListMultimapRulesRecipes$IterableToImmutableListMultimapRecipe

Prefer ImmutableListMultimap#copyOf(Iterable) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableListMultimapRules.PairToImmutableListMultimap

tech.picnic.errorprone.refasterrules.ImmutableListMultimapRulesRecipes$PairToImmutableListMultimapRecipe

Prefer ImmutableListMultimap#of(Object, Object) over more contrived or less-specific alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableListMultimapRules.TransformMultimapValuesToImmutableListMultimap2

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.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

ImmutableListRules Refaster recipes

tech.picnic.errorprone.refasterrules.ImmutableListRulesRecipes

Refaster rules related to expressions dealing with ImmutableLists. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableListRules.ImmutableListBuilder

tech.picnic.errorprone.refasterrules.ImmutableListRulesRecipes$ImmutableListBuilderRecipe

Prefer ImmutableList#builder() over the associated constructor.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableListRules.ImmutableListOf1

tech.picnic.errorprone.refasterrules.ImmutableListRulesRecipes$ImmutableListOf1Recipe

Prefer ImmutableList#of(Object) over more contrived alternatives or alternatives that don't communicate the immutability of the resulting list at the type level.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableListRules.ImmutableListOf2

tech.picnic.errorprone.refasterrules.ImmutableListRulesRecipes$ImmutableListOf2Recipe

Prefer ImmutableList#of(Object, Object) over alternatives that don't communicate the immutability of the resulting list at the type level.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableListRules.ImmutableListOf3

tech.picnic.errorprone.refasterrules.ImmutableListRulesRecipes$ImmutableListOf3Recipe

Prefer ImmutableList#of(Object, Object, Object) over alternatives that don't communicate the immutability of the resulting list at the type level.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableListRules.ImmutableListOf4

tech.picnic.errorprone.refasterrules.ImmutableListRulesRecipes$ImmutableListOf4Recipe

Prefer ImmutableList#of(Object, Object, Object, Object) over alternatives that don't communicate the immutability of the resulting list at the type level.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableListRules.ImmutableListOf5

tech.picnic.errorprone.refasterrules.ImmutableListRulesRecipes$ImmutableListOf5Recipe

Prefer ImmutableList#of(Object, Object, Object, Object, Object) over alternatives that don't communicate the immutability of the resulting list at the type level.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableListRules.ImmutableListOf

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.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableListRules.ImmutableListSortedCopyOf

tech.picnic.errorprone.refasterrules.ImmutableListRulesRecipes$ImmutableListSortedCopyOfRecipe

Prefer ImmutableList#sortedCopyOf(Iterable) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableListRules.ImmutableListSortedCopyOfWithCustomComparator

tech.picnic.errorprone.refasterrules.ImmutableListRulesRecipes$ImmutableListSortedCopyOfWithCustomComparatorRecipe

Prefer ImmutableList#sortedCopyOf(Comparator, Iterable) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableListRules.IterableToImmutableList

tech.picnic.errorprone.refasterrules.ImmutableListRulesRecipes$IterableToImmutableListRecipe

Prefer ImmutableList#copyOf(Iterable) and variants over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableListRules.StreamToDistinctImmutableList

tech.picnic.errorprone.refasterrules.ImmutableListRulesRecipes$StreamToDistinctImmutableListRecipe

Collecting to an ImmutableSet and converting the result to an ImmutableList may be more efficient than deduplicating a stream and collecting the result to an ImmutableList.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableListRules.StreamToImmutableList

tech.picnic.errorprone.refasterrules.ImmutableListRulesRecipes$StreamToImmutableListRecipe

Prefer ImmutableList#toImmutableList() over less idiomatic alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

ImmutableMapRules Refaster recipes

tech.picnic.errorprone.refasterrules.ImmutableMapRulesRecipes

Refaster rules related to expressions dealing with ImmutableMaps. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableMapRules.EntryIterableToImmutableMap

tech.picnic.errorprone.refasterrules.ImmutableMapRulesRecipes$EntryIterableToImmutableMapRecipe

Prefer ImmutableMap#copyOf(Iterable) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableMapRules.EntryToImmutableMap

tech.picnic.errorprone.refasterrules.ImmutableMapRulesRecipes$EntryToImmutableMapRecipe

Prefer ImmutableMap#of(Object, Object) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableMapRules.ImmutableMapBuilderBuildOrThrow

tech.picnic.errorprone.refasterrules.ImmutableMapRulesRecipes$ImmutableMapBuilderBuildOrThrowRecipe

Prefer ImmutableMap.Builder#buildOrThrow() over the less explicit ImmutableMap.Builder#build().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableMapRules.ImmutableMapBuilder

tech.picnic.errorprone.refasterrules.ImmutableMapRulesRecipes$ImmutableMapBuilderRecipe

Prefer ImmutableMap#builder() over the associated constructor.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableMapRules.ImmutableMapOf1

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.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableMapRules.ImmutableMapOf2

tech.picnic.errorprone.refasterrules.ImmutableMapRulesRecipes$ImmutableMapOf2Recipe

Prefer ImmutableMap#of(Object, Object, Object, Object) over alternatives that don't communicate the immutability of the resulting map at the type level.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableMapRules.ImmutableMapOf3

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.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableMapRules.ImmutableMapOf4

tech.picnic.errorprone.refasterrules.ImmutableMapRulesRecipes$ImmutableMapOf4Recipe

Prefer ImmutableMap#of(Object, Object, Object, Object, Object, Object, Object, Object) over alternatives that don't communicate the immutability of the resulting map at the type level.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableMapRules.ImmutableMapOf5

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.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableMapRules.ImmutableMapOf

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.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

ImmutableMultisetRules Refaster recipes

tech.picnic.errorprone.refasterrules.ImmutableMultisetRulesRecipes

Refaster rules related to expressions dealing with ImmutableMultisets. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableMultisetRules.EmptyImmutableMultiset

tech.picnic.errorprone.refasterrules.ImmutableMultisetRulesRecipes$EmptyImmutableMultisetRecipe

Prefer ImmutableMultiset#of() over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableMultisetRules.ImmutableMultisetBuilder

tech.picnic.errorprone.refasterrules.ImmutableMultisetRulesRecipes$ImmutableMultisetBuilderRecipe

Prefer ImmutableMultiset#builder() over the associated constructor.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableMultisetRules.IterableToImmutableMultiset

tech.picnic.errorprone.refasterrules.ImmutableMultisetRulesRecipes$IterableToImmutableMultisetRecipe

Prefer ImmutableMultiset#copyOf(Iterable) and variants over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableMultisetRules.StreamToImmutableMultiset

tech.picnic.errorprone.refasterrules.ImmutableMultisetRulesRecipes$StreamToImmutableMultisetRecipe

Prefer ImmutableMultiset#toImmutableMultiset() over less idiomatic alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

ImmutableSetMultimapRules Refaster recipes

tech.picnic.errorprone.refasterrules.ImmutableSetMultimapRulesRecipes

Refaster rules related to expressions dealing with ImmutableSetMultimaps. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableSetMultimapRules.EmptyImmutableSetMultimap

tech.picnic.errorprone.refasterrules.ImmutableSetMultimapRulesRecipes$EmptyImmutableSetMultimapRecipe

Prefer ImmutableSetMultimap#of() over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableSetMultimapRules.EntryToImmutableSetMultimap

tech.picnic.errorprone.refasterrules.ImmutableSetMultimapRulesRecipes$EntryToImmutableSetMultimapRecipe

Prefer ImmutableSetMultimap#of(Object, Object) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableSetMultimapRules.ImmutableSetMultimapBuilder

tech.picnic.errorprone.refasterrules.ImmutableSetMultimapRulesRecipes$ImmutableSetMultimapBuilderRecipe

Prefer ImmutableSetMultimap#builder() over the associated constructor.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableSetMultimapRules.IterableToImmutableSetMultimap

tech.picnic.errorprone.refasterrules.ImmutableSetMultimapRulesRecipes$IterableToImmutableSetMultimapRecipe

Prefer ImmutableSetMultimap#copyOf(Iterable) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableSetMultimapRules.PairToImmutableSetMultimap

tech.picnic.errorprone.refasterrules.ImmutableSetMultimapRulesRecipes$PairToImmutableSetMultimapRecipe

Prefer ImmutableSetMultimap#of(Object, Object) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableSetMultimapRules.TransformMultimapValuesToImmutableSetMultimap2

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.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

ImmutableSetRules Refaster recipes

tech.picnic.errorprone.refasterrules.ImmutableSetRulesRecipes

Refaster rules related to expressions dealing with ImmutableSets. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableSetRules.ImmutableSetBuilder

tech.picnic.errorprone.refasterrules.ImmutableSetRulesRecipes$ImmutableSetBuilderRecipe

Prefer ImmutableSet#builder() over the associated constructor.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableSetRules.ImmutableSetCopyOfSetView

tech.picnic.errorprone.refasterrules.ImmutableSetRulesRecipes$ImmutableSetCopyOfSetViewRecipe

Prefer SetView#immutableCopy() over the more verbose alternative.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableSetRules.ImmutableSetOf1

tech.picnic.errorprone.refasterrules.ImmutableSetRulesRecipes$ImmutableSetOf1Recipe

Prefer ImmutableSet#of(Object) over more contrived alternatives or alternatives that don't communicate the immutability of the resulting set at the type level.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableSetRules.ImmutableSetOf2

tech.picnic.errorprone.refasterrules.ImmutableSetRulesRecipes$ImmutableSetOf2Recipe

Prefer ImmutableSet#of(Object, Object) over alternatives that don't communicate the immutability of the resulting set at the type level.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableSetRules.ImmutableSetOf3

tech.picnic.errorprone.refasterrules.ImmutableSetRulesRecipes$ImmutableSetOf3Recipe

Prefer ImmutableSet#of(Object, Object, Object) over alternatives that don't communicate the immutability of the resulting set at the type level.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableSetRules.ImmutableSetOf4

tech.picnic.errorprone.refasterrules.ImmutableSetRulesRecipes$ImmutableSetOf4Recipe

Prefer ImmutableSet#of(Object, Object, Object, Object) over alternatives that don't communicate the immutability of the resulting set at the type level.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableSetRules.ImmutableSetOf5

tech.picnic.errorprone.refasterrules.ImmutableSetRulesRecipes$ImmutableSetOf5Recipe

Prefer ImmutableSet#of(Object, Object, Object, Object, Object) over alternatives that don't communicate the immutability of the resulting set at the type level.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableSetRules.ImmutableSetOf

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.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableSetRules.IterableToImmutableSet

tech.picnic.errorprone.refasterrules.ImmutableSetRulesRecipes$IterableToImmutableSetRecipe

Prefer ImmutableSet#copyOf(Iterable) and variants over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableSetRules.SetsDifferenceMap

tech.picnic.errorprone.refasterrules.ImmutableSetRulesRecipes$SetsDifferenceMapRecipe

Prefer an immutable copy of Sets#difference(Set, Set) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableSetRules.SetsDifferenceMultimap

tech.picnic.errorprone.refasterrules.ImmutableSetRulesRecipes$SetsDifferenceMultimapRecipe

Prefer an immutable copy of Sets#difference(Set, Set) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableSetRules.SetsDifference

tech.picnic.errorprone.refasterrules.ImmutableSetRulesRecipes$SetsDifferenceRecipe

Prefer an immutable copy of Sets#difference(Set, Set) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableSetRules.SetsIntersectionMap

tech.picnic.errorprone.refasterrules.ImmutableSetRulesRecipes$SetsIntersectionMapRecipe

Prefer an immutable copy of Sets#intersection(Set, Set) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableSetRules.SetsIntersectionMultimap

tech.picnic.errorprone.refasterrules.ImmutableSetRulesRecipes$SetsIntersectionMultimapRecipe

Prefer an immutable copy of Sets#intersection(Set, Set) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableSetRules.SetsIntersection

tech.picnic.errorprone.refasterrules.ImmutableSetRulesRecipes$SetsIntersectionRecipe

Prefer an immutable copy of Sets#intersection(Set, Set) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableSetRules.SetsUnion

tech.picnic.errorprone.refasterrules.ImmutableSetRulesRecipes$SetsUnionRecipe

Prefer an immutable copy of Sets#union(Set, Set) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableSetRules.StreamToImmutableSet

tech.picnic.errorprone.refasterrules.ImmutableSetRulesRecipes$StreamToImmutableSetRecipe

Prefer ImmutableSet#toImmutableSet() over less idiomatic alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

ImmutableSortedMapRules Refaster recipes

tech.picnic.errorprone.refasterrules.ImmutableSortedMapRulesRecipes

Refaster rules related to expressions dealing with ImmutableSortedMaps. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableSortedMapRules.EmptyImmutableSortedMap

tech.picnic.errorprone.refasterrules.ImmutableSortedMapRulesRecipes$EmptyImmutableSortedMapRecipe

Prefer ImmutableSortedMap#of() over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableSortedMapRules.EntryToImmutableSortedMap

tech.picnic.errorprone.refasterrules.ImmutableSortedMapRulesRecipes$EntryToImmutableSortedMapRecipe

Prefer ImmutableSortedMap#of(Object, Object) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableSortedMapRules.ImmutableSortedMapBuilder

tech.picnic.errorprone.refasterrules.ImmutableSortedMapRulesRecipes$ImmutableSortedMapBuilderRecipe

Prefer ImmutableSortedMap#orderedBy(Comparator) over the associated constructor.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableSortedMapRules.ImmutableSortedMapNaturalOrderBuilder

tech.picnic.errorprone.refasterrules.ImmutableSortedMapRulesRecipes$ImmutableSortedMapNaturalOrderBuilderRecipe

Prefer ImmutableSortedMap#naturalOrder() over the alternative that requires explicitly providing the Comparator.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableSortedMapRules.ImmutableSortedMapReverseOrderBuilder

tech.picnic.errorprone.refasterrules.ImmutableSortedMapRulesRecipes$ImmutableSortedMapReverseOrderBuilderRecipe

Prefer ImmutableSortedMap#reverseOrder() over the alternative that requires explicitly providing the Comparator.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableSortedMapRules.IterableToImmutableSortedMap

tech.picnic.errorprone.refasterrules.ImmutableSortedMapRulesRecipes$IterableToImmutableSortedMapRecipe

Prefer ImmutableSortedMap#copyOf(Iterable) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableSortedMapRules.PairToImmutableSortedMap

tech.picnic.errorprone.refasterrules.ImmutableSortedMapRulesRecipes$PairToImmutableSortedMapRecipe

Prefer ImmutableSortedMap#of(Object, Object) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

ImmutableSortedMultisetRules Refaster recipes

tech.picnic.errorprone.refasterrules.ImmutableSortedMultisetRulesRecipes

Refaster rules related to expressions dealing with ImmutableSortedMultisets. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableSortedMultisetRules.EmptyImmutableSortedMultiset

tech.picnic.errorprone.refasterrules.ImmutableSortedMultisetRulesRecipes$EmptyImmutableSortedMultisetRecipe

Prefer ImmutableSortedMultiset#of() over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableSortedMultisetRules.ImmutableSortedMultisetBuilder

tech.picnic.errorprone.refasterrules.ImmutableSortedMultisetRulesRecipes$ImmutableSortedMultisetBuilderRecipe

Prefer ImmutableSortedMultiset#orderedBy(Comparator) over the associated constructor.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableSortedMultisetRules.ImmutableSortedMultisetNaturalOrderBuilder

tech.picnic.errorprone.refasterrules.ImmutableSortedMultisetRulesRecipes$ImmutableSortedMultisetNaturalOrderBuilderRecipe

Prefer ImmutableSortedMultiset#naturalOrder() over the alternative that requires explicitly providing the Comparator.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableSortedMultisetRules.ImmutableSortedMultisetReverseOrderBuilder

tech.picnic.errorprone.refasterrules.ImmutableSortedMultisetRulesRecipes$ImmutableSortedMultisetReverseOrderBuilderRecipe

Prefer ImmutableSortedMultiset#reverseOrder() over the alternative that requires explicitly providing the Comparator.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableSortedMultisetRules.IterableToImmutableSortedMultiset

tech.picnic.errorprone.refasterrules.ImmutableSortedMultisetRulesRecipes$IterableToImmutableSortedMultisetRecipe

Prefer ImmutableSortedMultiset#copyOf(Iterable) and variants over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableSortedMultisetRules.StreamToImmutableSortedMultiset

tech.picnic.errorprone.refasterrules.ImmutableSortedMultisetRulesRecipes$StreamToImmutableSortedMultisetRecipe

Prefer ImmutableSortedMultiset#toImmutableSortedMultiset(Comparator) over less idiomatic alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

ImmutableSortedSetRules Refaster recipes

tech.picnic.errorprone.refasterrules.ImmutableSortedSetRulesRecipes

Refaster rules related to expressions dealing with ImmutableSortedSets. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableSortedSetRules.EmptyImmutableSortedSet

tech.picnic.errorprone.refasterrules.ImmutableSortedSetRulesRecipes$EmptyImmutableSortedSetRecipe

Prefer ImmutableSortedSet#of() over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableSortedSetRules.ImmutableSortedSetBuilder

tech.picnic.errorprone.refasterrules.ImmutableSortedSetRulesRecipes$ImmutableSortedSetBuilderRecipe

Prefer ImmutableSortedSet#orderedBy(Comparator) over the associated constructor.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableSortedSetRules.ImmutableSortedSetNaturalOrderBuilder

tech.picnic.errorprone.refasterrules.ImmutableSortedSetRulesRecipes$ImmutableSortedSetNaturalOrderBuilderRecipe

Prefer ImmutableSortedSet#naturalOrder() over the alternative that requires explicitly providing the Comparator.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableSortedSetRules.ImmutableSortedSetReverseOrderBuilder

tech.picnic.errorprone.refasterrules.ImmutableSortedSetRulesRecipes$ImmutableSortedSetReverseOrderBuilderRecipe

Prefer ImmutableSortedSet#reverseOrder() over the alternative that requires explicitly providing the Comparator.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableSortedSetRules.IterableToImmutableSortedSet

tech.picnic.errorprone.refasterrules.ImmutableSortedSetRulesRecipes$IterableToImmutableSortedSetRecipe

Prefer ImmutableSortedSet#copyOf(Iterable) and variants over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableSortedSetRules.StreamToImmutableSortedSet

tech.picnic.errorprone.refasterrules.ImmutableSortedSetRulesRecipes$StreamToImmutableSortedSetRecipe

Prefer ImmutableSortedSet#toImmutableSortedSet(Comparator) over less idiomatic alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

ImmutableTableRules Refaster recipes

tech.picnic.errorprone.refasterrules.ImmutableTableRulesRecipes

Refaster rules related to expressions dealing with ImmutableTables. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableTableRules.CellToImmutableTable

tech.picnic.errorprone.refasterrules.ImmutableTableRulesRecipes$CellToImmutableTableRecipe

Prefer ImmutableTable#of(Object, Object, Object) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableTableRules.ImmutableTableBuilderBuildOrThrow

tech.picnic.errorprone.refasterrules.ImmutableTableRulesRecipes$ImmutableTableBuilderBuildOrThrowRecipe

Prefer ImmutableTable.Builder#buildOrThrow() over the less explicit ImmutableTable.Builder#build().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableTableRules.ImmutableTableBuilder

tech.picnic.errorprone.refasterrules.ImmutableTableRulesRecipes$ImmutableTableBuilderRecipe

Prefer ImmutableTable#builder() over the associated constructor.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ImmutableTableRules.ImmutableTableOf

tech.picnic.errorprone.refasterrules.ImmutableTableRulesRecipes$ImmutableTableOfRecipe

Prefer ImmutableTable#of() over more contrived alternatives .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

InputStreamRules Refaster recipes

tech.picnic.errorprone.refasterrules.InputStreamRulesRecipes

Refaster rules related to expressions dealing with InputStreams. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template InputStreamRules.InputStreamReadAllBytes

tech.picnic.errorprone.refasterrules.InputStreamRulesRecipes$InputStreamReadAllBytesRecipe

Recipe created for the following Refaster template: java static final class InputStreamReadAllBytes { @BeforeTemplate byte[] before(InputStream in) throws IOException { return ByteStreams.toByteArray(in); } @AfterTemplate byte[] after(InputStream in) throws IOException { return in.readAllBytes(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template InputStreamRules.InputStreamReadNBytes

tech.picnic.errorprone.refasterrules.InputStreamRulesRecipes$InputStreamReadNBytesRecipe

Recipe created for the following Refaster template: java static final class InputStreamReadNBytes { @BeforeTemplate byte[] before(InputStream in, int n) throws IOException { return ByteStreams.limit(in, n).readAllBytes(); } @AfterTemplate byte[] after(InputStream in, int n) throws IOException { return in.readNBytes(n); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template InputStreamRules.InputStreamSkipNBytes

tech.picnic.errorprone.refasterrules.InputStreamRulesRecipes$InputStreamSkipNBytesRecipe

Recipe created for the following Refaster template: java static final class InputStreamSkipNBytes { @BeforeTemplate void before(InputStream in, long n) throws IOException { ByteStreams.skipFully(in, n); } @AfterTemplate void after(InputStream in, long n) throws IOException { in.skipNBytes(n); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template InputStreamRules.InputStreamTransferTo

tech.picnic.errorprone.refasterrules.InputStreamRulesRecipes$InputStreamTransferToRecipe

Recipe created for the following Refaster template: java static final class InputStreamTransferTo { @BeforeTemplate long before(InputStream in, OutputStream out) throws IOException { return ByteStreams.copy(in, out); } @AfterTemplate long after(InputStream in, OutputStream out) throws IOException { return in.transferTo(out); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

IntStreamRules Refaster recipes

tech.picnic.errorprone.refasterrules.IntStreamRulesRecipes

Refaster rules related to expressions dealing with IntStreams. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template IntStreamRules.ConcatOneIntStream

tech.picnic.errorprone.refasterrules.IntStreamRulesRecipes$ConcatOneIntStreamRecipe

Don't unnecessarily call Streams#concat(IntStream...).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template IntStreamRules.ConcatTwoIntStreams

tech.picnic.errorprone.refasterrules.IntStreamRulesRecipes$ConcatTwoIntStreamsRecipe

Prefer IntStream#concat(IntStream, IntStream) over the Guava alternative.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template IntStreamRules.IntStreamAllMatch

tech.picnic.errorprone.refasterrules.IntStreamRulesRecipes$IntStreamAllMatchRecipe

Recipe created for the following Refaster template: java 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); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template IntStreamRules.IntStreamAnyMatch

tech.picnic.errorprone.refasterrules.IntStreamRulesRecipes$IntStreamAnyMatchRecipe

Prefer IntStream#anyMatch(IntPredicate) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template IntStreamRules.IntStreamClosedOpenRange

tech.picnic.errorprone.refasterrules.IntStreamRulesRecipes$IntStreamClosedOpenRangeRecipe

Prefer IntStream#range(int, int) over the more contrived alternative.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template IntStreamRules.IntStreamFilterSorted

tech.picnic.errorprone.refasterrules.IntStreamRulesRecipes$IntStreamFilterSortedRecipe

Apply IntStream#filter(IntPredicate) before IntStream#sorted() to reduce the number of elements to sort.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template IntStreamRules.IntStreamIsEmpty

tech.picnic.errorprone.refasterrules.IntStreamRulesRecipes$IntStreamIsEmptyRecipe

In order to test whether a stream has any element, simply try to find one.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template IntStreamRules.IntStreamIsNotEmpty

tech.picnic.errorprone.refasterrules.IntStreamRulesRecipes$IntStreamIsNotEmptyRecipe

In order to test whether a stream has any element, simply try to find one.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template IntStreamRules.IntStreamMin

tech.picnic.errorprone.refasterrules.IntStreamRulesRecipes$IntStreamMinRecipe

Recipe created for the following Refaster template: java static final class IntStreamMin { @BeforeTemplate OptionalInt before(IntStream stream) { return stream.sorted().findFirst(); } @AfterTemplate OptionalInt after(IntStream stream) { return stream.min(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template IntStreamRules.IntStreamNoneMatch

tech.picnic.errorprone.refasterrules.IntStreamRulesRecipes$IntStreamNoneMatchRecipe

Prefer IntStream#noneMatch(IntPredicate) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template IntStreamRules.IntStreamTakeWhile

tech.picnic.errorprone.refasterrules.IntStreamRulesRecipes$IntStreamTakeWhileRecipe

Recipe created for the following Refaster template: java static final class IntStreamTakeWhile { @BeforeTemplate IntStream before(IntStream stream, IntPredicate predicate) { return stream.takeWhile(predicate).filter(predicate); } @AfterTemplate IntStream after(IntStream stream, IntPredicate predicate) { return stream.takeWhile(predicate); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster rules to replace JUnit assertions with AssertJ equivalents

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes

Note that, while both libraries throw an AssertionError in case of an assertion failure, the exact subtype used generally differs. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatBooleanArrayContainsExactly

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatBooleanArrayContainsExactlyRecipe

Recipe created for the following Refaster template: java 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); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatBooleanArrayWithFailMessageContainsExactly

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatBooleanArrayWithFailMessageContainsExactlyRecipe

Recipe created for the following Refaster template: java 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); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatBooleanArrayWithFailMessageSupplierContainsExactly

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatBooleanArrayWithFailMessageSupplierContainsExactlyRecipe

Recipe created for the following Refaster template: java static final class AssertThatBooleanArrayWithFailMessageSupplierContainsExactly { @BeforeTemplate @SuppressWarnings(value = &quot;java:S4449&quot;) void before(boolean[] actual, Supplier&lt;@Nullable String&gt; message, boolean[] expected) { assertArrayEquals(expected, actual, message); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(boolean[] actual, Supplier&lt;@Nullable String&gt; message, boolean[] expected) { assertThat(actual).withFailMessage(message).containsExactly(expected); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatByteArrayContainsExactly

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatByteArrayContainsExactlyRecipe

Recipe created for the following Refaster template: java 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); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatByteArrayWithFailMessageContainsExactly

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatByteArrayWithFailMessageContainsExactlyRecipe

Recipe created for the following Refaster template: java 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); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatByteArrayWithFailMessageSupplierContainsExactly

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatByteArrayWithFailMessageSupplierContainsExactlyRecipe

Recipe created for the following Refaster template: java static final class AssertThatByteArrayWithFailMessageSupplierContainsExactly { @BeforeTemplate @SuppressWarnings(value = &quot;java:S4449&quot;) void before(byte[] actual, Supplier&lt;@Nullable String&gt; message, byte[] expected) { assertArrayEquals(expected, actual, message); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(byte[] actual, Supplier&lt;@Nullable String&gt; message, byte[] expected) { assertThat(actual).withFailMessage(message).containsExactly(expected); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatCharArrayContainsExactly

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatCharArrayContainsExactlyRecipe

Recipe created for the following Refaster template: java 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); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatCharArrayWithFailMessageContainsExactly

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatCharArrayWithFailMessageContainsExactlyRecipe

Recipe created for the following Refaster template: java 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); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatCharArrayWithFailMessageSupplierContainsExactly

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatCharArrayWithFailMessageSupplierContainsExactlyRecipe

Recipe created for the following Refaster template: java static final class AssertThatCharArrayWithFailMessageSupplierContainsExactly { @BeforeTemplate @SuppressWarnings(value = &quot;java:S4449&quot;) void before(char[] actual, Supplier&lt;@Nullable String&gt; message, char[] expected) { assertArrayEquals(expected, actual, message); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(char[] actual, Supplier&lt;@Nullable String&gt; message, char[] expected) { assertThat(actual).withFailMessage(message).containsExactly(expected); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatCodeDoesNotThrowAnyException

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatCodeDoesNotThrowAnyExceptionRecipe

Recipe created for the following Refaster template: java static final class AssertThatCodeDoesNotThrowAnyException { @BeforeTemplate void before(Executable throwingCallable) { assertDoesNotThrow(throwingCallable); } @BeforeTemplate void before(ThrowingSupplier&lt;?&gt; throwingCallable) { assertDoesNotThrow(throwingCallable); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(ThrowingCallable throwingCallable) { assertThatCode(throwingCallable).doesNotThrowAnyException(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatCodeWithFailMessageStringDoesNotThrowAnyException

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatCodeWithFailMessageStringDoesNotThrowAnyExceptionRecipe

Recipe created for the following Refaster template: java static final class AssertThatCodeWithFailMessageStringDoesNotThrowAnyException { @BeforeTemplate void before(Executable throwingCallable, String message) { assertDoesNotThrow(throwingCallable, message); } @BeforeTemplate void before(ThrowingSupplier&lt;?&gt; throwingCallable, String message) { assertDoesNotThrow(throwingCallable, message); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(ThrowingCallable throwingCallable, String message) { assertThatCode(throwingCallable).withFailMessage(message).doesNotThrowAnyException(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatCodeWithFailMessageSupplierDoesNotThrowAnyException

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatCodeWithFailMessageSupplierDoesNotThrowAnyExceptionRecipe

Recipe created for the following Refaster template: java static final class AssertThatCodeWithFailMessageSupplierDoesNotThrowAnyException { @BeforeTemplate @SuppressWarnings(value = &quot;java:S4449&quot;) void before(Executable throwingCallable, Supplier&lt;@Nullable String&gt; supplier) { assertDoesNotThrow(throwingCallable, supplier); } @BeforeTemplate @SuppressWarnings(value = &quot;java:S4449&quot;) void before(ThrowingSupplier&lt;?&gt; throwingCallable, Supplier&lt;@Nullable String&gt; supplier) { assertDoesNotThrow(throwingCallable, supplier); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(ThrowingCallable throwingCallable, Supplier&lt;@Nullable String&gt; supplier) { assertThatCode(throwingCallable).withFailMessage(supplier).doesNotThrowAnyException(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatDoubleArrayContainsExactly

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatDoubleArrayContainsExactlyRecipe

Recipe created for the following Refaster template: java 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); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatDoubleArrayContainsExactlyWithOffset

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatDoubleArrayContainsExactlyWithOffsetRecipe

Recipe created for the following Refaster template: java 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)); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatDoubleArrayWithFailMessageContainsExactly

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatDoubleArrayWithFailMessageContainsExactlyRecipe

Recipe created for the following Refaster template: java 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); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatDoubleArrayWithFailMessageContainsExactlyWithOffset

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatDoubleArrayWithFailMessageContainsExactlyWithOffsetRecipe

Recipe created for the following Refaster template: java 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)); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatDoubleArrayWithFailMessageSupplierContainsExactly

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatDoubleArrayWithFailMessageSupplierContainsExactlyRecipe

Recipe created for the following Refaster template: java static final class AssertThatDoubleArrayWithFailMessageSupplierContainsExactly { @BeforeTemplate @SuppressWarnings(value = &quot;java:S4449&quot;) void before(double[] actual, Supplier&lt;@Nullable String&gt; message, double[] expected) { assertArrayEquals(expected, actual, message); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(double[] actual, Supplier&lt;@Nullable String&gt; message, double[] expected) { assertThat(actual).withFailMessage(message).containsExactly(expected); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatDoubleArrayWithFailMessageSupplierContainsExactlyWithOffset

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatDoubleArrayWithFailMessageSupplierContainsExactlyWithOffsetRecipe

Recipe created for the following Refaster template: java static final class AssertThatDoubleArrayWithFailMessageSupplierContainsExactlyWithOffset { @BeforeTemplate @SuppressWarnings(value = &quot;java:S4449&quot;) void before(double[] actual, Supplier&lt;@Nullable String&gt; messageSupplier, double[] expected, double delta) { assertArrayEquals(expected, actual, delta, messageSupplier); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(double[] actual, Supplier&lt;@Nullable String&gt; messageSupplier, double[] expected, double delta) { assertThat(actual).withFailMessage(messageSupplier).containsExactly(expected, offset(delta)); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatFloatArrayContainsExactly

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatFloatArrayContainsExactlyRecipe

Recipe created for the following Refaster template: java 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); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatFloatArrayContainsExactlyWithOffset

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatFloatArrayContainsExactlyWithOffsetRecipe

Recipe created for the following Refaster template: java 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)); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatFloatArrayWithFailMessageContainsExactly

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatFloatArrayWithFailMessageContainsExactlyRecipe

Recipe created for the following Refaster template: java 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); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatFloatArrayWithFailMessageContainsExactlyWithOffset

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatFloatArrayWithFailMessageContainsExactlyWithOffsetRecipe

Recipe created for the following Refaster template: java 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)); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatFloatArrayWithFailMessageSupplierContainsExactly

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatFloatArrayWithFailMessageSupplierContainsExactlyRecipe

Recipe created for the following Refaster template: java static final class AssertThatFloatArrayWithFailMessageSupplierContainsExactly { @BeforeTemplate @SuppressWarnings(value = &quot;java:S4449&quot;) void before(float[] actual, Supplier&lt;@Nullable String&gt; message, float[] expected) { assertArrayEquals(expected, actual, message); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(float[] actual, Supplier&lt;@Nullable String&gt; message, float[] expected) { assertThat(actual).withFailMessage(message).containsExactly(expected); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatFloatArrayWithFailMessageSupplierContainsExactlyWithOffset

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatFloatArrayWithFailMessageSupplierContainsExactlyWithOffsetRecipe

Recipe created for the following Refaster template: java static final class AssertThatFloatArrayWithFailMessageSupplierContainsExactlyWithOffset { @BeforeTemplate @SuppressWarnings(value = &quot;java:S4449&quot;) void before(float[] actual, Supplier&lt;@Nullable String&gt; message, float[] expected, float delta) { assertArrayEquals(expected, actual, delta, message); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(float[] actual, Supplier&lt;@Nullable String&gt; message, float[] expected, float delta) { assertThat(actual).withFailMessage(message).containsExactly(expected, offset(delta)); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatIntArrayContainsExactly

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatIntArrayContainsExactlyRecipe

Recipe created for the following Refaster template: java 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); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatIntArrayWithFailMessageContainsExactly

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatIntArrayWithFailMessageContainsExactlyRecipe

Recipe created for the following Refaster template: java 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); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatIntArrayWithFailMessageSupplierContainsExactly

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatIntArrayWithFailMessageSupplierContainsExactlyRecipe

Recipe created for the following Refaster template: java static final class AssertThatIntArrayWithFailMessageSupplierContainsExactly { @BeforeTemplate @SuppressWarnings(value = &quot;java:S4449&quot;) void before(int[] actual, Supplier&lt;@Nullable String&gt; message, int[] expected) { assertArrayEquals(expected, actual, message); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(int[] actual, Supplier&lt;@Nullable String&gt; message, int[] expected) { assertThat(actual).withFailMessage(message).containsExactly(expected); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatIsFalse

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatIsFalseRecipe

Recipe created for the following Refaster template: java static final class AssertThatIsFalse { @BeforeTemplate void before(boolean actual) { assertFalse(actual); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(boolean actual) { assertThat(actual).isFalse(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatIsInstanceOf

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatIsInstanceOfRecipe

Recipe created for the following Refaster template: java static final class AssertThatIsInstanceOf&lt;T&gt; { @BeforeTemplate void before(Object actual, Class&lt;T&gt; clazz) { assertInstanceOf(clazz, actual); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(Object actual, Class&lt;T&gt; clazz) { assertThat(actual).isInstanceOf(clazz); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatIsNotNull

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatIsNotNullRecipe

Recipe created for the following Refaster template: java static final class AssertThatIsNotNull { @BeforeTemplate void before(Object actual) { assertNotNull(actual); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(Object actual) { assertThat(actual).isNotNull(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatIsNotSameAs

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatIsNotSameAsRecipe

Recipe created for the following Refaster template: java static final class AssertThatIsNotSameAs { @BeforeTemplate void before(Object actual, Object expected) { assertNotSame(expected, actual); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(Object actual, Object expected) { assertThat(actual).isNotSameAs(expected); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatIsNull

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatIsNullRecipe

Recipe created for the following Refaster template: java static final class AssertThatIsNull { @BeforeTemplate void before(Object actual) { assertNull(actual); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(Object actual) { assertThat(actual).isNull(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatIsSameAs

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatIsSameAsRecipe

Recipe created for the following Refaster template: java static final class AssertThatIsSameAs { @BeforeTemplate void before(Object actual, Object expected) { assertSame(expected, actual); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(Object actual, Object expected) { assertThat(actual).isSameAs(expected); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatIsTrue

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatIsTrueRecipe

Recipe created for the following Refaster template: java static final class AssertThatIsTrue { @BeforeTemplate void before(boolean actual) { assertTrue(actual); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(boolean actual) { assertThat(actual).isTrue(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatLongArrayContainsExactly

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatLongArrayContainsExactlyRecipe

Recipe created for the following Refaster template: java 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); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatLongArrayWithFailMessageContainsExactly

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatLongArrayWithFailMessageContainsExactlyRecipe

Recipe created for the following Refaster template: java 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); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatLongArrayWithFailMessageSupplierContainsExactly

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatLongArrayWithFailMessageSupplierContainsExactlyRecipe

Recipe created for the following Refaster template: java static final class AssertThatLongArrayWithFailMessageSupplierContainsExactly { @BeforeTemplate @SuppressWarnings(value = &quot;java:S4449&quot;) void before(long[] actual, Supplier&lt;@Nullable String&gt; message, long[] expected) { assertArrayEquals(expected, actual, message); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(long[] actual, Supplier&lt;@Nullable String&gt; message, long[] expected) { assertThat(actual).withFailMessage(message).containsExactly(expected); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatObjectArrayContainsExactly

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatObjectArrayContainsExactlyRecipe

Recipe created for the following Refaster template: java 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); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatObjectArrayWithFailMessageContainsExactly

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatObjectArrayWithFailMessageContainsExactlyRecipe

Recipe created for the following Refaster template: java 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); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatObjectArrayWithFailMessageSupplierContainsExactly

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatObjectArrayWithFailMessageSupplierContainsExactlyRecipe

Recipe created for the following Refaster template: java static final class AssertThatObjectArrayWithFailMessageSupplierContainsExactly { @BeforeTemplate @SuppressWarnings(value = &quot;java:S4449&quot;) void before(Object[] actual, Supplier&lt;@Nullable String&gt; message, Object[] expected) { assertArrayEquals(expected, actual, message); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(Object[] actual, Supplier&lt;@Nullable String&gt; message, Object[] expected) { assertThat(actual).withFailMessage(message).containsExactly(expected); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatShortArrayContainsExactly

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatShortArrayContainsExactlyRecipe

Recipe created for the following Refaster template: java 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); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatShortArrayWithFailMessageContainsExactly

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatShortArrayWithFailMessageContainsExactlyRecipe

Recipe created for the following Refaster template: java 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); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatShortArrayWithFailMessageSupplierContainsExactly

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatShortArrayWithFailMessageSupplierContainsExactlyRecipe

Recipe created for the following Refaster template: java static final class AssertThatShortArrayWithFailMessageSupplierContainsExactly { @BeforeTemplate @SuppressWarnings(value = &quot;java:S4449&quot;) void before(short[] actual, Supplier&lt;@Nullable String&gt; message, short[] expected) { assertArrayEquals(expected, actual, message); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(short[] actual, Supplier&lt;@Nullable String&gt; message, short[] expected) { assertThat(actual).withFailMessage(message).containsExactly(expected); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatThrownByIsExactlyInstanceOf

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatThrownByIsExactlyInstanceOfRecipe

Recipe created for the following Refaster template: java static final class AssertThatThrownByIsExactlyInstanceOf&lt;T extends Throwable&gt; { @BeforeTemplate void before(Executable throwingCallable, Class&lt;T&gt; clazz) { assertThrowsExactly(clazz, throwingCallable); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(ThrowingCallable throwingCallable, Class&lt;T&gt; clazz) { assertThatThrownBy(throwingCallable).isExactlyInstanceOf(clazz); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatThrownByIsInstanceOf

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatThrownByIsInstanceOfRecipe

Recipe created for the following Refaster template: java static final class AssertThatThrownByIsInstanceOf&lt;T extends Throwable&gt; { @BeforeTemplate void before(Executable throwingCallable, Class&lt;T&gt; clazz) { assertThrows(clazz, throwingCallable); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(ThrowingCallable throwingCallable, Class&lt;T&gt; clazz) { assertThatThrownBy(throwingCallable).isInstanceOf(clazz); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatThrownByWithFailMessageStringIsExactlyInstanceOf

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatThrownByWithFailMessageStringIsExactlyInstanceOfRecipe

Recipe created for the following Refaster template: java static final class AssertThatThrownByWithFailMessageStringIsExactlyInstanceOf&lt;T extends Throwable&gt; { @BeforeTemplate void before(Executable throwingCallable, String message, Class&lt;T&gt; clazz) { assertThrowsExactly(clazz, throwingCallable, message); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(ThrowingCallable throwingCallable, String message, Class&lt;T&gt; clazz) { assertThatThrownBy(throwingCallable).withFailMessage(message).isExactlyInstanceOf(clazz); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatThrownByWithFailMessageStringIsInstanceOf

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatThrownByWithFailMessageStringIsInstanceOfRecipe

Recipe created for the following Refaster template: java static final class AssertThatThrownByWithFailMessageStringIsInstanceOf&lt;T extends Throwable&gt; { @BeforeTemplate void before(Executable throwingCallable, String message, Class&lt;T&gt; clazz) { assertThrows(clazz, throwingCallable, message); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(ThrowingCallable throwingCallable, String message, Class&lt;T&gt; clazz) { assertThatThrownBy(throwingCallable).withFailMessage(message).isInstanceOf(clazz); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatThrownByWithFailMessageSupplierIsExactlyInstanceOf

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatThrownByWithFailMessageSupplierIsExactlyInstanceOfRecipe

Recipe created for the following Refaster template: java static final class AssertThatThrownByWithFailMessageSupplierIsExactlyInstanceOf&lt;T extends Throwable&gt; { @BeforeTemplate @SuppressWarnings(value = &quot;java:S4449&quot;) void before(Executable throwingCallable, Supplier&lt;@Nullable String&gt; supplier, Class&lt;T&gt; clazz) { assertThrowsExactly(clazz, throwingCallable, supplier); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(ThrowingCallable throwingCallable, Supplier&lt;@Nullable String&gt; supplier, Class&lt;T&gt; clazz) { assertThatThrownBy(throwingCallable).withFailMessage(supplier).isExactlyInstanceOf(clazz); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatThrownByWithFailMessageSupplierIsInstanceOf

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatThrownByWithFailMessageSupplierIsInstanceOfRecipe

Recipe created for the following Refaster template: java static final class AssertThatThrownByWithFailMessageSupplierIsInstanceOf&lt;T extends Throwable&gt; { @BeforeTemplate @SuppressWarnings(value = &quot;java:S4449&quot;) void before(Executable throwingCallable, Supplier&lt;@Nullable String&gt; supplier, Class&lt;T&gt; clazz) { assertThrows(clazz, throwingCallable, supplier); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(ThrowingCallable throwingCallable, Supplier&lt;@Nullable String&gt; supplier, Class&lt;T&gt; clazz) { assertThatThrownBy(throwingCallable).withFailMessage(supplier).isInstanceOf(clazz); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatWithFailMessageStringIsFalse

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageStringIsFalseRecipe

Recipe created for the following Refaster template: java 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(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatWithFailMessageStringIsInstanceOf

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageStringIsInstanceOfRecipe

Recipe created for the following Refaster template: java static final class AssertThatWithFailMessageStringIsInstanceOf&lt;T&gt; { @BeforeTemplate void before(Object actual, String message, Class&lt;T&gt; clazz) { assertInstanceOf(clazz, actual, message); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(Object actual, String message, Class&lt;T&gt; clazz) { assertThat(actual).withFailMessage(message).isInstanceOf(clazz); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatWithFailMessageStringIsNotNull

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageStringIsNotNullRecipe

Recipe created for the following Refaster template: java 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(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatWithFailMessageStringIsNotSameAs

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageStringIsNotSameAsRecipe

Recipe created for the following Refaster template: java 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); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatWithFailMessageStringIsNull

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageStringIsNullRecipe

Recipe created for the following Refaster template: java 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(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatWithFailMessageStringIsSameAs

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageStringIsSameAsRecipe

Recipe created for the following Refaster template: java 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); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatWithFailMessageStringIsTrue

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageStringIsTrueRecipe

Recipe created for the following Refaster template: java 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(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatWithFailMessageSupplierIsFalse

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageSupplierIsFalseRecipe

Recipe created for the following Refaster template: java static final class AssertThatWithFailMessageSupplierIsFalse { @BeforeTemplate @SuppressWarnings(value = &quot;java:S4449&quot;) void before(boolean actual, Supplier&lt;@Nullable String&gt; supplier) { assertFalse(actual, supplier); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(boolean actual, Supplier&lt;@Nullable String&gt; supplier) { assertThat(actual).withFailMessage(supplier).isFalse(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatWithFailMessageSupplierIsInstanceOf

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageSupplierIsInstanceOfRecipe

Recipe created for the following Refaster template: java static final class AssertThatWithFailMessageSupplierIsInstanceOf&lt;T&gt; { @BeforeTemplate @SuppressWarnings(value = &quot;java:S4449&quot;) void before(Object actual, Supplier&lt;@Nullable String&gt; supplier, Class&lt;T&gt; clazz) { assertInstanceOf(clazz, actual, supplier); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(Object actual, Supplier&lt;@Nullable String&gt; supplier, Class&lt;T&gt; clazz) { assertThat(actual).withFailMessage(supplier).isInstanceOf(clazz); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatWithFailMessageSupplierIsNotNull

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageSupplierIsNotNullRecipe

Recipe created for the following Refaster template: java static final class AssertThatWithFailMessageSupplierIsNotNull { @BeforeTemplate @SuppressWarnings(value = &quot;java:S4449&quot;) void before(Object actual, Supplier&lt;@Nullable String&gt; supplier) { assertNotNull(actual, supplier); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(Object actual, Supplier&lt;@Nullable String&gt; supplier) { assertThat(actual).withFailMessage(supplier).isNotNull(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatWithFailMessageSupplierIsNotSameAs

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageSupplierIsNotSameAsRecipe

Recipe created for the following Refaster template: java static final class AssertThatWithFailMessageSupplierIsNotSameAs { @BeforeTemplate @SuppressWarnings(value = &quot;java:S4449&quot;) void before(Object actual, Supplier&lt;@Nullable String&gt; supplier, Object expected) { assertNotSame(expected, actual, supplier); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(Object actual, Supplier&lt;@Nullable String&gt; supplier, Object expected) { assertThat(actual).withFailMessage(supplier).isNotSameAs(expected); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatWithFailMessageSupplierIsNull

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageSupplierIsNullRecipe

Recipe created for the following Refaster template: java static final class AssertThatWithFailMessageSupplierIsNull { @BeforeTemplate @SuppressWarnings(value = &quot;java:S4449&quot;) void before(Object actual, Supplier&lt;@Nullable String&gt; supplier) { assertNull(actual, supplier); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(Object actual, Supplier&lt;@Nullable String&gt; supplier) { assertThat(actual).withFailMessage(supplier).isNull(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatWithFailMessageSupplierIsSameAs

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageSupplierIsSameAsRecipe

Recipe created for the following Refaster template: java static final class AssertThatWithFailMessageSupplierIsSameAs { @BeforeTemplate @SuppressWarnings(value = &quot;java:S4449&quot;) void before(Object actual, Supplier&lt;@Nullable String&gt; supplier, Object expected) { assertSame(expected, actual, supplier); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(Object actual, Supplier&lt;@Nullable String&gt; supplier, Object expected) { assertThat(actual).withFailMessage(supplier).isSameAs(expected); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.AssertThatWithFailMessageSupplierIsTrue

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageSupplierIsTrueRecipe

Recipe created for the following Refaster template: java static final class AssertThatWithFailMessageSupplierIsTrue { @BeforeTemplate @SuppressWarnings(value = &quot;java:S4449&quot;) void before(boolean actual, Supplier&lt;@Nullable String&gt; supplier) { assertTrue(actual, supplier); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(boolean actual, Supplier&lt;@Nullable String&gt; supplier) { assertThat(actual).withFailMessage(supplier).isTrue(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.Fail

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$FailRecipe

Recipe created for the following Refaster template: java static final class Fail&lt;T&gt; { @BeforeTemplate T before() { return Assertions.fail(); } @AfterTemplate @DoNotCall T after() { return fail(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.FailWithMessageAndThrowable

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$FailWithMessageAndThrowableRecipe

Recipe created for the following Refaster template: java static final class FailWithMessageAndThrowable&lt;T&gt; { @BeforeTemplate T before(String message, Throwable throwable) { return Assertions.fail(message, throwable); } @AfterTemplate T after(String message, Throwable throwable) { return fail(message, throwable); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.FailWithMessage

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$FailWithMessageRecipe

Recipe created for the following Refaster template: java static final class FailWithMessage&lt;T&gt; { @BeforeTemplate T before(String message) { return Assertions.fail(message); } @AfterTemplate T after(String message) { return fail(message); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template JUnitToAssertJRules.FailWithThrowable

tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$FailWithThrowableRecipe

Recipe created for the following Refaster template: java static final class FailWithThrowable&lt;T&gt; { @BeforeTemplate T before(Throwable throwable) { return Assertions.fail(throwable); } @AfterTemplate @DoNotCall T after(Throwable throwable) { return fail(throwable); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Jackson2Rules Refaster recipes

tech.picnic.errorprone.refasterrules.Jackson2RulesRecipes

Refaster rules related to Jackson 2.x expressions and statements. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template Jackson2Rules.JsonNodeOptionalInt

tech.picnic.errorprone.refasterrules.Jackson2RulesRecipes$JsonNodeOptionalIntRecipe

Prefer JsonNode#optional(int) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template Jackson2Rules.JsonNodeOptionalString

tech.picnic.errorprone.refasterrules.Jackson2RulesRecipes$JsonNodeOptionalStringRecipe

Prefer JsonNode#optional(String) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template Jackson2Rules.ObjectMapperConvertValueWithClass

tech.picnic.errorprone.refasterrules.Jackson2RulesRecipes$ObjectMapperConvertValueWithClassRecipe

Prefer ObjectMapper#convertValue(Object, Class) over more contrived and less efficient alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template Jackson2Rules.ObjectMapperConvertValueWithJavaType

tech.picnic.errorprone.refasterrules.Jackson2RulesRecipes$ObjectMapperConvertValueWithJavaTypeRecipe

Prefer ObjectMapper#convertValue(Object, JavaType) over more contrived and less efficient alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template Jackson2Rules.ObjectMapperConvertValueWithTypeReference

tech.picnic.errorprone.refasterrules.Jackson2RulesRecipes$ObjectMapperConvertValueWithTypeReferenceRecipe

Prefer ObjectMapper#convertValue(Object, TypeReference) over more contrived and less efficient alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template Jackson2Rules.ObjectMapperValueToTree

tech.picnic.errorprone.refasterrules.Jackson2RulesRecipes$ObjectMapperValueToTreeRecipe

Prefer ObjectMapper#valueToTree(Object) over more contrived and less efficient alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Jackson3Rules Refaster recipes

tech.picnic.errorprone.refasterrules.Jackson3RulesRecipes

Refaster rules related to Jackson 3.x expressions and statements. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template Jackson3Rules.JsonNodeOptionalInt

tech.picnic.errorprone.refasterrules.Jackson3RulesRecipes$JsonNodeOptionalIntRecipe

Prefer JsonNode#optional(int) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template Jackson3Rules.JsonNodeOptionalString

tech.picnic.errorprone.refasterrules.Jackson3RulesRecipes$JsonNodeOptionalStringRecipe

Prefer JsonNode#optional(String) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template Jackson3Rules.ObjectMapperConvertValueWithClass

tech.picnic.errorprone.refasterrules.Jackson3RulesRecipes$ObjectMapperConvertValueWithClassRecipe

Prefer ObjectMapper#convertValue(Object, Class) over more contrived and less efficient alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template Jackson3Rules.ObjectMapperConvertValueWithJavaType

tech.picnic.errorprone.refasterrules.Jackson3RulesRecipes$ObjectMapperConvertValueWithJavaTypeRecipe

Prefer ObjectMapper#convertValue(Object, JavaType) over more contrived and less efficient alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template Jackson3Rules.ObjectMapperConvertValueWithTypeReference

tech.picnic.errorprone.refasterrules.Jackson3RulesRecipes$ObjectMapperConvertValueWithTypeReferenceRecipe

Prefer ObjectMapper#convertValue(Object, TypeReference) over more contrived and less efficient alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template Jackson3Rules.ObjectMapperValueToTree

tech.picnic.errorprone.refasterrules.Jackson3RulesRecipes$ObjectMapperValueToTreeRecipe

Prefer ObjectMapper#valueToTree(Object) over more contrived and less efficient alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

LongStreamRules Refaster recipes

tech.picnic.errorprone.refasterrules.LongStreamRulesRecipes

Refaster rules related to expressions dealing with LongStreams. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template LongStreamRules.ConcatOneLongStream

tech.picnic.errorprone.refasterrules.LongStreamRulesRecipes$ConcatOneLongStreamRecipe

Don't unnecessarily call Streams#concat(LongStream...).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template LongStreamRules.ConcatTwoLongStreams

tech.picnic.errorprone.refasterrules.LongStreamRulesRecipes$ConcatTwoLongStreamsRecipe

Prefer LongStream#concat(LongStream, LongStream) over the Guava alternative.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template LongStreamRules.LongStreamAllMatch

tech.picnic.errorprone.refasterrules.LongStreamRulesRecipes$LongStreamAllMatchRecipe

Recipe created for the following Refaster template: java 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); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template LongStreamRules.LongStreamAnyMatch

tech.picnic.errorprone.refasterrules.LongStreamRulesRecipes$LongStreamAnyMatchRecipe

Prefer LongStream#anyMatch(LongPredicate) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template LongStreamRules.LongStreamClosedOpenRange

tech.picnic.errorprone.refasterrules.LongStreamRulesRecipes$LongStreamClosedOpenRangeRecipe

Prefer LongStream#range(long, long) over the more contrived alternative.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template LongStreamRules.LongStreamFilterSorted

tech.picnic.errorprone.refasterrules.LongStreamRulesRecipes$LongStreamFilterSortedRecipe

Apply LongStream#filter(LongPredicate) before LongStream#sorted() to reduce the number of elements to sort.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template LongStreamRules.LongStreamIsEmpty

tech.picnic.errorprone.refasterrules.LongStreamRulesRecipes$LongStreamIsEmptyRecipe

In order to test whether a stream has any element, simply try to find one.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template LongStreamRules.LongStreamIsNotEmpty

tech.picnic.errorprone.refasterrules.LongStreamRulesRecipes$LongStreamIsNotEmptyRecipe

In order to test whether a stream has any element, simply try to find one.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template LongStreamRules.LongStreamMin

tech.picnic.errorprone.refasterrules.LongStreamRulesRecipes$LongStreamMinRecipe

Recipe created for the following Refaster template: java static final class LongStreamMin { @BeforeTemplate OptionalLong before(LongStream stream) { return stream.sorted().findFirst(); } @AfterTemplate OptionalLong after(LongStream stream) { return stream.min(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template LongStreamRules.LongStreamNoneMatch

tech.picnic.errorprone.refasterrules.LongStreamRulesRecipes$LongStreamNoneMatchRecipe

Prefer LongStream#noneMatch(LongPredicate) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template LongStreamRules.LongStreamTakeWhile

tech.picnic.errorprone.refasterrules.LongStreamRulesRecipes$LongStreamTakeWhileRecipe

Recipe created for the following Refaster template: java static final class LongStreamTakeWhile { @BeforeTemplate LongStream before(LongStream stream, LongPredicate predicate) { return stream.takeWhile(predicate).filter(predicate); } @AfterTemplate LongStream after(LongStream stream, LongPredicate predicate) { return stream.takeWhile(predicate); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

MapEntryRules Refaster recipes

tech.picnic.errorprone.refasterrules.MapEntryRulesRecipes

Refaster rules related to expressions dealing with Map.Entry instances. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template MapEntryRules.MapEntryComparingByKey

tech.picnic.errorprone.refasterrules.MapEntryRulesRecipes$MapEntryComparingByKeyRecipe

Prefer Map.Entry#comparingByKey() over more verbose alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template MapEntryRules.MapEntryComparingByKeyWithCustomComparator

tech.picnic.errorprone.refasterrules.MapEntryRulesRecipes$MapEntryComparingByKeyWithCustomComparatorRecipe

Prefer Map.Entry#comparingByKey(Comparator) over more verbose alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template MapEntryRules.MapEntryComparingByValue

tech.picnic.errorprone.refasterrules.MapEntryRulesRecipes$MapEntryComparingByValueRecipe

Prefer Map.Entry#comparingByValue() over more verbose alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template MapEntryRules.MapEntryComparingByValueWithCustomComparator

tech.picnic.errorprone.refasterrules.MapEntryRulesRecipes$MapEntryComparingByValueWithCustomComparatorRecipe

Prefer Map.Entry#comparingByValue(Comparator) over more verbose alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Map#entry(Object, Object) over alternative ways to create an immutable map entry

tech.picnic.errorprone.refasterrules.MapEntryRulesRecipes$MapEntryRecipe

<strong>Warning:</strong> while both Maps#immutableEntry(Object, Object) and AbstractMap.SimpleImmutableEntry allow null keys and values, the preferred @link Map#entry(Object, Object)} variant does not. Moreover, the Map.Entry instances produced by the former approaches is java.io.Serializable, while this does not hold for the object returned by the preferred approach.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

MapRules Refaster recipes

tech.picnic.errorprone.refasterrules.MapRulesRecipes

Refaster rules related to expressions dealing with Map instances. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template MapRules.MapContainsKey

tech.picnic.errorprone.refasterrules.MapRulesRecipes$MapContainsKeyRecipe

Prefer Map#containsKey(Object) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template MapRules.MapContainsValue

tech.picnic.errorprone.refasterrules.MapRulesRecipes$MapContainsValueRecipe

Prefer Map#containsValue(Object) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template MapRules.MapGetOrDefault

tech.picnic.errorprone.refasterrules.MapRulesRecipes$MapGetOrDefaultRecipe

Prefer Map#getOrDefault(Object, Object) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template MapRules.MapGetOrNull

tech.picnic.errorprone.refasterrules.MapRulesRecipes$MapGetOrNullRecipe

Recipe created for the following Refaster template: java static final class MapGetOrNull&lt;K, V, T&gt; { @BeforeTemplate @Nullable V before(Map&lt;K, V&gt; map, T key) { return map.getOrDefault(key, null); } @AfterTemplate @Nullable V after(Map&lt;K, V&gt; map, T key) { return map.get(key); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template MapRules.MapIsEmpty

tech.picnic.errorprone.refasterrules.MapRulesRecipes$MapIsEmptyRecipe

Prefer Map#isEmpty() over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template MapRules.MapKeyStream

tech.picnic.errorprone.refasterrules.MapRulesRecipes$MapKeyStreamRecipe

Don't unnecessarily use Map#entrySet().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template MapRules.MapSize

tech.picnic.errorprone.refasterrules.MapRulesRecipes$MapSizeRecipe

Prefer Map#size() over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template MapRules.MapValueStream

tech.picnic.errorprone.refasterrules.MapRulesRecipes$MapValueStreamRecipe

Don't unnecessarily use Map#entrySet().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

MicrometerRules Refaster recipes

tech.picnic.errorprone.refasterrules.MicrometerRulesRecipes

Refaster rules related to expressions dealing with Micrometer. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template MicrometerRules.TagsOf1

tech.picnic.errorprone.refasterrules.MicrometerRulesRecipes$TagsOf1Recipe

Prefer using Tags over other immutable collections.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template MicrometerRules.TagsOf2

tech.picnic.errorprone.refasterrules.MicrometerRulesRecipes$TagsOf2Recipe

Prefer using Tags over other immutable collections.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template MicrometerRules.TagsOf3

tech.picnic.errorprone.refasterrules.MicrometerRulesRecipes$TagsOf3Recipe

Prefer using Tags over other immutable collections.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template MicrometerRules.TagsOf4

tech.picnic.errorprone.refasterrules.MicrometerRulesRecipes$TagsOf4Recipe

Prefer using Tags over other immutable collections.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template MicrometerRules.TagsOf5

tech.picnic.errorprone.refasterrules.MicrometerRulesRecipes$TagsOf5Recipe

Prefer using Tags over other immutable collections.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

MockitoRules Refaster recipes

tech.picnic.errorprone.refasterrules.MockitoRulesRecipes

Refaster rules related to Mockito expressions and statements. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template MockitoRules.InvocationOnMockGetArguments

tech.picnic.errorprone.refasterrules.MockitoRulesRecipes$InvocationOnMockGetArgumentsRecipe

Recipe created for the following Refaster template: java 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); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template MockitoRules.Never

tech.picnic.errorprone.refasterrules.MockitoRulesRecipes$NeverRecipe

Prefer Mockito#never()} over explicitly specifying that the associated invocation must happen precisely zero times.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template MockitoRules.VerifyOnce

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.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

MultimapRules Refaster recipes

tech.picnic.errorprone.refasterrules.MultimapRulesRecipes

Refaster rules related to expressions dealing with Multimaps. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template MultimapRules.MultimapContainsKey

tech.picnic.errorprone.refasterrules.MultimapRulesRecipes$MultimapContainsKeyRecipe

Prefer Multimap#containsKey(Object) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template MultimapRules.MultimapContainsValue

tech.picnic.errorprone.refasterrules.MultimapRulesRecipes$MultimapContainsValueRecipe

Prefer Multimap#containsValue(Object) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Multimap#get(Object) over more contrived alternatives

tech.picnic.errorprone.refasterrules.MultimapRulesRecipes$MultimapGetRecipe

<strong>Warning:</strong> this rewrite rule is not completely behavior preserving: the original code will yield null for unknown keys, while the replacement code will return an empty collection for unknown keys.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template MultimapRules.MultimapIsEmpty

tech.picnic.errorprone.refasterrules.MultimapRulesRecipes$MultimapIsEmptyRecipe

Prefer Multimap#isEmpty() over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template MultimapRules.MultimapKeySet

tech.picnic.errorprone.refasterrules.MultimapRulesRecipes$MultimapKeySetRecipe

Prefer Multimap#keySet() over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template MultimapRules.MultimapKeysStream

tech.picnic.errorprone.refasterrules.MultimapRulesRecipes$MultimapKeysStreamRecipe

Don't unnecessarily use Multimap#entries().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template MultimapRules.MultimapSize

tech.picnic.errorprone.refasterrules.MultimapRulesRecipes$MultimapSizeRecipe

Prefer Multimap#size() over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template MultimapRules.MultimapValuesStream

tech.picnic.errorprone.refasterrules.MultimapRulesRecipes$MultimapValuesStreamRecipe

Don't unnecessarily use Multimap#entries().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

NullRules Refaster recipes

tech.picnic.errorprone.refasterrules.NullRulesRecipes

Refaster rules related to expressions dealing with (possibly) null values. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template NullRules.IsNotNull

tech.picnic.errorprone.refasterrules.NullRulesRecipes$IsNotNullRecipe

Prefer the != operator (with null as the second operand) over Objects#nonNull(Object).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template NullRules.IsNullFunction

tech.picnic.errorprone.refasterrules.NullRulesRecipes$IsNullFunctionRecipe

Prefer Objects#isNull(Object) over the equivalent lambda function or more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template NullRules.IsNull

tech.picnic.errorprone.refasterrules.NullRulesRecipes$IsNullRecipe

Prefer the == operator (with null as the second operand) over Objects#isNull(Object).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template NullRules.NonNullFunction

tech.picnic.errorprone.refasterrules.NullRulesRecipes$NonNullFunctionRecipe

Prefer Objects#nonNull(Object) over the equivalent lambda function or more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template NullRules.RequireNonNullElseGet

tech.picnic.errorprone.refasterrules.NullRulesRecipes$RequireNonNullElseGetRecipe

Prefer Objects#requireNonNullElseGet(Object, Supplier) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template NullRules.RequireNonNullElse

tech.picnic.errorprone.refasterrules.NullRulesRecipes$RequireNonNullElseRecipe

Prefer Objects#requireNonNullElse(Object, Object) over non-JDK or more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

OptionalRules Refaster recipes

tech.picnic.errorprone.refasterrules.OptionalRulesRecipes

Refaster rules related to expressions dealing with Optionals. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template OptionalRules.MapOptionalToBoolean

tech.picnic.errorprone.refasterrules.OptionalRulesRecipes$MapOptionalToBooleanRecipe

Prefer Optional#filter(Predicate) over Optional#map(Function) when converting an Optional to a boolean.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template OptionalRules.OptionalEmpty

tech.picnic.errorprone.refasterrules.OptionalRulesRecipes$OptionalEmptyRecipe

Prefer Optional#empty() over the more contrived alternative.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template OptionalRules.OptionalEqualsOptional

tech.picnic.errorprone.refasterrules.OptionalRulesRecipes$OptionalEqualsOptionalRecipe

Prefer Optional#equals(Object) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template OptionalRules.OptionalFilter

tech.picnic.errorprone.refasterrules.OptionalRulesRecipes$OptionalFilterRecipe

Avoid unnecessary Optional to Stream conversion when filtering a value of the former type.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template OptionalRules.OptionalFirstIteratorElement

tech.picnic.errorprone.refasterrules.OptionalRulesRecipes$OptionalFirstIteratorElementRecipe

Don't use the ternary operator to extract the first element of a possibly-empty Iterator as an Optional.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template OptionalRules.OptionalIsEmpty

tech.picnic.errorprone.refasterrules.OptionalRulesRecipes$OptionalIsEmptyRecipe

Prefer Optional#isEmpty() over the more verbose alternative.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template OptionalRules.OptionalIsPresent

tech.picnic.errorprone.refasterrules.OptionalRulesRecipes$OptionalIsPresentRecipe

Prefer Optional#isPresent() over the inverted alternative.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template OptionalRules.OptionalMap

tech.picnic.errorprone.refasterrules.OptionalRulesRecipes$OptionalMapRecipe

Avoid unnecessary Optional to Stream conversion when mapping a value of the former type.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template OptionalRules.OptionalOfNullable

tech.picnic.errorprone.refasterrules.OptionalRulesRecipes$OptionalOfNullableRecipe

Recipe created for the following Refaster template: java static final class OptionalOfNullable&lt;T&gt; { @BeforeTemplate @SuppressWarnings(value = &quot;TernaryOperatorOptionalNegativeFiltering&quot;) Optional&lt;T&gt; before(@Nullable T object) { return object == null ? Optional.empty() : Optional.of(object); } @AfterTemplate Optional&lt;T&gt; after(T object) { return Optional.ofNullable(object); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template OptionalRules.OptionalOrElseThrowMethodReference

tech.picnic.errorprone.refasterrules.OptionalRulesRecipes$OptionalOrElseThrowMethodReferenceRecipe

Prefer Optional#orElseThrow() over the less explicit Optional#get().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template OptionalRules.OptionalOrElseThrow

tech.picnic.errorprone.refasterrules.OptionalRulesRecipes$OptionalOrElseThrowRecipe

Prefer Optional#orElseThrow() over the less explicit Optional#get().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template OptionalRules.OptionalOrOtherOptional

tech.picnic.errorprone.refasterrules.OptionalRulesRecipes$OptionalOrOtherOptionalRecipe

Prefer Optional#or(Supplier) over more verbose alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template OptionalRules.OptionalStream

tech.picnic.errorprone.refasterrules.OptionalRulesRecipes$OptionalStreamRecipe

Prefer Optional#stream() over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template OptionalRules.OrOrElseThrow

tech.picnic.errorprone.refasterrules.OptionalRulesRecipes$OrOrElseThrowRecipe

Recipe created for the following Refaster template: java static final class OrOrElseThrow&lt;T&gt; { @BeforeTemplate T before(Optional&lt;T&gt; o1, Optional&lt;T&gt; o2) { return o1.orElseGet(()-&gt;o2.orElseThrow()); } @AfterTemplate T after(Optional&lt;T&gt; o1, Optional&lt;T&gt; o2) { return o1.or(()-&gt;o2).orElseThrow(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template OptionalRules.StreamFlatMapOptional

tech.picnic.errorprone.refasterrules.OptionalRulesRecipes$StreamFlatMapOptionalRecipe

Flatten a stream of Optionals using Optional#stream(), rather than using one of the more verbose alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

PatternRules Refaster recipes

tech.picnic.errorprone.refasterrules.PatternRulesRecipes

Refaster rules related to code dealing with regular expressions. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template PatternRules.PatternAsPredicate

tech.picnic.errorprone.refasterrules.PatternRulesRecipes$PatternAsPredicateRecipe

Prefer Pattern#asPredicate() over non-JDK alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template PatternRules.PatternCompileAsPredicate

tech.picnic.errorprone.refasterrules.PatternRulesRecipes$PatternCompileAsPredicateRecipe

Prefer Pattern#asPredicate() over non-JDK alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

PreconditionsRules Refaster recipes

tech.picnic.errorprone.refasterrules.PreconditionsRulesRecipes

Refaster templates related to statements dealing with Preconditions. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template PreconditionsRules.RequireNonNull

tech.picnic.errorprone.refasterrules.PreconditionsRulesRecipes$RequireNonNullRecipe

Prefer Objects#requireNonNull(Object) over non-JDK alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template PreconditionsRules.RequireNonNullWithMessage

tech.picnic.errorprone.refasterrules.PreconditionsRulesRecipes$RequireNonNullWithMessageRecipe

Prefer Objects#requireNonNull(Object, String) over non-JDK alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

PrimitiveRules Refaster recipes

tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes

Refaster rules related to expressions dealing with primitives. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template PrimitiveRules.ArraysCompareUnsignedBytes

tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes$ArraysCompareUnsignedBytesRecipe

Prefer JDK's Arrays#compareUnsigned(byte[], byte[]) over third-party alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template PrimitiveRules.ArraysCompareUnsignedInts

tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes$ArraysCompareUnsignedIntsRecipe

Prefer JDK's Arrays#compareUnsigned(int[], int[]) over third-party alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template PrimitiveRules.ArraysCompareUnsignedLongs

tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes$ArraysCompareUnsignedLongsRecipe

Prefer JDK's Arrays#compareUnsigned(long[], long[]) over third-party alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template PrimitiveRules.CharacterBytes

tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes$CharacterBytesRecipe

Prefer Character#BYTES over the Guava alternative.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template PrimitiveRules.DoubleBytes

tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes$DoubleBytesRecipe

Prefer Double#BYTES over the Guava alternative.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template PrimitiveRules.FloatBytes

tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes$FloatBytesRecipe

Prefer Float#BYTES over the Guava alternative.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template PrimitiveRules.GreaterThanOrEqualTo

tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes$GreaterThanOrEqualToRecipe

Avoid contrived ways of expressing the "greater than or equal to" relationship.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template PrimitiveRules.GreaterThan

tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes$GreaterThanRecipe

Avoid contrived ways of expressing the "greater than" relationship.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template PrimitiveRules.IntegerBytes

tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes$IntegerBytesRecipe

Prefer Integer#BYTES over the Guava alternative.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template PrimitiveRules.IntegerCompareUnsigned

tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes$IntegerCompareUnsignedRecipe

Prefer JDK's Integer#compareUnsigned(int, int) over third-party alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template PrimitiveRules.IntegerDivideUnsigned

tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes$IntegerDivideUnsignedRecipe

Prefer JDK's Integer#divideUnsigned(int, int) over third-party alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template PrimitiveRules.IntegerParseUnsignedInt

tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes$IntegerParseUnsignedIntRecipe

Prefer JDK's Integer#parseUnsignedInt(String) over third-party or more verbose alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template PrimitiveRules.IntegerParseUnsignedIntWithRadix

tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes$IntegerParseUnsignedIntWithRadixRecipe

Prefer JDK's Integer#parseUnsignedInt(String, int) over third-party alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template PrimitiveRules.IntegerRemainderUnsigned

tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes$IntegerRemainderUnsignedRecipe

Prefer JDK's Integer#remainderUnsigned(int, int) over third-party alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template PrimitiveRules.IntegerSignumIsNegative

tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes$IntegerSignumIsNegativeRecipe

Prefer an Integer#signum(int) comparison to -1 over less clear alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template PrimitiveRules.IntegerSignumIsPositive

tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes$IntegerSignumIsPositiveRecipe

Prefer an Integer#signum(int) comparison to 1 over less clear alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template PrimitiveRules.IntegerToUnsignedString

tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes$IntegerToUnsignedStringRecipe

Prefer JDK's Integer#toUnsignedString(int) over third-party or more verbose alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template PrimitiveRules.IntegerToUnsignedStringWithRadix

tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes$IntegerToUnsignedStringWithRadixRecipe

Prefer JDK's Integer#toUnsignedString(int,int) over third-party alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template PrimitiveRules.LessThanOrEqualTo

tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes$LessThanOrEqualToRecipe

Avoid contrived ways of expressing the "less than or equal to" relationship.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template PrimitiveRules.LessThan

tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes$LessThanRecipe

Avoid contrived ways of expressing the "less than" relationship.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template PrimitiveRules.LongBytes

tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes$LongBytesRecipe

Prefer Long#BYTES over the Guava alternative.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template PrimitiveRules.LongCompareUnsigned

tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes$LongCompareUnsignedRecipe

Prefer JDK's Long#compareUnsigned(long, long) over third-party alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template PrimitiveRules.LongDivideUnsigned

tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes$LongDivideUnsignedRecipe

Prefer JDK's Long#divideUnsigned(long, long) over third-party alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template PrimitiveRules.LongParseUnsignedLong

tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes$LongParseUnsignedLongRecipe

Prefer JDK's Long#parseUnsignedLong(String) over third-party or more verbose alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template PrimitiveRules.LongParseUnsignedLongWithRadix

tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes$LongParseUnsignedLongWithRadixRecipe

Prefer JDK's Long#parseUnsignedLong(String, int) over third-party alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template PrimitiveRules.LongRemainderUnsigned

tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes$LongRemainderUnsignedRecipe

Prefer JDK's Long#remainderUnsigned(long, long) over third-party alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template PrimitiveRules.LongSignumIsNegative

tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes$LongSignumIsNegativeRecipe

Prefer an Long#signum(long) comparison to -1 over less clear alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template PrimitiveRules.LongSignumIsPositive

tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes$LongSignumIsPositiveRecipe

Prefer an Long#signum(long) comparison to 1 over less clear alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template PrimitiveRules.LongToIntExact

tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes$LongToIntExactRecipe

Prefer Math#toIntExact(long) over the Guava alternative.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template PrimitiveRules.LongToUnsignedString

tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes$LongToUnsignedStringRecipe

Prefer JDK's Long#toUnsignedString(long) over third-party or more verbose alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template PrimitiveRules.LongToUnsignedStringWithRadix

tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes$LongToUnsignedStringWithRadixRecipe

Prefer JDK's Long#toUnsignedString(long,int) over third-party alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template PrimitiveRules.ShortBytes

tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes$ShortBytesRecipe

Prefer Short#BYTES over the Guava alternative.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

RandomGeneratorRules Refaster recipes

tech.picnic.errorprone.refasterrules.RandomGeneratorRulesRecipes

Refaster rules related to expressions dealing with RandomGenerator instances. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template RandomGeneratorRules.RandomGeneratorNextDouble

tech.picnic.errorprone.refasterrules.RandomGeneratorRulesRecipes$RandomGeneratorNextDoubleRecipe

Prefer RandomGenerator#nextDouble(double) over alternatives that yield a smaller domain of values and may result in Double#isInfinite() inifinity.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template RandomGeneratorRules.RandomGeneratorNextInt

tech.picnic.errorprone.refasterrules.RandomGeneratorRulesRecipes$RandomGeneratorNextIntRecipe

Prefer RandomGenerator#nextInt(int) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer RandomGenerator#nextLong(long) over more contrived alternatives

tech.picnic.errorprone.refasterrules.RandomGeneratorRulesRecipes$RandomGeneratorNextLongRecipe

Additionally, for large bounds, the unnecessary floating point arithmetic prevents some long values from being generated.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

ReactorRules Refaster recipes

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes

Refaster rules related to Reactor expressions and statements. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.ConcatMapIterableIdentity

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$ConcatMapIterableIdentityRecipe

Prefer Flux#concatMapIterable(Function) over alternatives that require an additional subscription.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.ConcatMapIterableIdentityWithPrefetch

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$ConcatMapIterableIdentityWithPrefetchRecipe

Prefer Flux#concatMapIterable(Function, int) over alternatives that require an additional subscription.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.FluxAsStepVerifierExpectNext

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxAsStepVerifierExpectNextRecipe

Avoid list collection when verifying that a Flux emits exactly one value.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.FluxCollectToImmutableList

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxCollectToImmutableListRecipe

Prefer Flux#collect(Collector) with ImmutableList#toImmutableList() over alternatives that do not explicitly return an immutable collection.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.FluxCollectToImmutableSet

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxCollectToImmutableSetRecipe

Prefer Flux#collect(Collector) with ImmutableSet#toImmutableSet() over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.FluxDefaultIfEmpty

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxDefaultIfEmptyRecipe

Prefer Flux#defaultIfEmpty(Object) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.FluxDeferredError

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxDeferredErrorRecipe

Don't unnecessarily defer Flux#error(Throwable).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.FluxDistinctSort

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxDistinctSortRecipe

Apply Flux#distinct() before Flux#sort() to reduce the number of elements to sort.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.FluxDistinctSortWithComparator

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxDistinctSortWithComparatorRecipe

Apply Flux#distinct() before Flux#sort(Comparator) to reduce the number of elements to sort.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.FluxDoOnError

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxDoOnErrorRecipe

Prefer Flux#doOnError(Class, Consumer) over Flux#doOnError(Predicate, Consumer) where possible.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.FluxErrorSupplier

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxErrorSupplierRecipe

Don't unnecessarily pass Flux#error(Supplier) a method reference or lambda expression.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.FluxFilterSort

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxFilterSortRecipe

Apply Flux#filter(Predicate) before Flux#sort() to reduce the number of elements to sort.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.FluxFilterSortWithComparator

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxFilterSortWithComparatorRecipe

Apply Flux#filter(Predicate) before Flux#sort(Comparator) to reduce the number of elements to sort.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.FluxFromIterable

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxFromIterableRecipe

Prefer Flux#fromIterable(Iterable) over less efficient alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.FluxFromStreamSupplier

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxFromStreamSupplierRecipe

Prefer Flux#fromStream(Supplier) over Flux#fromStream(Stream), as the former yields a Flux that is more likely to behave as expected when subscribed to more than once.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.FluxJust

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxJustRecipe

Prefer Flux#just(Object) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.FluxMapNotNullOrElse

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxMapNotNullOrElseRecipe

Prefer Flux#mapNotNull(Function) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.FluxNext

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxNextRecipe

Prefer fluent Flux#next() over less explicit alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.FluxOfType

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxOfTypeRecipe

Prefer Flux#ofType(Class) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.FluxOnErrorCompletePredicate

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxOnErrorCompletePredicateRecipe

Prefer Flux#onErrorComplete(Predicate)} over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.FluxOnErrorContinue

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxOnErrorContinueRecipe

Prefer Flux#onErrorContinue(Class, BiConsumer) over Flux#onErrorContinue(Predicate, BiConsumer) where possible.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.FluxOnErrorMap

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxOnErrorMapRecipe

Prefer Flux#onErrorMap(Class, Function) over Flux#onErrorMap(Predicate, Function) where possible.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.FluxOnErrorResume

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxOnErrorResumeRecipe

Prefer Flux#onErrorResume(Class, Function) over Flux#onErrorResume(Predicate, Function) where possible.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.FluxOnErrorReturn

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxOnErrorReturnRecipe

Prefer Flux#onErrorReturn(Class, Object) over Flux#onErrorReturn(Predicate, Object) where possible.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.FluxSort

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxSortRecipe

Prefer Flux#sort() over more verbose alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.FluxSwitchIfEmptyOfEmptyPublisher

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxSwitchIfEmptyOfEmptyPublisherRecipe

Don't unnecessarily pass an empty publisher to Flux#switchIfEmpty(Publisher).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Flux#take(long) over Flux#take(long, boolean) where relevant

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxTakeRecipe

In Reactor versions prior to 3.5.0, Flux#take(long) makes an unbounded request upstream, and is equivalent to Flux#take(long, false). From version 3.5.0 onwards, the behavior of Flux#take(long) instead matches Flux#take(long, true).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.FluxTakeWhile

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxTakeWhileRecipe

Do not unnecessarily Flux#filter(Predicate) filter the result of Flux#takeWhile(Predicate) using the same Predicate.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.FluxThenEmpty

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxThenEmptyRecipe

Avoid vacuous invocations of Flux#ignoreElements().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.FluxThenMany

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxThenManyRecipe

Avoid vacuous invocations of Flux#ignoreElements().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.FluxThenMono

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxThenMonoRecipe

Avoid vacuous invocations of Flux#ignoreElements().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.FluxThen

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxThenRecipe

Avoid vacuous invocations of Flux#ignoreElements().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.FluxTimeoutFluxEmpty

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxTimeoutFluxEmptyRecipe

Prefer Flux#timeout(Duration, Publisher) over more contrived or less performant alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.FluxTransformMax

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxTransformMaxRecipe

Prefer MathFlux#max(Publisher) over less efficient alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.FluxTransformMaxWithComparator

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxTransformMaxWithComparatorRecipe

Prefer MathFlux#max(Publisher, Comparator) over less efficient or more verbose alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.FluxTransformMin

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxTransformMinRecipe

Prefer MathFlux#min(Publisher) over less efficient alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.FluxTransformMinWithComparator

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxTransformMinWithComparatorRecipe

Prefer MathFlux#min(Publisher, Comparator) over less efficient or more verbose alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.FluxZip

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxZipRecipe

Prefer Flux#zip(Publisher, Publisher) over a chained Flux#zipWith(Publisher), as the former better conveys that the Publishers may be subscribed to concurrently, and generalizes to combining three or more reactive streams.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.FluxZipWithCombinator

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxZipWithCombinatorRecipe

Prefer Flux#zip(Publisher, Publisher) with a chained combinator over a chained Flux#zipWith(Publisher, BiFunction), as the former better conveys that the Publishers may be subscribed to concurrently, and generalizes to combining three or more reactive streams.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.FluxZipWithIterableBiFunction

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxZipWithIterableBiFunctionRecipe

Prefer Flux#zipWithIterable(Iterable, BiFunction) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.FluxZipWithIterableMapFunction

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxZipWithIterableMapFunctionRecipe

Prefer Flux#zipWithIterable(Iterable) with a chained combinator over Flux#zipWithIterable(Iterable, BiFunction), as the former generally yields more readable code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.FluxZipWithIterable

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxZipWithIterableRecipe

Prefer Flux#zipWithIterable(Iterable) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.MathFluxMax

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MathFluxMaxRecipe

Prefer MathFlux#max(Publisher) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.MathFluxMin

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MathFluxMinRecipe

Prefer MathFlux#min(Publisher) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.MonoDefaultIfEmpty

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoDefaultIfEmptyRecipe

Prefer Mono#defaultIfEmpty(Object) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.MonoDeferMonoJustOrEmpty

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoDeferMonoJustOrEmptyRecipe

Prefer Mono#defer(Supplier) deferring Mono#justOrEmpty(Optional) over more verbose alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.MonoDeferredError

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoDeferredErrorRecipe

Don't unnecessarily defer Mono#error(Throwable).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.MonoDoOnError

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoDoOnErrorRecipe

Prefer Mono#doOnError(Class, Consumer) over Mono#doOnError(Predicate, Consumer) where possible.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.MonoEmpty

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoEmptyRecipe

Prefer Mono#empty() over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.MonoErrorSupplier

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoErrorSupplierRecipe

Don't unnecessarily pass Mono#error(Supplier) a method reference or lambda expression.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.MonoFlatMapIterableIdentity

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoFlatMapIterableIdentityRecipe

Prefer Mono#flatMapIterable(Function) to flatten a Mono of some Iterable over less efficient alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.MonoFlux

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoFluxRecipe

Prefer Mono#flux()} over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.MonoFromFutureAsyncLoadingCacheGetAll

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoFromFutureAsyncLoadingCacheGetAllRecipe

Don't propagate Mono cancellations to upstream cache value computations, as completion of such computations may benefit concurrent or subsequent cache usages.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.MonoFromFutureAsyncLoadingCacheGet

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoFromFutureAsyncLoadingCacheGetRecipe

Don't propagate Mono cancellations to an upstream cache value computation, as completion of such computations may benefit concurrent or subsequent cache usages.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.MonoFromFutureSupplierBoolean

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoFromFutureSupplierBooleanRecipe

Prefer Mono#fromFuture(Supplier, boolean) over Mono#fromFuture(CompletableFuture, boolean), as the former may defer initiation of the asynchronous computation until subscription.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.MonoFromFutureSupplier

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoFromFutureSupplierRecipe

Prefer Mono#fromFuture(Supplier) over Mono#fromFuture(CompletableFuture), as the former may defer initiation of the asynchronous computation until subscription.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer a Mono#justOrEmpty(Optional) and Mono#switchIfEmpty(Mono) chain over more contrived alternatives

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoFromOptionalSwitchIfEmptyRecipe

In particular, avoid mixing of the Optional and Mono APIs.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.MonoIdentity

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoIdentityRecipe

Don't unnecessarily transform a Mono to an equivalent instance.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.MonoJustOrEmptyObject

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoJustOrEmptyObjectRecipe

Prefer Mono#justOrEmpty(Object) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.MonoJustOrEmptyOptional

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoJustOrEmptyOptionalRecipe

Prefer Mono#justOrEmpty(Optional) over more verbose alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.MonoJust

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoJustRecipe

Prefer Mono#just(Object) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.MonoOfType

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoOfTypeRecipe

Prefer Mono#ofType(Class) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.MonoOnErrorCompleteClass

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoOnErrorCompleteClassRecipe

Prefer Mono#onErrorComplete(Class)} over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.MonoOnErrorCompletePredicate

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoOnErrorCompletePredicateRecipe

Prefer Mono#onErrorComplete(Predicate)} over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.MonoOnErrorComplete

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoOnErrorCompleteRecipe

Prefer Mono#onErrorComplete() over more contrived alternatives, and don't chain it with redundant calls to Mono#doOnError.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.MonoOnErrorContinue

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoOnErrorContinueRecipe

Prefer Mono#onErrorContinue(Class, BiConsumer) over Mono#onErrorContinue(Predicate, BiConsumer) where possible.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.MonoOnErrorMap

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoOnErrorMapRecipe

Prefer Mono#onErrorMap(Class, Function) over Mono#onErrorMap(Predicate, Function) where possible.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.MonoOnErrorResume

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoOnErrorResumeRecipe

Prefer Mono#onErrorResume(Class, Function) over Mono#onErrorResume(Predicate, Function) where possible.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.MonoOnErrorReturn

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoOnErrorReturnRecipe

Prefer Mono#onErrorReturn(Class, Object) over Mono#onErrorReturn(Predicate, Object) where possible.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.MonoSingleOptional

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoSingleOptionalRecipe

Prefer Mono#singleOptional() over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.MonoSingle

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoSingleRecipe

Don't unnecessarily transform a Mono to a Flux to expect exactly one item.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.MonoThenEmpty

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoThenEmptyRecipe

Avoid vacuous invocations of Mono#ignoreElement().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.MonoThenMany

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoThenManyRecipe

Avoid vacuous operations prior to invocation of Mono#thenMany(Publisher).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.MonoThenMonoFlux

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoThenMonoFluxRecipe

Prefer explicit invocation of Mono#flux() over implicit conversions from Mono to Flux.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.MonoThenMono

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoThenMonoRecipe

Avoid vacuous operations prior to invocation of Mono#then(Mono).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.MonoThen

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoThenRecipe

Prefer direct invocation of Mono#then()} over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.MonoThenReturn

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoThenReturnRecipe

Prefer Mono#thenReturn(Object) over more verbose alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.MonoTimeoutDurationMonoEmpty

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoTimeoutDurationMonoEmptyRecipe

Prefer Mono#timeout(Duration, Mono) over more contrived or less performant alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.MonoTimeoutDurationMonoJust

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoTimeoutDurationMonoJustRecipe

Prefer Mono#timeout(Duration, Mono) over more contrived or less performant alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.MonoTimeoutDuration

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoTimeoutDurationRecipe

Prefer Mono#timeout(Duration, Mono) over more contrived or less performant alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.MonoTimeoutPublisherMonoEmpty

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoTimeoutPublisherMonoEmptyRecipe

Prefer Mono#timeout(Publisher, Mono) over more contrived or less performant alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.MonoTimeoutPublisherMonoJust

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoTimeoutPublisherMonoJustRecipe

Prefer Mono#timeout(Publisher, Mono) over more contrived or less performant alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.MonoTimeoutPublisher

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoTimeoutPublisherRecipe

Prefer Mono#timeout(Publisher, Mono) over more contrived or less performant alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.MonoZip

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoZipRecipe

Prefer Mono#zip(Mono, Mono) over a chained Mono#zipWith(Mono), as the former better conveys that the Monos may be subscribed to concurrently, and generalizes to combining three or more reactive streams.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.MonoZipWithCombinator

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoZipWithCombinatorRecipe

Prefer Mono#zip(Mono, Mono) with a chained combinator over a chained Mono#zipWith(Mono, BiFunction), as the former better conveys that the Monos may be subscribed to concurrently, and generalizes to combining three or more reactive streams.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.OptionalMapMonoJust

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$OptionalMapMonoJustRecipe

Try to avoid expressions of type Optional&lt;Mono&lt;T&gt;&gt;, but if you must map an Optional to this type, prefer using Mono#just(Object).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.PublisherProbeAssertWasCancelled

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$PublisherProbeAssertWasCancelledRecipe

Prefer PublisherProbe#assertWasCancelled() over more verbose alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.PublisherProbeAssertWasNotCancelled

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$PublisherProbeAssertWasNotCancelledRecipe

Prefer PublisherProbe#assertWasNotCancelled() over more verbose alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.PublisherProbeAssertWasNotRequested

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$PublisherProbeAssertWasNotRequestedRecipe

Prefer PublisherProbe#assertWasNotRequested() over more verbose alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.PublisherProbeAssertWasNotSubscribed

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$PublisherProbeAssertWasNotSubscribedRecipe

Prefer PublisherProbe#assertWasNotSubscribed() over more verbose alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.PublisherProbeAssertWasRequested

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$PublisherProbeAssertWasRequestedRecipe

Prefer PublisherProbe#assertWasRequested() over more verbose alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.PublisherProbeAssertWasSubscribed

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$PublisherProbeAssertWasSubscribedRecipe

Prefer PublisherProbe#assertWasSubscribed() over more verbose alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.PublisherProbeEmpty

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$PublisherProbeEmptyRecipe

Prefer PublisherProbe#empty()} over more verbose alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.StepVerifierFromFlux

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$StepVerifierFromFluxRecipe

Prefer Flux#as(Function) when creating a StepVerifier.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.StepVerifierFromMono

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$StepVerifierFromMonoRecipe

Prefer Mono#as(Function) when creating a StepVerifier.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.StepVerifierLastStepVerifyComplete

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$StepVerifierLastStepVerifyCompleteRecipe

Prefer StepVerifier.LastStep#verifyComplete() over more verbose alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.StepVerifierLastStepVerifyErrorClass

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$StepVerifierLastStepVerifyErrorClassRecipe

Prefer StepVerifier.LastStep#verifyError(Class) over more verbose alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.StepVerifierLastStepVerifyErrorMatches

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$StepVerifierLastStepVerifyErrorMatchesRecipe

Prefer StepVerifier.LastStep#verifyErrorMatches(Predicate) over more verbose alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.StepVerifierLastStepVerifyErrorMessage

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$StepVerifierLastStepVerifyErrorMessageRecipe

Prefer StepVerifier.LastStep#verifyErrorMessage(String) over more verbose alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.StepVerifierLastStepVerifyError

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$StepVerifierLastStepVerifyErrorRecipe

Prefer StepVerifier.LastStep#verifyError() over more verbose alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.StepVerifierLastStepVerifyErrorSatisfiesAssertJ

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$StepVerifierLastStepVerifyErrorSatisfiesAssertJRecipe

Prefer StepVerifier.LastStep#verifyErrorSatisfies(Consumer) with AssertJ over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.StepVerifierLastStepVerifyErrorSatisfies

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$StepVerifierLastStepVerifyErrorSatisfiesRecipe

Prefer StepVerifier.LastStep#verifyErrorSatisfies(Consumer) over more verbose alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.StepVerifierLastStepVerifyTimeout

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$StepVerifierLastStepVerifyTimeoutRecipe

Prefer StepVerifier.LastStep#verifyTimeout(Duration) over more verbose alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.StepVerifierStepExpectNext

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$StepVerifierStepExpectNextRecipe

Prefer StepVerifier.Step#expectNext(Object) over more verbose alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.StepVerifierVerifyDuration

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$StepVerifierVerifyDurationRecipe

Prefer StepVerifier#verify(Duration) over a dangling StepVerifier#verifyThenAssertThat(Duration).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.StepVerifierVerifyLater

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$StepVerifierVerifyLaterRecipe

Don't unnecessarily invoke StepVerifier#verifyLater() multiple times.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template ReactorRules.StepVerifierVerify

tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$StepVerifierVerifyRecipe

Prefer StepVerifier#verify() over a dangling StepVerifier#verifyThenAssertThat().

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

RxJava2AdapterRules Refaster recipes

tech.picnic.errorprone.refasterrules.RxJava2AdapterRulesRecipes

Refaster rules related to expressions dealing with RxJava2Adapter. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template RxJava2AdapterRules.CompletableToMono

tech.picnic.errorprone.refasterrules.RxJava2AdapterRulesRecipes$CompletableToMonoRecipe

Use the fluent API style when using RxJava2Adapter#completableToMono.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template RxJava2AdapterRules.FlowableToFlux

tech.picnic.errorprone.refasterrules.RxJava2AdapterRulesRecipes$FlowableToFluxRecipe

Use RxJava2Adapter#flowableToFlux to convert a Flowable to a Flux, and do so using the fluent API style.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template RxJava2AdapterRules.FluxToFlowable

tech.picnic.errorprone.refasterrules.RxJava2AdapterRulesRecipes$FluxToFlowableRecipe

Use RxJava2Adapter#fluxToFlowable to convert a Flux to a Flowable, and do so using the fluent API style.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template RxJava2AdapterRules.FluxToObservable

tech.picnic.errorprone.refasterrules.RxJava2AdapterRulesRecipes$FluxToObservableRecipe

Use RxJava2Adapter#fluxToObservable to convert a Flux to a Observable, and do so using the fluent API style.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template RxJava2AdapterRules.MaybeToMono

tech.picnic.errorprone.refasterrules.RxJava2AdapterRulesRecipes$MaybeToMonoRecipe

Use the fluent API style when using RxJava2Adapter#maybeToMono.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template RxJava2AdapterRules.MonoToCompletable

tech.picnic.errorprone.refasterrules.RxJava2AdapterRulesRecipes$MonoToCompletableRecipe

Use RxJava2Adapter#monoToCompletable to convert a Mono to a Completable, and do so using the fluent API style.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template RxJava2AdapterRules.MonoToFlowable

tech.picnic.errorprone.refasterrules.RxJava2AdapterRulesRecipes$MonoToFlowableRecipe

Use RxJava2Adapter#monoToFlowable to convert a Mono to a Flowable, and do so using the fluent API style.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template RxJava2AdapterRules.MonoToMaybe

tech.picnic.errorprone.refasterrules.RxJava2AdapterRulesRecipes$MonoToMaybeRecipe

Use the fluent API style when using RxJava2Adapter#monoToMaybe.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template RxJava2AdapterRules.MonoToSingle

tech.picnic.errorprone.refasterrules.RxJava2AdapterRulesRecipes$MonoToSingleRecipe

Use RxJava2Adapter#monoToSingle to convert a Mono to a Single, and do so using the fluent API style.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template RxJava2AdapterRules.ObservableToFlux

tech.picnic.errorprone.refasterrules.RxJava2AdapterRulesRecipes$ObservableToFluxRecipe

Use the fluent API style when using RxJava2Adapter#observableToFlux.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template RxJava2AdapterRules.SingleToMono

tech.picnic.errorprone.refasterrules.RxJava2AdapterRulesRecipes$SingleToMonoRecipe

Use the fluent API style when using RxJava2Adapter#singleToMono.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

SpringTestRules Refaster recipes

tech.picnic.errorprone.refasterrules.SpringTestRulesRecipes

Refaster rules related to Spring Test expressions and statements. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template SpringTestRules.BodyContentSpecJsonLenient

tech.picnic.errorprone.refasterrules.SpringTestRulesRecipes$BodyContentSpecJsonLenientRecipe

Prefer BodyContentSpec#json(String, JsonCompareMode) over alternatives that implicitly perform a JsonCompareMode#LENIENT lenient comparison or are deprecated.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template SpringTestRules.BodyContentSpecJsonStrict

tech.picnic.errorprone.refasterrules.SpringTestRulesRecipes$BodyContentSpecJsonStrictRecipe

Prefer BodyContentSpec#json(String, JsonCompareMode) over the deprecated alternative.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

StreamRules Refaster recipes

tech.picnic.errorprone.refasterrules.StreamRulesRecipes

Refaster rules related to expressions dealing with Streams. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StreamRules.CollectionParallelStream

tech.picnic.errorprone.refasterrules.StreamRulesRecipes$CollectionParallelStreamRecipe

Prefer Collection#parallelStream() over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StreamRules.ConcatOneStream

tech.picnic.errorprone.refasterrules.StreamRulesRecipes$ConcatOneStreamRecipe

Don't unnecessarily call Streams#concat(Stream...).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StreamRules.ConcatTwoStreams

tech.picnic.errorprone.refasterrules.StreamRulesRecipes$ConcatTwoStreamsRecipe

Prefer Stream#concat(Stream, Stream) over the Guava alternative.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StreamRules.Joining

tech.picnic.errorprone.refasterrules.StreamRulesRecipes$JoiningRecipe

Prefer Collectors#joining() over Collectors#joining(CharSequence) with an empty delimiter string.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StreamRules.StreamCount

tech.picnic.errorprone.refasterrules.StreamRulesRecipes$StreamCountRecipe

Recipe created for the following Refaster template: java static final class StreamCount&lt;T&gt; { @BeforeTemplate @SuppressWarnings(value = &quot;java:S4266&quot;) long before(Stream&lt;T&gt; stream) { return stream.collect(counting()); } @AfterTemplate long after(Stream&lt;T&gt; stream) { return stream.count(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StreamRules.StreamDistinctSorted

tech.picnic.errorprone.refasterrules.StreamRulesRecipes$StreamDistinctSortedRecipe

Apply Stream#distinct() before Stream#sorted() to reduce the number of elements to sort.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StreamRules.StreamDistinctSortedWithComparator

tech.picnic.errorprone.refasterrules.StreamRulesRecipes$StreamDistinctSortedWithComparatorRecipe

Apply Stream#distinct() before Stream#sorted(Comparator) to reduce the number of elements to sort.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StreamRules.StreamFilterCollect

tech.picnic.errorprone.refasterrules.StreamRulesRecipes$StreamFilterCollectRecipe

Recipe created for the following Refaster template: java static final class StreamFilterCollect&lt;T, R&gt; { @BeforeTemplate R before(Stream&lt;T&gt; stream, Predicate&lt;? super T&gt; predicate, Collector&lt;? super T, ?, R&gt; collector) { return stream.collect(filtering(predicate, collector)); } @AfterTemplate R after(Stream&lt;T&gt; stream, Predicate&lt;? super T&gt; predicate, Collector&lt;? super T, ?, R&gt; collector) { return stream.filter(predicate).collect(collector); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StreamRules.StreamFilterSorted

tech.picnic.errorprone.refasterrules.StreamRulesRecipes$StreamFilterSortedRecipe

Apply Stream#filter(Predicate) before Stream#sorted() to reduce the number of elements to sort.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StreamRules.StreamFilterSortedWithComparator

tech.picnic.errorprone.refasterrules.StreamRulesRecipes$StreamFilterSortedWithComparatorRecipe

Apply Stream#filter(Predicate) before Stream#sorted(Comparator) to reduce the number of elements to sort.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StreamRules.StreamFindAnyIsEmpty

tech.picnic.errorprone.refasterrules.StreamRulesRecipes$StreamFindAnyIsEmptyRecipe

In order to test whether a stream has any element, simply try to find one.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StreamRules.StreamFindAnyIsPresent

tech.picnic.errorprone.refasterrules.StreamRulesRecipes$StreamFindAnyIsPresentRecipe

Prefer Stream#findAny() over Stream#findFirst() if one only cares whether the stream is nonempty.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StreamRules.StreamFlatMapCollect

tech.picnic.errorprone.refasterrules.StreamRulesRecipes$StreamFlatMapCollectRecipe

Recipe created for the following Refaster template: java static final class StreamFlatMapCollect&lt;T, U, R&gt; { @BeforeTemplate R before(Stream&lt;T&gt; stream, Function&lt;? super T, ? extends Stream&lt;? extends U&gt;&gt; mapper, Collector&lt;? super U, ?, R&gt; collector) { return stream.collect(flatMapping(mapper, collector)); } @AfterTemplate R after(Stream&lt;T&gt; stream, Function&lt;? super T, ? extends Stream&lt;? extends U&gt;&gt; mapper, Collector&lt;? super U, ?, R&gt; collector) { return stream.flatMap(mapper).collect(collector); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StreamRules.StreamIterate

tech.picnic.errorprone.refasterrules.StreamRulesRecipes$StreamIterateRecipe

Prefer Stream#iterate(Object, Predicate, UnaryOperator) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StreamRules.StreamMapCollect

tech.picnic.errorprone.refasterrules.StreamRulesRecipes$StreamMapCollectRecipe

Recipe created for the following Refaster template: java static final class StreamMapCollect&lt;T, U, R&gt; { @BeforeTemplate @SuppressWarnings(value = &quot;java:S4266&quot;) R before(Stream&lt;T&gt; stream, Function&lt;? super T, ? extends U&gt; mapper, Collector&lt;? super U, ?, R&gt; collector) { return stream.collect(mapping(mapper, collector)); } @AfterTemplate R after(Stream&lt;T&gt; stream, Function&lt;? super T, ? extends U&gt; mapper, Collector&lt;? super U, ?, R&gt; collector) { return stream.map(mapper).collect(collector); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StreamRules.StreamMapFilter

tech.picnic.errorprone.refasterrules.StreamRulesRecipes$StreamMapFilterRecipe

Prefer an unconditional Map#get(Object) call followed by a null check over a call to Map#containsKey(Object), as the former avoids a second lookup operation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StreamRules.StreamMapFirst

tech.picnic.errorprone.refasterrules.StreamRulesRecipes$StreamMapFirstRecipe

Where possible, clarify that a mapping operation will be applied only to a single stream element.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StreamRules.StreamMapToDoubleSummaryStatistics

tech.picnic.errorprone.refasterrules.StreamRulesRecipes$StreamMapToDoubleSummaryStatisticsRecipe

Recipe created for the following Refaster template: java static final class StreamMapToDoubleSummaryStatistics&lt;T&gt; { @BeforeTemplate DoubleSummaryStatistics before(Stream&lt;T&gt; stream, ToDoubleFunction&lt;T&gt; mapper) { return stream.collect(summarizingDouble(mapper)); } @AfterTemplate DoubleSummaryStatistics after(Stream&lt;T&gt; stream, ToDoubleFunction&lt;T&gt; mapper) { return stream.mapToDouble(mapper).summaryStatistics(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StreamRules.StreamMapToIntSummaryStatistics

tech.picnic.errorprone.refasterrules.StreamRulesRecipes$StreamMapToIntSummaryStatisticsRecipe

Recipe created for the following Refaster template: java static final class StreamMapToIntSummaryStatistics&lt;T&gt; { @BeforeTemplate IntSummaryStatistics before(Stream&lt;T&gt; stream, ToIntFunction&lt;T&gt; mapper) { return stream.collect(summarizingInt(mapper)); } @AfterTemplate IntSummaryStatistics after(Stream&lt;T&gt; stream, ToIntFunction&lt;T&gt; mapper) { return stream.mapToInt(mapper).summaryStatistics(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StreamRules.StreamMapToLongSummaryStatistics

tech.picnic.errorprone.refasterrules.StreamRulesRecipes$StreamMapToLongSummaryStatisticsRecipe

Recipe created for the following Refaster template: java static final class StreamMapToLongSummaryStatistics&lt;T&gt; { @BeforeTemplate LongSummaryStatistics before(Stream&lt;T&gt; stream, ToLongFunction&lt;T&gt; mapper) { return stream.collect(summarizingLong(mapper)); } @AfterTemplate LongSummaryStatistics after(Stream&lt;T&gt; stream, ToLongFunction&lt;T&gt; mapper) { return stream.mapToLong(mapper).summaryStatistics(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StreamRules.StreamMaxNaturalOrder

tech.picnic.errorprone.refasterrules.StreamRulesRecipes$StreamMaxNaturalOrderRecipe

Recipe created for the following Refaster template: java static final class StreamMaxNaturalOrder&lt;T extends Comparable&lt;? super T&gt;&gt; { @BeforeTemplate Optional&lt;T&gt; before(Stream&lt;T&gt; stream) { return Refaster.anyOf(stream.min(reverseOrder()), Streams.findLast(stream.sorted())); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) Optional&lt;T&gt; after(Stream&lt;T&gt; stream) { return stream.max(naturalOrder()); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StreamRules.StreamMax

tech.picnic.errorprone.refasterrules.StreamRulesRecipes$StreamMaxRecipe

Recipe created for the following Refaster template: java static final class StreamMax&lt;T&gt; { @BeforeTemplate @SuppressWarnings(value = &quot;java:S4266&quot;) Optional&lt;T&gt; before(Stream&lt;T&gt; stream, Comparator&lt;? super T&gt; comparator) { return Refaster.anyOf(stream.min(comparator.reversed()), Streams.findLast(stream.sorted(comparator)), stream.collect(maxBy(comparator))); } @AfterTemplate Optional&lt;T&gt; after(Stream&lt;T&gt; stream, Comparator&lt;? super T&gt; comparator) { return stream.max(comparator); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StreamRules.StreamMinNaturalOrder

tech.picnic.errorprone.refasterrules.StreamRulesRecipes$StreamMinNaturalOrderRecipe

Recipe created for the following Refaster template: java static final class StreamMinNaturalOrder&lt;T extends Comparable&lt;? super T&gt;&gt; { @BeforeTemplate Optional&lt;T&gt; before(Stream&lt;T&gt; stream) { return Refaster.anyOf(stream.max(reverseOrder()), stream.sorted().findFirst()); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) Optional&lt;T&gt; after(Stream&lt;T&gt; stream) { return stream.min(naturalOrder()); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StreamRules.StreamMin

tech.picnic.errorprone.refasterrules.StreamRulesRecipes$StreamMinRecipe

Recipe created for the following Refaster template: java static final class StreamMin&lt;T&gt; { @BeforeTemplate @SuppressWarnings(value = &quot;java:S4266&quot;) Optional&lt;T&gt; before(Stream&lt;T&gt; stream, Comparator&lt;? super T&gt; comparator) { return Refaster.anyOf(stream.max(comparator.reversed()), stream.sorted(comparator).findFirst(), stream.collect(minBy(comparator))); } @AfterTemplate Optional&lt;T&gt; after(Stream&lt;T&gt; stream, Comparator&lt;? super T&gt; comparator) { return stream.min(comparator); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StreamRules.StreamOf1

tech.picnic.errorprone.refasterrules.StreamRulesRecipes$StreamOf1Recipe

Prefer Stream#of(Object) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StreamRules.StreamOf2

tech.picnic.errorprone.refasterrules.StreamRulesRecipes$StreamOf2Recipe

Prefer Stream#of(Object[]) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StreamRules.StreamOf3

tech.picnic.errorprone.refasterrules.StreamRulesRecipes$StreamOf3Recipe

Prefer Stream#of(Object[]) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StreamRules.StreamOf4

tech.picnic.errorprone.refasterrules.StreamRulesRecipes$StreamOf4Recipe

Prefer Stream#of(Object[]) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StreamRules.StreamOf5

tech.picnic.errorprone.refasterrules.StreamRulesRecipes$StreamOf5Recipe

Prefer Stream#of(Object[]) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StreamRules.StreamOfNullable

tech.picnic.errorprone.refasterrules.StreamRulesRecipes$StreamOfNullableRecipe

Prefer Stream#ofNullable(Object) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StreamRules.StreamReduce

tech.picnic.errorprone.refasterrules.StreamRulesRecipes$StreamReduceRecipe

Recipe created for the following Refaster template: java static final class StreamReduce&lt;T&gt; { @BeforeTemplate @SuppressWarnings(value = &quot;java:S4266&quot;) Optional&lt;T&gt; before(Stream&lt;T&gt; stream, BinaryOperator&lt;T&gt; accumulator) { return stream.collect(reducing(accumulator)); } @AfterTemplate Optional&lt;T&gt; after(Stream&lt;T&gt; stream, BinaryOperator&lt;T&gt; accumulator) { return stream.reduce(accumulator); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StreamRules.StreamReduceWithIdentity

tech.picnic.errorprone.refasterrules.StreamRulesRecipes$StreamReduceWithIdentityRecipe

Recipe created for the following Refaster template: java static final class StreamReduceWithIdentity&lt;T&gt; { @BeforeTemplate @SuppressWarnings(value = &quot;java:S4266&quot;) T before(Stream&lt;T&gt; stream, T identity, BinaryOperator&lt;T&gt; accumulator) { return stream.collect(reducing(identity, accumulator)); } @AfterTemplate T after(Stream&lt;T&gt; stream, T identity, BinaryOperator&lt;T&gt; accumulator) { return stream.reduce(identity, accumulator); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StreamRules.StreamTakeWhile

tech.picnic.errorprone.refasterrules.StreamRulesRecipes$StreamTakeWhileRecipe

Recipe created for the following Refaster template: java static final class StreamTakeWhile&lt;T&gt; { @BeforeTemplate Stream&lt;T&gt; before(Stream&lt;T&gt; stream, Predicate&lt;? super T&gt; predicate) { return stream.takeWhile(predicate).filter(predicate); } @AfterTemplate Stream&lt;T&gt; after(Stream&lt;T&gt; stream, Predicate&lt;? super T&gt; predicate) { return stream.takeWhile(predicate); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StreamRules.StreamsStream

tech.picnic.errorprone.refasterrules.StreamRulesRecipes$StreamsStreamRecipe

Prefer Streams#stream(Iterable) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

StringRules Refaster recipes

tech.picnic.errorprone.refasterrules.StringRulesRecipes

Refaster rules related to expressions dealing with Strings. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StringRules.EmptyString

tech.picnic.errorprone.refasterrules.StringRulesRecipes$EmptyStringRecipe

Avoid unnecessary creation of new empty String objects; use the empty string literal instead.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StringRules.FilterEmptyString

tech.picnic.errorprone.refasterrules.StringRulesRecipes$FilterEmptyStringRecipe

Recipe created for the following Refaster template: java static final class FilterEmptyString { @BeforeTemplate Optional&lt;String&gt; before(Optional&lt;String&gt; optional) { return optional.map(Strings::emptyToNull); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) Optional&lt;String&gt; after(Optional&lt;String&gt; optional) { return optional.filter(not(String::isEmpty)); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StringRules.JoinStrings

tech.picnic.errorprone.refasterrules.StringRulesRecipes$JoinStringsRecipe

Prefer String#join(CharSequence, Iterable) and variants over the Guava alternative.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StringRules.NewStringFromCharArray

tech.picnic.errorprone.refasterrules.StringRulesRecipes$NewStringFromCharArrayRecipe

Prefer direct invocation of String#String(char[]) over the indirection introduced by alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StringRules.NewStringFromCharArraySubSequence

tech.picnic.errorprone.refasterrules.StringRulesRecipes$NewStringFromCharArraySubSequenceRecipe

Prefer direct invocation of String#String(char[], int, int) over the indirection introduced by alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StringRules.OptionalNonEmptyString

tech.picnic.errorprone.refasterrules.StringRulesRecipes$OptionalNonEmptyStringRecipe

Don't use the ternary operator to create an optionally-absent string.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StringRules.StringIdentity

tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIdentityRecipe

Avoid unnecessary creation of new String objects.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StringRules.StringIndexOfCharBetweenIndices

tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIndexOfCharBetweenIndicesRecipe

Prefer String#indexOf(int, int, int) over less efficient alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StringRules.StringIndexOfCharFromIndex

tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIndexOfCharFromIndexRecipe

Prefer String#indexOf(int, int) over less efficient alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StringRules.StringIndexOfStringBetweenIndices

tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIndexOfStringBetweenIndicesRecipe

Prefer String#indexOf(String, int) over less efficient alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StringRules.StringIndexOfStringFromIndex

tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIndexOfStringFromIndexRecipe

Prefer String#indexOf(String, int) over less efficient alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StringRules.StringIsBlank

tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIsBlankRecipe

Prefer String#isBlank() over less efficient alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StringRules.StringIsEmptyPredicate

tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIsEmptyPredicateRecipe

Prefer a method reference to String#isEmpty() over the equivalent lambda function.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StringRules.StringIsEmpty

tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIsEmptyRecipe

Prefer String#isEmpty() over alternatives that consult the string's length.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StringRules.StringIsNotEmptyPredicate

tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIsNotEmptyPredicateRecipe

Prefer a method reference to String#isEmpty() over the equivalent lambda function.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StringRules.StringIsNullOrEmpty

tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIsNullOrEmptyRecipe

Prefer Strings#isNullOrEmpty(String) over the more verbose alternative.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StringRules.StringLastIndexOfChar

tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringLastIndexOfCharRecipe

Prefer String#lastIndexOf(int, int) over less efficient alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StringRules.StringLastIndexOfCharWithIndex

tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringLastIndexOfCharWithIndexRecipe

Prefer String#lastIndexOf(int, int) over less efficient alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StringRules.StringLastIndexOfString

tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringLastIndexOfStringRecipe

Prefer String#lastIndexOf(String, int) over less efficient alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StringRules.StringLastIndexOfStringWithIndex

tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringLastIndexOfStringWithIndexRecipe

Prefer String#lastIndexOf(String, int) over less efficient alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StringRules.StringStartsWith

tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringStartsWithRecipe

Prefer String#startsWith(String, int) over less efficient alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StringRules.StringValueOfMethodReference

tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringValueOfMethodReferenceRecipe

Prefer direct delegation to String#valueOf(Object) over the indirection introduced by Objects#toString(Object).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StringRules.StringValueOf

tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringValueOfRecipe

Prefer direct invocation of String#valueOf(Object) over the indirection introduced by Objects#toString(Object).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StringRules.SubstringRemainder

tech.picnic.errorprone.refasterrules.StringRulesRecipes$SubstringRemainderRecipe

Don't unnecessarily use the two-argument String#substring(int, int).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template StringRules.Utf8EncodedLength

tech.picnic.errorprone.refasterrules.StringRulesRecipes$Utf8EncodedLengthRecipe

Prefer Utf8#encodedLength(CharSequence) over less efficient alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

SuggestedFixRules Refaster recipes

tech.picnic.errorprone.refasterrules.SuggestedFixRulesRecipes

Refaster rules related to expressions dealing with SuggestedFixes. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template SuggestedFixRules.SuggestedFixDelete

tech.picnic.errorprone.refasterrules.SuggestedFixRulesRecipes$SuggestedFixDeleteRecipe

Prefer SuggestedFix#delete(Tree) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template SuggestedFixRules.SuggestedFixPostfixWith

tech.picnic.errorprone.refasterrules.SuggestedFixRulesRecipes$SuggestedFixPostfixWithRecipe

Prefer SuggestedFix#postfixWith(Tree, String)} over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template SuggestedFixRules.SuggestedFixPrefixWith

tech.picnic.errorprone.refasterrules.SuggestedFixRulesRecipes$SuggestedFixPrefixWithRecipe

Prefer SuggestedFix#prefixWith(Tree, String) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template SuggestedFixRules.SuggestedFixReplaceStartEnd

tech.picnic.errorprone.refasterrules.SuggestedFixRulesRecipes$SuggestedFixReplaceStartEndRecipe

Prefer SuggestedFix#replace(int, int, String)} over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template SuggestedFixRules.SuggestedFixReplaceTree

tech.picnic.errorprone.refasterrules.SuggestedFixRulesRecipes$SuggestedFixReplaceTreeRecipe

Prefer SuggestedFix#replace(Tree, String)} over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template SuggestedFixRules.SuggestedFixReplaceTreeStartEnd

tech.picnic.errorprone.refasterrules.SuggestedFixRulesRecipes$SuggestedFixReplaceTreeStartEndRecipe

Prefer SuggestedFix#replace(Tree, String, int, int)} over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template SuggestedFixRules.SuggestedFixSwap

tech.picnic.errorprone.refasterrules.SuggestedFixRulesRecipes$SuggestedFixSwapRecipe

Prefer SuggestedFix#swap(Tree, Tree, VisitorState) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template SuggestedFixRules.SuggestedFixToBuilder

tech.picnic.errorprone.refasterrules.SuggestedFixRulesRecipes$SuggestedFixToBuilderRecipe

Prefer SuggestedFix#toBuilder()} over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster rules that replace TestNG assertions with equivalent AssertJ assertions

tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes

Some of the classes below have TestNG @BeforeTemplates that reference wildcard type bounds (&lt;?&gt;), while the associated AssertJ @AfterTemplates reference stricter type bounds. This introduces the risk of producing invalid code. We do this anyway, because TestNG's wildcard types can cause javac to infer less specific types than AssertJ requires, while the appropriate (more specific) types will be inferred properly when plugged into AssertJ's API. The following is an example of a TestNG statement, which would not be rewritten if it weren't for the wildcard matching (note that the type parameters of the map on the right-hand side will be inferred to be &lt;Object, Object&gt; rather than &lt;String, Object&gt;). java List&lt;Map&lt;String, Object&gt;&gt; myMaps = new ArrayList&lt;&gt;(); assertEquals(myMaps, ImmutableList.of(ImmutableMap.of())); . Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TestNGToAssertJRules.AssertEqualArrayIterationOrder

tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertEqualArrayIterationOrderRecipe

Recipe created for the following Refaster template: java 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); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TestNGToAssertJRules.AssertEqualArrayIterationOrderWithMessage

tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertEqualArrayIterationOrderWithMessageRecipe

Recipe created for the following Refaster template: java 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); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TestNGToAssertJRules.AssertEqualArraysIrrespectiveOfOrder

tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertEqualArraysIrrespectiveOfOrderRecipe

Recipe created for the following Refaster template: java 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); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TestNGToAssertJRules.AssertEqualArraysIrrespectiveOfOrderWithMessage

tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertEqualArraysIrrespectiveOfOrderWithMessageRecipe

Recipe created for the following Refaster template: java 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); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TestNGToAssertJRules.AssertEqualDoubleArraysWithDelta

tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertEqualDoubleArraysWithDeltaRecipe

Recipe created for the following Refaster template: java 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)); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TestNGToAssertJRules.AssertEqualDoubleArraysWithDeltaWithMessage

tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertEqualDoubleArraysWithDeltaWithMessageRecipe

Recipe created for the following Refaster template: java 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)); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TestNGToAssertJRules.AssertEqualDoublesWithDelta

tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertEqualDoublesWithDeltaRecipe

Recipe created for the following Refaster template: java 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)); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TestNGToAssertJRules.AssertEqualDoublesWithDeltaWithMessage

tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertEqualDoublesWithDeltaWithMessageRecipe

Recipe created for the following Refaster template: java 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)); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TestNGToAssertJRules.AssertEqualFloatArraysWithDelta

tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertEqualFloatArraysWithDeltaRecipe

Recipe created for the following Refaster template: java 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)); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TestNGToAssertJRules.AssertEqualFloatArraysWithDeltaWithMessage

tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertEqualFloatArraysWithDeltaWithMessageRecipe

Recipe created for the following Refaster template: java 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)); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TestNGToAssertJRules.AssertEqualFloatsWithDelta

tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertEqualFloatsWithDeltaRecipe

Recipe created for the following Refaster template: java 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)); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TestNGToAssertJRules.AssertEqualFloatsWithDeltaWithMessage

tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertEqualFloatsWithDeltaWithMessageRecipe

Recipe created for the following Refaster template: java 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)); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TestNGToAssertJRules.AssertEqualIterableIterationOrder

tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertEqualIterableIterationOrderRecipe

Recipe created for the following Refaster template: java static final class AssertEqualIterableIterationOrder&lt;S, T extends S&gt; { @BeforeTemplate void before(Iterable&lt;S&gt; actual, Iterable&lt;T&gt; expected) { assertEquals(actual, expected); } @BeforeTemplate void before(Collection&lt;S&gt; actual, Collection&lt;T&gt; expected) { assertEquals(actual, expected); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(Iterable&lt;S&gt; actual, Iterable&lt;T&gt; expected) { assertThat(actual).containsExactlyElementsOf(expected); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TestNGToAssertJRules.AssertEqualIterableIterationOrderWithMessage

tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertEqualIterableIterationOrderWithMessageRecipe

Recipe created for the following Refaster template: java static final class AssertEqualIterableIterationOrderWithMessage&lt;S, T extends S&gt; { @BeforeTemplate void before(Iterable&lt;S&gt; actual, String message, Iterable&lt;T&gt; expected) { assertEquals(actual, expected, message); } @BeforeTemplate void before(Collection&lt;S&gt; actual, String message, Collection&lt;T&gt; expected) { assertEquals(actual, expected, message); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(Iterable&lt;S&gt; actual, String message, Iterable&lt;T&gt; expected) { assertThat(actual).withFailMessage(message).containsExactlyElementsOf(expected); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TestNGToAssertJRules.AssertEqualIteratorIterationOrder

tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertEqualIteratorIterationOrderRecipe

Recipe created for the following Refaster template: java static final class AssertEqualIteratorIterationOrder&lt;S, T extends S&gt; { @BeforeTemplate void before(Iterator&lt;S&gt; actual, Iterator&lt;T&gt; expected) { assertEquals(actual, expected); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(Iterator&lt;S&gt; actual, Iterator&lt;T&gt; expected) { assertThat(actual).toIterable().containsExactlyElementsOf(ImmutableList.copyOf(expected)); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TestNGToAssertJRules.AssertEqualIteratorIterationOrderWithMessage

tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertEqualIteratorIterationOrderWithMessageRecipe

Recipe created for the following Refaster template: java static final class AssertEqualIteratorIterationOrderWithMessage&lt;S, T extends S&gt; { @BeforeTemplate void before(Iterator&lt;S&gt; actual, String message, Iterator&lt;T&gt; expected) { assertEquals(actual, expected, message); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(Iterator&lt;S&gt; actual, String message, Iterator&lt;T&gt; expected) { assertThat(actual).toIterable().withFailMessage(message).containsExactlyElementsOf(ImmutableList.copyOf(expected)); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TestNGToAssertJRules.AssertEqual

tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertEqualRecipe

Recipe created for the following Refaster template: java @SuppressWarnings(value = &quot;java:S1448&quot;) 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&lt;?, ?&gt; actual, Map&lt;?, ?&gt; expected) { assertEquals(actual, expected); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(Object actual, Object expected) { assertThat(actual).isEqualTo(expected); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TestNGToAssertJRules.AssertEqualSets

tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertEqualSetsRecipe

Recipe created for the following Refaster template: java static final class AssertEqualSets&lt;S, T extends S&gt; { @BeforeTemplate void before(Set&lt;S&gt; actual, Set&lt;T&gt; expected) { assertEquals(actual, expected); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(Set&lt;S&gt; actual, Set&lt;T&gt; expected) { assertThat(actual).hasSameElementsAs(expected); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TestNGToAssertJRules.AssertEqualSetsWithMessage

tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertEqualSetsWithMessageRecipe

Recipe created for the following Refaster template: java static final class AssertEqualSetsWithMessage&lt;S, T extends S&gt; { @BeforeTemplate void before(Set&lt;S&gt; actual, String message, Set&lt;T&gt; expected) { assertEquals(actual, expected, message); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(Set&lt;S&gt; actual, String message, Set&lt;T&gt; expected) { assertThat(actual).withFailMessage(message).hasSameElementsAs(expected); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TestNGToAssertJRules.AssertEqualWithMessage

tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertEqualWithMessageRecipe

Recipe created for the following Refaster template: java @SuppressWarnings(value = &quot;java:S1448&quot;) 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&lt;?, ?&gt; actual, String message, Map&lt;?, ?&gt; 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); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TestNGToAssertJRules.AssertFalse

tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertFalseRecipe

Recipe created for the following Refaster template: java static final class AssertFalse { @BeforeTemplate void before(boolean condition) { assertFalse(condition); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(boolean condition) { assertThat(condition).isFalse(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TestNGToAssertJRules.AssertFalseWithMessage

tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertFalseWithMessageRecipe

Recipe created for the following Refaster template: java 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(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TestNGToAssertJRules.AssertNotNull

tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertNotNullRecipe

Recipe created for the following Refaster template: java static final class AssertNotNull { @BeforeTemplate void before(Object object) { assertNotNull(object); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(Object object) { assertThat(object).isNotNull(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TestNGToAssertJRules.AssertNotNullWithMessage

tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertNotNullWithMessageRecipe

Recipe created for the following Refaster template: java 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(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TestNGToAssertJRules.AssertNotSame

tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertNotSameRecipe

Recipe created for the following Refaster template: java 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); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TestNGToAssertJRules.AssertNotSameWithMessage

tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertNotSameWithMessageRecipe

Recipe created for the following Refaster template: java 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); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TestNGToAssertJRules.AssertNull

tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertNullRecipe

Recipe created for the following Refaster template: java static final class AssertNull { @BeforeTemplate void before(Object object) { assertNull(object); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(Object object) { assertThat(object).isNull(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TestNGToAssertJRules.AssertNullWithMessage

tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertNullWithMessageRecipe

Recipe created for the following Refaster template: java 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(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TestNGToAssertJRules.AssertSame

tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertSameRecipe

Recipe created for the following Refaster template: java 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); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TestNGToAssertJRules.AssertSameWithMessage

tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertSameWithMessageRecipe

Recipe created for the following Refaster template: java 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); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TestNGToAssertJRules.AssertThrows

tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertThrowsRecipe

Recipe created for the following Refaster template: java static final class AssertThrows { @BeforeTemplate void before(ThrowingRunnable runnable) { assertThrows(runnable); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(ThrowingCallable runnable) { assertThatThrownBy(runnable); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TestNGToAssertJRules.AssertThrowsWithType

tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertThrowsWithTypeRecipe

Recipe created for the following Refaster template: java static final class AssertThrowsWithType&lt;T extends Throwable&gt; { @BeforeTemplate void before(ThrowingRunnable runnable, Class&lt;T&gt; clazz) { assertThrows(clazz, runnable); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(ThrowingCallable runnable, Class&lt;T&gt; clazz) { assertThatThrownBy(runnable).isInstanceOf(clazz); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TestNGToAssertJRules.AssertTrue

tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertTrueRecipe

Recipe created for the following Refaster template: java static final class AssertTrue { @BeforeTemplate void before(boolean condition) { assertTrue(condition); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(boolean condition) { assertThat(condition).isTrue(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TestNGToAssertJRules.AssertTrueWithMessage

tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertTrueWithMessageRecipe

Recipe created for the following Refaster template: java 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(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TestNGToAssertJRules.AssertUnequalDoublesWithDelta

tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertUnequalDoublesWithDeltaRecipe

Recipe created for the following Refaster template: java 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)); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TestNGToAssertJRules.AssertUnequalDoublesWithDeltaWithMessage

tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertUnequalDoublesWithDeltaWithMessageRecipe

Recipe created for the following Refaster template: java 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)); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TestNGToAssertJRules.AssertUnequalFloatsWithDelta

tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertUnequalFloatsWithDeltaRecipe

Recipe created for the following Refaster template: java 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)); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TestNGToAssertJRules.AssertUnequalFloatsWithDeltaWithMessage

tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertUnequalFloatsWithDeltaWithMessageRecipe

Recipe created for the following Refaster template: java 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)); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TestNGToAssertJRules.AssertUnequal

tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertUnequalRecipe

Recipe created for the following Refaster template: java 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&lt;?&gt; actual, Set&lt;?&gt; expected) { assertNotEquals(actual, expected); } @BeforeTemplate void before(Map&lt;?, ?&gt; actual, Map&lt;?, ?&gt; expected) { assertNotEquals(actual, expected); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(Object actual, Object expected) { assertThat(actual).isNotEqualTo(expected); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TestNGToAssertJRules.AssertUnequalWithMessage

tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertUnequalWithMessageRecipe

Recipe created for the following Refaster template: java 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&lt;?&gt; actual, String message, Set&lt;?&gt; expected) { assertNotEquals(actual, expected, message); } @BeforeTemplate void before(Map&lt;?, ?&gt; actual, String message, Map&lt;?, ?&gt; 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); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TestNGToAssertJRules.Fail

tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$FailRecipe

Recipe created for the following Refaster template: java static final class Fail { @BeforeTemplate void before() { Assert.fail(); } @AfterTemplate @DoNotCall @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after() { fail(); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TestNGToAssertJRules.FailWithMessageAndThrowable

tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$FailWithMessageAndThrowableRecipe

Recipe created for the following Refaster template: java 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); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TestNGToAssertJRules.FailWithMessage

tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$FailWithMessageRecipe

Recipe created for the following Refaster template: java static final class FailWithMessage { @BeforeTemplate void before(String message) { Assert.fail(message); } @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(String message) { fail(message); } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

TimeRules Refaster recipes

tech.picnic.errorprone.refasterrules.TimeRulesRecipes

Refaster rules related to expressions dealing with time. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.ChronoLocalDateIsAfter

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$ChronoLocalDateIsAfterRecipe

Prefer ChronoLocalDate#isBefore(ChronoLocalDate) over explicit comparison, as it yields more readable code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.ChronoLocalDateIsBefore

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$ChronoLocalDateIsBeforeRecipe

Prefer ChronoLocalDate#isBefore(ChronoLocalDate) over explicit comparison, as it yields more readable code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.ChronoLocalDateTimeIsAfter

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$ChronoLocalDateTimeIsAfterRecipe

Prefer ChronoLocalDateTime#isBefore(ChronoLocalDateTime) over explicit comparison, as it yields more readable code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.ChronoLocalDateTimeIsBefore

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$ChronoLocalDateTimeIsBeforeRecipe

Prefer ChronoLocalDateTime#isBefore(ChronoLocalDateTime) over explicit comparison, as it yields more readable code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.ChronoZonedDateTimeIsAfter

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$ChronoZonedDateTimeIsAfterRecipe

Prefer ChronoZonedDateTime#isBefore(ChronoZonedDateTime) over explicit comparison, as it yields more readable code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.ChronoZonedDateTimeIsBefore

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$ChronoZonedDateTimeIsBeforeRecipe

Prefer ChronoZonedDateTime#isBefore(ChronoZonedDateTime) over explicit comparison, as it yields more readable code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.ClockInstant

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$ClockInstantRecipe

Prefer Clock#instant() over Instant#now(Clock), as it is more concise and more "OOP-py".

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.DurationBetweenInstants

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!.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.DurationBetweenOffsetDateTimes

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!.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.DurationIsZero

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$DurationIsZeroRecipe

Prefer Duration#isZero() over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.DurationOfDays

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$DurationOfDaysRecipe

Prefer Duration#ofDays(long) over alternative representations.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.DurationOfHours

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$DurationOfHoursRecipe

Prefer Duration#ofHours(long) over alternative representations.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.DurationOfMillis

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$DurationOfMillisRecipe

Prefer Duration#ofMillis(long) over alternative representations.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.DurationOfMinutes

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$DurationOfMinutesRecipe

Prefer Duration#ofMinutes(long) over alternative representations.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.DurationOfNanos

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$DurationOfNanosRecipe

Prefer Duration#ofNanos(long) over alternative representations.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.DurationOfSeconds

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$DurationOfSecondsRecipe

Prefer Duration#ofSeconds(long) over alternative representations.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.EpochInstant

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$EpochInstantRecipe

Prefer Instant#EPOCH over alternative representations.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.InstantAtOffset

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$InstantAtOffsetRecipe

Prefer Instant#atOffset(ZoneOffset) over more verbose alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.InstantAtZone

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$InstantAtZoneRecipe

Prefer Instant#atZone(ZoneId) over more verbose alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.InstantIdentity

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$InstantIdentityRecipe

Don't unnecessarily transform an Instant to an equivalent instance.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.InstantIsAfter

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$InstantIsAfterRecipe

Prefer Instant#isBefore(Instant) over explicit comparison, as it yields more readable code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.InstantIsBefore

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$InstantIsBeforeRecipe

Prefer Instant#isBefore(Instant) over explicit comparison, as it yields more readable code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Prefer Instant#truncatedTo(TemporalUnit) over less obvious alternatives

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$InstantTruncatedToMillisecondsRecipe

Note that Instant#toEpochMilli() throws an ArithmeticException for dates very far in the past or future, while the suggested alternative doesn't.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.InstantTruncatedToSeconds

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$InstantTruncatedToSecondsRecipe

Prefer Instant#truncatedTo(TemporalUnit) over less obvious alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.LocalDateAtStartOfDay

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$LocalDateAtStartOfDayRecipe

Prefer LocalDate#atStartOfDay() over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.LocalDateMinusDays

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$LocalDateMinusDaysRecipe

Prefer LocalDate#minusDays(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.LocalDateMinusMonths

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$LocalDateMinusMonthsRecipe

Prefer LocalDate#minusMonths(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.LocalDateMinusWeeks

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$LocalDateMinusWeeksRecipe

Prefer LocalDate#minusWeeks(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.LocalDateMinusYears

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$LocalDateMinusYearsRecipe

Prefer LocalDate#minusYears(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.LocalDateOfInstant

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$LocalDateOfInstantRecipe

Prefer LocalDate#ofInstant(Instant, ZoneId) over more indirect alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.LocalDatePlusDays

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$LocalDatePlusDaysRecipe

Prefer LocalDate#plusDays(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.LocalDatePlusMonths

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$LocalDatePlusMonthsRecipe

Prefer LocalDate#plusMonths(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.LocalDatePlusWeeks

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$LocalDatePlusWeeksRecipe

Prefer LocalDate#plusWeeks(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.LocalDatePlusYears

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$LocalDatePlusYearsRecipe

Prefer LocalDate#plusYears(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.LocalDateTimeMinusDays

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$LocalDateTimeMinusDaysRecipe

Prefer LocalDateTime#minusDays(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.LocalDateTimeMinusHours

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$LocalDateTimeMinusHoursRecipe

Prefer LocalDateTime#minusHours(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.LocalDateTimeMinusMinutes

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$LocalDateTimeMinusMinutesRecipe

Prefer LocalDateTime#minusMinutes(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.LocalDateTimeMinusMonths

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$LocalDateTimeMinusMonthsRecipe

Prefer LocalDateTime#minusMonths(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.LocalDateTimeMinusNanos

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$LocalDateTimeMinusNanosRecipe

Prefer LocalDateTime#minusNanos(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.LocalDateTimeMinusSeconds

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$LocalDateTimeMinusSecondsRecipe

Prefer LocalDateTime#minusSeconds(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.LocalDateTimeMinusWeeks

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$LocalDateTimeMinusWeeksRecipe

Prefer LocalDateTime#minusWeeks(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.LocalDateTimeMinusYears

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$LocalDateTimeMinusYearsRecipe

Prefer LocalDateTime#minusYears(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.LocalDateTimeOfInstant

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$LocalDateTimeOfInstantRecipe

Prefer LocalDateTime#ofInstant(Instant, ZoneId) over more indirect alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.LocalDateTimePlusDays

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$LocalDateTimePlusDaysRecipe

Prefer LocalDateTime#plusDays(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.LocalDateTimePlusHours

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$LocalDateTimePlusHoursRecipe

Prefer LocalDateTime#plusHours(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.LocalDateTimePlusMinutes

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$LocalDateTimePlusMinutesRecipe

Prefer LocalDateTime#plusMinutes(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.LocalDateTimePlusMonths

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$LocalDateTimePlusMonthsRecipe

Prefer LocalDateTime#plusMonths(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.LocalDateTimePlusNanos

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$LocalDateTimePlusNanosRecipe

Prefer LocalDateTime#plusNanos(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.LocalDateTimePlusSeconds

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$LocalDateTimePlusSecondsRecipe

Prefer LocalDateTime#plusSeconds(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.LocalDateTimePlusWeeks

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$LocalDateTimePlusWeeksRecipe

Prefer LocalDateTime#plusWeeks(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.LocalDateTimePlusYears

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$LocalDateTimePlusYearsRecipe

Prefer LocalDateTime#plusYears(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.LocalTimeMin

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$LocalTimeMinRecipe

Prefer the LocalTime#MIN over alternative representations.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.LocalTimeMinusHours

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$LocalTimeMinusHoursRecipe

Prefer LocalTime#minusHours(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.LocalTimeMinusMinutes

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$LocalTimeMinusMinutesRecipe

Prefer LocalTime#minusMinutes(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.LocalTimeMinusNanos

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$LocalTimeMinusNanosRecipe

Prefer LocalTime#minusNanos(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.LocalTimeMinusSeconds

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$LocalTimeMinusSecondsRecipe

Prefer LocalTime#minusSeconds(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.LocalTimeOfInstant

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$LocalTimeOfInstantRecipe

Prefer LocalTime#ofInstant(Instant, ZoneId) over more indirect alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.LocalTimePlusHours

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$LocalTimePlusHoursRecipe

Prefer LocalTime#plusHours(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.LocalTimePlusMinutes

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$LocalTimePlusMinutesRecipe

Prefer LocalTime#plusMinutes(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.LocalTimePlusNanos

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$LocalTimePlusNanosRecipe

Prefer LocalTime#plusNanos(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.LocalTimePlusSeconds

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$LocalTimePlusSecondsRecipe

Prefer LocalTime#plusSeconds(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.OffsetDateTimeIsAfter

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$OffsetDateTimeIsAfterRecipe

Prefer OffsetDateTime#isBefore(OffsetDateTime) over explicit comparison, as it yields more readable code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.OffsetDateTimeIsBefore

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$OffsetDateTimeIsBeforeRecipe

Prefer OffsetDateTime#isBefore(OffsetDateTime) over explicit comparison, as it yields more readable code.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.OffsetDateTimeMinusDays

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$OffsetDateTimeMinusDaysRecipe

Prefer OffsetDateTime#minusDays(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.OffsetDateTimeMinusHours

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$OffsetDateTimeMinusHoursRecipe

Prefer OffsetDateTime#minusHours(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.OffsetDateTimeMinusMinutes

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$OffsetDateTimeMinusMinutesRecipe

Prefer OffsetDateTime#minusMinutes(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.OffsetDateTimeMinusMonths

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$OffsetDateTimeMinusMonthsRecipe

Prefer OffsetDateTime#minusMonths(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.OffsetDateTimeMinusNanos

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$OffsetDateTimeMinusNanosRecipe

Prefer OffsetDateTime#minusNanos(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.OffsetDateTimeMinusSeconds

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$OffsetDateTimeMinusSecondsRecipe

Prefer OffsetDateTime#minusSeconds(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.OffsetDateTimeMinusWeeks

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$OffsetDateTimeMinusWeeksRecipe

Prefer OffsetDateTime#minusWeeks(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.OffsetDateTimeMinusYears

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$OffsetDateTimeMinusYearsRecipe

Prefer OffsetDateTime#minusYears(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.OffsetDateTimeOfInstant

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$OffsetDateTimeOfInstantRecipe

Prefer OffsetDateTime#ofInstant(Instant, ZoneId) over more indirect alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.OffsetDateTimePlusDays

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$OffsetDateTimePlusDaysRecipe

Prefer OffsetDateTime#plusDays(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.OffsetDateTimePlusHours

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$OffsetDateTimePlusHoursRecipe

Prefer OffsetDateTime#plusHours(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.OffsetDateTimePlusMinutes

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$OffsetDateTimePlusMinutesRecipe

Prefer OffsetDateTime#plusMinutes(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.OffsetDateTimePlusMonths

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$OffsetDateTimePlusMonthsRecipe

Prefer OffsetDateTime#plusMonths(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.OffsetDateTimePlusNanos

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$OffsetDateTimePlusNanosRecipe

Prefer OffsetDateTime#plusNanos(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.OffsetDateTimePlusSeconds

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$OffsetDateTimePlusSecondsRecipe

Prefer OffsetDateTime#plusSeconds(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.OffsetDateTimePlusWeeks

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$OffsetDateTimePlusWeeksRecipe

Prefer OffsetDateTime#plusWeeks(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.OffsetDateTimePlusYears

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$OffsetDateTimePlusYearsRecipe

Prefer OffsetDateTime#plusYears(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.OffsetTimeMinusHours

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$OffsetTimeMinusHoursRecipe

Prefer OffsetTime#minusHours(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.OffsetTimeMinusMinutes

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$OffsetTimeMinusMinutesRecipe

Prefer OffsetTime#minusMinutes(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.OffsetTimeMinusNanos

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$OffsetTimeMinusNanosRecipe

Prefer OffsetTime#minusNanos(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.OffsetTimeMinusSeconds

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$OffsetTimeMinusSecondsRecipe

Prefer OffsetTime#minusSeconds(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.OffsetTimeOfInstant

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$OffsetTimeOfInstantRecipe

Prefer OffsetTime#ofInstant(Instant, ZoneId) over more indirect alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.OffsetTimePlusHours

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$OffsetTimePlusHoursRecipe

Prefer OffsetTime#plusHours(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.OffsetTimePlusMinutes

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$OffsetTimePlusMinutesRecipe

Prefer OffsetTime#plusMinutes(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.OffsetTimePlusNanos

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$OffsetTimePlusNanosRecipe

Prefer OffsetTime#plusNanos(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.OffsetTimePlusSeconds

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$OffsetTimePlusSecondsRecipe

Prefer OffsetTime#plusSeconds(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.UtcClock

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$UtcClockRecipe

Use Clock#systemUTC() when possible.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.UtcConstant

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$UtcConstantRecipe

Use ZoneOffset#UTC when possible.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.ZeroDuration

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$ZeroDurationRecipe

Recipe created for the following Refaster template: java 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; } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.ZeroPeriod

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$ZeroPeriodRecipe

Recipe created for the following Refaster template: java 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; } } .

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.ZonedDateTimeMinusDays

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$ZonedDateTimeMinusDaysRecipe

Prefer ZonedDateTime#minusDays(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.ZonedDateTimeMinusHours

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$ZonedDateTimeMinusHoursRecipe

Prefer ZonedDateTime#minusHours(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.ZonedDateTimeMinusMinutes

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$ZonedDateTimeMinusMinutesRecipe

Prefer ZonedDateTime#minusMinutes(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.ZonedDateTimeMinusMonths

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$ZonedDateTimeMinusMonthsRecipe

Prefer ZonedDateTime#minusMonths(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.ZonedDateTimeMinusNanos

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$ZonedDateTimeMinusNanosRecipe

Prefer ZonedDateTime#minusNanos(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.ZonedDateTimeMinusSeconds

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$ZonedDateTimeMinusSecondsRecipe

Prefer ZonedDateTime#minusSeconds(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.ZonedDateTimeMinusWeeks

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$ZonedDateTimeMinusWeeksRecipe

Prefer ZonedDateTime#minusWeeks(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.ZonedDateTimeMinusYears

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$ZonedDateTimeMinusYearsRecipe

Prefer ZonedDateTime#minusYears(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.ZonedDateTimePlusDays

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$ZonedDateTimePlusDaysRecipe

Prefer ZonedDateTime#plusDays(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.ZonedDateTimePlusHours

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$ZonedDateTimePlusHoursRecipe

Prefer ZonedDateTime#plusHours(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.ZonedDateTimePlusMinutes

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$ZonedDateTimePlusMinutesRecipe

Prefer ZonedDateTime#plusMinutes(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.ZonedDateTimePlusMonths

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$ZonedDateTimePlusMonthsRecipe

Prefer ZonedDateTime#plusMonths(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.ZonedDateTimePlusNanos

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$ZonedDateTimePlusNanosRecipe

Prefer ZonedDateTime#plusNanos(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.ZonedDateTimePlusSeconds

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$ZonedDateTimePlusSecondsRecipe

Prefer ZonedDateTime#plusSeconds(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.ZonedDateTimePlusWeeks

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$ZonedDateTimePlusWeeksRecipe

Prefer ZonedDateTime#plusWeeks(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template TimeRules.ZonedDateTimePlusYears

tech.picnic.errorprone.refasterrules.TimeRulesRecipes$ZonedDateTimePlusYearsRecipe

Prefer ZonedDateTime#plusYears(long) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

WebClientRules Refaster recipes

tech.picnic.errorprone.refasterrules.WebClientRulesRecipes

Refaster rules related to expressions dealing with org.springframework.web.reactive.function.client.WebClient and related types. Source.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template WebClientRules.BodyValue

tech.picnic.errorprone.refasterrules.WebClientRulesRecipes$BodyValueRecipe

Prefer RequestBodySpec#bodyValue(Object) over more contrived alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template WebClientRules.WebClientGet

tech.picnic.errorprone.refasterrules.WebClientRulesRecipes$WebClientGetRecipe

Prefer WebClient#get() over WebClient#method(HttpMethod) with HttpMethod#GET.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template WebClientRules.WebClientHead

tech.picnic.errorprone.refasterrules.WebClientRulesRecipes$WebClientHeadRecipe

Prefer WebClient#head() over WebClient#method(HttpMethod) with HttpMethod#HEAD.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template WebClientRules.WebClientOptions

tech.picnic.errorprone.refasterrules.WebClientRulesRecipes$WebClientOptionsRecipe

Prefer WebClient#options() over WebClient#method(HttpMethod) with HttpMethod#OPTIONS.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template WebClientRules.WebClientPatch

tech.picnic.errorprone.refasterrules.WebClientRulesRecipes$WebClientPatchRecipe

Prefer WebClient#patch() over WebClient#method(HttpMethod) with HttpMethod#PATCH.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template WebClientRules.WebClientPost

tech.picnic.errorprone.refasterrules.WebClientRulesRecipes$WebClientPostRecipe

Prefer WebClient#post() over WebClient#method(HttpMethod) with HttpMethod#POST.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refaster template WebClientRules.WebClientPut

tech.picnic.errorprone.refasterrules.WebClientRulesRecipes$WebClientPutRecipe

Prefer WebClient#put() over WebClient#method(HttpMethod) with HttpMethod#PUT.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

All Picnic Refaster rules

tech.picnic.errorprone.refasterrules.tech.picnic.errorprone.refasterrules.AllRefasterRules

Collection of all Refaster rules from Picnic's error-prone-contrib project.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Quarkus Updates Aggregate 3.0.0

org.openrewrite.quarkus.MigrateToQuarkus_v3_0_0

Quarkus update recipes to upgrade your application to 3.0.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Quarkus Updates Aggregate 3.1.0

org.openrewrite.quarkus.MigrateToQuarkus_v3_1_0

Quarkus update recipes to upgrade your application to 3.1.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Quarkus Updates Aggregate 3.2.0

org.openrewrite.quarkus.MigrateToQuarkus_v3_2_0

Quarkus update recipes to upgrade your application to 3.2.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Quarkus Updates Aggregate 3.3.0

org.openrewrite.quarkus.MigrateToQuarkus_v3_3_0

Quarkus update recipes to upgrade your application to 3.3.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Quarkus Updates Aggregate 3.5.0

org.openrewrite.quarkus.MigrateToQuarkus_v3_5_0

Quarkus update recipes to upgrade your application to 3.5.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Quarkus Updates Aggregate 3.6.0

org.openrewrite.quarkus.MigrateToQuarkus_v3_6_0

Quarkus update recipes to upgrade your application to 3.6.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Quarkus Updates Aggregate 3.7.0

org.openrewrite.quarkus.MigrateToQuarkus_v3_7_0

Quarkus update recipes to upgrade your application to 3.7.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Quarkus Updates Aggregate 3.8.0

org.openrewrite.quarkus.MigrateToQuarkus_v3_8_0

Quarkus update recipes to upgrade your application to 3.8.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Quarkus Updates Aggregate 3.8.3

org.openrewrite.quarkus.MigrateToQuarkus_v3_8_3

Quarkus update recipes to upgrade your application to 3.8.3.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Quarkus Updates Aggregate 3.9.0

org.openrewrite.quarkus.MigrateToQuarkus_v3_9_0

Quarkus update recipes to upgrade your application to 3.9.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Quarkus Updates Aggregate 3.10.0

org.openrewrite.quarkus.MigrateToQuarkus_v3_10_0

Quarkus update recipes to upgrade your application to 3.10.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Quarkus Updates Aggregate 3.11.0

org.openrewrite.quarkus.MigrateToQuarkus_v3_11_0

Quarkus update recipes to upgrade your application to 3.11.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Quarkus Updates Aggregate 3.12.0

org.openrewrite.quarkus.MigrateToQuarkus_v3_12_0

Quarkus update recipes to upgrade your application to 3.12.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Quarkus Updates Aggregate 3.13.0

org.openrewrite.quarkus.MigrateToQuarkus_v3_13_0

Quarkus update recipes to upgrade your application to 3.13.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Quarkus Updates Aggregate 3.15.0

org.openrewrite.quarkus.MigrateToQuarkus_v3_15_0

Quarkus update recipes to upgrade your application to 3.15.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Quarkus Updates Aggregate 3.17.0

org.openrewrite.quarkus.MigrateToQuarkus_v3_17_0

Quarkus update recipes to upgrade your application to 3.17.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Quarkus Updates Aggregate 3.18.0

org.openrewrite.quarkus.MigrateToQuarkus_v3_18_0

Quarkus update recipes to upgrade your application to 3.18.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Quarkus Updates Aggregate 3.19.0

org.openrewrite.quarkus.MigrateToQuarkus_v3_19_0

Quarkus update recipes to upgrade your application to 3.19.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Quarkus Updates Aggregate 3.20.1

org.openrewrite.quarkus.MigrateToQuarkus_v3_20_1

Quarkus update recipes to upgrade your application to 3.20.1.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Quarkus Updates Aggregate 3.21.0

org.openrewrite.quarkus.MigrateToQuarkus_v3_21_0

Quarkus update recipes to upgrade your application to 3.21.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Quarkus Updates Aggregate 3.22.0

org.openrewrite.quarkus.MigrateToQuarkus_v3_22_0

Quarkus update recipes to upgrade your application to 3.22.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Quarkus Updates Aggregate 3.23.0

org.openrewrite.quarkus.MigrateToQuarkus_v3_23_0

Quarkus update recipes to upgrade your application to 3.23.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Quarkus Updates Aggregate 3.24.0

org.openrewrite.quarkus.MigrateToQuarkus_v3_24_0

Quarkus update recipes to upgrade your application to 3.24.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Quarkus Updates Aggregate 3.25.0

org.openrewrite.quarkus.MigrateToQuarkus_v3_25_0

Quarkus update recipes to upgrade your application to 3.25.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Quarkus Updates Aggregate 3.26.0

org.openrewrite.quarkus.MigrateToQuarkus_v3_26_0

Quarkus update recipes to upgrade your application to 3.26.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Change the Timefold version

ai.timefold.solver.migration.ChangeVersion

Replaces the version of Timefold

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate from OptaPlanner to Timefold Solver

ai.timefold.solver.migration.FromOptaPlannerToTimefoldSolver

Replaces your method/field calls, GAVs, etc. To replace deprecated methods too, use the recipe ToLatest

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade to the latest Timefold Solver

ai.timefold.solver.migration.ToLatest

Replace all your calls to deleted/deprecated types and methods of Timefold Solver with their proper alternatives.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add AWS SDK for Java v2 S3 Event Notification dependency if needed

software.amazon.awssdk.v2migration.AddS3EventNotificationDependency

This recipe will add the Java v2 S3 Event Notification dependency if v1 S3EventNotification is used

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add AWS SDK for Java v2 S3 Transfer Manager dependency if needed

software.amazon.awssdk.v2migration.AddTransferManagerDependency

This recipe will add the Java v2 S3 Transfer Manager dependency if v1 Transfer Manager is used

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate from the AWS SDK for Java v1 to the AWS SDK for Java v2

software.amazon.awssdk.v2migration.AwsSdkJavaV1ToV2

This recipe will apply changes required for migrating from the AWS SDK for Java v1 to the AWS SDK for Java v2.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

software.amazon.awssdk.v2migration.ChangeAuthTypes

Change auth related classes from v1 to v2.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

software.amazon.awssdk.v2migration.ChangeConfigTypes

Change config related classes from v1 to v2.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change v1 enum getters to v2

software.amazon.awssdk.v2migration.EnumGettersToV2

Change v1 enum getters to v2.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change SDK Exception types from v1 to v2

software.amazon.awssdk.v2migration.ChangeExceptionTypes

Change SDK Exception types from v1 to v2.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

software.amazon.awssdk.v2migration.ChangeRegionTypes

Change region related classes from v1 to v2.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change S3EventNotification methods to v2.

software.amazon.awssdk.v2migration.S3EventNotificationMethodsToV2

Change S3EventNotification methods to v2.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change SDK S3EventNotification types from v1 to v2

software.amazon.awssdk.v2migration.ChangeS3EventNotificationTypes

Change SDK S3EventNotification types from v1 to v2.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change S3 methods to v2.

software.amazon.awssdk.v2migration.S3MethodsToV2

Change S3 methods to v2.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change S3 types to v2.

software.amazon.awssdk.v2migration.S3TypesToV2

Change S3 types to v2.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change SDK core types from v1 to v2

software.amazon.awssdk.v2migration.ChangeSdkCoreTypes

Change SDK core types from v1 to v2.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change TransferManager simple methods to v2.

software.amazon.awssdk.v2migration.ChangeTransferManagerSimpleMethods

Change TransferManager simple methods to v2.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change SDK TransferManager types from v1 to v2

software.amazon.awssdk.v2migration.ChangeTransferManagerTypes

Change SDK TransferManager types from v1 to v2.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change S3 method constructors to fluent builder calls

software.amazon.awssdk.v2migration.S3MethodsConstructorToFluent

Change S3 method constructors to fluent builder calls.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change v1 Maven/Gradle dependencies to v2

software.amazon.awssdk.v2migration.UpgradeSdkDependencies

Change v1 Maven/Gradle dependencies to v2.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Wicket best practices

org.apache.wicket.BestPractices

Applies Wicket best practices such as minimizing anonymous inner classes and upgrading to the latest version.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Migrate to Wicket 10.x

org.apache.wicket.MigrateToWicket10

Migrates Wicket 9.x to Wicket 10.x, as well as Java 17 and Jakarta.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Upgrade to Axonframework 4.x Jakarta

org.axonframework.migration.UpgradeAxonFramework_4_Jakarta

Migration file to upgrade from an Axon Framework Javax-specific project to Jakarta.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade to Axonframework 4.x Javax

org.axonframework.migration.UpgradeAxonFramework_4_Javax

Migration file to upgrade an Axon Framework Javax-specific project and remain on Javax.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add WebLogic 15.1.1 PetClinic extras

com.oracle.weblogic.rewrite.examples.spring.MigratedPetClinicExtrasFor1511

Run migration extras for migrated Spring Framework PetClinic example run on WebLogic 15.1.1.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Setup Spring Framework 5.3.x PetClinic for WebLogic 14.1.2

com.oracle.weblogic.rewrite.examples.spring.SetupSpringFrameworkPetClinicFor1412

Setup Spring Framework 5.3.x PetClinic for WebLogic 14.1.2.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change cacheManager to use the SimpleCacheManager

com.oracle.weblogic.rewrite.examples.spring.ChangeCacheManagerToSimpleCacheManager

Change cacheManager to use the SimpleCacheManager.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add implicit TLD with taglib 3.0

com.oracle.weblogic.rewrite.examples.AddImplicitTldFileWithTaglib3_0

Add implicit.tld file with taglib 3.0 to src/main/webapp/WEB-INF/tags.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add implicit TLD with taglib 2.1

com.oracle.weblogic.rewrite.examples.AddImplicitTldFileWithTaglib2_1

Add implicit.tld file with taglib 2.1 to src/main/webapp/WEB-INF/tags.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Hibernate for Jakarta EE 9

com.oracle.weblogic.rewrite.hibernate.MigrateHibernateToJakartaEE9

Upgrade hibernate libraries to Jakarta EE9 versions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add Hibernate ORM Core if has dependencies

com.oracle.weblogic.rewrite.hibernate.AddHibernateOrmCore61

This recipe will add Hibernate ORM Core if has dependencies.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update Jakarta Persistence to 3.1

com.oracle.weblogic.rewrite.jakarta.UpdateJakartaPersistenceTo31

Update Jakarta Persistence to 3.1.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update Jakarta Persistence to 3.2

com.oracle.weblogic.rewrite.jakarta.UpdateJakartaPersistenceTo32

Update Jakarta Persistence to 3.2.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate from JavaX to Jakarta EE 9.1 Namespaces

com.oracle.weblogic.rewrite.jakarta.JakartaEeNamespaces9_1

These recipes help with Migration From JavaX to Jakarta EE 9.1 Namespaces.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in handler.xml files.

com.oracle.weblogic.rewrite.jakarta.JavaxWebHandlerXmlToJakarta9HandlerXml

Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in batch.xml files.

com.oracle.weblogic.rewrite.jakarta.JavaxBatchXmlToJakarta9BatchXml

Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in beans.xml files for Beans 3.0.

com.oracle.weblogic.rewrite.jakarta.JavaxBeansXmlToJakarta9BeansXml

Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in **/batch-jobs/*.xml files.

com.oracle.weblogic.rewrite.jakarta.JavaxBatchJobsXmlsToJakarta9BatchJobsXmls

Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in application.xml files.

com.oracle.weblogic.rewrite.jakarta.JavaxApplicationXmlToJakarta9ApplicationXml

Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in application-client.xml files.

com.oracle.weblogic.rewrite.jakarta.JavaxApplicationClientXmlToJakarta9ApplicationClientXml

Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in ra.xml files (Connectors).

com.oracle.weblogic.rewrite.jakarta.JavaxRaXmlToJakarta9RaXml

Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in ejb-jar.xml files.

com.oracle.weblogic.rewrite.jakarta.JavaxEjbJarXmlToJakarta9EjbJarXml

Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in webservices.xml files.

com.oracle.weblogic.rewrite.jakarta.JavaxWebServicesXmlToJakarta9WebServicesXml

Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in permissions.xml files.

com.oracle.weblogic.rewrite.jakarta.JavaxPermissionsXmlToJakarta9PermissionsXml

Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in *.tld files.

com.oracle.weblogic.rewrite.jakarta.JavaxWebJspTagLibraryTldsToJakarta9WebJspTagLibraryTlds

Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in *.xjb files.

com.oracle.weblogic.rewrite.jakarta.JavaxBindingsSchemaXjbsToJakarta9BindingsSchemaXjbs

Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in **/validation/*.xml files.

com.oracle.weblogic.rewrite.jakarta.JavaxValidationMappingXmlsToJakarta9ValidationMappingXmls

Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in test-*.xml files for Jakarta EE 9.1 using test interfaces

com.oracle.weblogic.rewrite.jakarta.JavaxTestXmlsToJakartaTestsXmls

Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation for test interfaces like arquillian.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Jakarta EE 9.1

com.oracle.weblogic.rewrite.JakartaEE9_1

These recipes help with Migration to Jakarta EE 9.1, flagging and updating deprecated methods.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Replace deprecated Jakarta Servlet methods and classes

com.oracle.weblogic.rewrite.jakarta.RemovalsServletJakarta9

This recipe replaces the classes and methods deprecated in Jakarta Servlet 5.0

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Rename CDI Extension to Jakarta

com.oracle.weblogic.rewrite.jakarta.JavaxToJakartaCdiExtensions

Rename javax.enterprise.inject.spi.Extension to jakarta.enterprise.inject.spi.Extension.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Tag Libraries to 2.0 (Jakarta EE 9)

com.oracle.weblogic.rewrite.jakarta.MigrateTagLibsToJakartaEE9

Upgrade Jakarta Standard Tag libraries to 2.0 (Jakarta EE9) versions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add Jakarta EE 9 Servlet Dependency

com.oracle.weblogic.rewrite.jakarta.AddJakartaEE9ServletDependencyIfUsingServletContext

Add Jakarta EE 9 Servlet Dependency if using jakarta.servlet.ServletContext

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate javax.javaee-web-api to jakarta.jakartaee-web-api (Jakarta EE 9)

com.oracle.weblogic.rewrite.jakarta.MigrateJavaxWebToJakartaWeb9

Update Java EE Web API dependency to Jakarta EE Web Profile API 9.1

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate javax.mvc to 2.0 (Jakarta EE 9)

com.oracle.weblogic.rewrite.jakarta.MigrateJavaxMVCToJakartaEE9

Upgrade Jakarta Model-View-Controller libraries to 2.0 (Jakarta EE9) versions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.annotation to jakarta.annotation

com.oracle.weblogic.rewrite.jakarta.JavaxAnnotationMigrationToJakarta9Annotation

Java EE has been rebranded to Jakarta EE, necessitating a package relocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated org.glassfish.javax.el packages to jakarta.el

com.oracle.weblogic.rewrite.jakarta.OrgGlassfishJavaxElToJakartaEl

Package relocation for rebranded Javax to Jakarta EE.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate javax.jms to jakarta.jms on MDB

com.oracle.weblogic.rewrite.jakarta.JavaxJmsToJakartaJmsOnMdb

Migrate javax.jms to jakarta.jms on MDB

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update Jakarta EE Platform Dependencies to 9.1.0

com.oracle.weblogic.rewrite.jakarta.UpdateJakartaPlatform9_1

Update Jakarta EE Platform Dependencies to 9.1.0

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Mitigate Unaffected Non-EE Jakarta 9 Packages

com.oracle.weblogic.rewrite.jakarta.MitigateUnaffectedNonEEJakarta9Packages

Mitigate Unaffected Non-EE Jakarta 9 Packages. Reference: https://github.com/jakartaee/platform/blob/main/namespace/unaffected-packages.adoc

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade Common open source libraries

com.oracle.weblogic.rewrite.jakarta.UpgradeCommonOpenSourceLibraries

Upgrade Common open source libraries libraries to Jakarta EE9 versions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change artifacts for a Maven plugin configuration

com.oracle.weblogic.rewrite.jakarta.UpgradeMavenPluginConfigurationArtifacts

Change artifacts for a Maven plugin configuration artifacts.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

JSF 1.x to Jakarta Server Faces 2.3 on WebLogic 14.1.2 or older

com.oracle.weblogic.rewrite.FacesMigrationToJakartaFaces2x

Jakarta EE 8 uses Faces 2.3 a major upgrade to Jakarta packages and XML namespaces. This recipe will migrate JSF 1.x to Jakarta Server Faces 2.3 on WebLogic 14.1.2 or older.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade Faces open source libraries

com.oracle.weblogic.rewrite.jakarta.UpgradeFacesOpenSourceLibraries2

Upgrade PrimeFaces, OmniFaces, and MyFaces libraries to Jakarta EE9 versions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

JSF 2.x to Jakarta Server Faces 3.x

com.oracle.weblogic.rewrite.jakarta.Faces2xMigrationToJakartaFaces3x

Jakarta EE 9 uses Faces 3.0 a major upgrade to Jakarta packages and XML namespaces.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Faces XHTML migration for Jakarta EE 9

com.oracle.weblogic.rewrite.jakarta.JakartaFaces3Xhtml

Find and replace legacy JSF namespaces and javax references with Jakarta Faces values in XHTML files.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in web.xml files for Jakarta Server Faces 3

com.oracle.weblogic.rewrite.jakarta.JavaxWebXmlToJakartaWebXml5

Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in web-fragment.xml files for Jakarta Server Faces 3

com.oracle.weblogic.rewrite.jakarta.JavaxWebFragmentXmlToJakartaWebFragmentXml5

Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in faces-config.xml files for Jakarta Server Faces 3

com.oracle.weblogic.rewrite.jakarta.JavaxFacesConfigXmlToJakartaFaces3ConfigXml

Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in *taglib*.xml files for Jakarta Server Faces 3

com.oracle.weblogic.rewrite.jakarta.JavaxFacesTagLibraryXmlToJakartaFaces3TagLibraryXml

Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in test-web.xml files for Jakarta Server Faces 3 using test interfaces

com.oracle.weblogic.rewrite.jakarta.JavaxTestWebXmlToJakartaTestWebXml5

Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation for test interfaces like arquillian.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

JNDI name jsf/ClientSideSecretKey has been renamed to faces/ClientSideSecretKey, and the jsf/FlashSecretKey JNDI name has been renamed to faces/FlashSecretKey.

com.oracle.weblogic.rewrite.jakarta.FacesJNDINamesChanged3

The jsf/ClientSideSecretKey JNDI name has been renamed to faces/ClientSideSecretKey, and the jsf/FlashSecretKey JNDI name has been renamed to faces/FlashSecretKey. The JNDI keys that have been renamed are updated to allow use of the keys.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace ResourceResolver with ResourceHandler

com.oracle.weblogic.rewrite.jakarta.RemovedJakartaFaces3ResourceResolver

The ResourceResolver class was removed in Jakarta Faces 3.0. The functionality provided by that class can be replaced by using the jakarta.faces.application.ResourceHandler class.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use StateManagementStrategy

com.oracle.weblogic.rewrite.jakarta.RemovedStateManagerMethods3

Methods that were removed from the jakarta.faces.application.StateManager and javax.faces.application.StateManager classes in Jakarta Faces 3.0 are replaced by jakarta.faces.view.StateManagementStrategy or javax.faces.view.StateManagementStrategy based on JakartaEE9 migration in Faces 3.0

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use jakarta.el instead of jakarta.faces.el and javax.faces.el

com.oracle.weblogic.rewrite.jakarta.RemovedJakartaFaces3ExpressionLanguageClasses

Several classes were removed and replaced in Jakarta Server Faces 3.0. The only Object definition not removed in the jakarta.faces.el package is the CompositeComponentExpressionHolder interface.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update deprecated Faces method calls

com.oracle.weblogic.rewrite.jakarta.UpdateJakartaFacesMethodCalls

Custom recipe to handle method call changes for deprecated Faces/EL methods where the method argument lists have changed. This recipe should be run after all the Jakarta Faces related type changes are completed.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Substitute deprecated Faces Managed Beans

com.oracle.weblogic.rewrite.jakarta.FacesManagedBeansRemoved3

This recipe substitutes Faces Managed Beans, which were deprecated in JavaServer Faces 2.3 and have been removed from Jakarta Faces 3.0. It also replaces the deprecated jakarta.faces.bean.ManagedBean annotation with the jarkarta.inject.Named annotation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade Faces open source libraries

com.oracle.weblogic.rewrite.jakarta.UpgradeFacesOpenSourceLibraries3

Upgrade PrimeFaces, OmniFaces, and MyFaces libraries to Jakarta EE9 versions.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Spring Framework 6.2 for WebLogic 15.1.1

com.oracle.weblogic.rewrite.spring.framework.UpgradeToSpringFramework_6_2

Migrate applications to the Spring Framework 6.2 release and compatibility with WebLogic 15.1.1.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update Default Servlet Handler for Spring Framework if empty

com.oracle.weblogic.rewrite.spring.framework.DefaultServletHandler

This recipe will update Spring Framework default servlet handler if empty, as noted in the Spring Framework 6.2 documentation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace Removed WebLogicJtaTransactionManager from Spring Framework 5.3.x to 6.2.x

com.oracle.weblogic.rewrite.spring.framework.ReplaceWebLogicJtaTransactionManager

Replace removed WebLogicJtaTransactionManager with JtaTransactionManager from Spring Framework 6.2.x.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace Removed WebLogicLoadTimeWeaver from Spring Framework 5.3.x to 6.2.x

com.oracle.weblogic.rewrite.spring.framework.ReplaceWebLogicLoadTimeWeaver

Replace removed WebLogicLoadTimeWeaver with LoadTimeWeaver from Spring Framework 6.2.x.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade Spring Data BOM to 2024.1.x

com.oracle.weblogic.rewrite.spring.data.UpgradeSpringDataBom

Upgrade Spring Data BOM to 2024.1.x version.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Upgrade Spring Data JPA to 3.4.6

com.oracle.weblogic.rewrite.spring.data.UpgradeSpringDataJpa

Upgrade Spring Data JPA to 3.4.6 version, which is the version used by spring-data-bom v2024.1.x

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to WebLogic 14.1.1

com.oracle.weblogic.rewrite.UpgradeTo1411

This recipe will apply changes required for migrating to WebLogic 14.1.1

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Migrate to WebLogic 14.1.2

com.oracle.weblogic.rewrite.UpgradeTo1412

This recipe will apply changes required for migrating to WebLogic 14.1.2

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Update the WebLogic version to 14.1.2

com.oracle.weblogic.rewrite.UpdateBuildToWebLogic1412

This recipe will update the WebLogic version to 14.1.2 for Maven build.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Migrate WebLogic Schemas to 14.1.2

com.oracle.weblogic.rewrite.MigrateWebLogicSchemasTo1412

This recipe will migrate WebLogic schemas to 14.1.2

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in weblogic.xml files to WebLogic 14.1.2

com.oracle.weblogic.rewrite.WebLogicXmlWebAppNamespace1412

Migrate xmlns entries in WebLogic schema files to WebLogic 14.1.2

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in weblogic-ejb-jar.xml files to WebLogic 14.1.2

com.oracle.weblogic.rewrite.WebLogicEjbJar32XmlNamespace1412

Migrate xmlns entries in WebLogic EJB 3.2 schema files to WebLogic 14.1.2

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in weblogic-rdbms-jar.xml files to WebLogic 14.1.2

com.oracle.weblogic.rewrite.WebLogicRdbmsJarXmlNamespace1412

Migrate xmlns entries in WebLogic EJB 3.2 RDBMS schema files to WebLogic 14.1.2

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in persistence-configuration.xml files to WebLogic 14.1.2

com.oracle.weblogic.rewrite.WebLogicPersistenceConfigurationXmlNamespace1412

Migrate xmlns entries in WebLogic EJB 3.2 Persistence Configuration schema files to WebLogic 14.1.2

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in weblogic-webservices.xml files to WebLogic 14.1.2

com.oracle.weblogic.rewrite.WebLogicWebServicesXmlNamespace1412

Migrate xmlns entries in WebLogic Web Services schema files to WebLogic 14.1.2

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in weblogic-wsee-clientHandlerChain.xml files to WebLogic 14.1.2

com.oracle.weblogic.rewrite.WebLogicWseeClientHandlerChainXmlNamespace1412

Migrate xmlns entries in WebLogic WSEE Client Handler Chains schema files to WebLogic 14.1.2

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in weblogic-webservices-policy.xml files to WebLogic 14.1.2

com.oracle.weblogic.rewrite.WebLogicWebservicesPolicyRefXmlNamespace1412

Migrate xmlns entries in WebLogic Web Service Policy Reference schema files to WebLogic 14.1.2

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in weblogic-wsee-standaloneclient.xml files to WebLogic 14.1.2

com.oracle.weblogic.rewrite.WebLogicWseeStandaloneClientXmlNamespace1412

Migrate xmlns entries in WebLogic WSEE Standalone Client schema files to WebLogic 14.1.2

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in weblogic-ra.xml files to WebLogic 14.1.2

com.oracle.weblogic.rewrite.WebLogicRaXmlNamespace1412

Migrate xmlns entries in WebLogic Resource Adapter schema files to WebLogic 14.1.2

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in weblogic-application.xml files to WebLogic 14.1.2

com.oracle.weblogic.rewrite.WebLogicApplicationXmlNamespace1412

Migrate xmlns entries in WebLogic Application schema files to WebLogic 14.1.2

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in application-client.xml files to WebLogic 14.1.2

com.oracle.weblogic.rewrite.WebLogicApplicationClientXmlNamespace1412

Migrate xmlns entries in WebLogic Application Client schema files to WebLogic 14.1.2

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in weblogic-pubsub.xml files to WebLogic 14.1.2

com.oracle.weblogic.rewrite.WebLogicPubSubXmlNamespace1412

Migrate xmlns entries in WebLogic PubSub schema files to WebLogic 14.1.2

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in *-jms.xml files to WebLogic 14.1.2

com.oracle.weblogic.rewrite.WebLogicJmsXmlNamespace1412

Migrate xmlns entries in WebLogic JMS schema files to WebLogic 14.1.2

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in *-jdbc.xml files to WebLogic 14.1.2

com.oracle.weblogic.rewrite.WebLogicJdbcXmlNamespace1412

Migrate xmlns entries in WebLogic JDBC schema files to WebLogic 14.1.2

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in plan.xml files to WebLogic 14.1.2

com.oracle.weblogic.rewrite.WebLogicPlanXmlNamespace1412

Migrate xmlns entries in WebLogic Plan schema files to WebLogic 14.1.2

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in resource-deployment-plan.xml files to WebLogic 14.1.2

com.oracle.weblogic.rewrite.WebLogicResourceDeploymentPlanXmlNamespace1412

Migrate xmlns entries in WebLogic Resource Deployment Plan schema files to WebLogic 14.1.2

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Mitigation of Java XML Bind Deprecation in Java 11 vs WebLogic 14.1.2

com.oracle.weblogic.rewrite.WebLogic1412JavaXmlBindMitigation

This recipe will mitigate the Javax XML Bind deprecation in Java 11 vs WebLogic 14.1.2

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to WebLogic 15.1.1

com.oracle.weblogic.rewrite.UpgradeTo1511

This recipe will apply changes required for migrating to WebLogic 15.1.1 and Jakarta EE 9.1

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Update the WebLogic version to 15.1.1

com.oracle.weblogic.rewrite.UpdateBuildToWebLogic1511

This recipe will update the WebLogic version to 15.1.1 for Maven build.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Migrate WebLogic Schemas to 15.1.1

com.oracle.weblogic.rewrite.MigrateWebLogicSchemasTo1511

This recipe will migrate WebLogic schemas to 15.1.1

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in weblogic.xml files to WebLogic 15.1.1

com.oracle.weblogic.rewrite.WebLogicXmlWebAppNamespace1511

This recipe will update the xmlns entries in weblogic.xml files to WebLogic 15.1.1

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in weblogic-ejb-jar.xml files to WebLogic 15.1.1

com.oracle.weblogic.rewrite.WebLogicEjbJar32XmlNamespace1511

This recipe will update the xmlns entries in weblogic-ejb-jar.xml files to WebLogic 15.1.1

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in weblogic-rdbms-jar.xml files to WebLogic 15.1.1

com.oracle.weblogic.rewrite.WebLogicRdbmsJarXmlNamespace1511

This recipe will update the xmlns entries in weblogic-rdbms-jar.xml files to WebLogic 15.1.1

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in persistence-configuration.xml files to WebLogic 15.1.1

com.oracle.weblogic.rewrite.WebLogicPersistenceConfigurationXmlNamespace1511

This recipe will update the xmlns entries in persistence-configuration.xml files to WebLogic 15.1.1

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in weblogic-webservices.xml files to WebLogic 15.1.1

com.oracle.weblogic.rewrite.WebLogicWebServicesXmlNamespace1511

This recipe will update the xmlns entries in weblogic-webservices.xml files to WebLogic 15.1.1

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in weblogic-wsee-clientHandlerChain.xml files to WebLogic 15.1.1

com.oracle.weblogic.rewrite.WebLogicWseeClientHandlerChainXmlNamespace1511

This recipe will update the xmlns entries in weblogic-wsee-clientHandlerChain.xml files to WebLogic 15.1.1

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in weblogic-webservices-policy.xml files to WebLogic 15.1.1

com.oracle.weblogic.rewrite.WebLogicWebservicesPolicyRefXmlNamespace1511

This recipe will update the xmlns entries in weblogic-webservices-policy.xml files to WebLogic 15.1.1

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in weblogic-wsee-standaloneclient.xml files to WebLogic 15.1.1

com.oracle.weblogic.rewrite.WebLogicWseeStandaloneClientXmlNamespace1511

This recipe will update the xmlns entries in weblogic-wsee-standaloneclient.xml files to WebLogic 15.1.1

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in weblogic-ra.xml files to WebLogic 15.1.1

com.oracle.weblogic.rewrite.WebLogicRaXmlNamespace1511

This recipe will update the xmlns entries in weblogic-ra.xml files to WebLogic 15.1.1

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in weblogic-application.xml files to WebLogic 15.1.1

com.oracle.weblogic.rewrite.WebLogicApplicationXmlNamespace1511

This recipe will update the xmlns entries in weblogic-application.xml files to WebLogic 15.1.1

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in application-client.xml files to WebLogic 15.1.1

com.oracle.weblogic.rewrite.WebLogicApplicationClientXmlNamespace1511

This recipe will update the xmlns entries in application-client.xml files to WebLogic 15.1.1

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in weblogic-pubsub.xml files to WebLogic 15.1.1

com.oracle.weblogic.rewrite.WebLogicPubSubXmlNamespace1511

This recipe will update the xmlns entries in weblogic-pubsub.xml files to WebLogic 15.1.1

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in *-jms.xml files to WebLogic 15.1.1

com.oracle.weblogic.rewrite.WebLogicJmsXmlNamespace1511

This recipe will update the xmlns entries in *-jms.xml files to WebLogic 15.1.1

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in *-jdbc.xml files to WebLogic 15.1.1

com.oracle.weblogic.rewrite.WebLogicJdbcXmlNamespace1511

This recipe will update the xmlns entries in *-jdbc.xml files to WebLogic 15.1.1

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in plan.xml files to WebLogic 15.1.1

com.oracle.weblogic.rewrite.WebLogicPlanXmlNamespace1511

This recipe will update the xmlns entries in plan.xml files to WebLogic 15.1.1

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in resource-deployment-plan.xml files to WebLogic 15.1.1

com.oracle.weblogic.rewrite.WebLogicResourceDeploymentPlanXmlNamespace1511

This recipe will update the xmlns entries in resource-deployment-plan.xml files to WebLogic 15.1.1

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change the jakarta.inject-api dependency to scope provided when jakartaee-api 9.x is provided.

com.oracle.weblogic.rewrite.ChangeJakartaInjectAPIDependencyScope

This recipe will change the jakarta.inject-api dependency scope to provided when jakarta.jakartaee-api version 9.x is provided in WebLogic 15.1.1. This prevents the jakarta.inject-api jar from being deployed to WebLogic which can cause class conflicts.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change the jakarta.xml.bind-api dependency to scope provided when jakartaee-api 9.x is provided.

com.oracle.weblogic.rewrite.ChangeJAXBBindAPIDependencyScope

This recipe will change the jakarta.xml.bind-api dependency scope to provided when jakarta.jakartaee-api version 9.x is provided in WebLogic 15.1.1. This prevents the jakarta.xml.bind-api jar from being deployed to WebLogic which can cause class conflicts.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change the jakarta.ws.rs-api dependency to scope provided when jakartaee-api 9.x is provided.

com.oracle.weblogic.rewrite.ChangeJakartaWebServiceRSAPIDependencyScope

This recipe will change the jakarta.ws.rs-api dependency scope to provided when jakarta.jakartaee-api version 9.x is provided in WebLogic 15.1.1. This prevents the jakarta.ws.rs-api jar from being deployed to WebLogic which can cause class conflicts.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Create weblogic.xml if it does not exist

com.oracle.weblogic.rewrite.WebLogicXmlCreateIfNotExists1511

This recipe will create a weblogic.xml file with the WebLogic 15.1.1 namespace if it does not already exist.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add prefer-application-packages for JPA in weblogic.xml

com.oracle.weblogic.rewrite.WebLogicXmlPreferApplicationPackagesJPA

This recipe will add a prefer-application-packages entry for Jakarta Persistence in weblogic.xml if it does not already exist.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Add prefer-application-packages for SLF4J in weblogic.xml

com.oracle.weblogic.rewrite.WebLogicXmlPreferApplicationPackagesSlf4j

This recipe will add a prefer-application-packages entry for SLF4J in weblogic.xml if it does not already exist.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Check and Comment Out Deprecations removed on WebLogic version 15.1.1

com.oracle.weblogic.rewrite.CheckAndCommentOutDeprecations1511

This recipe will check and comment out deprecations on WebLogic version 15.1.1.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Check and Comment Out Deprecations removed on WebLogic version 14.1.2

com.oracle.weblogic.rewrite.CheckAndCommentOutDeprecations1412

This recipe will check and comment out deprecations on WebLogic version 14.1.2.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus30.UpgradeQuarkiverse

io.quarkus.updates.core.quarkus30.UpgradeQuarkiverse

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.activation packages to jakarta.activation

io.quarkus.updates.core.quarkus30.JavaxActivationMigrationToJakartaActivation

Java EE has been rebranded to Jakarta EE, necessitating a package relocation.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.annotation packages to jakarta.annotation

io.quarkus.updates.core.quarkus30.JavaxAnnotationMigrationToJakartaAnnotation

Java EE has been rebranded to Jakarta EE, necessitating a package relocation.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.annotation packages to jakarta.annotation

io.quarkus.updates.core.quarkus30.ChangeJavaxAnnotationToJakarta

Java EE has been rebranded to Jakarta EE, necessitating a package relocation. Excludes javax.annotation.processing.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.annotation packages to jakarta.annotation

io.quarkus.updates.core.quarkus30.JavaxAnnotationPackageToJakarta

Change type of classes in the javax.annotation package to jakarta.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.annotation.security packages to jakarta.annotation.security

io.quarkus.updates.core.quarkus30.JavaxAnnotationSecurityPackageToJakarta

Change type of classes in the javax.annotation.security package to jakarta.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.annotation.sql packages to jakarta.annotation.sql

io.quarkus.updates.core.quarkus30.JavaxAnnotationSqlPackageToJakarta

Change type of classes in the javax.annotation.sql package to jakarta.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.security.auth.message packages to jakarta.security.auth.message

io.quarkus.updates.core.quarkus30.JavaxAuthenticationMigrationToJakartaAuthentication

Java EE has been rebranded to Jakarta EE, necessitating a package relocation.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.security.jacc packages to jakarta.security.jacc

io.quarkus.updates.core.quarkus30.JavaxAuthorizationMigrationToJakartaAuthorization

Java EE has been rebranded to Jakarta EE, necessitating a package relocation.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.batch packages to jakarta.batch

io.quarkus.updates.core.quarkus30.JavaxBatchMigrationToJakartaBatch

Java EE has been rebranded to Jakarta EE, necessitating a package relocation.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.validation packages to jakarta.validation

io.quarkus.updates.core.quarkus30.JavaxValidationMigrationToJakartaValidation

Java EE has been rebranded to Jakarta EE, necessitating a package relocation.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.decorator packages to jakarta.decorator

io.quarkus.updates.core.quarkus30.JavaxDecoratorToJakartaDecorator

Java EE has been rebranded to Jakarta EE, necessitating a package relocation.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.ejb packages to jakarta.ejb

io.quarkus.updates.core.quarkus30.JavaxEjbToJakartaEjb

Java EE has been rebranded to Jakarta EE, necessitating a package relocation.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.el packages to jakarta.el

io.quarkus.updates.core.quarkus30.JavaxElToJakartaEl

Java EE has been rebranded to Jakarta EE, necessitating a package relocation.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.enterprise packages to jakarta.enterprise

io.quarkus.updates.core.quarkus30.JavaxEnterpriseToJakartaEnterprise

Java EE has been rebranded to Jakarta EE, necessitating a package relocation.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.faces packages to jakarta.faces

io.quarkus.updates.core.quarkus30.JavaxFacesToJakartaFaces

Java EE has been rebranded to Jakarta EE, necessitating a package relocation.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.inject packages to jakarta.inject

io.quarkus.updates.core.quarkus30.JavaxInjectMigrationToJakartaInject

Java EE has been rebranded to Jakarta EE, necessitating a package relocation.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.interceptor packages to jakarta.interceptor

io.quarkus.updates.core.quarkus30.JavaxInterceptorToJakartaInterceptor

Java EE has been rebranded to Jakarta EE, necessitating a package relocation.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.jms packages to jakarta.jms

io.quarkus.updates.core.quarkus30.JavaxJmsToJakartaJms

Java EE has been rebranded to Jakarta EE, necessitating a package relocation.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.json packages to jakarta.json

io.quarkus.updates.core.quarkus30.JavaxJsonToJakartaJson

Java EE has been rebranded to Jakarta EE, necessitating a package relocation.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.jws packages to jakarta.jws

io.quarkus.updates.core.quarkus30.JavaxJwsToJakartaJws

Java EE has been rebranded to Jakarta EE, necessitating a package relocation.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.mail packages to jakarta.mail

io.quarkus.updates.core.quarkus30.JavaxMailToJakartaMail

Java EE has been rebranded to Jakarta EE, necessitating a package relocation.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.persistence packages to jakarta.persistence

io.quarkus.updates.core.quarkus30.JavaxPersistenceToJakartaPersistence

Java EE has been rebranded to Jakarta EE, necessitating a package relocation

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.resource packages to jakarta.resource

io.quarkus.updates.core.quarkus30.JavaxResourceToJakartaResource

Java EE has been rebranded to Jakarta EE, necessitating a package relocation.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.security.enterprise packages to jakarta.security.enterprise

io.quarkus.updates.core.quarkus30.JavaxSecurityToJakartaSecurity

Java EE has been rebranded to Jakarta EE, necessitating a package relocation.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.servlet packages to jakarta.servlet

io.quarkus.updates.core.quarkus30.JavaxServletToJakartaServlet

Java EE has been rebranded to Jakarta EE, necessitating a package relocation.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.transaction packages to jakarta.transaction

io.quarkus.updates.core.quarkus30.JavaxTransactionMigrationToJakartaTransaction

Java EE has been rebranded to Jakarta EE, necessitating a package relocation.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.websocket packages to jakarta.websocket

io.quarkus.updates.core.quarkus30.JavaxWebsocketToJakartaWebsocket

Java EE has been rebranded to Jakarta EE, necessitating a package relocation.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.ws packages to jakarta.ws

io.quarkus.updates.core.quarkus30.JavaxWsToJakartaWs

Java EE has been rebranded to Jakarta EE, necessitating a package relocation.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.xml.bind packages to jakarta.xml.bind

io.quarkus.updates.core.quarkus30.JavaxXmlBindMigrationToJakartaXmlBind

Java EE has been rebranded to Jakarta EE, necessitating a package relocation.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.soap packages to jakarta.soap

io.quarkus.updates.core.quarkus30.JavaxXmlSoapToJakartaXmlSoap

Java EE has been rebranded to Jakarta EE, necessitating a package relocation.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate deprecated javax.xml.ws packages to jakarta.xml.ws

io.quarkus.updates.core.quarkus30.JavaxXmlWsMigrationToJakartaXmlWs

Java EE has been rebranded to Jakarta EE, necessitating a package relocation.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate xmlns entries in persistence.xml files

io.quarkus.updates.core.quarkus30.JavaxPersistenceXmlToJakartaPersistenceXml

Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate Jackson from javax to jakarta namespace

io.quarkus.updates.core.quarkus30.JacksonJavaxToJakarta

Java EE has been rebranded to Jakarta EE. This recipe replaces existing Jackson dependencies with their counterparts that are compatible with Jakarta EE.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Migrate RestAssured from javax to jakarta namespace by upgrading to a version compatible with J2EE9

io.quarkus.updates.core.quarkus30.RestAssuredJavaxToJakarta

Java EE has been rebranded to Jakarta EE. This recipe replaces existing RestAssured dependencies with their counterparts that are compatible with Jakarta EE.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus30.JavaxToJakartaAdditionalMigration

io.quarkus.updates.core.quarkus30.JavaxToJakartaAdditionalMigration

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Rename a file example

io.quarkus.updates.core.quarkus30.RenameJavaxServiceFiles

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus30.JavaxConfigurationFiles

io.quarkus.updates.core.quarkus30.JavaxConfigurationFiles

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus30.AdditionalChanges

io.quarkus.updates.core.quarkus30.AdditionalChanges

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

io.quarkus.updates.core.quarkus30.Kotlin

io.quarkus.updates.core.quarkus30.Kotlin

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus30.ApplicationProperties

io.quarkus.updates.core.quarkus30.ApplicationProperties

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus30.ApplicationYml

io.quarkus.updates.core.quarkus30.ApplicationYml

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus30.JavaxToJakartaDocumentationAdoc

io.quarkus.updates.core.quarkus30.JavaxToJakartaDocumentationAdoc

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus30.JavaxToJakartaDocumentationMd

io.quarkus.updates.core.quarkus30.JavaxToJakartaDocumentationMd

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus30.JavaxToJakartaCodestarts

io.quarkus.updates.core.quarkus30.JavaxToJakartaCodestarts

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus30.JavaxToJakartaCodestartsTests

io.quarkus.updates.core.quarkus30.JavaxToJakartaCodestartsTests

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus30.JavaxToJakartaKotlin

io.quarkus.updates.core.quarkus30.JavaxToJakartaKotlin

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus30.JavaxToJakartaKotlinCodestarts

io.quarkus.updates.core.quarkus30.JavaxToJakartaKotlinCodestarts

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus30.JavaxToJakartaKotlinCodestartsTests

io.quarkus.updates.core.quarkus30.JavaxToJakartaKotlinCodestartsTests

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus31.RemoveMockitoInline

io.quarkus.updates.core.quarkus31.RemoveMockitoInline

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus310.SyncHibernateJpaModelgenVersionWithBOM

io.quarkus.updates.core.quarkus310.SyncHibernateJpaModelgenVersionWithBOM

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus310.UpdateConfigPackagePom

io.quarkus.updates.core.quarkus310.UpdateConfigPackagePom

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus310.UpdateConfigPackageTypeJar

io.quarkus.updates.core.quarkus310.UpdateConfigPackageTypeJar

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus310.UpdateConfigPackageTypeFastJar

io.quarkus.updates.core.quarkus310.UpdateConfigPackageTypeFastJar

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus310.UpdateConfigPackageTypeUberJar

io.quarkus.updates.core.quarkus310.UpdateConfigPackageTypeUberJar

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus310.UpdateConfigPackageTypeMutableJar

io.quarkus.updates.core.quarkus310.UpdateConfigPackageTypeMutableJar

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus310.UpdateConfigPackageTypeNative

io.quarkus.updates.core.quarkus310.UpdateConfigPackageTypeNative

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus310.UpdateConfigPackageTypeNativeSources

io.quarkus.updates.core.quarkus310.UpdateConfigPackageTypeNativeSources

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus310.UpdateConfigPackageSimpleProperties

io.quarkus.updates.core.quarkus310.UpdateConfigPackageSimpleProperties

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus310.FlywayPostgreSQL

io.quarkus.updates.core.quarkus310.FlywayPostgreSQL

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus310.FlywayDb2

io.quarkus.updates.core.quarkus310.FlywayDb2

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus310.FlywayDerby

io.quarkus.updates.core.quarkus310.FlywayDerby

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus311.SyncHibernateJpaModelgenVersionWithBOM

io.quarkus.updates.core.quarkus311.SyncHibernateJpaModelgenVersionWithBOM

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus312.SyncHibernateJpaModelgenVersionWithBOM

io.quarkus.updates.core.quarkus312.SyncHibernateJpaModelgenVersionWithBOM

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus313.SyncHibernateJpaModelgenVersionWithBOM

io.quarkus.updates.core.quarkus313.SyncHibernateJpaModelgenVersionWithBOM

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus313.UpdateTestOIDCAuthServerUrl

io.quarkus.updates.core.quarkus313.UpdateTestOIDCAuthServerUrl

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus318.RemoveFlywayCleanOnValidationError

io.quarkus.updates.core.quarkus318.RemoveFlywayCleanOnValidationError

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus319.MoveAccessTokenAnnotationToNewPackage

io.quarkus.updates.core.quarkus319.MoveAccessTokenAnnotationToNewPackage

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus319.ConfigurationPropertiesChange

io.quarkus.updates.core.quarkus319.ConfigurationPropertiesChange

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus319.HibernateORMValidationMode

io.quarkus.updates.core.quarkus319.HibernateORMValidationMode

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus32.InjectMock

io.quarkus.updates.core.quarkus32.InjectMock

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus32.ApplicationProperties

io.quarkus.updates.core.quarkus32.ApplicationProperties

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus32.ApplicationYml

io.quarkus.updates.core.quarkus32.ApplicationYml

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus321.TlsRegistrySplitPackagesFix

io.quarkus.updates.core.quarkus321.TlsRegistrySplitPackagesFix

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus323.HibernateORMSchemaManagementProperties

io.quarkus.updates.core.quarkus323.HibernateORMSchemaManagementProperties

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus324.ReplaceOldJpaModelgenAnnotationProcessor

io.quarkus.updates.core.quarkus324.ReplaceOldJpaModelgenAnnotationProcessor

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus324.ReplaceNewJpaModelgenAnnotationProcessor

io.quarkus.updates.core.quarkus324.ReplaceNewJpaModelgenAnnotationProcessor

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus324.AddHibernateAnnotationProcessorIfNewJpaModelgenDependency

io.quarkus.updates.core.quarkus324.AddHibernateAnnotationProcessorIfNewJpaModelgenDependency

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus324.AddHibernateAnnotationProcessorIfOldJpaModelgenDependency

io.quarkus.updates.core.quarkus324.AddHibernateAnnotationProcessorIfOldJpaModelgenDependency

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus324.RemoveJpaModelgenDependencies

io.quarkus.updates.core.quarkus324.RemoveJpaModelgenDependencies

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus324.MigrateFromHibernateOrmSessionMethodsRemovedIn7

io.quarkus.updates.core.quarkus324.MigrateFromHibernateOrmSessionMethodsRemovedIn7

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus324.MigrateFromHibernateOrmVariousRemovedIn7

io.quarkus.updates.core.quarkus324.MigrateFromHibernateOrmVariousRemovedIn7

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus324.LogConsoleAsyncEnable

io.quarkus.updates.core.quarkus324.LogConsoleAsyncEnable

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus326.EnableEnabledConfigChanges

io.quarkus.updates.core.quarkus326.EnableEnabledConfigChanges

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus33.ApplicationProperties

io.quarkus.updates.core.quarkus33.ApplicationProperties

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus33.ApplicationYml

io.quarkus.updates.core.quarkus33.ApplicationYml

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus33.GraalVMSubstitutionsArtifact

io.quarkus.updates.core.quarkus33.GraalVMSubstitutionsArtifact

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus331.CoreUpdate331

io.quarkus.updates.core.quarkus331.CoreUpdate331

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus35.MutinyUniAndGroupCombinedWith

io.quarkus.updates.core.quarkus35.MutinyUniAndGroupCombinedWith

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus35.MutinyUniMemoizeAtLeast

io.quarkus.updates.core.quarkus35.MutinyUniMemoizeAtLeast

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus36.JaegerSmallRyeOpenTracing

io.quarkus.updates.core.quarkus36.JaegerSmallRyeOpenTracing

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus37.HibernateSearchOutboxPolling

io.quarkus.updates.core.quarkus37.HibernateSearchOutboxPolling

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus37.ResteasyClientRenaming

io.quarkus.updates.core.quarkus37.ResteasyClientRenaming

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus37.MavenPlugins

io.quarkus.updates.core.quarkus37.MavenPlugins

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus37.ReplaceJpaModelgenAnnotationProcessor

io.quarkus.updates.core.quarkus37.ReplaceJpaModelgenAnnotationProcessor

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus37.AddJpaModelgenAnnotationProcessor

io.quarkus.updates.core.quarkus37.AddJpaModelgenAnnotationProcessor

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus37.AddJpaModelgenAnnotationProcessorIfOldArtifact

io.quarkus.updates.core.quarkus37.AddJpaModelgenAnnotationProcessorIfOldArtifact

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus37.RemoveJpaModelgenDependencies

io.quarkus.updates.core.quarkus37.RemoveJpaModelgenDependencies

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus37.SyncHibernateJpaModelgenVersionWithBOM

io.quarkus.updates.core.quarkus37.SyncHibernateJpaModelgenVersionWithBOM

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to Java 17

io.quarkus.updates.core.quarkus37.UpgradeToJava17

This recipe will apply changes commonly needed when migrating to Java 17. Specifically, for those applications that are built on Java 8, this recipe will update and add dependencies on J2EE libraries that are no longer directly bundled with the JDK. This recipe will also replace deprecated API with equivalents when there is a clear migration strategy. Build files will also be updated to use Java 17 as the target/source and plugins will be also be upgraded to versions that are compatible with Java 17.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Change Maven and Gradle Java version property values to 17

io.quarkus.updates.core.quarkus37.JavaVersion17

Change maven.compiler.source and maven.compiler.target values to 17.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use java.security.cert instead of javax.security.cert

io.quarkus.updates.core.quarkus37.DeprecatedJavaxSecurityCert

The javax.security.cert package has been deprecated for removal.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use SunJSSE instead of com.sun.net.ssl.internal.ssl.Provider

io.quarkus.updates.core.quarkus37.RemovedLegacySunJSSEProviderName

The com.sun.net.ssl.internal.ssl.Provider provider name was removed.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Adopt setLongThreadID in java.util.logging.LogRecord

io.quarkus.updates.core.quarkus37.DeprecatedLogRecordThreadID

Avoid using the deprecated methods in java.util.logging.LogRecord

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Set visibility of premain and agentmain methods to public

io.quarkus.updates.core.quarkus37.Jre17AgentMainPreMainPublic

Check for a behavior change in Java agents.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus383.GraalSDK

io.quarkus.updates.core.quarkus383.GraalSDK

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus38.SyncHibernateJpaModelgenVersionWithBOM

io.quarkus.updates.core.quarkus38.SyncHibernateJpaModelgenVersionWithBOM

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus39.RemovePanacheAnnotationProcessor

io.quarkus.updates.core.quarkus39.RemovePanacheAnnotationProcessor

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus39.SyncHibernateJpaModelgenVersionWithBOM

io.quarkus.updates.core.quarkus39.SyncHibernateJpaModelgenVersionWithBOM

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus39.Relocations

io.quarkus.updates.core.quarkus39.Relocations

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus39.UpdateConfigRoots

io.quarkus.updates.core.quarkus39.UpdateConfigRoots

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.core.quarkus39.GraalSDK

io.quarkus.updates.core.quarkus39.GraalSDK

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.minio.minio38.UpdateAll

io.quarkus.updates.minio.minio38.UpdateAll

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

io.quarkus.updates.minio.minio38.UpdateProperties

io.quarkus.updates.minio.minio38.UpdateProperties

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrates camel 4.4 application to camel 4.8

io.quarkus.updates.camel.camel47.CamelQuarkusMigrationRecipe

Migrates camel 4.4 quarkus application to camel 4.8.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Migrates camel 4.8 application to camel 4.9

io.quarkus.updates.camel.camel49.CamelQuarkusMigrationRecipe

Migrates camel 4.8 quarkus application to camel 4.9.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrates camel 4.9 application to camel 4.10

io.quarkus.updates.camel.camel410.CamelQuarkusMigrationRecipe

Migrates camel 4.9 quarkus application to camel 4.10.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrates camel 4.10 application to camel 4.11

io.quarkus.updates.camel.camel411.CamelQuarkusMigrationRecipe

Migrates camel 4.10 quarkus application to camel 4.11.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrates camel 4.11 application to camel 4.12

io.quarkus.updates.camel.camel412.CamelQuarkusMigrationRecipe

Migrates camel 4.11 quarkus application to camel 4.12.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Migrates camel 4.12 application to camel 4.13

io.quarkus.updates.camel.camel413.CamelQuarkusMigrationRecipe

Migrates camel 4.12 Quarkus application to camel 4.13.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Migrates camel 4.13 application to camel 4.14

io.quarkus.updates.camel.camel414.CamelQuarkusMigrationRecipe

Migrates camel 4.13 Quarkus application to camel 4.14.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrates camel 4.14 application to camel 4.15

io.quarkus.updates.camel.camel415.CamelQuarkusMigrationRecipe

Migrates camel 4.14 Quarkus application to camel 4.15.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrates camel 4.0 application to camel 4.4

io.quarkus.updates.camel.camel44.CamelQuarkusMigrationRecipe

Migrates camel 4.0 quarkus application to camel 4.4.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate camel3 application to camel4.

io.quarkus.updates.camel.camel40.CamelQuarkusMigrationRecipe

Migrate camel3 quarkus application to camel4 quarkus.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Remove non existing camel-quarkus extensions

org.openrewrite.java.camel.migrate.removedExtensions

Removal of maven dependencies for extension, which are no longer part of Camel 3.x.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate camel3 application to camel4.

org.apache.camel.upgrade.camel40.CamelMigrationRecipe

Migrate camel3 application to camel4.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate moved types between Camel 3.x and Camel 4.x

org.apache.camel.upgrade.camel40.ChangeTypes

Change type of classes related to change of API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Camel API changes in application.properties

org.apache.camel.upgrade.camel40.properties.rejectedPolicy

Apache Camel API migration from version 3.20 or higher to 4.0. Removal of deprecated APIs, which could be part of the application.properties.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change of method names brought by Camel JMX API changes

org.apache.camel.upgrade.camel40.ChangeManagedChoiceMBeanMethodName

MBeans now use a consistent method name of extendedInformation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change of method names brought by Camel JMX API changes

org.apache.camel.upgrade.camel40.ChangeManagedFailoverLoadBalancerMBeanMethodName

MBeans now use a consistent method name of extendedInformation.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace context.getExtension(ExtendedCamelContext.class).get* with PluginHelper.get*(context)

org.apache.camel.upgrade.camel40.UsePluginHelperForContextGetters

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrates camel 4.10.3 application to camel 4.10.4

org.apache.camel.upgrade.camel410_4.CamelMigrationRecipe

Migrates camel 4.10.3 application to camel 4.10.4.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrates camel 4.9 application to camel 4.10

org.apache.camel.upgrade.camel410.CamelMigrationRecipe

Migrates camel 4.9 application to camel 4.10.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Renamed constants in camel-azure-files

org.apache.camel.upgrade.camel410.camelAzureFiles

Renamed constants in camel-azure-files.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Renamed constants in camel-smb

org.apache.camel.upgrade.camel410.camelSmb

Renamed constants in camel-smb.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update properties and yaml configurations file

org.apache.camel.upgrade.UpdatePropertiesAndYamlKeys

Update properties and yaml configurations file.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to 4.10.6

org.apache.camel.upgrade.Camel410LTSMigrationRecipe

Migrates Apache Camel application to 4.10.6.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Migrates camel 4.10 application to camel 4.11

org.apache.camel.upgrade.camel411.CamelMigrationRecipe

Migrates camel 4.10 application to camel 4.11.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Use PlatformHttpHeaderFilterStrategy instead of HttpHeaderFilterStrategy

org.apache.camel.upgrade.camel411.platformHttpFilterStrategy

PlatformHttpHeaderFilterStrategy is removed, use HttpHeaderFilterStrategy instead.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Removed deprecated components

org.apache.camel.upgrade.camel411.removedDependencies

Removed deprecated components (camel-etcd3).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Removed deprecated property camel.main.lightweight

org.apache.camel.upgrade.camel411.removedLightweight

Removed deprecated configuration properties (camel.main.lightweight).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrates camel 4.11 application to camel 4.12

org.apache.camel.upgrade.camel412.CamelMigrationRecipe

Migrates camel 4.11 application to camel 4.12.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

The package scan classes has moved from camel-base-engine to camel-support - java

org.apache.camel.upgrade.camel412.scanClassesMoved

The package scan classes has moved from camel-base-engine to camel-support JAR and moved to a new package - java.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

The package scan classes has moved from camel-base-engine to camel-support - maven

org.apache.camel.upgrade.camel412.scanClassesMovedMaven

The package scan classes has moved from camel-base-engine to camel-support JAR and moved to a new package - maven.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

XML DSL bearer from rest/securityDefinitions is renamed to bearerToken

org.apache.camel.upgrade.camel412.xmlDslBearer

Rest definition in XML DSL with security constraints, then bearer in YAML and XML DSL has been renamed to bearerToken to be aligned with Java DSL.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Yaml DSL bearer from rest/securityDefinitions is renamed to bearerToken

org.apache.camel.upgrade.camel412.yamlDslBearer

Rest definition in Yaml DSL with security constraints, then bearer in YAML and XML DSL has been renamed to bearerToken to be aligned with Java DSL.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrates camel 4.12 application to camel 4.13

org.apache.camel.upgrade.camel413.CamelMigrationRecipe

Migrates camel 4.12 application to camel 4.13.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Renamed BasicAuthenticationHttpClientConfigurer to DefaultAuthenticationHttpClientConfigurer

org.apache.camel.upgrade.camel413.authenticationHttpClientConfigurer

BasicAuthenticationHttpClientConfigurer is renamed to DefaultAuthenticationHttpClientConfigurer.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change Maven dependency example

org.apache.camel.upgrade.camel413.furyDependency

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Renamed BasicAuthenticationHttpClientConfigurer to DefaultAuthenticationHttpClientConfigurer

org.apache.camel.upgrade.camel413.furyJava

BasicAuthenticationHttpClientConfigurer is renamed to DefaultAuthenticationHttpClientConfigurer.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Change dataformat fury to fury in xml/java dsl.

org.apache.camel.upgrade.camel413.furyDsl

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrates camel 4.13 application to camel 4.14

org.apache.camel.upgrade.camel414.CamelMigrationRecipe

Migrates camel 4.13 application to camel 4.14.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Update properties and yaml configurations file because of Http management vs business separation

org.apache.camel.upgrade.camel414.httpBusinessVsManagementServicesSeparationProperties

The HTTP server for standalone camel-main applications has separated management services and business services. This means that part of configurations in application.properties should be changed from camel.server.xxx to camel.management.xxx.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrates camel 4.14 application to camel 4.15

org.apache.camel.upgrade.camel415.CamelMigrationRecipe

Migrates camel 4.14 application to camel 4.15.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Changed types of camel AI nested headers classes

org.apache.camel.upgrade.camel415.aiNestedHeadersClasses

Changed types of camel AI nested headers classes.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refactored dataFormats

org.apache.camel.upgrade.camel415.dataFormats

Refactored dataFormats.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refactored dataFormats (YAML DSL)

org.apache.camel.upgrade.camel415.yamDataFormats

Refactored dataFormats (YAML DSL).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Refactored dataFormats (XML DSL)

org.apache.camel.upgrade.camel415.xmlDataFormats

Refactored dataFormats (XML DSL).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Changed parameter in camel-netty and camel-netty-http

org.apache.camel.upgrade.camel415.nettyAndNettyHttp

Changed parameter in camel-netty and camel-netty-http + enhanced value.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrates camel 4.15 application to camel 4.16

org.apache.camel.upgrade.camel416.CamelMigrationRecipe

Migrates camel 4.15 application to camel 4.16.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Different java type for ServerCertificateValidator in camel-milo

org.apache.camel.upgrade.camel416.camelMiloCertificate

Different java type for ServerCertificateValidator in camel-milo.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrates camel 4.0 application to camel 4.4

org.apache.camel.upgrade.camel44.CamelMigrationRecipe

Migrates camel 4.0 application to camel 4.4.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Tag Enum has been deprecated

org.apache.camel.upgrade.camel41.TracingTag

The Tag Enum containing constants for tagging spans has been deprecated. Instead, use constants from the TagConstants.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

The option camel.main.debugger has been renamed

org.apache.camel.upgrade.camel42.CamelMainDebugger

The option camel.main.debugger has been renamed to camel.debug.enabled.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

MemoryStateRepository and FileStateRepository were moved to another package and library

org.apache.camel.upgrade.camel43.StateRepository

Moved classes MemoryStateRepository and FileStateRepositor from camel-base-engine to camel-support.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

The header name for the List metadata has changed

org.apache.camel.upgrade.camel43.KafkaMetadata

The header name for the List metadata has changed also the dsl method for metadata changed.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace deprecated DefaultJsonSchemaLoader with DefaultJsonUriSchemaLoader

org.apache.camel.upgrade.camel44.DefaultJsonSchemaLoader

Replaces deprecated class with its successor.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace 'camel.main.routeController' with `camel.routecontroller'

org.apache.camel.upgrade.camel44.RouteControllerProperties

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrates camel 4.4 application to camel 4.5

org.apache.camel.upgrade.camel45.CamelMigrationRecipe

Migrates camel 4.4 application to camel 4.5.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace context.${method}(*) with context.getCamelContextExtension().${method}(*)

org.apache.camel.upgrade.camel45.UseExtendedCamelContextGetters

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Replace 'camel.main.backlogTracing' with `camel.trace.enabled'

org.apache.camel.upgrade.camel45.TraceProperties

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Renamed classes for elasticsearch,opensearch and spring regis

org.apache.camel.upgrade.camel45.renamedClasses

Renamed classes for elasticsearch,opensearch and spring regis.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrates camel 4.5 application to camel 4.6

org.apache.camel.upgrade.camel46.CamelMigrationRecipe

Migrates camel 4.5 application to camel 4.6.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Renamed classes for elasticsearch,opensearch and spring regis

org.apache.camel.upgrade.camel46.renamedClasses

Renamed classes for elasticsearch,opensearch and spring regis.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Renamed dependencies

org.apache.camel.upgrade.camel46.renamedDependencies

Renamed dependencies.

Data tables:

  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.
  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Renamed streamCaching to streamCache on the route

org.apache.camel.upgrade.camel46.yamStreamCaching

Renamed streamCaching to streamCache on the route.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrates camel 4.6 application to camel 4.7

org.apache.camel.upgrade.camel47.CamelMigrationRecipe

Migrates camel 4.6 application to camel 4.7.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Renamed classes for API

org.apache.camel.upgrade.camel47.renamedClasses

Renamed classes for API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Moved the camel-cloudevents api into camel-api and removed the camel-cloudevents

org.apache.camel.upgrade.camel47.removedDependencies

Moved the camel-cloudevents api into camel-api and removed the camel-cloudevents.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrates camel 4.8 application to camel 4.9

org.apache.camel.upgrade.camel49.CamelMigrationRecipe

Migrates camel 4.8 application to camel 4.9.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Renamed classes for API

org.apache.camel.upgrade.camel49.renamedAPIs

Renamed classes for API.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

The syntax for retrieving a single field of a secret has been changed

org.apache.camel.upgrade.camel49.HashicorpSecretRecipe

The syntax for retrieving a single field of a secret has been changed..

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

The syntax for retrieving a single field of a secret has been changed

org.apache.camel.upgrade.camel49.GcpSecretRecipe

The syntax for retrieving a single field of a secret has been changed..

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

The syntax for retrieving a single field of a secret has been changed

org.apache.camel.upgrade.camel49.AwsSecretRecipe

The syntax for retrieving a single field of a secret has been changed..

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

The syntax for retrieving a single field of a secret has been changed

org.apache.camel.upgrade.camel49.AzureSecretRecipe

The syntax for retrieving a single field of a secret has been changed..

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Each camel-debezium module has its own subpackage corresponding to the database type

org.apache.camel.upgrade.camel49.DebeziumChangeTypes

each camel-debezium module has its own subpackage corresponding to the database type. So for example, all the classes of the module camel-debezium-postgres have been moved to a dedicated package which is org.apache.camel.component.debezium.postgres instead of having everything under the root package org.apache.camel.component.debezium.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Removed deprecated components

org.apache.camel.upgrade.camel49.removedDependencies

Removed deprecated components (camel-groovy-dsl, camel-js-dsl, camel-jsh-dsl, camel-kotlin-api, camel-kotlin-dsl).

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.

Migrate to 4.14.0

org.apache.camel.upgrade.CamelMigrationRecipe

Migrates Apache Camel application to 4.14.0.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Migrate to Java 17

org.apache.camel.upgrade.UpgradeToJava17

This recipe will apply changes commonly needed when migrating to Java 17. Specifically, for those applications that are built on Java 8, this recipe will update and add dependencies on J2EE libraries that are no longer directly bundled with the JDK. This recipe will also replace deprecated API with equivalents when there is a clear migration strategy. Build files will also be updated to use Java 17 as the target/source and plugins will be also be upgraded to versions that are compatible with Java 17.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.
  • org.openrewrite.maven.table.MavenMetadataFailures: Attempts to resolve maven metadata that failed.

Change Maven Java version property values to 17

org.apache.camel.upgrade.JavaVersion17

Change maven.compiler.source and maven.compiler.target values to 17.

Data tables:

  • org.openrewrite.table.SearchResults: Search results that were found during the recipe run.