Skip to main content

Recipes by Tag

This doc contains all recipe tags and the recipes that are tagged with them.

Total tags: 396

0.2

3 recipes

1.0

4 recipes

3.10

12 recipes

3.11

3 recipes

  • org.openrewrite.python.migrate.FindLocaleGetdefaultlocale
    • Find deprecated locale.getdefaultlocale() usage
    • locale.getdefaultlocale() was deprecated in Python 3.11. Use locale.setlocale(), locale.getlocale(), or locale.getpreferredencoding(False) instead.
  • org.openrewrite.python.migrate.ReplaceReTemplate
    • Replace re.template() with re.compile() and flag re.TEMPLATE/re.T
    • re.template() was deprecated in Python 3.11 and removed in 3.13. Calls are auto-replaced with re.compile(). re.TEMPLATE/re.T flags have no direct replacement and are flagged for manual review.
  • org.openrewrite.python.migrate.UpgradeToPython311
    • Upgrade to Python 3.11
    • Migrate deprecated and removed APIs for Python 3.11 compatibility. This includes handling removed modules, deprecated functions, and API changes between Python 3.10 and 3.11.

3.12

13 recipes

3.13

20 recipes

3.14

6 recipes

3.6

2 recipes

3.8

7 recipes

3.9

5 recipes

5to6

7 recipes

acegi

1 recipe

  • io.moderne.java.spring.security.MigrateAcegiToSpringSecurity_5_0
    • Migrate from Acegi Security 1.0.x to Spring Security 5.0
    • Migrates Acegi Security 1.0.x directly to Spring Security 5.0. This recipe handles dependency changes, type renames, XML configuration updates, web.xml filter migration, and adds TODO comments for password encoders that require manual migration.

actions

2 recipes

activation

2 recipes

activemq

1 recipe

actuator

2 recipes

ai

1 recipe

  • io.moderne.ai.FixMisencodedCommentsInFrench
    • Fix mis-encoded French comments, javadocs and pom.xml comments
    • Fixes mis-encoded French comments in your code, javadocs and in your pom.xml files. Mis-encoded comments contain a ? or � character.

amqp

2 recipes

annotation

3 recipes

annotations

2 recipes

apache

20 recipes

application

7 recipes

arquillian

1 recipe

array

2 recipes

artemis

1 recipe

aspnet

3 recipes

aspnetcore

40 recipes

assertj

11 recipes

async

2 recipes

authentication

5 recipes

authorization

2 recipes

AWS

57 recipes

Azure

49 recipes

batch

9 recipes

batchXML

1 recipe

bean validation

1 recipe

beans

2 recipes

best

1 recipe

  • org.openrewrite.java.migrate.JavaBestPractices
    • Java best practices
    • Applies opinionated best practices for Java projects targeting Java 25. This recipe includes the full Java 25 upgrade chain plus additional improvements to code style, API usage, and third-party dependency reduction that go beyond what the version migration recipes apply.
    • Tags: best-practices

bindings

1 recipe

bom

2 recipes

boot

78 recipes

bouncycastle

2 recipes

brave

1 recipe

bug

1 recipe

build

2 recipes

byteman

1 recipe

cache

1 recipe

cacheManager

1 recipe

caching

1 recipe

  • OpenRewrite.Recipes.Net9.FindDistributedCache
    • Find IDistributedCache usage (HybridCache in .NET 9)
    • Finds usages of IDistributedCache. In .NET 9, HybridCache is the recommended replacement with L1/L2 caching, stampede protection, and tag-based invalidation.

camel

1 recipe

cdi

3 recipes

cgi

2 recipes

  • org.openrewrite.python.migrate.ReplaceCgiParseQs
    • Replace cgi.parse_qs() with urllib.parse.parse_qs()
    • cgi.parse_qs() was removed in Python 3.8. Use urllib.parse.parse_qs() instead. Note: this rewrites call sites but does not manage imports. Use with ChangeImport in a composite recipe to update from imports.
  • org.openrewrite.python.migrate.ReplaceCgiParseQsl
    • Replace cgi.parse_qsl() with urllib.parse.parse_qsl()
    • cgi.parse_qsl() was removed in Python 3.8. Use urllib.parse.parse_qsl() instead. Note: this rewrites call sites but does not manage imports. Use with ChangeImport in a composite recipe to update from imports.

ci

2 recipes

  • org.openrewrite.gitlab.BestPractices
    • GitLab CI best practices
    • Apply GitLab CI/CD best practices to .gitlab-ci.yml. This includes adding workflow:rules to prevent duplicate pipelines, setting interruptible: true and retry in the default section, configuring artifacts:expire_in, and setting a job timeout.
  • org.openrewrite.gitlab.search.FindDeprecatedSyntax
    • Find deprecated GitLab CI syntax
    • Find usages of deprecated only and except keywords in .gitlab-ci.yml. These keywords are deprecated in favor of rules.

CKV

110 recipes

CKV2

1 recipe

classic

3 recipes

cleanup

1 recipe

cloud

27 recipes

cloudfoundry

1 recipe

cobertura

1 recipe

code

403 recipes

codemods

103 recipes

collections

3 recipes

commons

14 recipes

compatibility

1 recipe

compiler

2 recipes

compose

1 recipe

compression

2 recipes

  • OpenRewrite.Recipes.Net9.FindZipArchiveCompressionLevel
    • Find ZipArchive.CreateEntry with CompressionLevel (bit flag change)
    • Finds ZipArchive.CreateEntry() and ZipFileExtensions.CreateEntryFromFile() calls with a CompressionLevel parameter. In .NET 9, the CompressionLevel value now sets general-purpose bit flags in the ZIP central directory header, which may affect interoperability.
  • OpenRewrite.Recipes.Net9.FindZipArchiveEntryEncoding
    • Find ZipArchiveEntry name/comment UTF-8 encoding change
    • Finds access to ZipArchiveEntry.Name, FullName, or Comment properties. In .NET 9, these now respect the UTF-8 flag in ZIP entries, which may change decoded values.

config

1 recipe

configuration

1 recipe

connector

2 recipes

connectors

1 recipe

core

1 recipe

cryptography

9 recipes

  • OpenRewrite.Recipes.Net10.FindRfc2898DeriveBytesObsolete
    • Find obsolete Rfc2898DeriveBytes constructors (SYSLIB0060)
    • Finds new Rfc2898DeriveBytes(...) constructor calls which are obsolete in .NET 10. Use the static Rfc2898DeriveBytes.Pbkdf2() method instead.
  • OpenRewrite.Recipes.Net10.FindX500DistinguishedNameValidation
    • Find X500DistinguishedName string constructor stricter validation
    • Finds new X500DistinguishedName(string, ...) constructor calls which have stricter validation in .NET 10. Non-Windows environments may reject previously accepted values.
  • OpenRewrite.Recipes.Net10.MlDsaSlhDsaSecretKeyToPrivateKey
    • Rename MLDsa/SlhDsa SecretKey members to PrivateKey
    • Renames SecretKey to PrivateKey in MLDsa and SlhDsa post-quantum cryptography APIs to align with .NET 10 naming conventions.
  • OpenRewrite.Recipes.Net6.FindX509PrivateKey
    • Find X509Certificate2.PrivateKey usage (SYSLIB0028)
    • Finds usages of X509Certificate2.PrivateKey which is obsolete (SYSLIB0028). Use GetRSAPrivateKey(), GetECDsaPrivateKey(), or the appropriate algorithm-specific method instead.
  • OpenRewrite.Recipes.Net7.FindRfc2898InsecureCtors
    • Find insecure Rfc2898DeriveBytes constructors (SYSLIB0041)
    • Finds Rfc2898DeriveBytes constructor calls that use default SHA1 or low iteration counts, which are obsolete in .NET 7 (SYSLIB0041). Specify HashAlgorithmName and at least 600,000 iterations.
  • OpenRewrite.Recipes.Net8.FindAesGcmOldConstructor
    • Find AesGcm constructor without tag size (SYSLIB0053)
    • Finds new AesGcm(key) constructor calls without an explicit tag size parameter. In .NET 8, the single-argument constructor is obsolete (SYSLIB0053). Use new AesGcm(key, tagSizeInBytes) instead.
  • OpenRewrite.Recipes.Net9.FindSafeEvpPKeyHandleDuplicate
    • Find SafeEvpPKeyHandle.DuplicateHandle up-ref change
    • Finds calls to SafeEvpPKeyHandle.DuplicateHandle(). In .NET 9, this method now increments the reference count instead of creating a deep copy, which may affect handle lifetime.
  • OpenRewrite.Recipes.Net9.FindX509CertificateConstructors
    • Find obsolete X509Certificate2/X509Certificate constructors (SYSLIB0057)
    • Finds usages of X509Certificate2 and X509Certificate constructors that accept binary content or file paths, which are obsolete in .NET 9 (SYSLIB0057). Use X509CertificateLoader methods instead.
  • OpenRewrite.Recipes.Net9.UseX509CertificateLoader
    • Use X509CertificateLoader (SYSLIB0057)
    • Replace new X509Certificate2(path, password) with X509CertificateLoader.LoadPkcs12FromFile(path, password). The two-argument X509Certificate2 constructor is obsolete in .NET 9 (SYSLIB0057).

csharp

480 recipes

cucumber

5 recipes

CVE

3 recipes

  • org.openrewrite.java.logging.log4j.UpgradeLog4J2DependencyVersion
  • org.openrewrite.java.security.FindTextDirectionChanges
    • Find text-direction changes
    • 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.
    • Tags: CVE-2021-42574
  • org.openrewrite.java.security.spring.InsecureSpringServiceExporter
    • Secure Spring service exporters
    • 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.
    • Tags: CVE-2016-1000027

CWE

28 recipes

  • org.openrewrite.apache.httpclient4.MigrateDefaultHttpClient
    • Migrates deprecated DefaultHttpClient
    • 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.
    • Tags: CWE-326
  • org.openrewrite.java.security.FixCwe338
    • Fix CWE-338 with SecureRandom
    • Use a cryptographically strong pseudo-random number generator (PRNG).
    • Tags: CWE-338
  • org.openrewrite.java.security.FixCwe918
    • Remediate server-side request forgery (SSRF)
    • Inserts a guard that validates URLs constructed from user-controlled input do not target internal network addresses, blocking server-side request forgery (SSRF) attacks.
    • Tags: CWE-918
  • org.openrewrite.java.security.ImproperPrivilegeManagement
    • Improper privilege management
    • 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.
    • Tags: CWE-269
  • org.openrewrite.java.security.Owasp2025A03
    • Remediate OWASP A03:2025 Software supply chain failures
    • OWASP A03:2025 describes failures related to the software supply chain, including vulnerable and outdated components. Expanded from A06:2021 Vulnerable and Outdated Components.
    • Tags: CWE-1104, CWE-1395, CWE-477
  • org.openrewrite.java.security.Owasp2025A04
    • Remediate OWASP A04:2025 Cryptographic failures
    • OWASP A04:2025 describes failures related to cryptography (or lack thereof), which often lead to exposure of sensitive data. Previously A02:2021.
    • Tags: CWE-326, CWE-327, CWE-329, CWE-330, CWE-338, CWE-759, CWE-760, CWE-780, CWE-916
  • org.openrewrite.java.security.PartialPathTraversalVulnerability
    • Partial path traversal vulnerability
    • 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 "/usr/outnot".startsWith("/usr/out"). 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("/var")) will print /var, but println(new File("/var", "/") will print /var/; however, println(new File("/var", "/").getCanonicalPath()) will print /var.
    • Tags: CWE-22
  • org.openrewrite.java.security.SecureTempFileCreation
    • Use secure temporary file creation
    • java.io.File.createTempFile() has exploitable default file permissions. This recipe migrates to the more secure java.nio.file.Files.createTempFile().
    • Tags: CWE-377
  • org.openrewrite.java.security.UseFilesCreateTempDirectory
    • Use Files#createTempDirectory
    • Use Files#createTempDirectory when the sequence File#createTempFile(..)->File#delete()->File#mkdir() is used for creating a temp directory.
    • Tags: CWE-377, CWE-379
  • org.openrewrite.java.security.XmlParserXXEVulnerability
    • XML parser XXE vulnerability
    • Avoid exposing dangerous features of the XML parser by updating certain factory settings.
    • Tags: CWE-611
  • org.openrewrite.java.security.ZipSlip
    • Zip slip
    • 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.
    • Tags: CWE-22
  • org.openrewrite.java.security.marshalling.InsecureJmsDeserialization
    • Insecure JMS deserialization
    • 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.
    • Tags: CWE-502
  • org.openrewrite.java.security.marshalling.SecureJacksonDefaultTyping
    • Secure the use of Jackson default typing
    • See the blog post on this subject.
    • Tags: CWE-502, CWE-94
  • org.openrewrite.java.security.marshalling.SecureSnakeYamlConstructor
    • Secure the use of SnakeYAML's constructor
    • See the paper on this subject.
    • Tags: CWE-502, CWE-94
  • org.openrewrite.java.security.search.FindHardcodedIv
    • Find hardcoded initialization vectors
    • Finds IvParameterSpec constructed with hardcoded byte arrays or string literals. A static IV makes CBC and other modes deterministic, enabling chosen-plaintext attacks. IVs should be generated randomly using SecureRandom for each encryption operation.
    • Tags: CWE-329
  • org.openrewrite.java.security.search.FindInadequateKeySize
    • Find inadequate cryptographic key sizes
    • Finds cryptographic key generation with inadequate key sizes. RSA keys should be at least 2048 bits, DSA keys at least 2048 bits, EC keys at least 256 bits, and symmetric keys (AES) at least 128 bits. NIST recommends RSA-2048+ and AES-128+ as minimum for all new applications.
    • Tags: CWE-326
  • org.openrewrite.java.security.search.FindPermissiveCorsConfiguration
    • Find permissive CORS configuration
    • Finds overly permissive CORS configurations that allow all origins, which can expose the application to cross-domain attacks.
    • Tags: CWE-942
  • org.openrewrite.java.security.search.FindPredictableSalt
    • Find predictable cryptographic salts
    • Finds PBEParameterSpec and PBEKeySpec constructed with hardcoded salt byte arrays. A predictable salt undermines the purpose of salting, making rainbow table and precomputation attacks feasible. Salts should be generated randomly using SecureRandom.
    • Tags: CWE-760
  • org.openrewrite.java.security.search.FindRsaWithoutOaep
    • Find RSA encryption without OAEP padding
    • Finds uses of RSA encryption with PKCS#1 v1.5 padding or no padding specification. RSA without OAEP padding is vulnerable to padding oracle attacks. Use RSA/ECB/OAEPWithSHA-256AndMGF1Padding or equivalent OAEP mode instead.
    • Tags: CWE-780
  • org.openrewrite.java.security.search.FindWeakCryptoAlgorithm
    • Find weak cryptographic algorithms
    • Finds uses of broken or risky cryptographic algorithms such as MD5, SHA-1, DES, DESede (3DES), RC2, RC4, and Blowfish in calls to Cipher.getInstance(), MessageDigest.getInstance(), Mac.getInstance(), KeyGenerator.getInstance(), and SecretKeyFactory.getInstance().
    • Tags: CWE-327, CWE-328
  • org.openrewrite.java.security.search.FindWeakPasswordHashing
    • Find weak password hashing
    • Finds uses of MessageDigest.getInstance() with algorithms unsuitable for password hashing (MD5, SHA-1, SHA-256, SHA-384, SHA-512). Passwords should be hashed with a purpose-built password hashing function such as bcrypt, scrypt, Argon2, or PBKDF2 that includes a salt and a tunable work factor.
    • Tags: CWE-759, CWE-916
  • org.openrewrite.java.security.servlet.CookieSetHttpOnly
    • Cookies missing HttpOnly flag
    • Check for use of cookies without the HttpOnly flag. Cookies should be marked as HttpOnly to prevent client-side scripts from accessing them, reducing the risk of cross-site scripting (XSS) attacks.
    • Tags: CWE-1004
  • org.openrewrite.java.security.servlet.CookieSetSecure
    • Insecure cookies
    • 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.
    • Tags: CWE-614
  • org.openrewrite.java.security.spring.CsrfProtection
    • Enable CSRF attack prevention
    • 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.
    • Tags: CWE-352
  • org.openrewrite.java.security.spring.PreventClickjacking
    • Prevent clickjacking
    • 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 <frame> or <iframe>. Sites can use this to avoid Clickjacking attacks by ensuring that their content is not embedded into other sites.
    • Tags: CWE-1021
  • org.openrewrite.java.security.spring.RemoveEnableWebSecurityDebug
    • Remove debug mode from Spring Security
    • Removes the debug attribute from @EnableWebSecurity annotations to prevent sensitive security information from being logged in production.
    • Tags: CWE-489
  • org.openrewrite.maven.security.UseHttpsForRepositories
    • Use HTTPS for repositories
    • Use HTTPS for repository URLs.
    • Tags: CWE-829
  • org.openrewrite.staticanalysis.OnlyCatchDeclaredExceptions
    • Replace catch(Exception) with specific declared exceptions thrown in the try block
    • 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.
    • Tags: CWE-396

CycloneDX

1 recipe

  • org.openrewrite.java.dependencies.SoftwareBillOfMaterials
    • Software bill of materials
    • 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

5 recipes

database

5 recipes

datadog

1 recipe

datanucleus

4 recipes

datasource

1 recipe

dbrider

1 recipe

default

1 recipe

demo

2 recipes

DEP0030

1 recipe

  • org.openrewrite.node.migrate.buffer.replace-slow-buffer
    • Replace deprecated SlowBuffer with Buffer.allocUnsafeSlow()
    • Replace deprecated new SlowBuffer(size) calls with Buffer.allocUnsafeSlow(size). SlowBuffer was used to create un-pooled Buffer instances, but has been removed in favor of the explicit Buffer.allocUnsafeSlow() method.

DEP0040

1 recipe

  • org.openrewrite.node.migrate.find-punycode-usage
    • Find deprecated punycode module usage
    • The punycode built-in module was deprecated in Node.js 21 (DEP0040). Use the userland punycode package from npm or url.domainToASCII/url.domainToUnicode instead.

DEP0043

1 recipe

DEP0044

1 recipe

DEP0045

1 recipe

DEP0046

1 recipe

DEP0047

1 recipe

DEP0048

1 recipe

DEP0049

1 recipe

DEP0050

1 recipe

DEP0051

1 recipe

DEP0052

1 recipe

DEP0053

1 recipe

DEP0054

1 recipe

DEP0055

1 recipe

DEP0056

1 recipe

DEP0057

1 recipe

DEP0058

1 recipe

DEP0059

1 recipe

DEP0060

1 recipe

DEP0064

1 recipe

DEP0066

1 recipe

  • org.openrewrite.node.migrate.http.replace-outgoing-message-headers
    • Replace OutgoingMessage._headers and ._headerNames with public methods
    • Replace deprecated OutgoingMessage.prototype._headers with getHeaders(), setHeader(), removeHeader() and OutgoingMessage.prototype._headerNames with getHeaderNames() to address DEP0066 deprecation.

DEP0081

1 recipe

  • org.openrewrite.node.migrate.fs.replace-fs-truncate-fd
    • Replace fs.truncate() with file descriptor to fs.ftruncate()
    • Replace deprecated fs.truncate(fd, ...) and fs.truncateSync(fd, ...) calls with fs.ftruncate(fd, ...) and fs.ftruncateSync(fd, ...) when the first argument is a file descriptor (number).

DEP0093

1 recipe

DEP0100

1 recipe

DEP0106

1 recipe

  • org.openrewrite.node.migrate.crypto.find-create-cipher
    • Find deprecated crypto.createCipher() and crypto.createDecipher() usage
    • crypto.createCipher() and crypto.createDecipher() were deprecated in Node.js 10 (DEP0106) and removed in Node.js 22. Use crypto.createCipheriv() and crypto.createDecipheriv() instead.

DEP0108

1 recipe

DEP0121

1 recipe

DEP0126

1 recipe

DEP0127

1 recipe

DEP0158

1 recipe

DEP0164

1 recipe

DEP0174

1 recipe

  • org.openrewrite.node.migrate.util.remove-promisify-on-promise
    • Remove unnecessary util.promisify() on Promise-returning functions
    • Removes util.promisify() calls on functions that already return a Promise. Since Node.js v17.0.0, calling promisify on a function that returns a Promise emits a runtime deprecation warning (DEP0174).

DEP0176

1 recipe

  • org.openrewrite.node.migrate.fs.replace-fs-access-constants
    • Replace deprecated fs.F_OK, fs.R_OK, fs.W_OK, fs.X_OK with fs.constants.*
    • Replace deprecated file access constants (fs.F_OK, fs.R_OK, fs.W_OK, fs.X_OK) with their equivalents from fs.constants. These constants were removed in Node.js v24+ and should be accessed through the constants namespace.

DEP0177

1 recipe

DEP0178

1 recipe

DEP0179

1 recipe

  • org.openrewrite.node.migrate.crypto.replace-hash-constructor
    • Replace deprecated new crypto.Hash() and new crypto.Hmac() with factory methods
    • Replace deprecated new crypto.Hash(algorithm) constructor calls with crypto.createHash(algorithm) and new crypto.Hmac(algorithm, key) with crypto.createHmac(algorithm, key) factory methods.

DEP0180

1 recipe

DEP0181

1 recipe

  • org.openrewrite.node.migrate.crypto.replace-hash-constructor
    • Replace deprecated new crypto.Hash() and new crypto.Hmac() with factory methods
    • Replace deprecated new crypto.Hash(algorithm) constructor calls with crypto.createHash(algorithm) and new crypto.Hmac(algorithm, key) with crypto.createHmac(algorithm, key) factory methods.

DEP0189

1 recipe

DEP0192

1 recipe

DEP0193

1 recipe

dependabot

4 recipes

dependencies

7 recipes

deployment

2 recipes

deprecated

18 recipes

deprecation

5 recipes

derby

2 recipes

descriptors

2 recipes

devtools

1 recipe

di

1 recipe

  • OpenRewrite.Recipes.Net10.FindKeyedServiceAnyKey
    • Find KeyedService.AnyKey behavior change
    • Finds usages of KeyedService.AnyKey which has changed behavior in .NET 10. GetKeyedService(AnyKey) now throws InvalidOperationException and GetKeyedServices(AnyKey) no longer returns AnyKey registrations.

diagnostics

3 recipes

  • OpenRewrite.Recipes.Net10.FindActivitySampling
    • Find ActivitySamplingResult.PropagationData behavior change
    • Finds usages of ActivitySamplingResult.PropagationData which has changed behavior in .NET 10. Activities with a recorded parent and PropagationData sampling no longer set Activity.Recorded = true.
  • OpenRewrite.Recipes.Net10.FindDistributedContextPropagator
    • Find DistributedContextPropagator default propagator change
    • Finds usages of DistributedContextPropagator.Current and DistributedContextPropagator.CreateDefaultPropagator() which now default to W3C format in .NET 10. The 'baggage' header is used instead of 'Correlation-Context'.
  • OpenRewrite.Recipes.Net9.FindIncrementingPollingCounter
    • Find IncrementingPollingCounter async callback change
    • Finds new IncrementingPollingCounter() constructor calls. In .NET 9, the initial callback invocation is asynchronous instead of synchronous, which may change timing behavior.

docker

3 recipes

  • org.openrewrite.docker.DockerBestPractices
    • Apply Docker best practices
    • Apply a set of Docker best practices to Dockerfiles. This recipe applies security hardening, build optimization, and maintainability improvements based on CIS Docker Benchmark and industry best practices.
  • org.openrewrite.docker.DockerBuildOptimization
    • Optimize Docker builds
    • Apply build optimization best practices to Dockerfiles. This includes combining RUN instructions to reduce layers and adding cleanup commands to reduce image size.
  • org.openrewrite.docker.DockerSecurityBestPractices
    • Apply Docker security best practices
    • Apply security-focused Docker best practices to Dockerfiles. This includes running as a non-root user (CIS 4.1) and using COPY instead of ADD where appropriate (CIS 4.9).

dotnet

122 recipes

  • OpenRewrite.Recipes.AspNet.UpgradeAspNetFrameworkToCore
  • OpenRewrite.Recipes.Net10.FindActionContextAccessorObsolete
    • Find obsolete IActionContextAccessor/ActionContextAccessor (ASPDEPR006)
    • Finds usages of IActionContextAccessor and ActionContextAccessor which are obsolete in .NET 10. Use IHttpContextAccessor and HttpContext.GetEndpoint() instead.
  • OpenRewrite.Recipes.Net10.FindActivitySampling
    • Find ActivitySamplingResult.PropagationData behavior change
    • Finds usages of ActivitySamplingResult.PropagationData which has changed behavior in .NET 10. Activities with a recorded parent and PropagationData sampling no longer set Activity.Recorded = true.
  • OpenRewrite.Recipes.Net10.FindBackgroundServiceExecuteAsync
    • Find BackgroundService.ExecuteAsync behavior change
    • Finds methods that override ExecuteAsync from BackgroundService. In .NET 10, the entire method runs on a background thread; synchronous code before the first await no longer blocks host startup.
  • OpenRewrite.Recipes.Net10.FindBufferedStreamWriteByte
    • Find BufferedStream.WriteByte implicit flush behavior change
    • Finds calls to BufferedStream.WriteByte() which no longer performs an implicit flush when the internal buffer is full in .NET 10. Call Flush() explicitly if needed.
  • OpenRewrite.Recipes.Net10.FindClipboardGetData
    • Find obsolete Clipboard.GetData calls (WFDEV005)
    • Finds calls to Clipboard.GetData(string). In .NET 10, this method is obsolete (WFDEV005). Use Clipboard.TryGetData methods instead.
  • OpenRewrite.Recipes.Net10.FindDistributedContextPropagator
    • Find DistributedContextPropagator default propagator change
    • Finds usages of DistributedContextPropagator.Current and DistributedContextPropagator.CreateDefaultPropagator() which now default to W3C format in .NET 10. The 'baggage' header is used instead of 'Correlation-Context'.
  • OpenRewrite.Recipes.Net10.FindDllImportSearchPath
    • Find DllImportSearchPath.AssemblyDirectory behavior change
    • Finds usages of DllImportSearchPath.AssemblyDirectory which has changed behavior in .NET 10. Specifying only AssemblyDirectory no longer falls back to OS default search paths.
  • OpenRewrite.Recipes.Net10.FindDriveInfoDriveFormat
    • Find DriveInfo.DriveFormat behavior change
    • Finds usages of DriveInfo.DriveFormat which returns Linux kernel filesystem type strings instead of mapped names in .NET 10. Verify that comparisons match the new format.
  • OpenRewrite.Recipes.Net10.FindFormOnClosingObsolete
    • Find obsolete Form.OnClosing/OnClosed usage (WFDEV004)
    • Finds usage of Form.OnClosing, Form.OnClosed, and the Closing/Closed events. In .NET 10, these are obsolete (WFDEV004). Use OnFormClosing/OnFormClosed and FormClosing/FormClosed instead.
  • OpenRewrite.Recipes.Net10.FindGnuTarPaxTarEntry
    • Find GnuTarEntry/PaxTarEntry default timestamp change
    • Finds new GnuTarEntry(...) and new PaxTarEntry(...) constructor calls. In .NET 10, these no longer set atime and ctime by default. Set AccessTime/ChangeTime explicitly if needed.
  • OpenRewrite.Recipes.Net10.FindIpNetworkObsolete
    • Find obsolete IPNetwork/KnownNetworks (ASPDEPR005)
    • Finds usages of Microsoft.AspNetCore.HttpOverrides.IPNetwork and ForwardedHeadersOptions.KnownNetworks which are obsolete in .NET 10. Use System.Net.IPNetwork and KnownIPNetworks instead.
  • OpenRewrite.Recipes.Net10.FindKeyedServiceAnyKey
    • Find KeyedService.AnyKey behavior change
    • Finds usages of KeyedService.AnyKey which has changed behavior in .NET 10. GetKeyedService(AnyKey) now throws InvalidOperationException and GetKeyedServices(AnyKey) no longer returns AnyKey registrations.
  • OpenRewrite.Recipes.Net10.FindMakeGenericSignatureType
    • Find Type.MakeGenericSignatureType validation change
    • Finds calls to Type.MakeGenericSignatureType() which now validates that the first argument is a generic type definition in .NET 10.
  • OpenRewrite.Recipes.Net10.FindQueryableMaxByMinByObsolete
    • Find obsolete Queryable.MaxBy/MinBy with IComparer<TSource> (SYSLIB0061)
    • Finds Queryable.MaxBy and Queryable.MinBy overloads taking IComparer<TSource> which are obsolete in .NET 10. Use the overloads taking IComparer<TKey> instead.
  • OpenRewrite.Recipes.Net10.FindRazorRuntimeCompilationObsolete
    • Find obsolete AddRazorRuntimeCompilation calls (ASPDEPR003)
    • Finds calls to AddRazorRuntimeCompilation which is obsolete in .NET 10. Use Hot Reload instead for development scenarios.
  • OpenRewrite.Recipes.Net10.FindRfc2898DeriveBytesObsolete
    • Find obsolete Rfc2898DeriveBytes constructors (SYSLIB0060)
    • Finds new Rfc2898DeriveBytes(...) constructor calls which are obsolete in .NET 10. Use the static Rfc2898DeriveBytes.Pbkdf2() method instead.
  • OpenRewrite.Recipes.Net10.FindSslAuthEnumTypes
    • Find obsolete SSL authentication enum types
    • Finds usage of ExchangeAlgorithmType, CipherAlgorithmType, and HashAlgorithmType from System.Security.Authentication. These enum types are obsolete in .NET 10 (SYSLIB0058). Use SslStream.NegotiatedCipherSuite instead.
  • OpenRewrite.Recipes.Net10.FindSslStreamObsoleteProperties
    • Find obsolete SslStream cipher properties (SYSLIB0058)
    • Finds usages of SslStream.KeyExchangeAlgorithm, KeyExchangeStrength, CipherAlgorithm, CipherStrength, HashAlgorithm, and HashStrength which are obsolete in .NET 10. Use SslStream.NegotiatedCipherSuite instead.
  • OpenRewrite.Recipes.Net10.FindSystemDrawingExceptionChange
    • Find catch (OutOfMemoryException) that may need ExternalException
    • In .NET 10, System.Drawing GDI+ errors now throw ExternalException instead of OutOfMemoryException. This recipe finds catch blocks that catch OutOfMemoryException which may need to also catch ExternalException.
  • OpenRewrite.Recipes.Net10.FindSystemEventsThreadShutdownObsolete
    • Find obsolete SystemEvents.EventsThreadShutdown (SYSLIB0059)
    • Finds usages of SystemEvents.EventsThreadShutdown which is obsolete in .NET 10. Use AppDomain.ProcessExit instead.
  • OpenRewrite.Recipes.Net10.FindWebHostBuilderObsolete
    • Find obsolete WebHostBuilder/IWebHost/WebHost usage (ASPDEPR004/ASPDEPR008)
    • Finds usages of WebHostBuilder, IWebHost, and WebHost which are obsolete in .NET 10. Migrate to HostBuilder or WebApplicationBuilder instead.
  • OpenRewrite.Recipes.Net10.FindWinFormsObsoleteApis
    • Find obsolete Windows Forms APIs (WFDEV004/005/006)
    • Finds usages of Windows Forms APIs that are obsolete in .NET 10, including Form.OnClosing/OnClosed (WFDEV004), Clipboard.GetData (WFDEV005), and legacy controls like ContextMenu, DataGrid, MainMenu (WFDEV006).
  • OpenRewrite.Recipes.Net10.FindWithOpenApiDeprecated
    • Find deprecated WithOpenApi calls (ASPDEPR002)
    • Finds calls to .WithOpenApi() which is deprecated in .NET 10. Remove the call or use AddOpenApiOperationTransformer instead.
  • OpenRewrite.Recipes.Net10.FindX500DistinguishedNameValidation
    • Find X500DistinguishedName string constructor stricter validation
    • Finds new X500DistinguishedName(string, ...) constructor calls which have stricter validation in .NET 10. Non-Windows environments may reject previously accepted values.
  • OpenRewrite.Recipes.Net10.FindXsltSettingsEnableScriptObsolete
    • Find obsolete XsltSettings.EnableScript (SYSLIB0062)
    • Finds usages of XsltSettings.EnableScript which is obsolete in .NET 10.
  • OpenRewrite.Recipes.Net10.FormOnClosingRename
    • Rename Form.OnClosing/OnClosed to OnFormClosing/OnFormClosed (WFDEV004)
    • Renames Form.OnClosing to OnFormClosing and Form.OnClosed to OnFormClosed for .NET 10 compatibility. Parameter type changes (CancelEventArgsFormClosingEventArgs, EventArgsFormClosedEventArgs) must be updated manually.
  • OpenRewrite.Recipes.Net10.InsertAdjacentElementOrientParameterRename
    • Rename orient parameter to orientation in HtmlElement.InsertAdjacentElement
    • The orient parameter of HtmlElement.InsertAdjacentElement was renamed to orientation in .NET 10. This recipe updates named arguments in method calls to use the new parameter name.
  • OpenRewrite.Recipes.Net10.KnownNetworksRename
    • Rename KnownNetworks to KnownIPNetworks (ASPDEPR005)
    • Renames ForwardedHeadersOptions.KnownNetworks to KnownIPNetworks for .NET 10 compatibility.
  • OpenRewrite.Recipes.Net10.MlDsaSlhDsaSecretKeyToPrivateKey
    • Rename MLDsa/SlhDsa SecretKey members to PrivateKey
    • Renames SecretKey to PrivateKey in MLDsa and SlhDsa post-quantum cryptography APIs to align with .NET 10 naming conventions.
  • OpenRewrite.Recipes.Net10.RazorRuntimeCompilationObsolete
    • Remove obsolete AddRazorRuntimeCompilation calls (ASPDEPR003)
    • Removes AddRazorRuntimeCompilation() calls which are obsolete in .NET 10. Use Hot Reload instead for development scenarios.
  • OpenRewrite.Recipes.Net10.UpgradeToDotNet10
  • OpenRewrite.Recipes.Net10.WithOpenApiDeprecated
    • Remove deprecated WithOpenApi calls (ASPDEPR002)
    • Removes .WithOpenApi() calls which are deprecated in .NET 10. The call is removed from fluent method chains.
  • OpenRewrite.Recipes.Net3_0.FindCompactOnMemoryPressure
    • Find CompactOnMemoryPressure usage (removed in ASP.NET Core 3.0)
    • Finds usages of CompactOnMemoryPressure which was removed from MemoryCacheOptions in ASP.NET Core 3.0.
  • OpenRewrite.Recipes.Net3_0.FindConnectionAdapter
    • Find IConnectionAdapter usage (removed in ASP.NET Core 3.0)
    • Finds usages of IConnectionAdapter which was removed from Kestrel in ASP.NET Core 3.0. Use Connection Middleware instead.
  • OpenRewrite.Recipes.Net3_0.FindHttpContextAuthentication
    • Find HttpContext.Authentication usage (removed in ASP.NET Core 3.0)
    • Finds usages of HttpContext.Authentication which was removed in ASP.NET Core 3.0. Use dependency injection to get IAuthenticationService instead.
  • OpenRewrite.Recipes.Net3_0.FindNewtonsoftJson
    • Find Newtonsoft.Json usage
    • Finds usages of Newtonsoft.Json types (JObject, JArray, JToken, JsonConvert) that should be migrated to System.Text.Json or explicitly preserved via Microsoft.AspNetCore.Mvc.NewtonsoftJson in ASP.NET Core 3.0+.
  • OpenRewrite.Recipes.Net3_0.FindObsoleteLocalizationApis
    • Find obsolete localization APIs (ASP.NET Core 3.0)
    • Finds usages of ResourceManagerWithCultureStringLocalizer and WithCulture() which are obsolete in ASP.NET Core 3.0.
  • OpenRewrite.Recipes.Net3_0.FindSpaServices
    • Find SpaServices/NodeServices usage (obsolete in ASP.NET Core 3.0)
    • Finds usages of SpaServices and NodeServices which are obsolete in ASP.NET Core 3.0.
  • OpenRewrite.Recipes.Net3_0.FindSynchronousIO
    • Find synchronous IO usage (disabled in ASP.NET Core 3.0)
    • Finds references to AllowSynchronousIO which indicates synchronous IO usage that is disabled by default in ASP.NET Core 3.0.
  • OpenRewrite.Recipes.Net3_0.FindUseMvc
    • Find UseMvc/AddMvc usage (replaced in ASP.NET Core 3.0)
    • Finds usages of app.UseMvc(), app.UseMvcWithDefaultRoute(), and services.AddMvc() which should be migrated to endpoint routing and more specific service registration in ASP.NET Core 3.0.
  • OpenRewrite.Recipes.Net3_0.FindWebApiCompatShim
    • Find Web API compatibility shim usage (removed in ASP.NET Core 3.0)
    • Finds usages of ApiController, HttpResponseMessage, and other types from Microsoft.AspNetCore.Mvc.WebApiCompatShim which was removed in ASP.NET Core 3.0.
  • OpenRewrite.Recipes.Net3_0.FindWebHostBuilder
    • Find WebHostBuilder/WebHost.CreateDefaultBuilder usage (replaced in ASP.NET Core 3.0)
    • Finds usages of WebHost.CreateDefaultBuilder() and new WebHostBuilder() which should be migrated to Host.CreateDefaultBuilder() with ConfigureWebHostDefaults() in ASP.NET Core 3.0.
  • OpenRewrite.Recipes.Net3_0.UpgradeToDotNet3_0
  • OpenRewrite.Recipes.Net3_0.UseApiControllerBase
    • Migrate ApiController to ControllerBase
    • Replace ApiController base class (from the removed WebApiCompatShim) with ControllerBase and add the [ApiController] attribute. The shim was removed in ASP.NET Core 3.0.
  • OpenRewrite.Recipes.Net3_1.FindSameSiteNone
    • Find SameSiteMode.None usage (behavior changed in .NET Core 3.1)
    • Finds usages of SameSiteMode.None which changed behavior in .NET Core 3.1 due to Chrome 80 SameSite cookie changes. Apps using remote authentication may need browser sniffing.
  • OpenRewrite.Recipes.Net3_1.UpgradeToDotNet3_1
  • OpenRewrite.Recipes.Net5.FindCodeAccessSecurity
    • Find Code Access Security usage (obsolete in .NET 5)
    • Finds usages of Code Access Security types (SecurityPermission, PermissionSet, etc.) which are obsolete in .NET 5+.
  • OpenRewrite.Recipes.Net5.FindPrincipalPermissionAttribute
    • Find PrincipalPermissionAttribute usage (SYSLIB0003)
    • Finds usages of PrincipalPermissionAttribute which is obsolete in .NET 5+ (SYSLIB0003) and throws NotSupportedException at runtime.
  • OpenRewrite.Recipes.Net5.FindUtf7Encoding
    • Find Encoding.UTF7 usage (SYSLIB0001)
    • Finds usages of Encoding.UTF7 and UTF7Encoding which are obsolete in .NET 5+ (SYSLIB0001). UTF-7 is insecure.
  • OpenRewrite.Recipes.Net5.FindWinHttpHandler
    • Find WinHttpHandler usage (removed in .NET 5)
    • Finds usages of WinHttpHandler which was removed from the .NET 5 runtime. Install the System.Net.Http.WinHttpHandler NuGet package explicitly.
  • OpenRewrite.Recipes.Net5.FindWinRTInterop
    • Find WinRT interop usage (removed in .NET 5)
    • Finds usages of WinRT interop types (WindowsRuntimeType, WindowsRuntimeMarshal, etc.) which were removed in .NET 5.
  • OpenRewrite.Recipes.Net5.UpgradeToDotNet5
  • OpenRewrite.Recipes.Net6.FindAssemblyCodeBase
    • Find Assembly.CodeBase/EscapedCodeBase usage (SYSLIB0012)
    • Finds usages of Assembly.CodeBase and Assembly.EscapedCodeBase which are obsolete (SYSLIB0012). Use Assembly.Location instead.
  • OpenRewrite.Recipes.Net6.FindIgnoreNullValues
    • Find JsonSerializerOptions.IgnoreNullValues usage (SYSLIB0020)
    • Finds usages of JsonSerializerOptions.IgnoreNullValues which is obsolete in .NET 6 (SYSLIB0020). Use DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull instead.
  • OpenRewrite.Recipes.Net6.FindThreadAbort
    • Find Thread.Abort usage (SYSLIB0006)
    • Finds calls to Thread.Abort() which throws PlatformNotSupportedException in .NET 6+ (SYSLIB0006). Use CancellationToken for cooperative cancellation instead.
  • OpenRewrite.Recipes.Net6.FindWebRequest
    • Find WebRequest/HttpWebRequest/WebClient usage (SYSLIB0014)
    • Finds usages of WebRequest, HttpWebRequest, and WebClient which are obsolete in .NET 6 (SYSLIB0014). Use HttpClient instead.
  • OpenRewrite.Recipes.Net6.FindX509PrivateKey
    • Find X509Certificate2.PrivateKey usage (SYSLIB0028)
    • Finds usages of X509Certificate2.PrivateKey which is obsolete (SYSLIB0028). Use GetRSAPrivateKey(), GetECDsaPrivateKey(), or the appropriate algorithm-specific method instead.
  • OpenRewrite.Recipes.Net6.UpgradeToDotNet6
  • OpenRewrite.Recipes.Net6.UseEnvironmentCurrentManagedThreadId
    • Use Environment.CurrentManagedThreadId
    • Replace Thread.CurrentThread.ManagedThreadId with Environment.CurrentManagedThreadId (CA1840). Available since .NET 6.
  • OpenRewrite.Recipes.Net6.UseEnvironmentProcessId
    • Use Environment.ProcessId
    • Replace Process.GetCurrentProcess().Id with Environment.ProcessId (CA1837). Available since .NET 6.
  • OpenRewrite.Recipes.Net6.UseEnvironmentProcessPath
    • Use Environment.ProcessPath
    • Replace Process.GetCurrentProcess().MainModule.FileName with Environment.ProcessPath (CA1839). Available since .NET 6.
  • OpenRewrite.Recipes.Net6.UseLinqDistinctBy
    • Use LINQ DistinctBy()
    • Replace collection.GroupBy(selector).Select(g => g.First()) with collection.DistinctBy(selector). Available since .NET 6.
  • OpenRewrite.Recipes.Net6.UseLinqMaxMinBy
    • Use LINQ MaxBy() and MinBy()
    • Replace collection.OrderByDescending(selector).First() with collection.MaxBy(selector) and collection.OrderBy(selector).First() with collection.MinBy(selector). Also handles .Last() variants (OrderBy().Last() → MaxBy, OrderByDescending().Last() → MinBy). Note: MinBy/MaxBy return default for empty reference-type sequences instead of throwing. Available since .NET 6.
  • OpenRewrite.Recipes.Net6.UseRandomShared
    • Use Random.Shared
    • Replace new Random().Method(...) with Random.Shared.Method(...). Available since .NET 6.
  • OpenRewrite.Recipes.Net6.UseStringContainsChar
    • Use string.Contains(char) overload
    • Finds calls to string.Contains("x") with a single-character string literal that could use the string.Contains('x') overload for better performance.
  • OpenRewrite.Recipes.Net6.UseStringStartsEndsWithChar
    • Use string.StartsWith(char)/EndsWith(char) overload
    • Finds calls to string.StartsWith("x") and string.EndsWith("x") with a single-character string literal that could use the char overload for better performance.
  • OpenRewrite.Recipes.Net6.UseThrowIfNull
    • Use ArgumentNullException.ThrowIfNull()
    • Replace if (x == null) throw new ArgumentNullException(nameof(x)) guard clauses with ArgumentNullException.ThrowIfNull(x) (CA1510). Handles == null, is null, reversed null ==, string literal param names, and braced then-blocks. Available since .NET 6.
  • OpenRewrite.Recipes.Net7.FindObsoleteSslProtocols
    • Find obsolete SslProtocols.Tls/Tls11 usage (SYSLIB0039)
    • Finds usages of SslProtocols.Tls and SslProtocols.Tls11 which are obsolete in .NET 7 (SYSLIB0039). Use SslProtocols.Tls12, SslProtocols.Tls13, or SslProtocols.None instead.
  • OpenRewrite.Recipes.Net7.FindRfc2898InsecureCtors
    • Find insecure Rfc2898DeriveBytes constructors (SYSLIB0041)
    • Finds Rfc2898DeriveBytes constructor calls that use default SHA1 or low iteration counts, which are obsolete in .NET 7 (SYSLIB0041). Specify HashAlgorithmName and at least 600,000 iterations.
  • OpenRewrite.Recipes.Net7.UpgradeToDotNet7
  • OpenRewrite.Recipes.Net7.UseLinqOrder
    • Use LINQ Order() and OrderDescending()
    • Replace collection.OrderBy(x => x) with collection.Order() and collection.OrderByDescending(x => x) with collection.OrderDescending(). Available since .NET 7.
  • OpenRewrite.Recipes.Net7.UseThrowIfNegative
    • Use ArgumentOutOfRangeException.ThrowIfNegative()
    • Replace if (value < 0) throw new ArgumentOutOfRangeException(nameof(value)) guard clauses with ArgumentOutOfRangeException.ThrowIfNegative(value). Also handles reversed 0 > value. Available since .NET 7.
  • OpenRewrite.Recipes.Net7.UseThrowIfNegativeOrZero
    • Use ArgumentOutOfRangeException.ThrowIfNegativeOrZero()
    • Replace if (value <= 0) throw new ArgumentOutOfRangeException(nameof(value)) guard clauses with ArgumentOutOfRangeException.ThrowIfNegativeOrZero(value). Also handles reversed 0 >= value. Available since .NET 7.
  • OpenRewrite.Recipes.Net7.UseThrowIfNullOrEmpty
    • Use ArgumentException.ThrowIfNullOrEmpty()
    • Replace if (string.IsNullOrEmpty(s)) throw new ArgumentException("...", nameof(s)) guard clauses with ArgumentException.ThrowIfNullOrEmpty(s). Available since .NET 7.
  • OpenRewrite.Recipes.Net8.FindAddContext
    • Find JsonSerializerOptions.AddContext usage (SYSLIB0049)
    • Finds calls to JsonSerializerOptions.AddContext<T>() which is obsolete in .NET 8 (SYSLIB0049). Use TypeInfoResolverChain or TypeInfoResolver instead.
  • OpenRewrite.Recipes.Net8.FindAesGcmOldConstructor
    • Find AesGcm constructor without tag size (SYSLIB0053)
    • Finds new AesGcm(key) constructor calls without an explicit tag size parameter. In .NET 8, the single-argument constructor is obsolete (SYSLIB0053). Use new AesGcm(key, tagSizeInBytes) instead.
  • OpenRewrite.Recipes.Net8.FindFormatterBasedSerialization
    • Find formatter-based serialization types (SYSLIB0050/0051)
    • Finds usage of formatter-based serialization types (FormatterConverter, IFormatter, ObjectIDGenerator, ObjectManager, SurrogateSelector, SerializationInfo, StreamingContext). These are obsolete in .NET 8 (SYSLIB0050/0051).
  • OpenRewrite.Recipes.Net8.FindFrozenCollection
    • Find ToImmutable() that could use Frozen collections*
    • Finds usages of ToImmutableDictionary() and ToImmutableHashSet(). In .NET 8+, ToFrozenDictionary() and ToFrozenSet() provide better read performance.
  • OpenRewrite.Recipes.Net8.FindRegexCompileToAssembly
    • Find Regex.CompileToAssembly usage (SYSLIB0052)
    • Finds usage of Regex.CompileToAssembly() and RegexCompilationInfo. These are obsolete in .NET 8 (SYSLIB0052). Use the Regex source generator instead.
  • OpenRewrite.Recipes.Net8.FindSerializationConstructors
    • Find legacy serialization constructors (SYSLIB0051)
    • Finds legacy serialization constructors .ctor(SerializationInfo, StreamingContext) which are obsolete in .NET 8 (SYSLIB0051). The ISerializable pattern is no longer recommended.
  • OpenRewrite.Recipes.Net8.FindTimeAbstraction
    • Find DateTime.Now/UtcNow usage (TimeProvider in .NET 8)
    • Finds usages of DateTime.Now, DateTime.UtcNow, DateTimeOffset.Now, and DateTimeOffset.UtcNow. In .NET 8+, TimeProvider is the recommended abstraction for time.
  • OpenRewrite.Recipes.Net8.UpgradeToDotNet8
  • OpenRewrite.Recipes.Net8.UseThrowIfGreaterThan
    • Use ArgumentOutOfRangeException.ThrowIfGreaterThan()
    • Replace if (value > other) throw new ArgumentOutOfRangeException(nameof(value)) guard clauses with ArgumentOutOfRangeException.ThrowIfGreaterThan(value, other). Also handles reversed other < value and >=/ThrowIfGreaterThanOrEqual. Available since .NET 8.
  • OpenRewrite.Recipes.Net8.UseThrowIfLessThan
    • Use ArgumentOutOfRangeException.ThrowIfLessThan()
    • Replace if (value < other) throw new ArgumentOutOfRangeException(nameof(value)) guard clauses with ArgumentOutOfRangeException.ThrowIfLessThan(value, other). Also handles reversed other > value and <=/ThrowIfLessThanOrEqual. Available since .NET 8.
  • OpenRewrite.Recipes.Net8.UseThrowIfNullOrWhiteSpace
    • Use ArgumentException.ThrowIfNullOrWhiteSpace()
    • Replace if (string.IsNullOrWhiteSpace(s)) throw new ArgumentException("...", nameof(s)) guard clauses with ArgumentException.ThrowIfNullOrWhiteSpace(s). Available since .NET 8.
  • OpenRewrite.Recipes.Net8.UseThrowIfZero
    • Use ArgumentOutOfRangeException.ThrowIfZero()
    • Replace if (value == 0) throw new ArgumentOutOfRangeException(nameof(value)) guard clauses with ArgumentOutOfRangeException.ThrowIfZero(value). Also handles reversed 0 == value. Available since .NET 8.
  • OpenRewrite.Recipes.Net8.UseTimeProvider
    • Use TimeProvider instead of DateTime/DateTimeOffset static properties
    • Replace DateTime.UtcNow, DateTime.Now, DateTimeOffset.UtcNow, and DateTimeOffset.Now with TimeProvider.System.GetUtcNow()/GetLocalNow() equivalents. TimeProvider enables testability and consistent time sources. Available since .NET 8.
  • OpenRewrite.Recipes.Net9.FindAuthenticationManager
    • Find AuthenticationManager usage (SYSLIB0009)
    • Finds usages of AuthenticationManager which is not supported in .NET 9 (SYSLIB0009). Methods will no-op or throw PlatformNotSupportedException.
  • OpenRewrite.Recipes.Net9.FindBinaryFormatter
    • Find BinaryFormatter usage (removed in .NET 9)
    • Finds usages of BinaryFormatter which always throws NotSupportedException in .NET 9. Migrate to a different serializer such as System.Text.Json, XmlSerializer, or DataContractSerializer.
  • OpenRewrite.Recipes.Net9.FindBinaryReaderReadString
    • Find BinaryReader.ReadString behavior change
    • Finds calls to BinaryReader.ReadString() which now returns the Unicode replacement character (\uFFFD) for malformed UTF-8 byte sequences in .NET 9, instead of the previous behavior. Verify your code handles the replacement character correctly.
  • OpenRewrite.Recipes.Net9.FindDistributedCache
    • Find IDistributedCache usage (HybridCache in .NET 9)
    • Finds usages of IDistributedCache. In .NET 9, HybridCache is the recommended replacement with L1/L2 caching, stampede protection, and tag-based invalidation.
  • OpenRewrite.Recipes.Net9.FindEnumConverter
    • Find EnumConverter constructor validation change
    • Finds new EnumConverter() constructor calls. In .NET 9, EnumConverter validates that the registered type is actually an enum and throws ArgumentException if not.
  • OpenRewrite.Recipes.Net9.FindExecuteUpdateSync
    • Find synchronous ExecuteUpdate/ExecuteDelete (EF Core 9)
    • Finds usages of synchronous ExecuteUpdate() and ExecuteDelete() which were removed in EF Core 9. Use ExecuteUpdateAsync/ExecuteDeleteAsync instead.
  • OpenRewrite.Recipes.Net9.FindHttpClientHandlerCast
    • Find HttpClientHandler usage (HttpClientFactory default change)
    • Finds usages of HttpClientHandler which may break when HttpClientFactory switches its default handler to SocketsHttpHandler in .NET 9.
  • OpenRewrite.Recipes.Net9.FindHttpListenerRequestUserAgent
    • Find HttpListenerRequest.UserAgent nullable change
    • Finds accesses to HttpListenerRequest.UserAgent which changed from string to string? in .NET 9. Code that assumes UserAgent is non-null may throw NullReferenceException.
  • OpenRewrite.Recipes.Net9.FindImplicitAuthenticationDefault
    • Find implicit authentication default scheme (ASP.NET Core 9)
    • Finds calls to AddAuthentication() with no arguments. In .NET 9, a single registered authentication scheme is no longer automatically used as the default.
  • OpenRewrite.Recipes.Net9.FindInMemoryDirectoryInfo
    • Find InMemoryDirectoryInfo rootDir prepend change
    • Finds new InMemoryDirectoryInfo() constructor calls. In .NET 9, rootDir is prepended to file paths that don't start with the rootDir, which may change file matching behavior.
  • OpenRewrite.Recipes.Net9.FindIncrementingPollingCounter
    • Find IncrementingPollingCounter async callback change
    • Finds new IncrementingPollingCounter() constructor calls. In .NET 9, the initial callback invocation is asynchronous instead of synchronous, which may change timing behavior.
  • OpenRewrite.Recipes.Net9.FindJsonDocumentNullable
    • Find JsonSerializer.Deserialize nullable JsonDocument change
    • Finds JsonSerializer.Deserialize() calls. In .NET 9, nullable JsonDocument properties now deserialize to a JsonDocument with RootElement.ValueKind == JsonValueKind.Null instead of being null.
  • OpenRewrite.Recipes.Net9.FindJsonStringEnumConverter
    • Find non-generic JsonStringEnumConverter
    • Finds usages of the non-generic JsonStringEnumConverter. In .NET 9, the generic JsonStringEnumConverter<TEnum> is preferred for AOT compatibility.
  • OpenRewrite.Recipes.Net9.FindRuntimeHelpersGetSubArray
    • Find RuntimeHelpers.GetSubArray return type change
    • Finds calls to RuntimeHelpers.GetSubArray() which may return a different array type in .NET 9. Code that depends on the runtime type of the returned array may break.
  • OpenRewrite.Recipes.Net9.FindSafeEvpPKeyHandleDuplicate
    • Find SafeEvpPKeyHandle.DuplicateHandle up-ref change
    • Finds calls to SafeEvpPKeyHandle.DuplicateHandle(). In .NET 9, this method now increments the reference count instead of creating a deep copy, which may affect handle lifetime.
  • OpenRewrite.Recipes.Net9.FindServicePointManager
    • Find ServicePointManager usage (SYSLIB0014)
    • Finds usages of ServicePointManager which is fully obsolete in .NET 9 (SYSLIB0014). Settings on ServicePointManager don't affect SslStream or HttpClient.
  • OpenRewrite.Recipes.Net9.FindSwashbuckle
    • Find Swashbuckle usage (ASP.NET Core 9 built-in OpenAPI)
    • Finds usages of Swashbuckle APIs (AddSwaggerGen, UseSwagger, UseSwaggerUI). .NET 9 includes built-in OpenAPI support. Consider migrating to AddOpenApi()/MapOpenApi().
  • OpenRewrite.Recipes.Net9.FindX509CertificateConstructors
    • Find obsolete X509Certificate2/X509Certificate constructors (SYSLIB0057)
    • Finds usages of X509Certificate2 and X509Certificate constructors that accept binary content or file paths, which are obsolete in .NET 9 (SYSLIB0057). Use X509CertificateLoader methods instead.
  • OpenRewrite.Recipes.Net9.FindZipArchiveCompressionLevel
    • Find ZipArchive.CreateEntry with CompressionLevel (bit flag change)
    • Finds ZipArchive.CreateEntry() and ZipFileExtensions.CreateEntryFromFile() calls with a CompressionLevel parameter. In .NET 9, the CompressionLevel value now sets general-purpose bit flags in the ZIP central directory header, which may affect interoperability.
  • OpenRewrite.Recipes.Net9.FindZipArchiveEntryEncoding
    • Find ZipArchiveEntry name/comment UTF-8 encoding change
    • Finds access to ZipArchiveEntry.Name, FullName, or Comment properties. In .NET 9, these now respect the UTF-8 flag in ZIP entries, which may change decoded values.
  • OpenRewrite.Recipes.Net9.MigrateSwashbuckleToOpenApi
    • Migrate Swashbuckle to built-in OpenAPI
    • Migrate from Swashbuckle to the built-in OpenAPI support in ASP.NET Core 9. Replaces AddSwaggerGen() with AddOpenApi(), UseSwaggerUI() with MapOpenApi(), removes UseSwagger(), removes Swashbuckle packages, and adds Microsoft.AspNetCore.OpenApi.
  • OpenRewrite.Recipes.Net9.RemoveConfigureAwaitFalse
    • Remove ConfigureAwait(false)
    • Remove .ConfigureAwait(false) calls that are unnecessary in ASP.NET Core and modern .NET applications (no SynchronizationContext). Do not apply to library code targeting .NET Framework.
  • OpenRewrite.Recipes.Net9.UpgradeToDotNet9
  • OpenRewrite.Recipes.Net9.UseEscapeSequenceE
    • Use \e escape sequence
    • Replace \u001b and \x1b escape sequences with \e. C# 13 introduced \e as a dedicated escape sequence for the escape character (U+001B).
  • OpenRewrite.Recipes.Net9.UseFrozenCollections
    • Use Frozen collections instead of Immutable
    • Replace ToImmutableDictionary() with ToFrozenDictionary() and ToImmutableHashSet() with ToFrozenSet(). Frozen collections (.NET 8+) provide better read performance for collections populated once and read many times.
  • OpenRewrite.Recipes.Net9.UseGuidCreateVersion7
    • Use Guid.CreateVersion7()
    • Replace Guid.NewGuid() with Guid.CreateVersion7(). Version 7 GUIDs are time-ordered and better for database primary keys, indexing, and sorting. Available since .NET 9.
  • OpenRewrite.Recipes.Net9.UseLinqAggregateBy
    • Use LINQ AggregateBy()
    • Replace collection.GroupBy(keySelector).ToDictionary(g => g.Key, g => g.Aggregate(seed, func)) with collection.AggregateBy(keySelector, seed, func).ToDictionary(). Available since .NET 9.
  • OpenRewrite.Recipes.Net9.UseLinqCountBy
    • Use LINQ CountBy()
    • Replace collection.GroupBy(selector).Select(g => g.Count()) with collection.CountBy(selector). Available since .NET 9.
  • OpenRewrite.Recipes.Net9.UseLinqIndex
    • Use LINQ Index()
    • Replace collection.Select((item, index) => (index, item)) with collection.Index(). Available since .NET 9.
  • OpenRewrite.Recipes.Net9.UseLockObject
    • Use System.Threading.Lock for lock fields
    • Replace object fields initialized with new object() with System.Threading.Lock initialized with new(). The Lock type provides better performance with the lock statement. Available since .NET 9.
  • OpenRewrite.Recipes.Net9.UseMapStaticAssets
    • Use MapStaticAssets()
    • Replace UseStaticFiles() with MapStaticAssets() for ASP.NET Core 9. Only applies when the receiver supports IEndpointRouteBuilder (WebApplication / minimal hosting). Skips Startup.cs patterns using IApplicationBuilder where MapStaticAssets is not available.
  • OpenRewrite.Recipes.Net9.UseTaskCompletedTask
    • Use Task.CompletedTask
    • Replace Task.FromResult(0), Task.FromResult(true), and Task.FromResult(false) with Task.CompletedTask when the return type is Task (not Task<T>).
  • OpenRewrite.Recipes.Net9.UseVolatileReadWrite
    • Use Volatile.Read/Write (SYSLIB0054)
    • Replace Thread.VolatileRead and Thread.VolatileWrite with Volatile.Read and Volatile.Write. The Thread methods are obsolete in .NET 9 (SYSLIB0054).
  • OpenRewrite.Recipes.Net9.UseX509CertificateLoader
    • Use X509CertificateLoader (SYSLIB0057)
    • Replace new X509Certificate2(path, password) with X509CertificateLoader.LoadPkcs12FromFile(path, password). The two-argument X509Certificate2 constructor is obsolete in .NET 9 (SYSLIB0057).

dropwizard

1 recipe

easymock

1 recipe

efcore

1 recipe

  • OpenRewrite.Recipes.Net9.FindExecuteUpdateSync
    • Find synchronous ExecuteUpdate/ExecuteDelete (EF Core 9)
    • Finds usages of synchronous ExecuteUpdate() and ExecuteDelete() which were removed in EF Core 9. Use ExecuteUpdateAsync/ExecuteDeleteAsync instead.

ejb

7 recipes

elasticsearch

11 recipes

  • io.moderne.elastic.elastic9.ChangeApiNumericFieldTypes
    • Change numeric field types for Elasticsearch 9
    • 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.
  • io.moderne.elastic.elastic9.MigrateDenseVectorElementType
    • Migrate DenseVectorProperty.elementType from String to DenseVectorElementType enum
    • 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.
  • io.moderne.elastic.elastic9.MigrateDenseVectorSimilarity
    • Migrate DenseVectorProperty.similarity from String to DenseVectorSimilarity enum
    • 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.
  • io.moderne.elastic.elastic9.MigrateMatchedQueries
    • Migrate matchedQueries from List to Map
    • 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.
  • io.moderne.elastic.elastic9.MigrateScriptSource
    • Migrate script source from String to Script/ScriptSource
    • Migrates Script.source(String) calls to use ScriptSource.scriptString(String) wrapper in Elasticsearch Java client 9.x.
  • io.moderne.elastic.elastic9.MigrateSpanTermQueryValue
    • Migrate SpanTermQuery.value() from String to FieldValue
    • 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.
  • io.moderne.elastic.elastic9.MigrateToElasticsearch9
    • Migrate from Elasticsearch 8 to 9
    • This recipe performs a comprehensive migration from Elasticsearch 8 to Elasticsearch 9, addressing breaking changes, API removals, deprecations, and required code modifications.
  • io.moderne.elastic.elastic9.RenameApiField
    • Rename Elasticsearch valueBody() methods
    • 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.
  • io.moderne.elastic.elastic9.RenameApiFields
    • Rename API fields for Elasticsearch 9
    • Renames various API response fields from valueBody to align with Elasticsearch 9 specifications.
  • io.moderne.elastic.elastic9.UseNamedValueParameters
    • Use NamedValue parameters instead of Map
    • Migrates indicesBoost and dynamicTemplates parameters from Map to NamedValue in Elasticsearch Java client 9.x.
  • org.openrewrite.quarkus.spring.SpringBootElasticsearchToQuarkus
    • Replace Spring Boot Elasticsearch with Quarkus Elasticsearch REST Client
    • Migrates spring-boot-starter-data-elasticsearch to quarkus-elasticsearch-rest-client.

epoll

1 recipe

eslint

190 recipes

events

1 recipe

examples

5 recipes

exposed

4 recipes

  • org.openrewrite.kotlin.exposed.ExposedChangeMethodNames
    • Rename Exposed deprecated methods for 1.0
    • Rename deprecated Exposed method and property references to their 1.0 replacements.
  • org.openrewrite.kotlin.exposed.ExposedChangeTypes
    • Migrate Exposed type references to 1.0 packages
    • Change fully qualified type references from Exposed 0.x packages to Exposed 1.0 packages. The 1.0 release reorganized all packages under org.jetbrains.exposed.v1.* and split classes across core, jdbc, and dao modules.
  • org.openrewrite.kotlin.exposed.ExposedUpgradeGradleDependencies
    • Upgrade Exposed Gradle dependencies to 1.0
    • Update JetBrains Exposed Gradle dependencies for the 1.0.0 migration. Upgrades dependency versions and handles the exposed-migration module split.
  • org.openrewrite.kotlin.exposed.UpgradeToExposed_1
    • Migrate to JetBrains Exposed 1.0
    • Migrate from JetBrains Exposed 0.x to 1.0.0. This includes package reorganization (adding v1 prefix), type moves between modules, class renames, method renames, and Gradle dependency updates. Some changes require manual intervention and are not covered by this recipe: Table.uuid() should be changed to Table.javaUUID() for java.util.UUID values, DateColumnType with constructor parameter time=false or time=true should be split into JodaLocalDateColumnType or JodaLocalDateTimeColumnType, SqlExpressionBuilder.* usages should be replaced with top-level function imports, and Statement.execute() calls should use BlockingExecutable wrapping.

f

2 recipes

faces

29 recipes

flyway

5 recipes

formatting

1 recipe

framework

14 recipes

  • io.moderne.java.spring.framework.FindDeprecatedPathMatcherUsage
    • Find deprecated PathMatcher usage
    • In Spring Framework 7.0, PathMatcher and AntPathMatcher are deprecated in favor of PathPatternParser. This recipe finds usages of the deprecated AntPathMatcher class that may require manual migration to PathPatternParser.
  • io.moderne.java.spring.framework.MigrateDefaultResponseErrorHandler
    • Migrate DefaultResponseErrorHandler.handleError method signature
    • 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.
  • io.moderne.java.spring.framework.RemoveDeprecatedPathMappingOptions
    • Migrate deprecated path mapping options
    • Migrates deprecated path mapping configuration options that have been removed in Spring Framework 7.0. For trailing slash matching, this recipe adds explicit dual routes to controller methods before removing the deprecated configuration. For suffix pattern matching, this recipe flags usages for manual review since there is no automatic migration path. Path extension content negotiation options are removed as they should be replaced with query parameter-based negotiation.
  • io.moderne.java.spring.framework.RemovePathExtensionContentNegotiation
    • Remove path extension content negotiation methods
    • Remove calls to favorPathExtension() and ignoreUnknownPathExtensions() on ContentNegotiationConfigurer. These methods and the underlying PathExtensionContentNegotiationStrategy were removed in Spring Framework 7.0. Path extension content negotiation was deprecated due to URI handling issues. Use query parameter-based negotiation with favorParameter(true) as an alternative.
  • io.moderne.java.spring.framework.jsf23.MigrateFacesConfig
    • Migrate JSF variable-resolver to el-resolver
    • Migrates JSF faces-config.xml from namespaces, tags and values that was deprecated in JSF 1.2 and removed in later versions, to the JSF 2.3 compatible constructs.
  • io.moderne.java.spring.framework7.FindRemovedAPIs
    • Find removed APIs in Spring Framework 7.0
    • Finds usages of APIs that were removed in Spring Framework 7.0 and require manual intervention. This includes Theme support, OkHttp3 integration, and servlet view document/feed classes which have no direct automated replacement.
  • io.moderne.java.spring.framework7.MigrateDeprecatedAPIs
    • Migrate deprecated APIs removed in Spring Framework 7.0
    • Migrates deprecated APIs that were removed in Spring Framework 7.0. This includes ListenableFuture to CompletableFuture migration.
  • io.moderne.java.spring.framework7.MigrateHttpStatusToRfc9110
    • Migrate HttpStatus enum values to RFC 9110 names
    • Spring Framework 7.0 aligns HttpStatus enum values with RFC 9110. This recipe replaces deprecated status code constants with their RFC 9110 equivalents: PAYLOAD_TOO_LARGE becomes CONTENT_TOO_LARGE and UNPROCESSABLE_ENTITY becomes UNPROCESSABLE_CONTENT.
  • io.moderne.java.spring.framework7.MigrateJmsDestinationResolver
    • Preserve DynamicDestinationResolver behavior for JmsTemplate
    • Spring Framework 7.0 changed the default DestinationResolver for JmsTemplate from DynamicDestinationResolver to SimpleDestinationResolver, which caches Session-resolved Queue and Topic instances. This recipe explicitly configures DynamicDestinationResolver to preserve the pre-7.0 behavior. The caching behavior of SimpleDestinationResolver should be fine for most JMS brokers, so this explicit configuration can be removed once verified.
  • io.moderne.java.spring.framework7.RemoveSpringJcl
    • Remove spring-jcl dependency
    • The spring-jcl module has been removed in Spring Framework 7.0 in favor of Apache Commons Logging 1.3.0. This recipe removes any explicit dependency on org.springframework:spring-jcl. The change should be transparent for most applications, as spring-jcl was typically a transitive dependency and the logging API calls (org.apache.commons.logging.*) remain unchanged.
  • io.moderne.java.spring.framework7.RenameMemberCategoryConstants
    • Rename MemberCategory field constants for Spring Framework 7.0
    • Renames deprecated MemberCategory constants to their new names in Spring Framework 7.0. MemberCategory.PUBLIC_FIELDS is renamed to MemberCategory.INVOKE_PUBLIC_FIELDS and MemberCategory.DECLARED_FIELDS is renamed to MemberCategory.INVOKE_DECLARED_FIELDS. These renames clarify the original intent of these categories and align with the rest of the API.
  • io.moderne.java.spring.framework7.RenameRequestContextJstlPresent
    • Rename RequestContext.jstPresent to JSTL_PRESENT
    • Renames the protected static field RequestContext.jstPresent to JSTL_PRESENT in Spring Framework 7.0. This field was renamed as part of a codebase-wide effort to use uppercase for classpath-related static final field names (see https://github.com/spring-projects/spring-framework/issues/35525).
  • io.moderne.java.spring.framework7.UpdateGraalVmNativeHints
    • Update GraalVM native reflection hints for Spring Framework 7.0
    • Migrates GraalVM native reflection hints to Spring Framework 7.0 conventions. Spring Framework 7.0 adopts the unified reachability metadata format for GraalVM. This recipe renames deprecated MemberCategory constants and simplifies reflection hint registrations where explicit member categories are no longer needed.
  • io.moderne.java.spring.framework7.UpgradeSpringFramework_7_0
    • Migrate to Spring Framework 7.0
    • Migrates applications to Spring Framework 7.0. This recipe applies all necessary changes including API migrations, removed feature detection, and configuration updates.

functools

1 recipe

future

1 recipe

GCP

15 recipes

github

12 recipes

gitlab

2 recipes

  • org.openrewrite.gitlab.BestPractices
    • GitLab CI best practices
    • Apply GitLab CI/CD best practices to .gitlab-ci.yml. This includes adding workflow:rules to prevent duplicate pipelines, setting interruptible: true and retry in the default section, configuring artifacts:expire_in, and setting a job timeout.
  • org.openrewrite.gitlab.search.FindDeprecatedSyntax
    • Find deprecated GitLab CI syntax
    • Find usages of deprecated only and except keywords in .gitlab-ci.yml. These keywords are deprecated in favor of rules.

glassfish

3 recipes

  • org.openrewrite.java.migrate.javax.AddJaxbDependenciesWithRuntime
    • Add explicit JAXB API dependencies and runtime
    • 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.
  • org.openrewrite.java.migrate.javax.AddJaxbRuntime
    • Use latest JAXB API and runtime for Jakarta EE 8
    • 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.
  • org.openrewrite.java.migrate.javax.AddJaxwsDependencies
    • Add explicit JAX-WS dependencies
    • 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.

globbing

1 recipe

  • OpenRewrite.Recipes.Net9.FindInMemoryDirectoryInfo
    • Find InMemoryDirectoryInfo rootDir prepend change
    • Finds new InMemoryDirectoryInfo() constructor calls. In .NET 9, rootDir is prepended to file paths that don't start with the rootDir, which may change file matching behavior.

graalvm

3 recipes

  • io.moderne.java.spring.framework7.RenameMemberCategoryConstants
    • Rename MemberCategory field constants for Spring Framework 7.0
    • Renames deprecated MemberCategory constants to their new names in Spring Framework 7.0. MemberCategory.PUBLIC_FIELDS is renamed to MemberCategory.INVOKE_PUBLIC_FIELDS and MemberCategory.DECLARED_FIELDS is renamed to MemberCategory.INVOKE_DECLARED_FIELDS. These renames clarify the original intent of these categories and align with the rest of the API.
  • io.moderne.java.spring.framework7.UpdateGraalVmNativeHints
    • Update GraalVM native reflection hints for Spring Framework 7.0
    • Migrates GraalVM native reflection hints to Spring Framework 7.0 conventions. Spring Framework 7.0 adopts the unified reachability metadata format for GraalVM. This recipe renames deprecated MemberCategory constants and simplifies reflection hint registrations where explicit member categories are no longer needed.
  • org.openrewrite.quarkus.spring.ConfigureNativeBuild
    • Configure Quarkus Native Build Support
    • Adds configuration and dependencies required for Quarkus native image compilation with GraalVM. Includes native profile configuration and reflection hints where needed.

gradle

8 recipes

guava

56 recipes

h2

2 recipes

hamcrest

6 recipes

handler

1 recipe

hazelcast

1 recipe

  • io.moderne.java.spring.boot4.MigrateHazelcastSpringSession
    • Migrate Spring Session Hazelcast to Hazelcast Spring Session
    • Spring Boot 4.0 removed direct support for Spring Session Hazelcast. The Hazelcast team now maintains their own Spring Session integration. This recipe changes the dependency from org.springframework.session:spring-session-hazelcast to com.hazelcast.spring:hazelcast-spring-session and updates the package from org.springframework.session.hazelcast to com.hazelcast.spring.session.

health

2 recipes

hibernate

6 recipes

hosting

2 recipes

html

1 recipe

httpclient

5 recipes

inject

3 recipes

integration

1 recipe

intellij

1 recipe

interop

2 recipes

  • OpenRewrite.Recipes.Net10.FindDllImportSearchPath
    • Find DllImportSearchPath.AssemblyDirectory behavior change
    • Finds usages of DllImportSearchPath.AssemblyDirectory which has changed behavior in .NET 10. Specifying only AssemblyDirectory no longer falls back to OS default search paths.
  • OpenRewrite.Recipes.Net5.FindWinRTInterop
    • Find WinRT interop usage (removed in .NET 5)
    • Finds usages of WinRT interop types (WindowsRuntimeType, WindowsRuntimeMarshal, etc.) which were removed in .NET 5.

jackson

25 recipes

  • org.openrewrite.java.jackson.AddJsonCreatorToPrivateConstructors
    • Add @JsonCreator to non-public constructors
    • Jackson 3 strictly enforces creator visibility rules. Non-public constructors in Jackson-annotated classes that were auto-detected in Jackson 2 need an explicit @JsonCreator annotation to work for deserialization in Jackson 3.
    • Tags: jackson-3
  • org.openrewrite.java.jackson.CodehausClassesToFasterXML
    • Migrate classes from Jackson Codehaus (legacy) to Jackson FasterXML
    • In Jackson 2, the package and dependency coordinates moved from Codehaus to FasterXML.
    • Tags: jackson-2
  • org.openrewrite.java.jackson.CodehausToFasterXML
    • Migrate from Jackson Codehaus (legacy) to Jackson FasterXML
    • In Jackson 2, the package and dependency coordinates moved from Codehaus to FasterXML.
    • Tags: jackson-2
  • org.openrewrite.java.jackson.IOExceptionToJacksonException
    • Replace IOException with JacksonException in catch clauses
    • In Jackson 3, ObjectMapper and related classes no longer throw IOException. This recipe replaces catch (IOException e) with catch (JacksonException e) when the try block contains Jackson API calls. When the try block also contains non-Jackson code that throws IOException, the catch is changed to a multi-catch catch (JacksonException | IOException e).
    • Tags: jackson-3
  • org.openrewrite.java.jackson.JacksonBestPractices
    • Jackson best practices
    • Apply best practices for using Jackson library, including upgrade to Jackson 2.x and removing redundant annotations.
    • Tags: jackson-2
  • org.openrewrite.java.jackson.MigrateMapperSettersToBuilder
    • Migrate JsonMapper setter calls to builder pattern
    • In Jackson 3, JsonMapper is immutable. Configuration methods like setFilterProvider, addMixIn, disable, enable, etc. must be called on the builder instead. This recipe migrates setter calls to the builder pattern when safe, or adds TODO comments when automatic migration is not possible.
    • Tags: jackson-3
  • org.openrewrite.java.jackson.RemoveBuiltInModuleRegistrations
    • Remove registrations of modules built-in to Jackson 3
    • 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.
    • Tags: jackson-3
  • org.openrewrite.java.jackson.RemoveRedundantFeatureFlags
    • Remove redundant Jackson 3 feature flag configurations
    • 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.
    • Tags: jackson-3
  • org.openrewrite.java.jackson.RemoveRedundantJsonPropertyValue
    • Remove redundant @JsonProperty argument
    • Remove @JsonProperty annotation or value attribute when the value matches the argument name.
    • Tags: jackson-2
  • org.openrewrite.java.jackson.ReplaceJsonIgnoreWithJsonSetter
    • Replace @JsonIgnore with @JsonSetter on empty collection fields
    • In Jackson 3, @JsonIgnore on fields initialized with empty collections causes the field value to become null instead of maintaining the empty collection. This recipe replaces @JsonIgnore with @JsonSetter(nulls = Nulls.AS_EMPTY) on Map and Collection fields that have an empty collection initializer.
    • Tags: jackson-3
  • org.openrewrite.java.jackson.ReplaceObjectMapperCopy
    • Replace ObjectMapper.copy() with rebuild().build()
    • In Jackson 3, ObjectMapper.copy() was removed. Use mapper.rebuild().build() instead.
    • Tags: jackson-3
  • org.openrewrite.java.jackson.ReplaceStreamWriteCapability
    • Replace removed JsonGenerator capability methods with StreamWriteCapability
    • 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.
    • Tags: jackson-3
  • org.openrewrite.java.jackson.SimplifyJacksonExceptionCatch
    • Simplify catch clauses for Jackson exceptions
    • 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).
    • Tags: jackson-3
  • org.openrewrite.java.jackson.UpdateSerializationInclusionConfiguration
    • Update configuration of serialization inclusion in ObjectMapper for Jackson 3
    • In Jackson 3, mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL) is no longer supported and should be replaced by changeDefaultPropertyInclusion() for both valueInclusion and contentInclusion.
    • Tags: jackson-3
  • org.openrewrite.java.jackson.UpgradeJackson_2_3
    • Migrates from Jackson 2.x to Jackson 3.x
    • 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()).
    • Tags: jackson-3
  • org.openrewrite.java.jackson.UpgradeJackson_2_3_Dependencies
    • Upgrade Jackson 2.x dependencies to 3.x
    • Upgrade Jackson Maven dependencies from 2.x to 3.x versions and update group IDs.
    • Tags: jackson-3
  • org.openrewrite.java.jackson.UpgradeJackson_2_3_JsonGeneratorMethodRenames
    • Rename Jackson 2.x methods to 3.x equivalents for JsonGenerator
    • Rename JsonGenerator methods that were renamed in 3.x (e.g., writeObject() to writePOJO(), getCurrentValue() to currentValue()).
    • Tags: jackson-3
  • org.openrewrite.java.jackson.UpgradeJackson_2_3_JsonNodeMethodRenames
    • Rename Jackson 2.x methods to 3.x equivalents for JsonNode
    • Rename JsonNode methods that were renamed in 3.x (e.g., elements() to values(), fields() to entries()).
    • Tags: jackson-3
  • org.openrewrite.java.jackson.UpgradeJackson_2_3_JsonParserMethodRenames
    • Rename Jackson 2.x methods to 3.x equivalents for JsonParser
    • Rename JsonParser methods that were renamed in 3.x (e.g., getTextCharacters() to getStringCharacters(), getCurrentValue() to currentValue()).
    • Tags: jackson-3
  • org.openrewrite.java.jackson.UpgradeJackson_2_3_MethodRenames
    • Rename Jackson 2.x methods to 3.x equivalents
    • Rename Jackson methods that were renamed in 3.x (e.g., writeObject() to writePOJO(), getCurrentValue() to currentValue()).
    • Tags: jackson-3
  • org.openrewrite.java.jackson.UpgradeJackson_2_3_PackageChanges
    • Update Jackson package names from 2.x to 3.x
    • Update Jackson package imports from com.fasterxml.jackson to tools.jackson.
    • Tags: jackson-3
  • org.openrewrite.java.jackson.UpgradeJackson_2_3_RelocatedFeatureConstants
    • Migrate relocated feature constants to DateTimeFeature and EnumFeature
    • Jackson 3 moved date/time-related feature constants from SerializationFeature and DeserializationFeature into DateTimeFeature, and enum-related constants into EnumFeature.
    • Tags: jackson-3
  • org.openrewrite.java.jackson.UpgradeJackson_2_3_RemoveRedundantFeatureFlags
    • Remove redundant Jackson 3 feature flag configurations
    • Remove ObjectMapper feature flag configurations that are now defaults in Jackson 3.
    • Tags: jackson-3
  • org.openrewrite.java.jackson.UpgradeJackson_2_3_TypeChanges
    • Update Jackson 2.x types to 3.x
    • Update Jackson type names including exception types and core class renames.
    • Tags: jackson-3
  • org.openrewrite.java.jackson.UseModernDateTimeSerialization
    • Use modern date/time serialization defaults
    • 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).
    • Tags: jackson-3

jacoco

1 recipe

jakarta

102 recipes

jakartaee

6 recipes

jasperreports

4 recipes

  • io.moderne.jasperreports.MigrateExporterConfigToJasper6
    • Update JasperReports exporter configuration
    • 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.
  • io.moderne.jasperreports.MigrateXlsToXlsxExporter
    • Migrate JRXlsExporter to JRXlsxExporter
    • Migrates the deprecated JRXlsExporter to the new JRXlsxExporter class in JasperReports 6. Also updates related configuration classes from XLS to XLSX variants.
  • io.moderne.jasperreports.UpgradeToJasperReports5
    • Migrate to JasperReports 5.6.x
    • 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.
  • io.moderne.jasperreports.UpgradeToJasperReports6
    • Migrate to JasperReports 6
    • Migrates JasperReports from 5.x to 6.x with the new exporter API, XLS to XLSX move, and removal of Spring JasperReports views.

java

10 recipes

java10

1 recipe

  • org.openrewrite.java.migrate.lang.UseVar
    • Use local variable type inference
    • 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.

java11

29 recipes

  • org.openrewrite.java.migrate.IBMJDKtoOracleJDK
    • Migrate from IBM Runtimes to Oracle Runtimes
    • 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.
  • org.openrewrite.java.migrate.IBMSemeru
    • Migrate to IBM Semeru Runtimes
    • 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.
  • org.openrewrite.java.migrate.InternalBindPackages
    • Use com.sun.xml.bind.* instead of com.sun.xml.internal.bind.*
    • Do not use APIs from com.sun.xml.internal.bind.* packages.
  • org.openrewrite.java.migrate.JREDoNotUseSunNetSslAPIs
    • Use javax.net.ssl instead of com.sun.net.ssl
    • Do not use APIs from com.sun.net.ssl packages.
  • org.openrewrite.java.migrate.JREDoNotUseSunNetSslInternalSslProvider
    • Use com.ibm.jsse2 instead of com.sun.net.ssl.internal.ssl
    • Do not use the com.sun.net.ssl.internal.ssl.Provider class.
  • org.openrewrite.java.migrate.JREDoNotUseSunNetSslInternalWwwProtocol
    • Use com.ibm.net.ssl.www2.protocol instead of com.sun.net.ssl.internal.www.protocol
    • Do not use the com.sun.net.ssl.internal.www.protocol package.
  • org.openrewrite.java.migrate.JREDoNotUseSunNetSslInternalWwwProtocolHttpsHandler
    • Use com.ibm.net.ssl.www2.protocol.https.Handler instead of com.sun.net.ssl.internal.www.protocol.https.Handler
    • Do not use the com.sun.net.ssl.internal.www.protocol.https.Handler class.
  • org.openrewrite.java.migrate.Java8toJava11
    • Migrate to Java 11
    • 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.
  • org.openrewrite.java.migrate.Krb5LoginModuleClass
    • Use com.sun.security.auth.module.Krb5LoginModule instead of com.ibm.security.auth.module.Krb5LoginModule
    • Do not use the com.ibm.security.auth.module.Krb5LoginModule class.
  • org.openrewrite.java.migrate.RemovedJavaXMLWSModuleProvided
    • Do not package java.xml.ws module in WebSphere Liberty applications
    • 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.
  • org.openrewrite.java.migrate.RemovedJaxBModuleProvided
    • Do not package java.xml.bind and java.activation modules in WebSphere Liberty applications
    • 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.
  • org.openrewrite.java.migrate.RemovedPolicy
    • Replace javax.security.auth.Policy with java.security.Policy
    • The javax.security.auth.Policy class is not available from Java SE 11 onwards.
  • org.openrewrite.java.migrate.ThreadStopDestroy
    • Remove Thread.destroy() and Thread.stop(Throwable)
    • 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.
  • org.openrewrite.java.migrate.UpgradeBuildToJava11
    • Upgrade build to Java 11
    • Updates build files to use Java 11 as the target/source.
  • org.openrewrite.java.migrate.UpgradePluginsForJava11
    • Upgrade plugins to Java 11 compatible versions
    • Updates plugins to version compatible with Java 11.
  • org.openrewrite.java.migrate.cobertura.RemoveCoberturaMavenPlugin
    • Remove Cobertura Maven plugin
    • This recipe will remove Cobertura, as it is not compatible with Java 11.
  • org.openrewrite.java.migrate.guava.NoGuavaJava11
    • Prefer the Java 11 standard library instead of Guava
    • 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.
  • org.openrewrite.java.migrate.guava.PreferJavaUtilObjectsRequireNonNullElse
    • Prefer java.util.Objects#requireNonNullElse
    • Prefer java.util.Objects#requireNonNullElse instead of using com.google.common.base.MoreObjects#firstNonNull.
  • org.openrewrite.java.migrate.javax.AddCommonAnnotationsDependencies
    • Add explicit Common Annotations dependencies
    • Add the necessary annotation-api dependency from Jakarta EE 8 to maintain compatibility with Java version 11 or greater.
  • org.openrewrite.java.migrate.javax.AddInjectDependencies
    • Add explicit Inject dependencies
    • Add the necessary inject-api dependency from Jakarta EE 8 to maintain compatibility with Java version 11 or greater.
  • org.openrewrite.java.migrate.javax.AddJaxbAPIDependencies
    • Add explicit JAXB API dependencies
    • 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.
  • org.openrewrite.java.migrate.javax.AddJaxbDependenciesWithRuntime
    • Add explicit JAXB API dependencies and runtime
    • 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.
  • org.openrewrite.java.migrate.javax.AddJaxbDependenciesWithoutRuntime
    • Add explicit JAXB API dependencies and remove runtimes
    • 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.
  • org.openrewrite.java.migrate.javax.AddJaxbRuntime
    • Use latest JAXB API and runtime for Jakarta EE 8
    • 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.
  • org.openrewrite.java.migrate.javax.AddJaxwsDependencies
    • Add explicit JAX-WS dependencies
    • 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.
  • org.openrewrite.java.migrate.javax.AddJaxwsRuntime
    • Use the latest JAX-WS API and runtime for Jakarta EE 8
    • 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.
  • org.openrewrite.java.migrate.javax.MigrateJaxBWSPlugin
    • Migrate JAXB-WS Plugin
    • Upgrade the JAXB-WS Maven plugin to be compatible with Java 11.
  • org.openrewrite.java.migrate.lombok.UpdateLombokToJava11
    • Migrate Lombok to a Java 11 compatible version
    • Update Lombok dependency to a version that is compatible with Java 11 and migrate experimental Lombok types that have been promoted.
  • org.openrewrite.java.migrate.nio.file.PathsGetToPathOf
    • Replace Paths.get with Path.of
    • 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.

java17

23 recipes

java21

11 recipes

java25

7 recipes

  • org.openrewrite.java.migrate.AccessController
    • Remove Security AccessController
    • The Security Manager API is unsupported in Java 24. This recipe will remove the usage of java.security.AccessController.
  • org.openrewrite.java.migrate.JavaBestPractices
    • Java best practices
    • Applies opinionated best practices for Java projects targeting Java 25. This recipe includes the full Java 25 upgrade chain plus additional improvements to code style, API usage, and third-party dependency reduction that go beyond what the version migration recipes apply.
  • org.openrewrite.java.migrate.RemoveSecurityManager
    • Remove Security SecurityManager
    • The Security Manager API is unsupported in Java 24. This recipe will remove the usage of java.security.SecurityManager.
  • org.openrewrite.java.migrate.RemoveSecurityPolicy
    • Remove Security Policy
    • The Security Manager API is unsupported in Java 24. This recipe will remove the use of java.security.Policy.
  • org.openrewrite.java.migrate.SystemGetSecurityManagerToNull
    • Replace System.getSecurityManager() with null
    • 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.
  • org.openrewrite.java.migrate.UpgradePluginsForJava25
    • Upgrade plugins to Java 25 compatible versions
    • Updates plugins and dependencies to versions compatible with Java 25.
  • org.openrewrite.java.migrate.UpgradeToJava25
    • Migrate to Java 25
    • 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.

java6

1 recipe

  • org.openrewrite.java.migrate.UpgradeToJava6
    • Migrate to Java 6
    • 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.

java7

1 recipe

  • org.openrewrite.java.migrate.UpgradeToJava7
    • Migrate to Java 7
    • 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.

java8

1 recipe

  • org.openrewrite.java.migrate.UpgradeToJava8
    • Migrate to Java 8
    • 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.

javaee

2 recipes

  • org.openrewrite.java.migrate.javax.AddJaxbRuntime
    • Use latest JAXB API and runtime for Jakarta EE 8
    • 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.
  • org.openrewrite.java.migrate.javax.AddJaxwsRuntime
    • Use the latest JAX-WS API and runtime for Jakarta EE 8
    • 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.

javaee6

1 recipe

javaee7

2 recipes

javaee8

1 recipe

javascript

1 recipe

javax

37 recipes

jaxb

12 recipes

  • com.oracle.weblogic.rewrite.jakarta.JavaxBindingsSchemaXjbsToJakarta9BindingsSchemaXjbs
    • Migrate xmlns entries in *.xjb files.
    • Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
  • io.quarkus.updates.core.quarkus30.JavaxXmlBindMigrationToJakartaXmlBind
    • Migrate deprecated javax.xml.bind packages to jakarta.xml.bind
    • Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
  • org.openrewrite.java.migrate.Java8toJava11
    • Migrate to Java 11
    • 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.
  • org.openrewrite.java.migrate.jakarta.JavaxMigrationToJakarta
    • Migrate to Jakarta EE 9
    • Jakarta EE 9 is the first version of Jakarta EE that uses the new jakarta namespace.
  • org.openrewrite.java.migrate.jakarta.JavaxXmlBindMigrationToJakartaXmlBind
    • Migrate deprecated javax.xml.bind packages to jakarta.xml.bind
    • Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
  • org.openrewrite.java.migrate.jakarta.JavaxXmlToJakartaXmlXJCBinding
    • Migrate XJC Bindings to Jakata XML
    • Java EE has been rebranded to Jakarta EE, migrates the namespace and version in XJC bindings.
  • org.openrewrite.java.migrate.jakarta.RetainJaxbApiForJackson
    • Retain javax.xml.bind:jaxb-api when jackson-module-jaxb-annotations is present
    • When migrating from javax.xml.bind to jakarta.xml.bind 3.0+, the javax.xml.bind:jaxb-api dependency is normally replaced. However, if jackson-module-jaxb-annotations is on the classpath (and still uses the javax.xml.bind namespace), this recipe ensures javax.xml.bind:jaxb-api remains available as a runtime dependency to prevent NoClassDefFoundError.
  • org.openrewrite.java.migrate.javax.AddJaxbAPIDependencies
    • Add explicit JAXB API dependencies
    • 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.
  • org.openrewrite.java.migrate.javax.AddJaxbDependenciesWithRuntime
    • Add explicit JAXB API dependencies and runtime
    • 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.
  • org.openrewrite.java.migrate.javax.AddJaxbDependenciesWithoutRuntime
    • Add explicit JAXB API dependencies and remove runtimes
    • 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.
  • org.openrewrite.java.migrate.javax.AddJaxbRuntime
    • Use latest JAXB API and runtime for Jakarta EE 8
    • 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.
  • org.openrewrite.java.migrate.javax.AddJaxwsDependencies
    • Add explicit JAX-WS dependencies
    • 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.

jaxrs

1 recipe

jaxws

5 recipes

  • io.quarkus.updates.core.quarkus30.JavaxXmlWsMigrationToJakartaXmlWs
    • Migrate deprecated javax.xml.ws packages to jakarta.xml.ws
    • Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
  • org.openrewrite.java.migrate.Java8toJava11
    • Migrate to Java 11
    • 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.
  • org.openrewrite.java.migrate.jakarta.JavaxMigrationToJakarta
    • Migrate to Jakarta EE 9
    • Jakarta EE 9 is the first version of Jakarta EE that uses the new jakarta namespace.
  • org.openrewrite.java.migrate.jakarta.JavaxXmlWsMigrationToJakartaXmlWs
    • Migrate deprecated javax.xml.ws packages to jakarta.xml.ws
    • Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
  • org.openrewrite.java.migrate.javax.AddJaxwsRuntime
    • Use the latest JAX-WS API and runtime for Jakarta EE 8
    • 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.

jboss

2 recipes

jdbc

4 recipes

JDK

1 recipe

jdo

4 recipes

Jest

17 recipes

jetbrains

1 recipe

jetty

1 recipe

  • org.openrewrite.java.spring.boot3.DowngradeServletApiWhenUsingJetty
    • Downgrade Jakarta Servlet API to 5.0 when using Jetty
    • 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.

jmockit

1 recipe

jms

6 recipes

jobXML

1 recipe

joda

1 recipe

  • org.openrewrite.java.joda.time.NoJodaTime
    • Prefer the Java standard library instead of Joda-Time
    • 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.
    • Tags: joda-time

jpa

7 recipes

jsf

33 recipes

json

1 recipe

jsp

1 recipe

jsptaglibrary

1 recipe

jsr250

1 recipe

JtaTransactionManager

1 recipe

junit

22 recipes

jupiter

2 recipes

kafka

23 recipes

kotlin

16 recipes

  • org.openrewrite.kotlin.compose.ReplaceDeprecatedComposeMethods
    • Replace deprecated Jetpack Compose methods
    • Replace deprecated Jetpack Compose method calls with their recommended replacements, based on @Deprecated(replaceWith=ReplaceWith(...)) annotations.
  • org.openrewrite.kotlin.exposed.ExposedChangeMethodNames
    • Rename Exposed deprecated methods for 1.0
    • Rename deprecated Exposed method and property references to their 1.0 replacements.
  • org.openrewrite.kotlin.exposed.ExposedChangeTypes
    • Migrate Exposed type references to 1.0 packages
    • Change fully qualified type references from Exposed 0.x packages to Exposed 1.0 packages. The 1.0 release reorganized all packages under org.jetbrains.exposed.v1.* and split classes across core, jdbc, and dao modules.
  • org.openrewrite.kotlin.exposed.ExposedUpgradeGradleDependencies
    • Upgrade Exposed Gradle dependencies to 1.0
    • Update JetBrains Exposed Gradle dependencies for the 1.0.0 migration. Upgrades dependency versions and handles the exposed-migration module split.
  • org.openrewrite.kotlin.exposed.UpgradeToExposed_1
    • Migrate to JetBrains Exposed 1.0
    • Migrate from JetBrains Exposed 0.x to 1.0.0. This includes package reorganization (adding v1 prefix), type moves between modules, class renames, method renames, and Gradle dependency updates. Some changes require manual intervention and are not covered by this recipe: Table.uuid() should be changed to Table.javaUUID() for java.util.UUID values, DateColumnType with constructor parameter time=false or time=true should be split into JodaLocalDateColumnType or JodaLocalDateTimeColumnType, SqlExpressionBuilder.* usages should be replaced with top-level function imports, and Statement.execute() calls should use BlockingExecutable wrapping.
  • org.openrewrite.kotlin.kotlinx.ReplaceDeprecatedKotlinxMethods
    • Replace deprecated kotlinx methods
    • Replace deprecated Kotlin extension library method calls with their recommended replacements, based on @Deprecated(replaceWith=ReplaceWith(...)) annotations.
  • org.openrewrite.kotlin.migrate.RemoveDeprecatedKotlinGradleProperties
    • Remove deprecated Kotlin Gradle properties
    • Remove deprecated Kotlin Gradle properties from gradle.properties. kotlin.experimental.coroutines was removed in Kotlin 2.x.
  • org.openrewrite.kotlin.migrate.RemoveRedundantKotlinStdlib
    • Remove redundant kotlin-stdlib dependencies
    • Remove explicit kotlin-stdlib, kotlin-stdlib-jdk7, kotlin-stdlib-jdk8, and kotlin-stdlib-common dependencies. The Kotlin Gradle plugin has automatically included the stdlib since Kotlin 1.4, making explicit declarations redundant.
  • org.openrewrite.kotlin.migrate.ReplaceDeprecatedAppendln
    • Replace deprecated appendln with appendLine
    • Replace appendln() with appendLine(). This was deprecated in Kotlin 1.4 and becomes an error in Kotlin 2.1.
  • org.openrewrite.kotlin.migrate.ReplaceDeprecatedCapitalizeAndDecapitalize
    • Replace deprecated capitalize and decapitalize
    • Replace String.capitalize() with String.replaceFirstChar \{ if (it.isLowerCase()) it.titlecase() else it.toString() \} and String.decapitalize() with String.replaceFirstChar \{ it.lowercase() \}. These were deprecated in Kotlin 1.5 and become errors in Kotlin 2.1.
  • org.openrewrite.kotlin.migrate.ReplaceDeprecatedCharCaseConversions
    • Replace deprecated Char case conversions
    • Replace Char.toLowerCase() with Char.lowercaseChar() and Char.toUpperCase() with Char.uppercaseChar(). These were deprecated in Kotlin 1.5 and become errors in Kotlin 2.1.
  • org.openrewrite.kotlin.migrate.ReplaceDeprecatedStringCaseConversions
    • Replace deprecated String case conversions
    • Replace String.toLowerCase() with String.lowercase() and String.toUpperCase() with String.uppercase(). These were deprecated in Kotlin 1.5 and become errors in Kotlin 2.1.
  • org.openrewrite.kotlin.migrate.ReplaceEnumValuesFunctionWithEnumEntries
    • Replace enumValues<T>() with enumEntries<T>()
    • Replace calls to enumValues<T>() with enumEntries<T>(). The enumEntries function returns an efficient immutable list instead of creating a new array. Deprecated since Kotlin 1.9, recommended replacement for Kotlin 2.x.
  • org.openrewrite.kotlin.migrate.UpgradeKotlinGradlePlugins
    • Upgrade Kotlin Gradle plugins to 2.x
    • Upgrade all org.jetbrains.kotlin.* Gradle plugins to Kotlin 2.x. This includes the core kotlin-jvm plugin as well as all official Kotlin Gradle plugins such as serialization, Spring, allopen, noarg, JPA, and parcelize.
  • org.openrewrite.kotlin.migrate.UpgradeToKotlin2
    • Migrate to Kotlin 2
    • Migrate deprecated Kotlin 1.x APIs to their Kotlin 2.x replacements and update Gradle build files for Kotlin 2.x compatibility. Deprecated APIs were deprecated in Kotlin 1.4-1.5 and become errors in Kotlin 2.1.
  • org.openrewrite.kotlin.replace.ReplaceKotlinMethod
    • Replace Kotlin method
    • Replaces Kotlin method calls based on @Deprecated(replaceWith=ReplaceWith(...)) annotations.

kotlinx

1 recipe

kubernetes

27 recipes

lang

1 recipe

langchain

7 recipes

linq

27 recipes

LoadTimeWeaver

1 recipe

local

1 recipe

locale

1 recipe

lodash

4 recipes

  • org.openrewrite.codemods.migrate.lodash.LodashUnderscoreArray
    • Replace lodash and underscore array functions with native JavaScript
      • _.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).
  • org.openrewrite.codemods.migrate.lodash.LodashUnderscoreFunction
    • Replace lodash and underscore function functions with native JavaScript
      • _.bind(fn, obj, ...x) -> fn.bind(obj, ...x) - _.partial(fn, a, b); -> (...args) => fn(a, b, ...args).
  • org.openrewrite.codemods.migrate.lodash.LodashUnderscoreObjects
    • Replace lodash and underscore object functions with native JavaScript
      • _.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).
  • org.openrewrite.codemods.migrate.lodash.LodashUnderscoreUtil
    • Replace lodash and underscore utility functions with native JavaScript
      • _.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'.

log4j

10 recipes

log4shell

1 recipe

logback

1 recipe

logging

27 recipes

lombok

6 recipes

macpath

1 recipe

mail

1 recipe

material

78 recipes

math

1 recipe

  • org.openrewrite.apache.commons.math.UpgradeApacheCommonsMath_2_3
    • Migrates to Apache Commons Math 3.x
    • 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.

maven

2 recipes

messaging

2 recipes

metrics

1 recipe

  • org.openrewrite.quarkus.spring.MigrateSpringActuator
    • Migrate Spring Boot Actuator to Quarkus Health and Metrics
    • Migrates Spring Boot Actuator to Quarkus SmallRye Health and Metrics extensions. Converts HealthIndicator implementations to Quarkus HealthCheck pattern.

micrometer

3 recipes

migration

159 recipes

mockito

7 recipes

modernization

29 recipes

  • OpenRewrite.Recipes.Net6.UseEnvironmentCurrentManagedThreadId
    • Use Environment.CurrentManagedThreadId
    • Replace Thread.CurrentThread.ManagedThreadId with Environment.CurrentManagedThreadId (CA1840). Available since .NET 6.
  • OpenRewrite.Recipes.Net6.UseEnvironmentProcessId
    • Use Environment.ProcessId
    • Replace Process.GetCurrentProcess().Id with Environment.ProcessId (CA1837). Available since .NET 6.
  • OpenRewrite.Recipes.Net6.UseEnvironmentProcessPath
    • Use Environment.ProcessPath
    • Replace Process.GetCurrentProcess().MainModule.FileName with Environment.ProcessPath (CA1839). Available since .NET 6.
  • OpenRewrite.Recipes.Net6.UseLinqDistinctBy
    • Use LINQ DistinctBy()
    • Replace collection.GroupBy(selector).Select(g => g.First()) with collection.DistinctBy(selector). Available since .NET 6.
  • OpenRewrite.Recipes.Net6.UseLinqMaxMinBy
    • Use LINQ MaxBy() and MinBy()
    • Replace collection.OrderByDescending(selector).First() with collection.MaxBy(selector) and collection.OrderBy(selector).First() with collection.MinBy(selector). Also handles .Last() variants (OrderBy().Last() → MaxBy, OrderByDescending().Last() → MinBy). Note: MinBy/MaxBy return default for empty reference-type sequences instead of throwing. Available since .NET 6.
  • OpenRewrite.Recipes.Net6.UseRandomShared
    • Use Random.Shared
    • Replace new Random().Method(...) with Random.Shared.Method(...). Available since .NET 6.
  • OpenRewrite.Recipes.Net6.UseStringContainsChar
    • Use string.Contains(char) overload
    • Finds calls to string.Contains("x") with a single-character string literal that could use the string.Contains('x') overload for better performance.
  • OpenRewrite.Recipes.Net6.UseStringStartsEndsWithChar
    • Use string.StartsWith(char)/EndsWith(char) overload
    • Finds calls to string.StartsWith("x") and string.EndsWith("x") with a single-character string literal that could use the char overload for better performance.
  • OpenRewrite.Recipes.Net6.UseThrowIfNull
    • Use ArgumentNullException.ThrowIfNull()
    • Replace if (x == null) throw new ArgumentNullException(nameof(x)) guard clauses with ArgumentNullException.ThrowIfNull(x) (CA1510). Handles == null, is null, reversed null ==, string literal param names, and braced then-blocks. Available since .NET 6.
  • OpenRewrite.Recipes.Net7.UseLinqOrder
    • Use LINQ Order() and OrderDescending()
    • Replace collection.OrderBy(x => x) with collection.Order() and collection.OrderByDescending(x => x) with collection.OrderDescending(). Available since .NET 7.
  • OpenRewrite.Recipes.Net7.UseThrowIfNegative
    • Use ArgumentOutOfRangeException.ThrowIfNegative()
    • Replace if (value < 0) throw new ArgumentOutOfRangeException(nameof(value)) guard clauses with ArgumentOutOfRangeException.ThrowIfNegative(value). Also handles reversed 0 > value. Available since .NET 7.
  • OpenRewrite.Recipes.Net7.UseThrowIfNegativeOrZero
    • Use ArgumentOutOfRangeException.ThrowIfNegativeOrZero()
    • Replace if (value <= 0) throw new ArgumentOutOfRangeException(nameof(value)) guard clauses with ArgumentOutOfRangeException.ThrowIfNegativeOrZero(value). Also handles reversed 0 >= value. Available since .NET 7.
  • OpenRewrite.Recipes.Net7.UseThrowIfNullOrEmpty
    • Use ArgumentException.ThrowIfNullOrEmpty()
    • Replace if (string.IsNullOrEmpty(s)) throw new ArgumentException("...", nameof(s)) guard clauses with ArgumentException.ThrowIfNullOrEmpty(s). Available since .NET 7.
  • OpenRewrite.Recipes.Net8.FindFrozenCollection
    • Find ToImmutable() that could use Frozen collections*
    • Finds usages of ToImmutableDictionary() and ToImmutableHashSet(). In .NET 8+, ToFrozenDictionary() and ToFrozenSet() provide better read performance.
  • OpenRewrite.Recipes.Net8.FindTimeAbstraction
    • Find DateTime.Now/UtcNow usage (TimeProvider in .NET 8)
    • Finds usages of DateTime.Now, DateTime.UtcNow, DateTimeOffset.Now, and DateTimeOffset.UtcNow. In .NET 8+, TimeProvider is the recommended abstraction for time.
  • OpenRewrite.Recipes.Net8.UseThrowIfGreaterThan
    • Use ArgumentOutOfRangeException.ThrowIfGreaterThan()
    • Replace if (value > other) throw new ArgumentOutOfRangeException(nameof(value)) guard clauses with ArgumentOutOfRangeException.ThrowIfGreaterThan(value, other). Also handles reversed other < value and >=/ThrowIfGreaterThanOrEqual. Available since .NET 8.
  • OpenRewrite.Recipes.Net8.UseThrowIfLessThan
    • Use ArgumentOutOfRangeException.ThrowIfLessThan()
    • Replace if (value < other) throw new ArgumentOutOfRangeException(nameof(value)) guard clauses with ArgumentOutOfRangeException.ThrowIfLessThan(value, other). Also handles reversed other > value and <=/ThrowIfLessThanOrEqual. Available since .NET 8.
  • OpenRewrite.Recipes.Net8.UseThrowIfNullOrWhiteSpace
    • Use ArgumentException.ThrowIfNullOrWhiteSpace()
    • Replace if (string.IsNullOrWhiteSpace(s)) throw new ArgumentException("...", nameof(s)) guard clauses with ArgumentException.ThrowIfNullOrWhiteSpace(s). Available since .NET 8.
  • OpenRewrite.Recipes.Net8.UseThrowIfZero
    • Use ArgumentOutOfRangeException.ThrowIfZero()
    • Replace if (value == 0) throw new ArgumentOutOfRangeException(nameof(value)) guard clauses with ArgumentOutOfRangeException.ThrowIfZero(value). Also handles reversed 0 == value. Available since .NET 8.
  • OpenRewrite.Recipes.Net8.UseTimeProvider
    • Use TimeProvider instead of DateTime/DateTimeOffset static properties
    • Replace DateTime.UtcNow, DateTime.Now, DateTimeOffset.UtcNow, and DateTimeOffset.Now with TimeProvider.System.GetUtcNow()/GetLocalNow() equivalents. TimeProvider enables testability and consistent time sources. Available since .NET 8.
  • OpenRewrite.Recipes.Net9.RemoveConfigureAwaitFalse
    • Remove ConfigureAwait(false)
    • Remove .ConfigureAwait(false) calls that are unnecessary in ASP.NET Core and modern .NET applications (no SynchronizationContext). Do not apply to library code targeting .NET Framework.
  • OpenRewrite.Recipes.Net9.UseEscapeSequenceE
    • Use \e escape sequence
    • Replace \u001b and \x1b escape sequences with \e. C# 13 introduced \e as a dedicated escape sequence for the escape character (U+001B).
  • OpenRewrite.Recipes.Net9.UseFrozenCollections
    • Use Frozen collections instead of Immutable
    • Replace ToImmutableDictionary() with ToFrozenDictionary() and ToImmutableHashSet() with ToFrozenSet(). Frozen collections (.NET 8+) provide better read performance for collections populated once and read many times.
  • OpenRewrite.Recipes.Net9.UseGuidCreateVersion7
    • Use Guid.CreateVersion7()
    • Replace Guid.NewGuid() with Guid.CreateVersion7(). Version 7 GUIDs are time-ordered and better for database primary keys, indexing, and sorting. Available since .NET 9.
  • OpenRewrite.Recipes.Net9.UseLinqAggregateBy
    • Use LINQ AggregateBy()
    • Replace collection.GroupBy(keySelector).ToDictionary(g => g.Key, g => g.Aggregate(seed, func)) with collection.AggregateBy(keySelector, seed, func).ToDictionary(). Available since .NET 9.
  • OpenRewrite.Recipes.Net9.UseLinqCountBy
    • Use LINQ CountBy()
    • Replace collection.GroupBy(selector).Select(g => g.Count()) with collection.CountBy(selector). Available since .NET 9.
  • OpenRewrite.Recipes.Net9.UseLinqIndex
    • Use LINQ Index()
    • Replace collection.Select((item, index) => (index, item)) with collection.Index(). Available since .NET 9.
  • OpenRewrite.Recipes.Net9.UseLockObject
    • Use System.Threading.Lock for lock fields
    • Replace object fields initialized with new object() with System.Threading.Lock initialized with new(). The Lock type provides better performance with the lock statement. Available since .NET 9.
  • OpenRewrite.Recipes.Net9.UseTaskCompletedTask
    • Use Task.CompletedTask
    • Replace Task.FromResult(0), Task.FromResult(true), and Task.FromResult(false) with Task.CompletedTask when the return type is Task (not Task<T>).

mongodb

3 recipes

mssql

3 recipes

mui

78 recipes

mvc

1 recipe

myfaces

5 recipes

mysql

1 recipe

namespaces

1 recipe

naming

6 recipes

native

3 recipes

  • io.moderne.java.spring.framework7.RenameMemberCategoryConstants
    • Rename MemberCategory field constants for Spring Framework 7.0
    • Renames deprecated MemberCategory constants to their new names in Spring Framework 7.0. MemberCategory.PUBLIC_FIELDS is renamed to MemberCategory.INVOKE_PUBLIC_FIELDS and MemberCategory.DECLARED_FIELDS is renamed to MemberCategory.INVOKE_DECLARED_FIELDS. These renames clarify the original intent of these categories and align with the rest of the API.
  • io.moderne.java.spring.framework7.UpdateGraalVmNativeHints
    • Update GraalVM native reflection hints for Spring Framework 7.0
    • Migrates GraalVM native reflection hints to Spring Framework 7.0 conventions. Spring Framework 7.0 adopts the unified reachability metadata format for GraalVM. This recipe renames deprecated MemberCategory constants and simplifies reflection hint registrations where explicit member categories are no longer needed.
  • org.openrewrite.quarkus.spring.ConfigureNativeBuild
    • Configure Quarkus Native Build Support
    • Adds configuration and dependencies required for Quarkus native image compilation with GraalVM. Includes native profile configuration and reflection hints where needed.

net10

31 recipes

  • OpenRewrite.Recipes.Net10.FindActionContextAccessorObsolete
    • Find obsolete IActionContextAccessor/ActionContextAccessor (ASPDEPR006)
    • Finds usages of IActionContextAccessor and ActionContextAccessor which are obsolete in .NET 10. Use IHttpContextAccessor and HttpContext.GetEndpoint() instead.
  • OpenRewrite.Recipes.Net10.FindActivitySampling
    • Find ActivitySamplingResult.PropagationData behavior change
    • Finds usages of ActivitySamplingResult.PropagationData which has changed behavior in .NET 10. Activities with a recorded parent and PropagationData sampling no longer set Activity.Recorded = true.
  • OpenRewrite.Recipes.Net10.FindBackgroundServiceExecuteAsync
    • Find BackgroundService.ExecuteAsync behavior change
    • Finds methods that override ExecuteAsync from BackgroundService. In .NET 10, the entire method runs on a background thread; synchronous code before the first await no longer blocks host startup.
  • OpenRewrite.Recipes.Net10.FindBufferedStreamWriteByte
    • Find BufferedStream.WriteByte implicit flush behavior change
    • Finds calls to BufferedStream.WriteByte() which no longer performs an implicit flush when the internal buffer is full in .NET 10. Call Flush() explicitly if needed.
  • OpenRewrite.Recipes.Net10.FindClipboardGetData
    • Find obsolete Clipboard.GetData calls (WFDEV005)
    • Finds calls to Clipboard.GetData(string). In .NET 10, this method is obsolete (WFDEV005). Use Clipboard.TryGetData methods instead.
  • OpenRewrite.Recipes.Net10.FindDistributedContextPropagator
    • Find DistributedContextPropagator default propagator change
    • Finds usages of DistributedContextPropagator.Current and DistributedContextPropagator.CreateDefaultPropagator() which now default to W3C format in .NET 10. The 'baggage' header is used instead of 'Correlation-Context'.
  • OpenRewrite.Recipes.Net10.FindDllImportSearchPath
    • Find DllImportSearchPath.AssemblyDirectory behavior change
    • Finds usages of DllImportSearchPath.AssemblyDirectory which has changed behavior in .NET 10. Specifying only AssemblyDirectory no longer falls back to OS default search paths.
  • OpenRewrite.Recipes.Net10.FindDriveInfoDriveFormat
    • Find DriveInfo.DriveFormat behavior change
    • Finds usages of DriveInfo.DriveFormat which returns Linux kernel filesystem type strings instead of mapped names in .NET 10. Verify that comparisons match the new format.
  • OpenRewrite.Recipes.Net10.FindFormOnClosingObsolete
    • Find obsolete Form.OnClosing/OnClosed usage (WFDEV004)
    • Finds usage of Form.OnClosing, Form.OnClosed, and the Closing/Closed events. In .NET 10, these are obsolete (WFDEV004). Use OnFormClosing/OnFormClosed and FormClosing/FormClosed instead.
  • OpenRewrite.Recipes.Net10.FindGnuTarPaxTarEntry
    • Find GnuTarEntry/PaxTarEntry default timestamp change
    • Finds new GnuTarEntry(...) and new PaxTarEntry(...) constructor calls. In .NET 10, these no longer set atime and ctime by default. Set AccessTime/ChangeTime explicitly if needed.
  • OpenRewrite.Recipes.Net10.FindIpNetworkObsolete
    • Find obsolete IPNetwork/KnownNetworks (ASPDEPR005)
    • Finds usages of Microsoft.AspNetCore.HttpOverrides.IPNetwork and ForwardedHeadersOptions.KnownNetworks which are obsolete in .NET 10. Use System.Net.IPNetwork and KnownIPNetworks instead.
  • OpenRewrite.Recipes.Net10.FindKeyedServiceAnyKey
    • Find KeyedService.AnyKey behavior change
    • Finds usages of KeyedService.AnyKey which has changed behavior in .NET 10. GetKeyedService(AnyKey) now throws InvalidOperationException and GetKeyedServices(AnyKey) no longer returns AnyKey registrations.
  • OpenRewrite.Recipes.Net10.FindMakeGenericSignatureType
    • Find Type.MakeGenericSignatureType validation change
    • Finds calls to Type.MakeGenericSignatureType() which now validates that the first argument is a generic type definition in .NET 10.
  • OpenRewrite.Recipes.Net10.FindQueryableMaxByMinByObsolete
    • Find obsolete Queryable.MaxBy/MinBy with IComparer<TSource> (SYSLIB0061)
    • Finds Queryable.MaxBy and Queryable.MinBy overloads taking IComparer<TSource> which are obsolete in .NET 10. Use the overloads taking IComparer<TKey> instead.
  • OpenRewrite.Recipes.Net10.FindRazorRuntimeCompilationObsolete
    • Find obsolete AddRazorRuntimeCompilation calls (ASPDEPR003)
    • Finds calls to AddRazorRuntimeCompilation which is obsolete in .NET 10. Use Hot Reload instead for development scenarios.
  • OpenRewrite.Recipes.Net10.FindRfc2898DeriveBytesObsolete
    • Find obsolete Rfc2898DeriveBytes constructors (SYSLIB0060)
    • Finds new Rfc2898DeriveBytes(...) constructor calls which are obsolete in .NET 10. Use the static Rfc2898DeriveBytes.Pbkdf2() method instead.
  • OpenRewrite.Recipes.Net10.FindSslAuthEnumTypes
    • Find obsolete SSL authentication enum types
    • Finds usage of ExchangeAlgorithmType, CipherAlgorithmType, and HashAlgorithmType from System.Security.Authentication. These enum types are obsolete in .NET 10 (SYSLIB0058). Use SslStream.NegotiatedCipherSuite instead.
  • OpenRewrite.Recipes.Net10.FindSslStreamObsoleteProperties
    • Find obsolete SslStream cipher properties (SYSLIB0058)
    • Finds usages of SslStream.KeyExchangeAlgorithm, KeyExchangeStrength, CipherAlgorithm, CipherStrength, HashAlgorithm, and HashStrength which are obsolete in .NET 10. Use SslStream.NegotiatedCipherSuite instead.
  • OpenRewrite.Recipes.Net10.FindSystemDrawingExceptionChange
    • Find catch (OutOfMemoryException) that may need ExternalException
    • In .NET 10, System.Drawing GDI+ errors now throw ExternalException instead of OutOfMemoryException. This recipe finds catch blocks that catch OutOfMemoryException which may need to also catch ExternalException.
  • OpenRewrite.Recipes.Net10.FindSystemEventsThreadShutdownObsolete
    • Find obsolete SystemEvents.EventsThreadShutdown (SYSLIB0059)
    • Finds usages of SystemEvents.EventsThreadShutdown which is obsolete in .NET 10. Use AppDomain.ProcessExit instead.
  • OpenRewrite.Recipes.Net10.FindWebHostBuilderObsolete
    • Find obsolete WebHostBuilder/IWebHost/WebHost usage (ASPDEPR004/ASPDEPR008)
    • Finds usages of WebHostBuilder, IWebHost, and WebHost which are obsolete in .NET 10. Migrate to HostBuilder or WebApplicationBuilder instead.
  • OpenRewrite.Recipes.Net10.FindWinFormsObsoleteApis
    • Find obsolete Windows Forms APIs (WFDEV004/005/006)
    • Finds usages of Windows Forms APIs that are obsolete in .NET 10, including Form.OnClosing/OnClosed (WFDEV004), Clipboard.GetData (WFDEV005), and legacy controls like ContextMenu, DataGrid, MainMenu (WFDEV006).
  • OpenRewrite.Recipes.Net10.FindWithOpenApiDeprecated
    • Find deprecated WithOpenApi calls (ASPDEPR002)
    • Finds calls to .WithOpenApi() which is deprecated in .NET 10. Remove the call or use AddOpenApiOperationTransformer instead.
  • OpenRewrite.Recipes.Net10.FindX500DistinguishedNameValidation
    • Find X500DistinguishedName string constructor stricter validation
    • Finds new X500DistinguishedName(string, ...) constructor calls which have stricter validation in .NET 10. Non-Windows environments may reject previously accepted values.
  • OpenRewrite.Recipes.Net10.FindXsltSettingsEnableScriptObsolete
    • Find obsolete XsltSettings.EnableScript (SYSLIB0062)
    • Finds usages of XsltSettings.EnableScript which is obsolete in .NET 10.
  • OpenRewrite.Recipes.Net10.FormOnClosingRename
    • Rename Form.OnClosing/OnClosed to OnFormClosing/OnFormClosed (WFDEV004)
    • Renames Form.OnClosing to OnFormClosing and Form.OnClosed to OnFormClosed for .NET 10 compatibility. Parameter type changes (CancelEventArgsFormClosingEventArgs, EventArgsFormClosedEventArgs) must be updated manually.
  • OpenRewrite.Recipes.Net10.InsertAdjacentElementOrientParameterRename
    • Rename orient parameter to orientation in HtmlElement.InsertAdjacentElement
    • The orient parameter of HtmlElement.InsertAdjacentElement was renamed to orientation in .NET 10. This recipe updates named arguments in method calls to use the new parameter name.
  • OpenRewrite.Recipes.Net10.KnownNetworksRename
    • Rename KnownNetworks to KnownIPNetworks (ASPDEPR005)
    • Renames ForwardedHeadersOptions.KnownNetworks to KnownIPNetworks for .NET 10 compatibility.
  • OpenRewrite.Recipes.Net10.MlDsaSlhDsaSecretKeyToPrivateKey
    • Rename MLDsa/SlhDsa SecretKey members to PrivateKey
    • Renames SecretKey to PrivateKey in MLDsa and SlhDsa post-quantum cryptography APIs to align with .NET 10 naming conventions.
  • OpenRewrite.Recipes.Net10.RazorRuntimeCompilationObsolete
    • Remove obsolete AddRazorRuntimeCompilation calls (ASPDEPR003)
    • Removes AddRazorRuntimeCompilation() calls which are obsolete in .NET 10. Use Hot Reload instead for development scenarios.
  • OpenRewrite.Recipes.Net10.WithOpenApiDeprecated
    • Remove deprecated WithOpenApi calls (ASPDEPR002)
    • Removes .WithOpenApi() calls which are deprecated in .NET 10. The call is removed from fluent method chains.

net3.0

10 recipes

  • OpenRewrite.Recipes.Net3_0.FindCompactOnMemoryPressure
    • Find CompactOnMemoryPressure usage (removed in ASP.NET Core 3.0)
    • Finds usages of CompactOnMemoryPressure which was removed from MemoryCacheOptions in ASP.NET Core 3.0.
  • OpenRewrite.Recipes.Net3_0.FindConnectionAdapter
    • Find IConnectionAdapter usage (removed in ASP.NET Core 3.0)
    • Finds usages of IConnectionAdapter which was removed from Kestrel in ASP.NET Core 3.0. Use Connection Middleware instead.
  • OpenRewrite.Recipes.Net3_0.FindHttpContextAuthentication
    • Find HttpContext.Authentication usage (removed in ASP.NET Core 3.0)
    • Finds usages of HttpContext.Authentication which was removed in ASP.NET Core 3.0. Use dependency injection to get IAuthenticationService instead.
  • OpenRewrite.Recipes.Net3_0.FindNewtonsoftJson
    • Find Newtonsoft.Json usage
    • Finds usages of Newtonsoft.Json types (JObject, JArray, JToken, JsonConvert) that should be migrated to System.Text.Json or explicitly preserved via Microsoft.AspNetCore.Mvc.NewtonsoftJson in ASP.NET Core 3.0+.
  • OpenRewrite.Recipes.Net3_0.FindObsoleteLocalizationApis
    • Find obsolete localization APIs (ASP.NET Core 3.0)
    • Finds usages of ResourceManagerWithCultureStringLocalizer and WithCulture() which are obsolete in ASP.NET Core 3.0.
  • OpenRewrite.Recipes.Net3_0.FindSpaServices
    • Find SpaServices/NodeServices usage (obsolete in ASP.NET Core 3.0)
    • Finds usages of SpaServices and NodeServices which are obsolete in ASP.NET Core 3.0.
  • OpenRewrite.Recipes.Net3_0.FindSynchronousIO
    • Find synchronous IO usage (disabled in ASP.NET Core 3.0)
    • Finds references to AllowSynchronousIO which indicates synchronous IO usage that is disabled by default in ASP.NET Core 3.0.
  • OpenRewrite.Recipes.Net3_0.FindUseMvc
    • Find UseMvc/AddMvc usage (replaced in ASP.NET Core 3.0)
    • Finds usages of app.UseMvc(), app.UseMvcWithDefaultRoute(), and services.AddMvc() which should be migrated to endpoint routing and more specific service registration in ASP.NET Core 3.0.
  • OpenRewrite.Recipes.Net3_0.FindWebApiCompatShim
    • Find Web API compatibility shim usage (removed in ASP.NET Core 3.0)
    • Finds usages of ApiController, HttpResponseMessage, and other types from Microsoft.AspNetCore.Mvc.WebApiCompatShim which was removed in ASP.NET Core 3.0.
  • OpenRewrite.Recipes.Net3_0.FindWebHostBuilder
    • Find WebHostBuilder/WebHost.CreateDefaultBuilder usage (replaced in ASP.NET Core 3.0)
    • Finds usages of WebHost.CreateDefaultBuilder() and new WebHostBuilder() which should be migrated to Host.CreateDefaultBuilder() with ConfigureWebHostDefaults() in ASP.NET Core 3.0.

net3.1

1 recipe

  • OpenRewrite.Recipes.Net3_1.FindSameSiteNone
    • Find SameSiteMode.None usage (behavior changed in .NET Core 3.1)
    • Finds usages of SameSiteMode.None which changed behavior in .NET Core 3.1 due to Chrome 80 SameSite cookie changes. Apps using remote authentication may need browser sniffing.

net5

5 recipes

net6

5 recipes

  • OpenRewrite.Recipes.Net6.FindAssemblyCodeBase
    • Find Assembly.CodeBase/EscapedCodeBase usage (SYSLIB0012)
    • Finds usages of Assembly.CodeBase and Assembly.EscapedCodeBase which are obsolete (SYSLIB0012). Use Assembly.Location instead.
  • OpenRewrite.Recipes.Net6.FindIgnoreNullValues
    • Find JsonSerializerOptions.IgnoreNullValues usage (SYSLIB0020)
    • Finds usages of JsonSerializerOptions.IgnoreNullValues which is obsolete in .NET 6 (SYSLIB0020). Use DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull instead.
  • OpenRewrite.Recipes.Net6.FindThreadAbort
    • Find Thread.Abort usage (SYSLIB0006)
    • Finds calls to Thread.Abort() which throws PlatformNotSupportedException in .NET 6+ (SYSLIB0006). Use CancellationToken for cooperative cancellation instead.
  • OpenRewrite.Recipes.Net6.FindWebRequest
    • Find WebRequest/HttpWebRequest/WebClient usage (SYSLIB0014)
    • Finds usages of WebRequest, HttpWebRequest, and WebClient which are obsolete in .NET 6 (SYSLIB0014). Use HttpClient instead.
  • OpenRewrite.Recipes.Net6.FindX509PrivateKey
    • Find X509Certificate2.PrivateKey usage (SYSLIB0028)
    • Finds usages of X509Certificate2.PrivateKey which is obsolete (SYSLIB0028). Use GetRSAPrivateKey(), GetECDsaPrivateKey(), or the appropriate algorithm-specific method instead.

net7

2 recipes

  • OpenRewrite.Recipes.Net7.FindObsoleteSslProtocols
    • Find obsolete SslProtocols.Tls/Tls11 usage (SYSLIB0039)
    • Finds usages of SslProtocols.Tls and SslProtocols.Tls11 which are obsolete in .NET 7 (SYSLIB0039). Use SslProtocols.Tls12, SslProtocols.Tls13, or SslProtocols.None instead.
  • OpenRewrite.Recipes.Net7.FindRfc2898InsecureCtors
    • Find insecure Rfc2898DeriveBytes constructors (SYSLIB0041)
    • Finds Rfc2898DeriveBytes constructor calls that use default SHA1 or low iteration counts, which are obsolete in .NET 7 (SYSLIB0041). Specify HashAlgorithmName and at least 600,000 iterations.

net8

7 recipes

  • OpenRewrite.Recipes.Net8.FindAddContext
    • Find JsonSerializerOptions.AddContext usage (SYSLIB0049)
    • Finds calls to JsonSerializerOptions.AddContext<T>() which is obsolete in .NET 8 (SYSLIB0049). Use TypeInfoResolverChain or TypeInfoResolver instead.
  • OpenRewrite.Recipes.Net8.FindAesGcmOldConstructor
    • Find AesGcm constructor without tag size (SYSLIB0053)
    • Finds new AesGcm(key) constructor calls without an explicit tag size parameter. In .NET 8, the single-argument constructor is obsolete (SYSLIB0053). Use new AesGcm(key, tagSizeInBytes) instead.
  • OpenRewrite.Recipes.Net8.FindFormatterBasedSerialization
    • Find formatter-based serialization types (SYSLIB0050/0051)
    • Finds usage of formatter-based serialization types (FormatterConverter, IFormatter, ObjectIDGenerator, ObjectManager, SurrogateSelector, SerializationInfo, StreamingContext). These are obsolete in .NET 8 (SYSLIB0050/0051).
  • OpenRewrite.Recipes.Net8.FindFrozenCollection
    • Find ToImmutable() that could use Frozen collections*
    • Finds usages of ToImmutableDictionary() and ToImmutableHashSet(). In .NET 8+, ToFrozenDictionary() and ToFrozenSet() provide better read performance.
  • OpenRewrite.Recipes.Net8.FindRegexCompileToAssembly
    • Find Regex.CompileToAssembly usage (SYSLIB0052)
    • Finds usage of Regex.CompileToAssembly() and RegexCompilationInfo. These are obsolete in .NET 8 (SYSLIB0052). Use the Regex source generator instead.
  • OpenRewrite.Recipes.Net8.FindSerializationConstructors
    • Find legacy serialization constructors (SYSLIB0051)
    • Finds legacy serialization constructors .ctor(SerializationInfo, StreamingContext) which are obsolete in .NET 8 (SYSLIB0051). The ISerializable pattern is no longer recommended.
  • OpenRewrite.Recipes.Net8.FindTimeAbstraction
    • Find DateTime.Now/UtcNow usage (TimeProvider in .NET 8)
    • Finds usages of DateTime.Now, DateTime.UtcNow, DateTimeOffset.Now, and DateTimeOffset.UtcNow. In .NET 8+, TimeProvider is the recommended abstraction for time.

net9

20 recipes

  • OpenRewrite.Recipes.Net9.FindAuthenticationManager
    • Find AuthenticationManager usage (SYSLIB0009)
    • Finds usages of AuthenticationManager which is not supported in .NET 9 (SYSLIB0009). Methods will no-op or throw PlatformNotSupportedException.
  • OpenRewrite.Recipes.Net9.FindBinaryFormatter
    • Find BinaryFormatter usage (removed in .NET 9)
    • Finds usages of BinaryFormatter which always throws NotSupportedException in .NET 9. Migrate to a different serializer such as System.Text.Json, XmlSerializer, or DataContractSerializer.
  • OpenRewrite.Recipes.Net9.FindBinaryReaderReadString
    • Find BinaryReader.ReadString behavior change
    • Finds calls to BinaryReader.ReadString() which now returns the Unicode replacement character (\uFFFD) for malformed UTF-8 byte sequences in .NET 9, instead of the previous behavior. Verify your code handles the replacement character correctly.
  • OpenRewrite.Recipes.Net9.FindDistributedCache
    • Find IDistributedCache usage (HybridCache in .NET 9)
    • Finds usages of IDistributedCache. In .NET 9, HybridCache is the recommended replacement with L1/L2 caching, stampede protection, and tag-based invalidation.
  • OpenRewrite.Recipes.Net9.FindEnumConverter
    • Find EnumConverter constructor validation change
    • Finds new EnumConverter() constructor calls. In .NET 9, EnumConverter validates that the registered type is actually an enum and throws ArgumentException if not.
  • OpenRewrite.Recipes.Net9.FindExecuteUpdateSync
    • Find synchronous ExecuteUpdate/ExecuteDelete (EF Core 9)
    • Finds usages of synchronous ExecuteUpdate() and ExecuteDelete() which were removed in EF Core 9. Use ExecuteUpdateAsync/ExecuteDeleteAsync instead.
  • OpenRewrite.Recipes.Net9.FindHttpClientHandlerCast
    • Find HttpClientHandler usage (HttpClientFactory default change)
    • Finds usages of HttpClientHandler which may break when HttpClientFactory switches its default handler to SocketsHttpHandler in .NET 9.
  • OpenRewrite.Recipes.Net9.FindHttpListenerRequestUserAgent
    • Find HttpListenerRequest.UserAgent nullable change
    • Finds accesses to HttpListenerRequest.UserAgent which changed from string to string? in .NET 9. Code that assumes UserAgent is non-null may throw NullReferenceException.
  • OpenRewrite.Recipes.Net9.FindImplicitAuthenticationDefault
    • Find implicit authentication default scheme (ASP.NET Core 9)
    • Finds calls to AddAuthentication() with no arguments. In .NET 9, a single registered authentication scheme is no longer automatically used as the default.
  • OpenRewrite.Recipes.Net9.FindInMemoryDirectoryInfo
    • Find InMemoryDirectoryInfo rootDir prepend change
    • Finds new InMemoryDirectoryInfo() constructor calls. In .NET 9, rootDir is prepended to file paths that don't start with the rootDir, which may change file matching behavior.
  • OpenRewrite.Recipes.Net9.FindIncrementingPollingCounter
    • Find IncrementingPollingCounter async callback change
    • Finds new IncrementingPollingCounter() constructor calls. In .NET 9, the initial callback invocation is asynchronous instead of synchronous, which may change timing behavior.
  • OpenRewrite.Recipes.Net9.FindJsonDocumentNullable
    • Find JsonSerializer.Deserialize nullable JsonDocument change
    • Finds JsonSerializer.Deserialize() calls. In .NET 9, nullable JsonDocument properties now deserialize to a JsonDocument with RootElement.ValueKind == JsonValueKind.Null instead of being null.
  • OpenRewrite.Recipes.Net9.FindJsonStringEnumConverter
    • Find non-generic JsonStringEnumConverter
    • Finds usages of the non-generic JsonStringEnumConverter. In .NET 9, the generic JsonStringEnumConverter<TEnum> is preferred for AOT compatibility.
  • OpenRewrite.Recipes.Net9.FindRuntimeHelpersGetSubArray
    • Find RuntimeHelpers.GetSubArray return type change
    • Finds calls to RuntimeHelpers.GetSubArray() which may return a different array type in .NET 9. Code that depends on the runtime type of the returned array may break.
  • OpenRewrite.Recipes.Net9.FindSafeEvpPKeyHandleDuplicate
    • Find SafeEvpPKeyHandle.DuplicateHandle up-ref change
    • Finds calls to SafeEvpPKeyHandle.DuplicateHandle(). In .NET 9, this method now increments the reference count instead of creating a deep copy, which may affect handle lifetime.
  • OpenRewrite.Recipes.Net9.FindServicePointManager
    • Find ServicePointManager usage (SYSLIB0014)
    • Finds usages of ServicePointManager which is fully obsolete in .NET 9 (SYSLIB0014). Settings on ServicePointManager don't affect SslStream or HttpClient.
  • OpenRewrite.Recipes.Net9.FindSwashbuckle
    • Find Swashbuckle usage (ASP.NET Core 9 built-in OpenAPI)
    • Finds usages of Swashbuckle APIs (AddSwaggerGen, UseSwagger, UseSwaggerUI). .NET 9 includes built-in OpenAPI support. Consider migrating to AddOpenApi()/MapOpenApi().
  • OpenRewrite.Recipes.Net9.FindX509CertificateConstructors
    • Find obsolete X509Certificate2/X509Certificate constructors (SYSLIB0057)
    • Finds usages of X509Certificate2 and X509Certificate constructors that accept binary content or file paths, which are obsolete in .NET 9 (SYSLIB0057). Use X509CertificateLoader methods instead.
  • OpenRewrite.Recipes.Net9.FindZipArchiveCompressionLevel
    • Find ZipArchive.CreateEntry with CompressionLevel (bit flag change)
    • Finds ZipArchive.CreateEntry() and ZipFileExtensions.CreateEntryFromFile() calls with a CompressionLevel parameter. In .NET 9, the CompressionLevel value now sets general-purpose bit flags in the ZIP central directory header, which may affect interoperability.
  • OpenRewrite.Recipes.Net9.FindZipArchiveEntryEncoding
    • Find ZipArchiveEntry name/comment UTF-8 encoding change
    • Finds access to ZipArchiveEntry.Name, FullName, or Comment properties. In .NET 9, these now respect the UTF-8 flag in ZIP entries, which may change decoded values.

netty

5 recipes

networking

8 recipes

  • OpenRewrite.Recipes.Net5.FindWinHttpHandler
    • Find WinHttpHandler usage (removed in .NET 5)
    • Finds usages of WinHttpHandler which was removed from the .NET 5 runtime. Install the System.Net.Http.WinHttpHandler NuGet package explicitly.
  • OpenRewrite.Recipes.Net6.FindWebRequest
    • Find WebRequest/HttpWebRequest/WebClient usage (SYSLIB0014)
    • Finds usages of WebRequest, HttpWebRequest, and WebClient which are obsolete in .NET 6 (SYSLIB0014). Use HttpClient instead.
  • OpenRewrite.Recipes.Net7.FindObsoleteSslProtocols
    • Find obsolete SslProtocols.Tls/Tls11 usage (SYSLIB0039)
    • Finds usages of SslProtocols.Tls and SslProtocols.Tls11 which are obsolete in .NET 7 (SYSLIB0039). Use SslProtocols.Tls12, SslProtocols.Tls13, or SslProtocols.None instead.
  • OpenRewrite.Recipes.Net9.FindAuthenticationManager
    • Find AuthenticationManager usage (SYSLIB0009)
    • Finds usages of AuthenticationManager which is not supported in .NET 9 (SYSLIB0009). Methods will no-op or throw PlatformNotSupportedException.
  • OpenRewrite.Recipes.Net9.FindHttpClientHandlerCast
    • Find HttpClientHandler usage (HttpClientFactory default change)
    • Finds usages of HttpClientHandler which may break when HttpClientFactory switches its default handler to SocketsHttpHandler in .NET 9.
  • OpenRewrite.Recipes.Net9.FindHttpListenerRequestUserAgent
    • Find HttpListenerRequest.UserAgent nullable change
    • Finds accesses to HttpListenerRequest.UserAgent which changed from string to string? in .NET 9. Code that assumes UserAgent is non-null may throw NullReferenceException.
  • OpenRewrite.Recipes.Net9.FindServicePointManager
    • Find ServicePointManager usage (SYSLIB0014)
    • Finds usages of ServicePointManager which is fully obsolete in .NET 9 (SYSLIB0014). Settings on ServicePointManager don't affect SslStream or HttpClient.
  • org.openrewrite.java.migrate.net.JavaNetAPIs
    • Use modernized java.net APIs
    • Certain Java networking APIs have become deprecated and their usages changed, necessitating usage changes.

newrelic

1 recipe

nextjs

12 recipes

nio

1 recipe

nodejs

1 recipe

non

1 recipe

oauth2

2 recipes

observability

3 recipes

okhttp

1 recipe

omnifaces

6 recipes

openapi

10 recipes

opentelemetry

8 recipes

opentracing

1 recipe

optimization

1 recipe

  • org.openrewrite.docker.DockerBuildOptimization
    • Optimize Docker builds
    • Apply build optimization best practices to Dockerfiles. This includes combining RUN instructions to reduce layers and adding cleanup commands to reduce image size.

oracle

4 recipes

orm

2 recipes

oss

1 recipe

panache

2 recipes

pathlib

1 recipe

PEP 594

19 recipes

pep604

2 recipes

performance

40 recipes

permissions

1 recipe

persistence

7 recipes

petclinic

2 recipes

plain text

1 recipe

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

platform

1 recipe

  • org.openrewrite.python.migrate.ReplacePlatformPopen
    • Replace platform.popen() with subprocess.check_output()
    • platform.popen() was removed in Python 3.8. Use subprocess.check_output(cmd, shell=True) instead. Note: this rewrites call sites but does not manage imports.

plugin

1 recipe

poi

3 recipes

  • org.openrewrite.apache.poi.UpgradeApachePoi_3_17
    • Migrates to Apache POI 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.
  • org.openrewrite.apache.poi.UpgradeApachePoi_4_1
    • Migrates to Apache POI 4.1.2
    • Migrates to the last Apache POI 4.x release. This recipe modifies build files and makes changes to deprecated/preferred APIs that have changed between versions.
  • org.openrewrite.apache.poi.UpgradeApachePoi_5
    • Migrates to Apache POI 5.x
    • Migrates to the latest Apache POI 5.x release. This recipe modifies build files to account for artifact renames and upgrades dependency versions. It also chains the 4.1 recipe to handle all prior API migrations.

postgresql

7 recipes

primefaces

4 recipes

pubsub

2 recipes

pulsar

1 recipe

python

72 recipes

quarkus

53 recipes

quartz

1 recipe

ra

3 recipes

rabbitmq

1 recipe

rdbms

2 recipes

RDS

4 recipes

re

1 recipe

  • org.openrewrite.python.migrate.ReplaceReTemplate
    • Replace re.template() with re.compile() and flag re.TEMPLATE/re.T
    • re.template() was deprecated in Python 3.11 and removed in 3.13. Calls are auto-replaced with re.compile(). re.TEMPLATE/re.T flags have no direct replacement and are flagged for manual review.

reactive

4 recipes

reactor

2 recipes

redis

1 recipe

redundancy

3 recipes

refactoring

1 recipe

  • org.openrewrite.java.migrate.lang.UseVar
    • Use local variable type inference
    • 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.

reflection

2 recipes

regex

1 recipe

resource

2 recipes

rest

1 recipe

richfaces

3 recipes

routing

1 recipe

RSPEC

215 recipes

  • org.openrewrite.cobol.cleanup.RemoveWithDebuggingMode
    • Remove with debugging mode
    • Remove debugging mode from SOURCE-COMPUTER paragraphs.
    • Tags: RSPEC-4057
  • org.openrewrite.java.RemoveUnusedImports
    • Remove unused imports
    • 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.
    • Tags: RSPEC-S1128
  • org.openrewrite.java.format.EmptyNewlineAtEndOfFile
    • End files with a single newline
    • Some tools work better when files end with an empty line.
    • Tags: RSPEC-S113
  • org.openrewrite.java.format.WrappingAndBraces
    • Wrapping and braces
    • Format line wraps and braces in Java code.
    • Tags: RSPEC-S121, RSPEC-S2681, RSPEC-S3972, RSPEC-S3973
  • org.openrewrite.java.logging.ParameterizedLogging
    • Parameterize logging statements
    • Transform logging statements using concatenation for messages and variables into a parameterized format. For example, logger.info("hi " + userName) becomes logger.info("hi \{\}", 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.
    • Tags: RSPEC-S2629, RSPEC-S3457
  • org.openrewrite.java.logging.slf4j.LoggersNamedForEnclosingClass
    • Loggers should be named for their enclosing classes
    • Ensure LoggerFactory#getLogger(Class) is called with the enclosing class as argument.
    • Tags: RSPEC-S3416
  • org.openrewrite.java.logging.slf4j.ParameterizedLogging
    • Parameterize SLF4J's logging statements
    • 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.
    • Tags: RSPEC-S2629
  • org.openrewrite.java.migrate.guava.NoGuavaCreateTempDir
    • Prefer Files#createTempDirectory()
    • Replaces Guava Files#createTempDir() with Java Files#createTempDirectory(..). Transformations are limited to scopes throwing or catching java.io.IOException.
    • Tags: RSPEC-S4738
  • org.openrewrite.java.migrate.guava.NoGuavaOptionalFromJavaUtil
    • Replace com.google.common.base.Optional#fromJavaUtil(java.util.Optional) with argument
    • Replaces com.google.common.base.Optional#fromJavaUtil(java.util.Optional) with argument.
    • Tags: RSPEC-S4738
  • org.openrewrite.java.migrate.guava.NoGuavaOptionalToJavaUtil
    • Remove com.google.common.base.Optional#toJavaUtil()
    • Remove calls to com.google.common.base.Optional#toJavaUtil().
    • Tags: RSPEC-S4738
  • org.openrewrite.java.migrate.guava.PreferJavaUtilFunction
    • Prefer java.util.function.Function
    • Prefer java.util.function.Function instead of using com.google.common.base.Function.
    • Tags: RSPEC-S4738
  • org.openrewrite.java.migrate.guava.PreferJavaUtilOptional
    • Prefer java.util.Optional
    • Prefer java.util.Optional instead of using com.google.common.base.Optional.
    • Tags: RSPEC-S4738
  • org.openrewrite.java.migrate.guava.PreferJavaUtilOptionalOrElseNull
    • Prefer java.util.Optional#orElse(null) over com.google.common.base.Optional#orNull()
    • Replaces com.google.common.base.Optional#orNull() with java.util.Optional#orElse(null).
    • Tags: RSPEC-S4738
  • org.openrewrite.java.migrate.guava.PreferJavaUtilOptionalOrSupplier
    • Prefer java.util.Optional#or(Supplier<T extends java.util.Optional<T>>)
    • Prefer java.util.Optional#or(Supplier<T extends java.util.Optional<T>>) over `com.google.common.base.Optional#or(com.google.common.base.Optional).
    • Tags: RSPEC-S4738
  • org.openrewrite.java.migrate.guava.PreferJavaUtilPredicate
    • Prefer java.util.function.Predicate
    • Prefer java.util.function.Predicate instead of using com.google.common.base.Predicate.
    • Tags: RSPEC-S4738
  • org.openrewrite.java.migrate.guava.PreferJavaUtilSupplier
    • Prefer java.util.function.Supplier
    • Prefer java.util.function.Supplier instead of using com.google.common.base.Supplier.
    • Tags: RSPEC-S4738
  • org.openrewrite.java.migrate.util.ReplaceStreamCollectWithToList
    • Replace Stream.collect(Collectors.toUnmodifiableList()) with Stream.toList()
    • Replace Stream.collect(Collectors.toUnmodifiableList()) with Java 16+ Stream.toList(). Also replaces Stream.collect(Collectors.toList()) if convertToList is set to true.
    • Tags: RSPEC-S6204
  • org.openrewrite.java.search.FindEmptyClasses
    • Find empty classes
    • Find empty classes without annotations that do not implement an interface or extend a class.
    • Tags: RSPEC-S2094
  • org.openrewrite.java.search.FindEmptyMethods
    • Find methods with empty bodies
    • Find methods with empty bodies and single public no arg constructors.
    • Tags: RSPEC-S1186
  • org.openrewrite.java.search.ResultOfMethodCallIgnored
    • Result of method call ignored
    • Find locations where the result of the method call is being ignored.
    • Tags: RSPEC-S6809
  • org.openrewrite.java.security.SecureRandom
    • Secure random
    • Use cryptographically secure Pseudo Random Number Generation in the "main" source set. Replaces instantiation of java.util.Random with java.security.SecureRandom.
    • Tags: RSPEC-S2245
  • org.openrewrite.java.security.SecureRandomPrefersDefaultSeed
    • SecureRandom seeds are not constant or predictable
    • Remove SecureRandom#setSeed(*) method invocations having constant or predictable arguments.
    • Tags: RSPEC-S4347
  • org.openrewrite.java.security.UseFilesCreateTempDirectory
    • Use Files#createTempDirectory
    • Use Files#createTempDirectory when the sequence File#createTempFile(..)->File#delete()->File#mkdir() is used for creating a temp directory.
    • Tags: RSPEC-S5445
  • org.openrewrite.java.security.XmlParserXXEVulnerability
    • XML parser XXE vulnerability
    • Avoid exposing dangerous features of the XML parser by updating certain factory settings.
    • Tags: RSPEC-S2755
  • org.openrewrite.java.security.secrets.FindSecrets
    • Find secrets
    • Locates secrets stored in plain text in code.
    • Tags: RSPEC-S6437
  • org.openrewrite.java.spring.NoRequestMappingAnnotation
    • Remove @RequestMapping annotations
    • Replace method declaration @RequestMapping annotations with @GetMapping, @PostMapping, etc. when possible.
    • Tags: RSPEC-S4488
  • org.openrewrite.java.testing.assertj.SimplifyChainedAssertJAssertion
    • Simplify AssertJ chained assertions
    • Many AssertJ chained assertions have dedicated assertions that function the same. It is best to use the dedicated assertions.
    • Tags: RSPEC-S5838
  • org.openrewrite.java.testing.cleanup.AssertionsArgumentOrder
    • Assertion arguments should be passed in the correct order
    • 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.
    • Tags: RSPEC-S3415
  • org.openrewrite.java.testing.cleanup.RemoveEmptyTests
    • Remove empty tests without comments
    • Removes empty methods with a @Test annotation if the body does not have comments.
    • Tags: RSPEC-S1186
  • org.openrewrite.java.testing.cleanup.TestsShouldIncludeAssertions
    • Include an assertion in tests
    • For tests not having any assertions, wrap the statements with JUnit Jupiter's Assertions#assertDoesNotThrow(..).
    • Tags: RSPEC-S2699
  • org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic
    • Remove public visibility of JUnit 5 tests
    • 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.
    • Tags: RSPEC-S5786
  • org.openrewrite.java.testing.junit5.AddMissingNested
    • JUnit 5 inner test classes should be annotated with @Nested
    • Adds @Nested to inner classes that contain JUnit 5 tests.
    • Tags: RSPEC-S5790
  • org.openrewrite.java.testing.junit5.RemoveTryCatchFailBlocks
    • Replace fail() in try-catch blocks with Assertions.assertDoesNotThrow(() -> \{ ... \})
    • Replace try-catch blocks where catch merely contains a fail() for fail(String) statement with Assertions.assertDoesNotThrow(() -> \{ ... \}).
    • Tags: RSPEC-S3658
  • org.openrewrite.java.testing.mockito.SimplifyMockitoVerifyWhenGiven
    • Call to Mockito method "verify", "when" or "given" should be simplified
    • Fixes Sonar issue java:S6068: Call to Mockito method "verify", "when" or "given" should be simplified.
    • Tags: RSPEC-6068
  • org.openrewrite.kotlin.cleanup.EqualsMethodUsage
    • Structural equality tests should use == or !=
    • 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.
    • Tags: RSPEC-S6519
  • org.openrewrite.kotlin.cleanup.ImplicitParameterInLambda
    • it shouldn't be used as a lambda parameter name
    • 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.
    • Tags: RSPEC-S6558
  • org.openrewrite.maven.OrderPomElements
    • Order POM elements
    • Order POM elements according to the recommended order.
    • Tags: RSPEC-S3423
  • org.openrewrite.staticanalysis.AbstractClassPublicConstructor
    • Constructors of an abstract class should not be declared public
    • Constructors of abstract classes can only be called in constructors of their subclasses. Therefore the visibility of public constructors are reduced to protected.
    • Tags: RSPEC-S5993
  • org.openrewrite.staticanalysis.AddSerialVersionUidToSerializable
    • Add serialVersionUID to a Serializable class when missing
    • 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.
    • Tags: RSPEC-S2057
  • org.openrewrite.staticanalysis.AtomicPrimitiveEqualsUsesGet
    • Atomic Boolean, Integer, and Long equality checks compare their values
    • 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().
    • Tags: RSPEC-S2204
  • org.openrewrite.staticanalysis.AvoidBoxedBooleanExpressions
    • Avoid boxed boolean expressions
    • Under certain conditions the java.lang.Boolean type is used as an expression, and it may throw a NullPointerException if the value is null.
    • Tags: RSPEC-S5411
  • org.openrewrite.staticanalysis.BigDecimalDoubleConstructorRecipe
    • new BigDecimal(double) should not be used
    • 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).
    • Tags: RSPEC-S2111
  • org.openrewrite.staticanalysis.BigDecimalRoundingConstantsToEnums
    • BigDecimal rounding constants to RoundingMode enums
    • Convert BigDecimal rounding constants to the equivalent RoundingMode enum.
    • Tags: RSPEC-S2111
  • org.openrewrite.staticanalysis.BooleanChecksNotInverted
    • Boolean checks should not be inverted
    • Ensures that boolean checks are not unnecessarily inverted. Also fixes double negative boolean expressions.
    • Tags: RSPEC-S1940
  • org.openrewrite.staticanalysis.CaseInsensitiveComparisonsDoNotChangeCase
    • CaseInsensitive comparisons do not alter case
    • Remove String#toLowerCase() or String#toUpperCase() from String#equalsIgnoreCase(..) comparisons.
    • Tags: RSPEC-S1157
  • org.openrewrite.staticanalysis.CatchClauseOnlyRethrows
    • Catch clause should do more than just rethrow
    • 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.
    • Tags: RSPEC-S2737
  • org.openrewrite.staticanalysis.ChainStringBuilderAppendCalls
    • Chain StringBuilder.append() calls
    • 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().
    • Tags: RSPEC-S3024
  • org.openrewrite.staticanalysis.CollectionToArrayShouldHaveProperType
    • 'Collection.toArray()' should be passed an array of the proper type
    • 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.
    • Tags: RSPEC-S3020
  • org.openrewrite.staticanalysis.CombineSemanticallyEqualCatchBlocks
    • Combine semantically equal catch blocks
    • 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.
    • Tags: RSPEC-S2147
  • org.openrewrite.staticanalysis.CommonDeclarationSiteTypeVariances
    • Properly use declaration-site type variance for well-known types
    • When using a method parameter like Function<IN, OUT>, it should rather be Function<? super IN, ? extends OUT>. This recipe checks for method parameters of well-known types.
    • Tags: RSPEC-S1217
  • org.openrewrite.staticanalysis.CompareEnumsWithEqualityOperator
    • Enum values should be compared with "=="
    • Replaces Enum equals(java.lang.Object) with Enum == java.lang.Object. An !Enum equals(java.lang.Object) will change to !=.
    • Tags: RSPEC-S4551
  • org.openrewrite.staticanalysis.ControlFlowIndentation
    • Control flow statement indentation
    • 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.
    • Tags: RSPEC-S2681
  • org.openrewrite.staticanalysis.CovariantEquals
    • Covariant equals
    • 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).
    • Tags: RSPEC-S2162
  • org.openrewrite.staticanalysis.DefaultComesLast
    • Default comes last
    • Ensure the default case comes last after all the cases in a switch statement.
    • Tags: RSPEC-S4524
  • org.openrewrite.staticanalysis.EmptyBlock
    • Remove empty blocks
    • Remove empty blocks that effectively do nothing.
    • Tags: RSPEC-S108
  • org.openrewrite.staticanalysis.EqualsAvoidsNull
    • Equals avoids null
    • 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 = "text")). And removes redundant null checks in conjunction with equals comparisons.
    • Tags: RSPEC-S1132
  • org.openrewrite.staticanalysis.ExplicitCharsetOnStringGetBytes
    • Set charset encoding explicitly when calling String#getBytes
    • 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.
    • Tags: RSPEC-S4719
  • org.openrewrite.staticanalysis.ExplicitInitialization
    • Explicit initialization
    • 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.
    • Tags: RSPEC-S3052
  • org.openrewrite.staticanalysis.ExplicitLambdaArgumentTypes
    • Use explicit types on lambda arguments
    • 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) -> a.length); will not have explicit types added.
    • Tags: RSPEC-S2211
  • org.openrewrite.staticanalysis.ExternalizableHasNoArgsConstructor
    • Externalizable classes have no-arguments constructor
    • Externalizable classes handle both serialization and deserialization and must have a no-args constructor for the deserialization process.
    • Tags: RSPEC-S2060
  • org.openrewrite.staticanalysis.FallThrough
    • Fall through
    • 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.
    • Tags: RSPEC-S128
  • org.openrewrite.staticanalysis.FinalClass
    • Finalize classes with private constructors
    • Adds the final modifier to classes that expose no public or package-private constructors.
    • Tags: RSPEC-S2974
  • org.openrewrite.staticanalysis.FixStringFormatExpressions
    • Fix String#format and String#formatted expressions
    • 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.
    • Tags: RSPEC-S3457
  • org.openrewrite.staticanalysis.ForLoopIncrementInUpdate
    • for loop counters incremented in update
    • The increment should be moved to the loop's increment clause if possible.
    • Tags: RSPEC-S1994
  • org.openrewrite.staticanalysis.HiddenField
    • Hidden field
    • Refactor local variables or parameters which shadow a field defined in the same class.
    • Tags: RSPEC-S1117, RSPEC-S2387
  • org.openrewrite.staticanalysis.HideUtilityClassConstructor
    • Hide utility class constructor
    • Ensures utility classes (classes containing only static methods or fields in their API) do not have a public constructor.
    • Tags: RSPEC-S1118
  • org.openrewrite.staticanalysis.IndexOfChecksShouldUseAStartPosition
    • Use indexOf(String, int)
    • Replaces indexOf(String) in binary operations if the compared value is an int and not less than 1.
    • Tags: RSPEC-S2912
  • org.openrewrite.staticanalysis.IndexOfReplaceableByContains
    • indexOf() replaceable by contains()
    • Checking if a value is included in a String or List using indexOf(value)>-1 or indexOf(value)>=0 can be replaced with contains(value).
    • Tags: RSPEC-S2692
  • org.openrewrite.staticanalysis.IndexOfShouldNotCompareGreaterThanZero
    • indexOf should not compare greater than zero
    • Replaces String#indexOf(String) > 0 and List#indexOf(Object) > 0 with >=1. Checking indexOf against >0 ignores the first element, whereas >-1 is inclusive of the first element. For clarity, >=1 is used, because >0 and >=1 are semantically equal. Using >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.
    • Tags: RSPEC-S2692
  • org.openrewrite.staticanalysis.InlineVariable
    • Inline variable
    • Inline variables when they are immediately used to return or throw. Supports both variable declarations and assignments to local variables.
    • Tags: RSPEC-S1488
  • org.openrewrite.staticanalysis.InstanceOfPatternMatch
    • Changes code to use Java 17's instanceof pattern matching
    • 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.
    • Tags: RSPEC-S6201
  • org.openrewrite.staticanalysis.InterruptedExceptionHandling
    • Restore interrupted state in catch blocks
    • When InterruptedException is caught, Thread.currentThread().interrupt() should be called to restore the thread's interrupted state. Failing to do so can suppress the interruption signal and prevent proper thread cancellation.
    • Tags: RSPEC-S2142
  • org.openrewrite.staticanalysis.IsEmptyCallOnCollections
    • Use Collection#isEmpty() instead of comparing size()
    • Also check for not isEmpty() when testing for not equal to zero size.
    • Tags: RSPEC-S1155, RSPEC-S3981
  • org.openrewrite.staticanalysis.LambdaBlockToExpression
    • Simplify lambda blocks to expressions
    • Single-line statement lambdas returning a value can be replaced with expression lambdas.
    • Tags: RSPEC-S1602
  • org.openrewrite.staticanalysis.LowercasePackage
    • Rename packages to lowercase
    • 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.
    • Tags: RSPEC-S120
  • org.openrewrite.staticanalysis.MemberNameCaseInsensitiveDuplicates
    • Members should not have names differing only by capitalization
    • Looking at the set of methods and fields in a class and all of its parents, no two members should have names that differ only in capitalization. This rule will not report if a method overrides a parent method.
    • Tags: RSPEC-S1845
  • org.openrewrite.staticanalysis.MethodNameCasing
    • Standardize method name casing
    • 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().
    • Tags: RSPEC-S100
  • org.openrewrite.staticanalysis.MinimumSwitchCases
    • switch statements should have at least 3 case clauses
    • 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.
    • Tags: RSPEC-S1301
  • org.openrewrite.staticanalysis.MissingOverrideAnnotation
    • Add missing @Override to overriding and implementing methods
    • 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.
    • Tags: RSPEC-S1161
  • org.openrewrite.staticanalysis.ModifierOrder
    • Modifier order
    • Modifiers should be declared in the correct order as recommended by the JLS.
    • Tags: RSPEC-S1124
  • org.openrewrite.staticanalysis.MultipleVariableDeclarations
    • No multiple variable declarations
    • 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.
    • Tags: RSPEC-S1659
  • org.openrewrite.staticanalysis.NeedBraces
    • Fix missing braces
    • Adds missing braces around code such as single-line if, for, while, and do-while block bodies.
    • Tags: RSPEC-S121
  • org.openrewrite.staticanalysis.NestedEnumsAreNotStatic
    • Nested enums are not static
    • Remove static modifier from nested enum types since they are implicitly static.
    • Tags: RSPEC-S2786
  • org.openrewrite.staticanalysis.NewStringBuilderBufferWithCharArgument
    • Change StringBuilder and StringBuffer character constructor argument to String
    • Instantiating a StringBuilder or a StringBuffer with a Character results in the int representation of the character being used for the initial size.
    • Tags: RSPEC-S1317
  • org.openrewrite.staticanalysis.NoDoubleBraceInitialization
    • No double brace initialization
    • Replace List, Map, and Set double brace initialization with an initialization block.
    • Tags: RSPEC-S1171, RSPEC-S3599
  • org.openrewrite.staticanalysis.NoEmptyCollectionWithRawType
    • Use Collections#emptyList(), emptyMap(), and emptySet()
    • Replaces Collections#EMPTY_... with methods that return generic types.
    • Tags: RSPEC-S1596
  • org.openrewrite.staticanalysis.NoEqualityInForCondition
    • Use comparison rather than equality checks in for conditions
    • 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.
    • Tags: RSPEC-S888
  • org.openrewrite.staticanalysis.NoFinalizer
    • Remove finalize() method
    • Finalizers are deprecated. Use of finalize() can lead to performance issues, deadlocks, hangs, and other undesirable behavior.
    • Tags: RSPEC-S1113
  • org.openrewrite.staticanalysis.NoPrimitiveWrappersForToStringOrCompareTo
    • No primitive wrappers for #toString() or #compareTo(..)
    • Primitive wrappers should not be instantiated only for #toString() or #compareTo(..) invocations.
    • Tags: RSPEC-S1158
  • org.openrewrite.staticanalysis.NoRedundantJumpStatements
    • Jump statements should not be redundant
    • 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.
    • Tags: RSPEC-S3626
  • org.openrewrite.staticanalysis.NoToStringOnStringType
    • Unnecessary String#toString
    • Remove unnecessary String#toString invocations on objects which are already a string.
    • Tags: RSPEC-S1858
  • org.openrewrite.staticanalysis.NoValueOfOnStringType
    • Unnecessary String#valueOf(..)
    • 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("example"). Or, when the String#valueOf(..) invocation is used in a concatenation, such as "example" + String.valueOf("example").
    • Tags: RSPEC-S1153
  • org.openrewrite.staticanalysis.ObjectFinalizeCallsSuper
    • finalize() calls super
    • Overrides of Object#finalize() should call super.
    • Tags: RSPEC-S1114
  • org.openrewrite.staticanalysis.OnlyCatchDeclaredExceptions
    • Replace catch(Exception) with specific declared exceptions thrown in the try block
    • 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.
    • Tags: RSPEC-S2221
  • org.openrewrite.staticanalysis.PrimitiveWrapperClassConstructorToValueOf
    • Use primitive wrapper valueOf method
    • 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.
    • Tags: RSPEC-S2129
  • org.openrewrite.staticanalysis.ReferentialEqualityToObjectEquals
    • Replace referential equality operators with Object equals method invocations when the operands both override Object.equals(Object obj)
    • 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.
    • Tags: RSPEC-S1698
  • org.openrewrite.staticanalysis.RemoveCallsToObjectFinalize
    • Remove Object.finalize() invocations
    • Remove calls to Object.finalize(). This method is called during garbage collection and calling it manually is misleading.
    • Tags: RSPEC-S1111
  • org.openrewrite.staticanalysis.RemoveCallsToSystemGc
    • Remove garbage collection invocations
    • Removes calls to System.gc() and Runtime.gc(). When to invoke garbage collection is best left to the JVM.
    • Tags: RSPEC-S1215
  • org.openrewrite.staticanalysis.RemoveExtraSemicolons
    • Remove extra semicolons
    • 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.
    • Tags: RSPEC-S1116, RSPEC-S2959
  • org.openrewrite.staticanalysis.RemoveHashCodeCallsFromArrayInstances
    • hashCode() should not be called on array instances
    • Replace hashCode() calls on arrays with Arrays.hashCode() because the results from hashCode() are not helpful.
    • Tags: RSPEC-S2116
  • org.openrewrite.staticanalysis.RemoveRedundantNullCheckBeforeInstanceof
    • Remove redundant null checks before instanceof
    • Removes redundant null checks before instanceof operations since instanceof returns false for null.
    • Tags: RSPEC-S1697
  • org.openrewrite.staticanalysis.RemoveRedundantTypeCast
    • Remove redundant casts
    • Removes unnecessary type casts. Does not currently check casts in lambdas and class constructors.
    • Tags: RSPEC-S1905
  • org.openrewrite.staticanalysis.RemoveSystemOutPrintln
    • Remove System.out#println statements
    • 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.
    • Tags: RSPEC-S106
  • org.openrewrite.staticanalysis.RemoveToStringCallsFromArrayInstances
    • Remove toString() calls on arrays
    • 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.
    • Tags: RSPEC-S2116
  • org.openrewrite.staticanalysis.RemoveUnneededBlock
    • Remove unneeded block
    • Flatten blocks into inline statements when possible.
    • Tags: RSPEC-S1199
  • org.openrewrite.staticanalysis.RemoveUnusedLocalVariables
    • Remove unused local variables
    • If a local variable is declared but not used, it is dead code and should be removed.
    • Tags: RSPEC-S1481
  • org.openrewrite.staticanalysis.RemoveUnusedPrivateFields
    • Remove unused private fields
    • If a private field is declared but not used in the program, it can be considered dead code and should therefore be removed.
    • Tags: RSPEC-S1068
  • org.openrewrite.staticanalysis.RemoveUnusedPrivateMethods
    • Remove unused private methods
    • private methods that are never executed are dead code and should be removed.
    • Tags: RSPEC-S1144
  • org.openrewrite.staticanalysis.RenameLocalVariablesToCamelCase
    • Reformat local variable names to camelCase
    • 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.
    • Tags: RSPEC-S117
  • org.openrewrite.staticanalysis.RenameMethodsNamedHashcodeEqualOrToString
    • Rename methods named hashcode, equal, or tostring
    • 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.
    • Tags: RSPEC-S1221
  • org.openrewrite.staticanalysis.RenamePrivateFieldsToCamelCase
    • Reformat private field names to camelCase
    • 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.
    • Tags: RSPEC-S116, RSPEC-S3008
  • org.openrewrite.staticanalysis.ReplaceClassIsInstanceWithInstanceof
    • Replace A.class.isInstance(a) with a instanceof A
    • There should be no A.class.isInstance(a), it should be replaced by a instanceof A.
    • Tags: RSPEC-S6202
  • org.openrewrite.staticanalysis.ReplaceDuplicateStringLiterals
    • Replace duplicate String literals
    • 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.
    • Tags: RSPEC-S1192, RSPEC-S1889
  • org.openrewrite.staticanalysis.ReplaceLambdaWithMethodReference
    • Use method references in lambda
    • Replaces the single statement lambdas o -> o instanceOf X, o -> (A) o, o -> System.out.println(o), o -> o != null, o -> o == null with the equivalent method reference.
    • Tags: RSPEC-S1612
  • org.openrewrite.staticanalysis.ReplaceStackWithDeque
    • Replace java.util.Stack with java.util.Deque
    • 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.
    • Tags: RSPEC-S1149
  • org.openrewrite.staticanalysis.ReplaceStringConcatenationWithStringValueOf
    • Replace String concatenation with String.valueOf()
    • Replace inefficient string concatenation patterns like "" + ... with String.valueOf(...). This improves code readability and may have minor performance benefits.
    • Tags: RSPEC-S1153
  • org.openrewrite.staticanalysis.ReplaceTextBlockWithString
    • Replace text block with regular string
    • Replace text block with a regular multi-line string.
    • Tags: RSPEC-S5663
  • org.openrewrite.staticanalysis.ReplaceThreadRunWithThreadStart
    • Replace calls to Thread.run() with Thread.start()
    • Thread.run() should not be called directly.
    • Tags: RSPEC-S1217
  • org.openrewrite.staticanalysis.ReplaceWeekYearWithYear
    • Week Year (YYYY) should not be used for date formatting
    • 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.
    • Tags: RSPEC-S3986
  • org.openrewrite.staticanalysis.SimplifyArraysAsList
    • Simplify Arrays.asList(..) with varargs
    • Simplifies Arrays.asList() method calls that use explicit array creation to use varargs instead. For example, Arrays.asList(new String[]\{"a", "b", "c"\}) becomes Arrays.asList("a", "b", "c").
    • Tags: RSPEC-S3878
  • org.openrewrite.staticanalysis.SimplifyBooleanExpression
    • Simplify boolean expression
    • Checks for overly complicated boolean expressions, such as if (b == true), b || true, !false, etc.
    • Tags: RSPEC-S1125
  • org.openrewrite.staticanalysis.SimplifyBooleanExpressionWithDeMorgan
    • Simplify boolean expressions using De Morgan's laws
    • Applies De Morgan's laws to simplify boolean expressions with negation. Transforms !(a && b) to !a || !b and !(a || b) to !a && !b.
    • Tags: RSPEC-S1125
  • org.openrewrite.staticanalysis.SimplifyBooleanReturn
    • Simplify boolean return
    • Simplifies Boolean expressions by removing redundancies. For example, a && true simplifies to a.
    • Tags: RSPEC-S1126
  • org.openrewrite.staticanalysis.SimplifyConstantIfBranchExecution
    • Simplify constant if branch execution
    • Checks for if expressions that are always true or false and simplifies them.
    • Tags: RSPEC-S6646
  • org.openrewrite.staticanalysis.SimplifyTernaryRecipes
    • Simplify ternary expressions
    • Simplifies various types of ternary expressions to improve code readability.
    • Tags: RSPEC-S1125
  • org.openrewrite.staticanalysis.StaticMethodNotFinal
    • Static methods need not be final
    • Static methods do not need to be declared final because they cannot be overridden.
    • Tags: RSPEC-S2333
  • org.openrewrite.staticanalysis.StringLiteralEquality
    • Use String.equals() on String literals
    • 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 "someString" == someVariable;. This is to prevent inadvertently changing code where referential equality is the user's intent.
    • Tags: RSPEC-S4973
  • org.openrewrite.staticanalysis.TernaryOperatorsShouldNotBeNested
    • Ternary operators should not be nested
    • 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.
    • Tags: RSPEC-S3358
  • org.openrewrite.staticanalysis.URLEqualsHashCodeRecipes
    • URL Equals and Hash Code
    • Uses of equals() and hashCode() cause java.net.URL to make blocking internet connections. Instead, use java.net.URI.
    • Tags: RSPEC-2112
  • org.openrewrite.staticanalysis.URLEqualsHashCodeRecipes$URLEqualsRecipe
    • URL Equals
    • Uses of equals() cause java.net.URL to make blocking internet connections. Instead, use java.net.URI.
    • Tags: RSPEC-2112
  • org.openrewrite.staticanalysis.URLEqualsHashCodeRecipes$URLHashCodeRecipe
    • URL Hash Code
    • Uses of hashCode() cause java.net.URL to make blocking internet connections. Instead, use java.net.URI.
    • Tags: RSPEC-2112
  • org.openrewrite.staticanalysis.UnnecessaryCloseInTryWithResources
    • Unnecessary close in try-with-resources
    • Remove unnecessary AutoCloseable#close() statements in try-with-resources.
    • Tags: RSPEC-S4087
  • org.openrewrite.staticanalysis.UnnecessaryParentheses
    • Remove unnecessary parentheses
    • Removes unnecessary parentheses from code where extra parentheses pairs are redundant.
    • Tags: RSPEC-S1110, RSPEC-S1611
  • org.openrewrite.staticanalysis.UnnecessaryPrimitiveAnnotations
    • Remove @Nullable and @CheckForNull annotations from primitives
    • Primitives can't be null anyway, so these annotations are not useful in this context.
    • Tags: RSPEC-S4682
  • org.openrewrite.staticanalysis.UnnecessaryReturnAsLastStatement
    • Unnecessary return as last statement in void method
    • Removes return from a void method if it's the last statement.
    • Tags: RSPEC-S3626
  • org.openrewrite.staticanalysis.UnnecessaryThrows
    • Unnecessary throws
    • 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.
    • Tags: RSPEC-S1130
  • org.openrewrite.staticanalysis.UnwrapRepeatableAnnotations
    • Unwrap @Repeatable annotations
    • Java 8 introduced the concept of @Repeatable annotations, making the wrapper annotation unnecessary.
    • Tags: RSPEC-S1710
  • org.openrewrite.staticanalysis.UpperCaseLiteralSuffixes
    • Upper case literal suffixes
    • Using upper case literal suffixes for declaring literals is less ambiguous, e.g., 1l versus 1L.
    • Tags: RSPEC-S818
  • org.openrewrite.staticanalysis.UseCollectionInterfaces
    • Use Collection interfaces
    • 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.
    • Tags: RSPEC-S1319
  • org.openrewrite.staticanalysis.UseDiamondOperator
    • Use the diamond operator
    • The diamond operator (<>) 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 <>, and the compiler will infer the type.
    • Tags: RSPEC-S2293
  • org.openrewrite.staticanalysis.UseJavaStyleArrayDeclarations
    • No C-style array declarations
    • Change C-Style array declarations int i[]; to int[] i;.
    • Tags: RSPEC-S1197
  • org.openrewrite.staticanalysis.UseLambdaForFunctionalInterface
    • Use lambda expressions instead of anonymous classes
    • 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.
    • Tags: RSPEC-S1604
  • org.openrewrite.staticanalysis.UseObjectNotifyAll
    • Replaces Object.notify() with Object.notifyAll()
    • 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.
    • Tags: RSPEC-S2446
  • org.openrewrite.staticanalysis.UsePortableNewlines
    • Use %n instead of \n in format strings
    • Format strings should use %n rather than \n to produce platform-specific line separators.
    • Tags: RSPEC-S3457
  • org.openrewrite.staticanalysis.UseStandardCharset
    • Use StandardCharset constants
    • Replaces Charset.forName(java.lang.String) with the equivalent StandardCharset constant.
    • Tags: RSPEC-S4719
  • org.openrewrite.staticanalysis.UseStringReplace
    • Use String::replace() when first parameter is not a real regular expression
    • 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.
    • Tags: RSPEC-S5361
  • org.openrewrite.staticanalysis.UseTryWithResources
    • Use try-with-resources
    • Refactor try/finally blocks to use try-with-resources when the finally block only closes an AutoCloseable resource.
    • Tags: RSPEC-S2093
  • org.openrewrite.staticanalysis.WhileInsteadOfFor
    • Prefer while over for loops
    • 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.
    • Tags: RSPEC-S1264
  • org.openrewrite.staticanalysis.WriteOctalValuesAsDecimal
    • Write octal values as decimal
    • Developers may not recognize octal values as such, mistaking them instead for decimal values.
    • Tags: RSPEC-S1314
  • tech.picnic.errorprone.refasterrules.AssortedRulesRecipes$LogicalImplicationRecipe
    • Refaster template AssortedRules.LogicalImplication
    • Don't unnecessarily repeat boolean expressions.
    • Tags: RSPEC-S2589
  • tech.picnic.errorprone.refasterrules.BigDecimalRulesRecipes$BigDecimalValueOfRecipe
    • Refaster template BigDecimalRules.BigDecimalValueOf
    • Prefer BigDecimal#valueOf(double) over the associated constructor.
    • Tags: RSPEC-S2111
  • tech.picnic.errorprone.refasterrules.CharSequenceRulesRecipes$CharSequenceIsEmptyRecipe
    • Refaster template CharSequenceRules.CharSequenceIsEmpty
    • Prefer CharSequence#isEmpty() over alternatives that consult the char sequence's length.
    • Tags: RSPEC-S7158
  • tech.picnic.errorprone.refasterrules.CollectionRulesRecipes$CollectionIsEmptyRecipe
    • Refaster template CollectionRules.CollectionIsEmpty
    • Prefer Collection#isEmpty() over alternatives that consult the collection's size or are otherwise more contrived.
    • Tags: RSPEC-S1155
  • tech.picnic.errorprone.refasterrules.DoubleStreamRulesRecipes$DoubleStreamAnyMatchRecipe
    • Refaster template DoubleStreamRules.DoubleStreamAnyMatch
    • Prefer DoubleStream#anyMatch(DoublePredicate) over more contrived alternatives.
    • Tags: RSPEC-S4034
  • tech.picnic.errorprone.refasterrules.EqualityRulesRecipes$DoubleNegationRecipe
    • Refaster template EqualityRules.DoubleNegation
    • Avoid double negations; this is not Javascript.
    • Tags: RSPEC-S2761
  • tech.picnic.errorprone.refasterrules.EqualityRulesRecipes$IndirectDoubleNegationRecipe
    • Refaster template EqualityRules.IndirectDoubleNegation
    • Don't negate an inequality test or use the ternary operator to compare two booleans; directly test for equality instead.
    • Tags: RSPEC-S1244, RSPEC-S1940
  • tech.picnic.errorprone.refasterrules.EqualityRulesRecipes$NegationRecipe
    • Refaster template EqualityRules.Negation
    • Don't negate an equality test or use the ternary operator to compare two booleans; directly test for inequality instead.
    • Tags: RSPEC-S1244, RSPEC-S1940
  • tech.picnic.errorprone.refasterrules.FileRulesRecipes$FilesCreateTempFileToFileRecipe
    • Prefer Files#createTempFile(String, String, FileAttribute[]) over alternatives that create files with more liberal permissions
    • 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.
    • Tags: RSPEC-S5443
  • tech.picnic.errorprone.refasterrules.FileRulesRecipes$FilesNewBufferedReaderPathOfRecipe
    • Refaster template FileRules.FilesNewBufferedReaderPathOf
    • Prefer Files#newBufferedReader(Path) over more verbose or contrived alternatives.
    • Tags: RSPEC-S1943, RSPEC-S2095
  • tech.picnic.errorprone.refasterrules.FileRulesRecipes$FilesNewBufferedReaderToPathRecipe
    • Refaster template FileRules.FilesNewBufferedReaderToPath
    • Prefer Files#newBufferedReader(Path) over more verbose or contrived alternatives.
    • Tags: RSPEC-S1943, RSPEC-S2095
  • tech.picnic.errorprone.refasterrules.ImmutableMapRulesRecipes$ImmutableMapOf4Recipe
    • Refaster template ImmutableMapRules.ImmutableMapOf4
    • 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.
    • Tags: RSPEC-S107
  • tech.picnic.errorprone.refasterrules.ImmutableMapRulesRecipes$ImmutableMapOf5Recipe
    • Refaster template ImmutableMapRules.ImmutableMapOf5
    • 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.
    • Tags: RSPEC-S107
  • tech.picnic.errorprone.refasterrules.IntStreamRulesRecipes$IntStreamAnyMatchRecipe
    • Refaster template IntStreamRules.IntStreamAnyMatch
    • Prefer IntStream#anyMatch(IntPredicate) over more contrived alternatives.
    • Tags: RSPEC-S4034
  • tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatBooleanArrayWithFailMessageSupplierContainsExactlyRecipe
    • Refaster template JUnitToAssertJRules.AssertThatBooleanArrayWithFailMessageSupplierContainsExactly
    • Recipe created for the following Refaster template: java static final class AssertThatBooleanArrayWithFailMessageSupplierContainsExactly \{ @BeforeTemplate @SuppressWarnings(value = "java:S4449") void before(boolean[] actual, Supplier<@Nullable String> message, boolean[] expected) \{ assertArrayEquals(expected, actual, message); \} @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(boolean[] actual, Supplier<@Nullable String> message, boolean[] expected) \{ assertThat(actual).withFailMessage(message).containsExactly(expected); \} \} .
    • Tags: RSPEC-S4449
  • tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatByteArrayWithFailMessageSupplierContainsExactlyRecipe
    • Refaster template JUnitToAssertJRules.AssertThatByteArrayWithFailMessageSupplierContainsExactly
    • Recipe created for the following Refaster template: java static final class AssertThatByteArrayWithFailMessageSupplierContainsExactly \{ @BeforeTemplate @SuppressWarnings(value = "java:S4449") void before(byte[] actual, Supplier<@Nullable String> message, byte[] expected) \{ assertArrayEquals(expected, actual, message); \} @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(byte[] actual, Supplier<@Nullable String> message, byte[] expected) \{ assertThat(actual).withFailMessage(message).containsExactly(expected); \} \} .
    • Tags: RSPEC-S4449
  • tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatCharArrayWithFailMessageSupplierContainsExactlyRecipe
    • Refaster template JUnitToAssertJRules.AssertThatCharArrayWithFailMessageSupplierContainsExactly
    • Recipe created for the following Refaster template: java static final class AssertThatCharArrayWithFailMessageSupplierContainsExactly \{ @BeforeTemplate @SuppressWarnings(value = "java:S4449") void before(char[] actual, Supplier<@Nullable String> message, char[] expected) \{ assertArrayEquals(expected, actual, message); \} @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(char[] actual, Supplier<@Nullable String> message, char[] expected) \{ assertThat(actual).withFailMessage(message).containsExactly(expected); \} \} .
    • Tags: RSPEC-S4449
  • tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatCodeWithFailMessageSupplierDoesNotThrowAnyExceptionRecipe
    • Refaster template JUnitToAssertJRules.AssertThatCodeWithFailMessageSupplierDoesNotThrowAnyException
    • Recipe created for the following Refaster template: java static final class AssertThatCodeWithFailMessageSupplierDoesNotThrowAnyException \{ @BeforeTemplate @SuppressWarnings(value = "java:S4449") void before(Executable throwingCallable, Supplier<@Nullable String> supplier) \{ assertDoesNotThrow(throwingCallable, supplier); \} @BeforeTemplate @SuppressWarnings(value = "java:S4449") void before(ThrowingSupplier<?> throwingCallable, Supplier<@Nullable String> supplier) \{ assertDoesNotThrow(throwingCallable, supplier); \} @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(ThrowingCallable throwingCallable, Supplier<@Nullable String> supplier) \{ assertThatCode(throwingCallable).withFailMessage(supplier).doesNotThrowAnyException(); \} \} .
    • Tags: RSPEC-S4449
  • tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatDoubleArrayWithFailMessageSupplierContainsExactlyRecipe
    • Refaster template JUnitToAssertJRules.AssertThatDoubleArrayWithFailMessageSupplierContainsExactly
    • Recipe created for the following Refaster template: java static final class AssertThatDoubleArrayWithFailMessageSupplierContainsExactly \{ @BeforeTemplate @SuppressWarnings(value = "java:S4449") void before(double[] actual, Supplier<@Nullable String> message, double[] expected) \{ assertArrayEquals(expected, actual, message); \} @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(double[] actual, Supplier<@Nullable String> message, double[] expected) \{ assertThat(actual).withFailMessage(message).containsExactly(expected); \} \} .
    • Tags: RSPEC-S4449
  • tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatDoubleArrayWithFailMessageSupplierContainsExactlyWithOffsetRecipe
    • Refaster template JUnitToAssertJRules.AssertThatDoubleArrayWithFailMessageSupplierContainsExactlyWithOffset
    • Recipe created for the following Refaster template: java static final class AssertThatDoubleArrayWithFailMessageSupplierContainsExactlyWithOffset \{ @BeforeTemplate @SuppressWarnings(value = "java:S4449") void before(double[] actual, Supplier<@Nullable String> messageSupplier, double[] expected, double delta) \{ assertArrayEquals(expected, actual, delta, messageSupplier); \} @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(double[] actual, Supplier<@Nullable String> messageSupplier, double[] expected, double delta) \{ assertThat(actual).withFailMessage(messageSupplier).containsExactly(expected, offset(delta)); \} \} .
    • Tags: RSPEC-S4449
  • tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatFloatArrayWithFailMessageSupplierContainsExactlyRecipe
    • Refaster template JUnitToAssertJRules.AssertThatFloatArrayWithFailMessageSupplierContainsExactly
    • Recipe created for the following Refaster template: java static final class AssertThatFloatArrayWithFailMessageSupplierContainsExactly \{ @BeforeTemplate @SuppressWarnings(value = "java:S4449") void before(float[] actual, Supplier<@Nullable String> message, float[] expected) \{ assertArrayEquals(expected, actual, message); \} @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(float[] actual, Supplier<@Nullable String> message, float[] expected) \{ assertThat(actual).withFailMessage(message).containsExactly(expected); \} \} .
    • Tags: RSPEC-S4449
  • tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatFloatArrayWithFailMessageSupplierContainsExactlyWithOffsetRecipe
    • Refaster template JUnitToAssertJRules.AssertThatFloatArrayWithFailMessageSupplierContainsExactlyWithOffset
    • Recipe created for the following Refaster template: java static final class AssertThatFloatArrayWithFailMessageSupplierContainsExactlyWithOffset \{ @BeforeTemplate @SuppressWarnings(value = "java:S4449") void before(float[] actual, Supplier<@Nullable String> message, float[] expected, float delta) \{ assertArrayEquals(expected, actual, delta, message); \} @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(float[] actual, Supplier<@Nullable String> message, float[] expected, float delta) \{ assertThat(actual).withFailMessage(message).containsExactly(expected, offset(delta)); \} \} .
    • Tags: RSPEC-S4449
  • tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatIntArrayWithFailMessageSupplierContainsExactlyRecipe
    • Refaster template JUnitToAssertJRules.AssertThatIntArrayWithFailMessageSupplierContainsExactly
    • Recipe created for the following Refaster template: java static final class AssertThatIntArrayWithFailMessageSupplierContainsExactly \{ @BeforeTemplate @SuppressWarnings(value = "java:S4449") void before(int[] actual, Supplier<@Nullable String> message, int[] expected) \{ assertArrayEquals(expected, actual, message); \} @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(int[] actual, Supplier<@Nullable String> message, int[] expected) \{ assertThat(actual).withFailMessage(message).containsExactly(expected); \} \} .
    • Tags: RSPEC-S4449
  • tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatLongArrayWithFailMessageSupplierContainsExactlyRecipe
    • Refaster template JUnitToAssertJRules.AssertThatLongArrayWithFailMessageSupplierContainsExactly
    • Recipe created for the following Refaster template: java static final class AssertThatLongArrayWithFailMessageSupplierContainsExactly \{ @BeforeTemplate @SuppressWarnings(value = "java:S4449") void before(long[] actual, Supplier<@Nullable String> message, long[] expected) \{ assertArrayEquals(expected, actual, message); \} @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(long[] actual, Supplier<@Nullable String> message, long[] expected) \{ assertThat(actual).withFailMessage(message).containsExactly(expected); \} \} .
    • Tags: RSPEC-S4449
  • tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatObjectArrayWithFailMessageSupplierContainsExactlyRecipe
    • Refaster template JUnitToAssertJRules.AssertThatObjectArrayWithFailMessageSupplierContainsExactly
    • Recipe created for the following Refaster template: java static final class AssertThatObjectArrayWithFailMessageSupplierContainsExactly \{ @BeforeTemplate @SuppressWarnings(value = "java:S4449") void before(Object[] actual, Supplier<@Nullable String> message, Object[] expected) \{ assertArrayEquals(expected, actual, message); \} @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(Object[] actual, Supplier<@Nullable String> message, Object[] expected) \{ assertThat(actual).withFailMessage(message).containsExactly(expected); \} \} .
    • Tags: RSPEC-S4449
  • tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatShortArrayWithFailMessageSupplierContainsExactlyRecipe
    • Refaster template JUnitToAssertJRules.AssertThatShortArrayWithFailMessageSupplierContainsExactly
    • Recipe created for the following Refaster template: java static final class AssertThatShortArrayWithFailMessageSupplierContainsExactly \{ @BeforeTemplate @SuppressWarnings(value = "java:S4449") void before(short[] actual, Supplier<@Nullable String> message, short[] expected) \{ assertArrayEquals(expected, actual, message); \} @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(short[] actual, Supplier<@Nullable String> message, short[] expected) \{ assertThat(actual).withFailMessage(message).containsExactly(expected); \} \} .
    • Tags: RSPEC-S4449
  • tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatThrownByWithFailMessageSupplierIsExactlyInstanceOfRecipe
    • Refaster template JUnitToAssertJRules.AssertThatThrownByWithFailMessageSupplierIsExactlyInstanceOf
    • Recipe created for the following Refaster template: java static final class AssertThatThrownByWithFailMessageSupplierIsExactlyInstanceOf<T extends Throwable> \{ @BeforeTemplate @SuppressWarnings(value = "java:S4449") void before(Executable throwingCallable, Supplier<@Nullable String> supplier, Class<T> clazz) \{ assertThrowsExactly(clazz, throwingCallable, supplier); \} @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(ThrowingCallable throwingCallable, Supplier<@Nullable String> supplier, Class<T> clazz) \{ assertThatThrownBy(throwingCallable).withFailMessage(supplier).isExactlyInstanceOf(clazz); \} \} .
    • Tags: RSPEC-S4449
  • tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatThrownByWithFailMessageSupplierIsInstanceOfRecipe
    • Refaster template JUnitToAssertJRules.AssertThatThrownByWithFailMessageSupplierIsInstanceOf
    • Recipe created for the following Refaster template: java static final class AssertThatThrownByWithFailMessageSupplierIsInstanceOf<T extends Throwable> \{ @BeforeTemplate @SuppressWarnings(value = "java:S4449") void before(Executable throwingCallable, Supplier<@Nullable String> supplier, Class<T> clazz) \{ assertThrows(clazz, throwingCallable, supplier); \} @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(ThrowingCallable throwingCallable, Supplier<@Nullable String> supplier, Class<T> clazz) \{ assertThatThrownBy(throwingCallable).withFailMessage(supplier).isInstanceOf(clazz); \} \} .
    • Tags: RSPEC-S4449
  • tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageSupplierIsFalseRecipe
    • Refaster template JUnitToAssertJRules.AssertThatWithFailMessageSupplierIsFalse
    • Recipe created for the following Refaster template: java static final class AssertThatWithFailMessageSupplierIsFalse \{ @BeforeTemplate @SuppressWarnings(value = "java:S4449") void before(boolean actual, Supplier<@Nullable String> supplier) \{ assertFalse(actual, supplier); \} @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(boolean actual, Supplier<@Nullable String> supplier) \{ assertThat(actual).withFailMessage(supplier).isFalse(); \} \} .
    • Tags: RSPEC-S4449
  • tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageSupplierIsInstanceOfRecipe
    • Refaster template JUnitToAssertJRules.AssertThatWithFailMessageSupplierIsInstanceOf
    • Recipe created for the following Refaster template: java static final class AssertThatWithFailMessageSupplierIsInstanceOf<T> \{ @BeforeTemplate @SuppressWarnings(value = "java:S4449") void before(Object actual, Supplier<@Nullable String> supplier, Class<T> clazz) \{ assertInstanceOf(clazz, actual, supplier); \} @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(Object actual, Supplier<@Nullable String> supplier, Class<T> clazz) \{ assertThat(actual).withFailMessage(supplier).isInstanceOf(clazz); \} \} .
    • Tags: RSPEC-S4449
  • tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageSupplierIsNotNullRecipe
    • Refaster template JUnitToAssertJRules.AssertThatWithFailMessageSupplierIsNotNull
    • Recipe created for the following Refaster template: java static final class AssertThatWithFailMessageSupplierIsNotNull \{ @BeforeTemplate @SuppressWarnings(value = "java:S4449") void before(Object actual, Supplier<@Nullable String> supplier) \{ assertNotNull(actual, supplier); \} @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(Object actual, Supplier<@Nullable String> supplier) \{ assertThat(actual).withFailMessage(supplier).isNotNull(); \} \} .
    • Tags: RSPEC-S4449
  • tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageSupplierIsNotSameAsRecipe
    • Refaster template JUnitToAssertJRules.AssertThatWithFailMessageSupplierIsNotSameAs
    • Recipe created for the following Refaster template: java static final class AssertThatWithFailMessageSupplierIsNotSameAs \{ @BeforeTemplate @SuppressWarnings(value = "java:S4449") void before(Object actual, Supplier<@Nullable String> supplier, Object expected) \{ assertNotSame(expected, actual, supplier); \} @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(Object actual, Supplier<@Nullable String> supplier, Object expected) \{ assertThat(actual).withFailMessage(supplier).isNotSameAs(expected); \} \} .
    • Tags: RSPEC-S4449
  • tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageSupplierIsNullRecipe
    • Refaster template JUnitToAssertJRules.AssertThatWithFailMessageSupplierIsNull
    • Recipe created for the following Refaster template: java static final class AssertThatWithFailMessageSupplierIsNull \{ @BeforeTemplate @SuppressWarnings(value = "java:S4449") void before(Object actual, Supplier<@Nullable String> supplier) \{ assertNull(actual, supplier); \} @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(Object actual, Supplier<@Nullable String> supplier) \{ assertThat(actual).withFailMessage(supplier).isNull(); \} \} .
    • Tags: RSPEC-S4449
  • tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageSupplierIsSameAsRecipe
    • Refaster template JUnitToAssertJRules.AssertThatWithFailMessageSupplierIsSameAs
    • Recipe created for the following Refaster template: java static final class AssertThatWithFailMessageSupplierIsSameAs \{ @BeforeTemplate @SuppressWarnings(value = "java:S4449") void before(Object actual, Supplier<@Nullable String> supplier, Object expected) \{ assertSame(expected, actual, supplier); \} @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(Object actual, Supplier<@Nullable String> supplier, Object expected) \{ assertThat(actual).withFailMessage(supplier).isSameAs(expected); \} \} .
    • Tags: RSPEC-S4449
  • tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageSupplierIsTrueRecipe
    • Refaster template JUnitToAssertJRules.AssertThatWithFailMessageSupplierIsTrue
    • Recipe created for the following Refaster template: java static final class AssertThatWithFailMessageSupplierIsTrue \{ @BeforeTemplate @SuppressWarnings(value = "java:S4449") void before(boolean actual, Supplier<@Nullable String> supplier) \{ assertTrue(actual, supplier); \} @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(boolean actual, Supplier<@Nullable String> supplier) \{ assertThat(actual).withFailMessage(supplier).isTrue(); \} \} .
    • Tags: RSPEC-S4449
  • tech.picnic.errorprone.refasterrules.LongStreamRulesRecipes$LongStreamAnyMatchRecipe
    • Refaster template LongStreamRules.LongStreamAnyMatch
    • Prefer LongStream#anyMatch(LongPredicate) over more contrived alternatives.
    • Tags: RSPEC-S4034
  • tech.picnic.errorprone.refasterrules.OptionalRulesRecipes$OptionalOrElseThrowRecipe
    • Refaster template OptionalRules.OptionalOrElseThrow
    • Prefer Optional#orElseThrow() over the less explicit Optional#get().
    • Tags: RSPEC-S3655
  • tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes$GreaterThanOrEqualToRecipe
    • Refaster template PrimitiveRules.GreaterThanOrEqualTo
    • Avoid contrived ways of expressing the "greater than or equal to" relationship.
    • Tags: RSPEC-S1940
  • tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes$GreaterThanRecipe
    • Refaster template PrimitiveRules.GreaterThan
    • Avoid contrived ways of expressing the "greater than" relationship.
    • Tags: RSPEC-S1940
  • tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes$LessThanOrEqualToRecipe
    • Refaster template PrimitiveRules.LessThanOrEqualTo
    • Avoid contrived ways of expressing the "less than or equal to" relationship.
    • Tags: RSPEC-S1940
  • tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes$LessThanRecipe
    • Refaster template PrimitiveRules.LessThan
    • Avoid contrived ways of expressing the "less than" relationship.
    • Tags: RSPEC-S1940
  • tech.picnic.errorprone.refasterrules.RandomGeneratorRulesRecipes$RandomGeneratorNextLongRecipe
    • Prefer RandomGenerator#nextLong(long) over more contrived alternatives
    • Additionally, for large bounds, the unnecessary floating point arithmetic prevents some long values from being generated.
    • Tags: RSPEC-S1905
  • tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxThenEmptyRecipe
    • Refaster template ReactorRules.FluxThenEmpty
    • Avoid vacuous invocations of Flux#ignoreElements().
    • Tags: RSPEC-S4968
  • tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxThenMonoRecipe
    • Refaster template ReactorRules.FluxThenMono
    • Avoid vacuous invocations of Flux#ignoreElements().
    • Tags: RSPEC-S4968
  • tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxThenRecipe
    • Refaster template ReactorRules.FluxThen
    • Avoid vacuous invocations of Flux#ignoreElements().
    • Tags: RSPEC-S2637, RSPEC-S4968
  • tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoIdentityRecipe
    • Refaster template ReactorRules.MonoIdentity
    • Don't unnecessarily transform a Mono to an equivalent instance.
    • Tags: RSPEC-S2637, RSPEC-S4968
  • tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoThenEmptyRecipe
    • Refaster template ReactorRules.MonoThenEmpty
    • Avoid vacuous invocations of Mono#ignoreElement().
    • Tags: RSPEC-S4968
  • tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoThenMonoRecipe
    • Refaster template ReactorRules.MonoThenMono
    • Avoid vacuous operations prior to invocation of Mono#then(Mono).
    • Tags: RSPEC-S4968
  • tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoThenRecipe
    • Refaster template ReactorRules.MonoThen
    • Prefer direct invocation of Mono#then()} over more contrived alternatives.
    • Tags: RSPEC-S4968
  • tech.picnic.errorprone.refasterrules.RxJava2AdapterRulesRecipes$CompletableToMonoRecipe
    • Refaster template RxJava2AdapterRules.CompletableToMono
    • Use the fluent API style when using RxJava2Adapter#completableToMono.
    • Tags: RSPEC-S4968
  • tech.picnic.errorprone.refasterrules.StreamRulesRecipes$StreamCountRecipe
    • Refaster template StreamRules.StreamCount
    • Recipe created for the following Refaster template: java static final class StreamCount<T> \{ @BeforeTemplate @SuppressWarnings(value = "java:S4266") long before(Stream<T> stream) \{ return stream.collect(counting()); \} @AfterTemplate long after(Stream<T> stream) \{ return stream.count(); \} \} .
    • Tags: RSPEC-S4266
  • tech.picnic.errorprone.refasterrules.StreamRulesRecipes$StreamMapCollectRecipe
    • Refaster template StreamRules.StreamMapCollect
    • Recipe created for the following Refaster template: java static final class StreamMapCollect<T, U, R> \{ @BeforeTemplate @SuppressWarnings(value = "java:S4266") R before(Stream<T> stream, Function<? super T, ? extends U> mapper, Collector<? super U, ?, R> collector) \{ return stream.collect(mapping(mapper, collector)); \} @AfterTemplate R after(Stream<T> stream, Function<? super T, ? extends U> mapper, Collector<? super U, ?, R> collector) \{ return stream.map(mapper).collect(collector); \} \} .
    • Tags: RSPEC-S4266
  • tech.picnic.errorprone.refasterrules.StreamRulesRecipes$StreamMaxRecipe
    • Refaster template StreamRules.StreamMax
    • Recipe created for the following Refaster template: java static final class StreamMax<T> \{ @BeforeTemplate @SuppressWarnings(value = "java:S4266") Optional<T> before(Stream<T> stream, Comparator<? super T> comparator) \{ return Refaster.anyOf(stream.min(comparator.reversed()), Streams.findLast(stream.sorted(comparator)), stream.collect(maxBy(comparator))); \} @AfterTemplate Optional<T> after(Stream<T> stream, Comparator<? super T> comparator) \{ return stream.max(comparator); \} \} .
    • Tags: RSPEC-S4266
  • tech.picnic.errorprone.refasterrules.StreamRulesRecipes$StreamMinRecipe
    • Refaster template StreamRules.StreamMin
    • Recipe created for the following Refaster template: java static final class StreamMin<T> \{ @BeforeTemplate @SuppressWarnings(value = "java:S4266") Optional<T> before(Stream<T> stream, Comparator<? super T> comparator) \{ return Refaster.anyOf(stream.max(comparator.reversed()), stream.sorted(comparator).findFirst(), stream.collect(minBy(comparator))); \} @AfterTemplate Optional<T> after(Stream<T> stream, Comparator<? super T> comparator) \{ return stream.min(comparator); \} \} .
    • Tags: RSPEC-S4266
  • tech.picnic.errorprone.refasterrules.StreamRulesRecipes$StreamReduceRecipe
    • Refaster template StreamRules.StreamReduce
    • Recipe created for the following Refaster template: java static final class StreamReduce<T> \{ @BeforeTemplate @SuppressWarnings(value = "java:S4266") Optional<T> before(Stream<T> stream, BinaryOperator<T> accumulator) \{ return stream.collect(reducing(accumulator)); \} @AfterTemplate Optional<T> after(Stream<T> stream, BinaryOperator<T> accumulator) \{ return stream.reduce(accumulator); \} \} .
    • Tags: RSPEC-S4266
  • tech.picnic.errorprone.refasterrules.StreamRulesRecipes$StreamReduceWithIdentityRecipe
    • Refaster template StreamRules.StreamReduceWithIdentity
    • Recipe created for the following Refaster template: java static final class StreamReduceWithIdentity<T> \{ @BeforeTemplate @SuppressWarnings(value = "java:S4266") T before(Stream<T> stream, T identity, BinaryOperator<T> accumulator) \{ return stream.collect(reducing(identity, accumulator)); \} @AfterTemplate T after(Stream<T> stream, T identity, BinaryOperator<T> accumulator) \{ return stream.reduce(identity, accumulator); \} \} .
    • Tags: RSPEC-S4266
  • tech.picnic.errorprone.refasterrules.StringRulesRecipes$EmptyStringRecipe
    • Refaster template StringRules.EmptyString
    • Avoid unnecessary creation of new empty String objects; use the empty string literal instead.
    • Tags: RSPEC-S2129
  • tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIdentityRecipe
    • Refaster template StringRules.StringIdentity
    • Avoid unnecessary creation of new String objects.
    • Tags: RSPEC-S2129
  • tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIndexOfCharFromIndexRecipe
    • Refaster template StringRules.StringIndexOfCharFromIndex
    • Prefer String#indexOf(int, int) over less efficient alternatives.
    • Tags: RSPEC-S4635
  • tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIndexOfStringFromIndexRecipe
    • Refaster template StringRules.StringIndexOfStringFromIndex
    • Prefer String#indexOf(String, int) over less efficient alternatives.
    • Tags: RSPEC-S4635
  • tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIsEmptyRecipe
    • Refaster template StringRules.StringIsEmpty
    • Prefer String#isEmpty() over alternatives that consult the string's length.
    • Tags: RSPEC-S7158
  • tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringLastIndexOfCharRecipe
    • Refaster template StringRules.StringLastIndexOfChar
    • Prefer String#lastIndexOf(int, int) over less efficient alternatives.
    • Tags: RSPEC-S4635
  • tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringLastIndexOfStringRecipe
    • Refaster template StringRules.StringLastIndexOfString
    • Prefer String#lastIndexOf(String, int) over less efficient alternatives.
    • Tags: RSPEC-S4635
  • tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringStartsWithRecipe
    • Refaster template StringRules.StringStartsWith
    • Prefer String#startsWith(String, int) over less efficient alternatives.
    • Tags: RSPEC-S4635
  • tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertEqualRecipe
    • Refaster template TestNGToAssertJRules.AssertEqual
    • Recipe created for the following Refaster template: java @SuppressWarnings(value = "java:S1448") static final class AssertEqual \{ @BeforeTemplate void before(boolean actual, boolean expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(boolean actual, Boolean expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(Boolean actual, boolean expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(Boolean actual, Boolean expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(byte actual, byte expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(byte actual, Byte expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(Byte actual, byte expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(Byte actual, Byte expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(char actual, char expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(char actual, Character expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(Character actual, char expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(Character actual, Character expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(short actual, short expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(short actual, Short expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(Short actual, short expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(Short actual, Short expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(int actual, int expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(int actual, Integer expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(Integer actual, int expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(Integer actual, Integer expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(long actual, long expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(long actual, Long expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(Long actual, long expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(Long actual, Long expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(float actual, float expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(float actual, Float expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(Float actual, float expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(Float actual, Float expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(double actual, double expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(double actual, Double expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(Double actual, double expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(Double actual, Double expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(Object actual, Object expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(String actual, String expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(Map<?, ?> actual, Map<?, ?> expected) \{ assertEquals(actual, expected); \} @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(Object actual, Object expected) \{ assertThat(actual).isEqualTo(expected); \} \} .
    • Tags: RSPEC-S1448
  • tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertEqualWithMessageRecipe
    • Refaster template TestNGToAssertJRules.AssertEqualWithMessage
    • Recipe created for the following Refaster template: java @SuppressWarnings(value = "java:S1448") static final class AssertEqualWithMessage \{ @BeforeTemplate void before(boolean actual, String message, boolean expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(boolean actual, String message, Boolean expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(Boolean actual, String message, boolean expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(Boolean actual, String message, Boolean expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(byte actual, String message, byte expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(byte actual, String message, Byte expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(Byte actual, String message, byte expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(Byte actual, String message, Byte expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(char actual, String message, char expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(char actual, String message, Character expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(Character actual, String message, char expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(Character actual, String message, Character expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(short actual, String message, short expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(short actual, String message, Short expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(Short actual, String message, short expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(Short actual, String message, Short expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(int actual, String message, int expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(int actual, String message, Integer expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(Integer actual, String message, int expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(Integer actual, String message, Integer expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(long actual, String message, long expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(long actual, String message, Long expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(Long actual, String message, long expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(Long actual, String message, Long expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(float actual, String message, float expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(float actual, String message, Float expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(Float actual, String message, float expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(Float actual, String message, Float expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(double actual, String message, double expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(double actual, String message, Double expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(Double actual, String message, double expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(Double actual, String message, Double expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(Object actual, String message, Object expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(String actual, String message, String expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(Map<?, ?> actual, String message, Map<?, ?> expected) \{ assertEquals(actual, expected, message); \} @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(Object actual, String message, Object expected) \{ assertThat(actual).withFailMessage(message).isEqualTo(expected); \} \} .
    • Tags: RSPEC-S1448

sap

1 recipe

scala

1 recipe

scheduler

2 recipes

schemas

37 recipes

sdk

3 recipes

91 recipes

  • OpenRewrite.Recipes.AspNetCore2.FindBuildWebHost
    • Find BuildWebHost method
    • Flags BuildWebHost method declarations that should be renamed to CreateWebHostBuilder and refactored for ASP.NET Core 2.1.
  • OpenRewrite.Recipes.AspNetCore2.FindIAuthenticationManager
    • Find IAuthenticationManager usage
    • Flags references to IAuthenticationManager which was removed in ASP.NET Core 2.0. Use HttpContext extension methods from Microsoft.AspNetCore.Authentication instead.
  • OpenRewrite.Recipes.AspNetCore2.FindLoggerFactoryAddProvider
    • Find ILoggerFactory.Add() calls*
    • Flags ILoggerFactory.AddConsole(), AddDebug(), and similar extension methods. In ASP.NET Core 2.2+, logging should be configured via ConfigureLogging in the host builder.
  • OpenRewrite.Recipes.AspNetCore2.FindSetCompatibilityVersion
    • Find SetCompatibilityVersion() calls
    • Flags SetCompatibilityVersion calls. This method is a no-op in ASP.NET Core 3.0+ and should be removed during migration.
  • OpenRewrite.Recipes.AspNetCore2.FindUseKestrelWithConfig
    • Find UseKestrel() with configuration
    • Flags UseKestrel calls with configuration lambdas that should be replaced with ConfigureKestrel to avoid conflicts with the IIS in-process hosting model.
  • OpenRewrite.Recipes.AspNetCore3.FindAddMvc
    • Find AddMvc() calls
    • Flags AddMvc() calls that should be replaced with more specific service registrations (AddControllers, AddControllersWithViews, or AddRazorPages) in ASP.NET Core 3.0.
  • OpenRewrite.Recipes.AspNetCore3.FindIApplicationLifetime
    • Find IApplicationLifetime usage
    • Flags usages of IApplicationLifetime which should be replaced with IHostApplicationLifetime in ASP.NET Core 3.0.
  • OpenRewrite.Recipes.AspNetCore3.FindIHostingEnvironment
    • Find IHostingEnvironment usage
    • Flags usages of IHostingEnvironment which should be replaced with IWebHostEnvironment in ASP.NET Core 3.0.
  • OpenRewrite.Recipes.AspNetCore3.FindNewLoggerFactory
    • Find new LoggerFactory() calls
    • Flags new LoggerFactory() calls that should be replaced with LoggerFactory.Create(builder => ...) in .NET Core 3.0+.
  • OpenRewrite.Recipes.AspNetCore3.FindNewtonsoftJsonUsage
    • Find Newtonsoft.Json usage in ASP.NET Core
    • Flags JsonConvert and other Newtonsoft.Json usage. ASP.NET Core 3.0 uses System.Text.Json by default.
  • OpenRewrite.Recipes.AspNetCore3.FindUseMvcOrUseSignalR
    • Find UseMvc()/UseSignalR() calls
    • Flags UseMvc() and UseSignalR() calls that should be replaced with endpoint routing (UseRouting() + UseEndpoints()) in ASP.NET Core 3.0.
  • OpenRewrite.Recipes.AspNetCore3.FindWebHostBuilder
    • Find WebHostBuilder usage
    • Flags WebHostBuilder and WebHost.CreateDefaultBuilder usage that should migrate to the Generic Host pattern in ASP.NET Core 3.0+.
  • OpenRewrite.Recipes.Net10.FindActionContextAccessorObsolete
    • Find obsolete IActionContextAccessor/ActionContextAccessor (ASPDEPR006)
    • Finds usages of IActionContextAccessor and ActionContextAccessor which are obsolete in .NET 10. Use IHttpContextAccessor and HttpContext.GetEndpoint() instead.
  • OpenRewrite.Recipes.Net10.FindActivitySampling
    • Find ActivitySamplingResult.PropagationData behavior change
    • Finds usages of ActivitySamplingResult.PropagationData which has changed behavior in .NET 10. Activities with a recorded parent and PropagationData sampling no longer set Activity.Recorded = true.
  • OpenRewrite.Recipes.Net10.FindBackgroundServiceExecuteAsync
    • Find BackgroundService.ExecuteAsync behavior change
    • Finds methods that override ExecuteAsync from BackgroundService. In .NET 10, the entire method runs on a background thread; synchronous code before the first await no longer blocks host startup.
  • OpenRewrite.Recipes.Net10.FindBufferedStreamWriteByte
    • Find BufferedStream.WriteByte implicit flush behavior change
    • Finds calls to BufferedStream.WriteByte() which no longer performs an implicit flush when the internal buffer is full in .NET 10. Call Flush() explicitly if needed.
  • OpenRewrite.Recipes.Net10.FindClipboardGetData
    • Find obsolete Clipboard.GetData calls (WFDEV005)
    • Finds calls to Clipboard.GetData(string). In .NET 10, this method is obsolete (WFDEV005). Use Clipboard.TryGetData methods instead.
  • OpenRewrite.Recipes.Net10.FindDistributedContextPropagator
    • Find DistributedContextPropagator default propagator change
    • Finds usages of DistributedContextPropagator.Current and DistributedContextPropagator.CreateDefaultPropagator() which now default to W3C format in .NET 10. The 'baggage' header is used instead of 'Correlation-Context'.
  • OpenRewrite.Recipes.Net10.FindDllImportSearchPath
    • Find DllImportSearchPath.AssemblyDirectory behavior change
    • Finds usages of DllImportSearchPath.AssemblyDirectory which has changed behavior in .NET 10. Specifying only AssemblyDirectory no longer falls back to OS default search paths.
  • OpenRewrite.Recipes.Net10.FindDriveInfoDriveFormat
    • Find DriveInfo.DriveFormat behavior change
    • Finds usages of DriveInfo.DriveFormat which returns Linux kernel filesystem type strings instead of mapped names in .NET 10. Verify that comparisons match the new format.
  • OpenRewrite.Recipes.Net10.FindFormOnClosingObsolete
    • Find obsolete Form.OnClosing/OnClosed usage (WFDEV004)
    • Finds usage of Form.OnClosing, Form.OnClosed, and the Closing/Closed events. In .NET 10, these are obsolete (WFDEV004). Use OnFormClosing/OnFormClosed and FormClosing/FormClosed instead.
  • OpenRewrite.Recipes.Net10.FindGnuTarPaxTarEntry
    • Find GnuTarEntry/PaxTarEntry default timestamp change
    • Finds new GnuTarEntry(...) and new PaxTarEntry(...) constructor calls. In .NET 10, these no longer set atime and ctime by default. Set AccessTime/ChangeTime explicitly if needed.
  • OpenRewrite.Recipes.Net10.FindIpNetworkObsolete
    • Find obsolete IPNetwork/KnownNetworks (ASPDEPR005)
    • Finds usages of Microsoft.AspNetCore.HttpOverrides.IPNetwork and ForwardedHeadersOptions.KnownNetworks which are obsolete in .NET 10. Use System.Net.IPNetwork and KnownIPNetworks instead.
  • OpenRewrite.Recipes.Net10.FindKeyedServiceAnyKey
    • Find KeyedService.AnyKey behavior change
    • Finds usages of KeyedService.AnyKey which has changed behavior in .NET 10. GetKeyedService(AnyKey) now throws InvalidOperationException and GetKeyedServices(AnyKey) no longer returns AnyKey registrations.
  • OpenRewrite.Recipes.Net10.FindMakeGenericSignatureType
    • Find Type.MakeGenericSignatureType validation change
    • Finds calls to Type.MakeGenericSignatureType() which now validates that the first argument is a generic type definition in .NET 10.
  • OpenRewrite.Recipes.Net10.FindQueryableMaxByMinByObsolete
    • Find obsolete Queryable.MaxBy/MinBy with IComparer<TSource> (SYSLIB0061)
    • Finds Queryable.MaxBy and Queryable.MinBy overloads taking IComparer<TSource> which are obsolete in .NET 10. Use the overloads taking IComparer<TKey> instead.
  • OpenRewrite.Recipes.Net10.FindRazorRuntimeCompilationObsolete
    • Find obsolete AddRazorRuntimeCompilation calls (ASPDEPR003)
    • Finds calls to AddRazorRuntimeCompilation which is obsolete in .NET 10. Use Hot Reload instead for development scenarios.
  • OpenRewrite.Recipes.Net10.FindRfc2898DeriveBytesObsolete
    • Find obsolete Rfc2898DeriveBytes constructors (SYSLIB0060)
    • Finds new Rfc2898DeriveBytes(...) constructor calls which are obsolete in .NET 10. Use the static Rfc2898DeriveBytes.Pbkdf2() method instead.
  • OpenRewrite.Recipes.Net10.FindSslAuthEnumTypes
    • Find obsolete SSL authentication enum types
    • Finds usage of ExchangeAlgorithmType, CipherAlgorithmType, and HashAlgorithmType from System.Security.Authentication. These enum types are obsolete in .NET 10 (SYSLIB0058). Use SslStream.NegotiatedCipherSuite instead.
  • OpenRewrite.Recipes.Net10.FindSslStreamObsoleteProperties
    • Find obsolete SslStream cipher properties (SYSLIB0058)
    • Finds usages of SslStream.KeyExchangeAlgorithm, KeyExchangeStrength, CipherAlgorithm, CipherStrength, HashAlgorithm, and HashStrength which are obsolete in .NET 10. Use SslStream.NegotiatedCipherSuite instead.
  • OpenRewrite.Recipes.Net10.FindSystemDrawingExceptionChange
    • Find catch (OutOfMemoryException) that may need ExternalException
    • In .NET 10, System.Drawing GDI+ errors now throw ExternalException instead of OutOfMemoryException. This recipe finds catch blocks that catch OutOfMemoryException which may need to also catch ExternalException.
  • OpenRewrite.Recipes.Net10.FindSystemEventsThreadShutdownObsolete
    • Find obsolete SystemEvents.EventsThreadShutdown (SYSLIB0059)
    • Finds usages of SystemEvents.EventsThreadShutdown which is obsolete in .NET 10. Use AppDomain.ProcessExit instead.
  • OpenRewrite.Recipes.Net10.FindWebHostBuilderObsolete
    • Find obsolete WebHostBuilder/IWebHost/WebHost usage (ASPDEPR004/ASPDEPR008)
    • Finds usages of WebHostBuilder, IWebHost, and WebHost which are obsolete in .NET 10. Migrate to HostBuilder or WebApplicationBuilder instead.
  • OpenRewrite.Recipes.Net10.FindWinFormsObsoleteApis
    • Find obsolete Windows Forms APIs (WFDEV004/005/006)
    • Finds usages of Windows Forms APIs that are obsolete in .NET 10, including Form.OnClosing/OnClosed (WFDEV004), Clipboard.GetData (WFDEV005), and legacy controls like ContextMenu, DataGrid, MainMenu (WFDEV006).
  • OpenRewrite.Recipes.Net10.FindWithOpenApiDeprecated
    • Find deprecated WithOpenApi calls (ASPDEPR002)
    • Finds calls to .WithOpenApi() which is deprecated in .NET 10. Remove the call or use AddOpenApiOperationTransformer instead.
  • OpenRewrite.Recipes.Net10.FindX500DistinguishedNameValidation
    • Find X500DistinguishedName string constructor stricter validation
    • Finds new X500DistinguishedName(string, ...) constructor calls which have stricter validation in .NET 10. Non-Windows environments may reject previously accepted values.
  • OpenRewrite.Recipes.Net10.FindXsltSettingsEnableScriptObsolete
    • Find obsolete XsltSettings.EnableScript (SYSLIB0062)
    • Finds usages of XsltSettings.EnableScript which is obsolete in .NET 10.
  • OpenRewrite.Recipes.Net3_0.FindCompactOnMemoryPressure
    • Find CompactOnMemoryPressure usage (removed in ASP.NET Core 3.0)
    • Finds usages of CompactOnMemoryPressure which was removed from MemoryCacheOptions in ASP.NET Core 3.0.
  • OpenRewrite.Recipes.Net3_0.FindConnectionAdapter
    • Find IConnectionAdapter usage (removed in ASP.NET Core 3.0)
    • Finds usages of IConnectionAdapter which was removed from Kestrel in ASP.NET Core 3.0. Use Connection Middleware instead.
  • OpenRewrite.Recipes.Net3_0.FindHttpContextAuthentication
    • Find HttpContext.Authentication usage (removed in ASP.NET Core 3.0)
    • Finds usages of HttpContext.Authentication which was removed in ASP.NET Core 3.0. Use dependency injection to get IAuthenticationService instead.
  • OpenRewrite.Recipes.Net3_0.FindNewtonsoftJson
    • Find Newtonsoft.Json usage
    • Finds usages of Newtonsoft.Json types (JObject, JArray, JToken, JsonConvert) that should be migrated to System.Text.Json or explicitly preserved via Microsoft.AspNetCore.Mvc.NewtonsoftJson in ASP.NET Core 3.0+.
  • OpenRewrite.Recipes.Net3_0.FindObsoleteLocalizationApis
    • Find obsolete localization APIs (ASP.NET Core 3.0)
    • Finds usages of ResourceManagerWithCultureStringLocalizer and WithCulture() which are obsolete in ASP.NET Core 3.0.
  • OpenRewrite.Recipes.Net3_0.FindSpaServices
    • Find SpaServices/NodeServices usage (obsolete in ASP.NET Core 3.0)
    • Finds usages of SpaServices and NodeServices which are obsolete in ASP.NET Core 3.0.
  • OpenRewrite.Recipes.Net3_0.FindSynchronousIO
    • Find synchronous IO usage (disabled in ASP.NET Core 3.0)
    • Finds references to AllowSynchronousIO which indicates synchronous IO usage that is disabled by default in ASP.NET Core 3.0.
  • OpenRewrite.Recipes.Net3_0.FindUseMvc
    • Find UseMvc/AddMvc usage (replaced in ASP.NET Core 3.0)
    • Finds usages of app.UseMvc(), app.UseMvcWithDefaultRoute(), and services.AddMvc() which should be migrated to endpoint routing and more specific service registration in ASP.NET Core 3.0.
  • OpenRewrite.Recipes.Net3_0.FindWebApiCompatShim
    • Find Web API compatibility shim usage (removed in ASP.NET Core 3.0)
    • Finds usages of ApiController, HttpResponseMessage, and other types from Microsoft.AspNetCore.Mvc.WebApiCompatShim which was removed in ASP.NET Core 3.0.
  • OpenRewrite.Recipes.Net3_0.FindWebHostBuilder
    • Find WebHostBuilder/WebHost.CreateDefaultBuilder usage (replaced in ASP.NET Core 3.0)
    • Finds usages of WebHost.CreateDefaultBuilder() and new WebHostBuilder() which should be migrated to Host.CreateDefaultBuilder() with ConfigureWebHostDefaults() in ASP.NET Core 3.0.
  • OpenRewrite.Recipes.Net3_1.FindSameSiteNone
    • Find SameSiteMode.None usage (behavior changed in .NET Core 3.1)
    • Finds usages of SameSiteMode.None which changed behavior in .NET Core 3.1 due to Chrome 80 SameSite cookie changes. Apps using remote authentication may need browser sniffing.
  • OpenRewrite.Recipes.Net5.FindCodeAccessSecurity
    • Find Code Access Security usage (obsolete in .NET 5)
    • Finds usages of Code Access Security types (SecurityPermission, PermissionSet, etc.) which are obsolete in .NET 5+.
  • OpenRewrite.Recipes.Net5.FindPrincipalPermissionAttribute
    • Find PrincipalPermissionAttribute usage (SYSLIB0003)
    • Finds usages of PrincipalPermissionAttribute which is obsolete in .NET 5+ (SYSLIB0003) and throws NotSupportedException at runtime.
  • OpenRewrite.Recipes.Net5.FindUtf7Encoding
    • Find Encoding.UTF7 usage (SYSLIB0001)
    • Finds usages of Encoding.UTF7 and UTF7Encoding which are obsolete in .NET 5+ (SYSLIB0001). UTF-7 is insecure.
  • OpenRewrite.Recipes.Net5.FindWinHttpHandler
    • Find WinHttpHandler usage (removed in .NET 5)
    • Finds usages of WinHttpHandler which was removed from the .NET 5 runtime. Install the System.Net.Http.WinHttpHandler NuGet package explicitly.
  • OpenRewrite.Recipes.Net5.FindWinRTInterop
    • Find WinRT interop usage (removed in .NET 5)
    • Finds usages of WinRT interop types (WindowsRuntimeType, WindowsRuntimeMarshal, etc.) which were removed in .NET 5.
  • OpenRewrite.Recipes.Net6.FindAssemblyCodeBase
    • Find Assembly.CodeBase/EscapedCodeBase usage (SYSLIB0012)
    • Finds usages of Assembly.CodeBase and Assembly.EscapedCodeBase which are obsolete (SYSLIB0012). Use Assembly.Location instead.
  • OpenRewrite.Recipes.Net6.FindIgnoreNullValues
    • Find JsonSerializerOptions.IgnoreNullValues usage (SYSLIB0020)
    • Finds usages of JsonSerializerOptions.IgnoreNullValues which is obsolete in .NET 6 (SYSLIB0020). Use DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull instead.
  • OpenRewrite.Recipes.Net6.FindThreadAbort
    • Find Thread.Abort usage (SYSLIB0006)
    • Finds calls to Thread.Abort() which throws PlatformNotSupportedException in .NET 6+ (SYSLIB0006). Use CancellationToken for cooperative cancellation instead.
  • OpenRewrite.Recipes.Net6.FindWebRequest
    • Find WebRequest/HttpWebRequest/WebClient usage (SYSLIB0014)
    • Finds usages of WebRequest, HttpWebRequest, and WebClient which are obsolete in .NET 6 (SYSLIB0014). Use HttpClient instead.
  • OpenRewrite.Recipes.Net6.FindX509PrivateKey
    • Find X509Certificate2.PrivateKey usage (SYSLIB0028)
    • Finds usages of X509Certificate2.PrivateKey which is obsolete (SYSLIB0028). Use GetRSAPrivateKey(), GetECDsaPrivateKey(), or the appropriate algorithm-specific method instead.
  • OpenRewrite.Recipes.Net7.FindObsoleteSslProtocols
    • Find obsolete SslProtocols.Tls/Tls11 usage (SYSLIB0039)
    • Finds usages of SslProtocols.Tls and SslProtocols.Tls11 which are obsolete in .NET 7 (SYSLIB0039). Use SslProtocols.Tls12, SslProtocols.Tls13, or SslProtocols.None instead.
  • OpenRewrite.Recipes.Net7.FindRfc2898InsecureCtors
    • Find insecure Rfc2898DeriveBytes constructors (SYSLIB0041)
    • Finds Rfc2898DeriveBytes constructor calls that use default SHA1 or low iteration counts, which are obsolete in .NET 7 (SYSLIB0041). Specify HashAlgorithmName and at least 600,000 iterations.
  • OpenRewrite.Recipes.Net8.FindAddContext
    • Find JsonSerializerOptions.AddContext usage (SYSLIB0049)
    • Finds calls to JsonSerializerOptions.AddContext<T>() which is obsolete in .NET 8 (SYSLIB0049). Use TypeInfoResolverChain or TypeInfoResolver instead.
  • OpenRewrite.Recipes.Net8.FindAesGcmOldConstructor
    • Find AesGcm constructor without tag size (SYSLIB0053)
    • Finds new AesGcm(key) constructor calls without an explicit tag size parameter. In .NET 8, the single-argument constructor is obsolete (SYSLIB0053). Use new AesGcm(key, tagSizeInBytes) instead.
  • OpenRewrite.Recipes.Net8.FindFormatterBasedSerialization
    • Find formatter-based serialization types (SYSLIB0050/0051)
    • Finds usage of formatter-based serialization types (FormatterConverter, IFormatter, ObjectIDGenerator, ObjectManager, SurrogateSelector, SerializationInfo, StreamingContext). These are obsolete in .NET 8 (SYSLIB0050/0051).
  • OpenRewrite.Recipes.Net8.FindFrozenCollection
    • Find ToImmutable() that could use Frozen collections*
    • Finds usages of ToImmutableDictionary() and ToImmutableHashSet(). In .NET 8+, ToFrozenDictionary() and ToFrozenSet() provide better read performance.
  • OpenRewrite.Recipes.Net8.FindRegexCompileToAssembly
    • Find Regex.CompileToAssembly usage (SYSLIB0052)
    • Finds usage of Regex.CompileToAssembly() and RegexCompilationInfo. These are obsolete in .NET 8 (SYSLIB0052). Use the Regex source generator instead.
  • OpenRewrite.Recipes.Net8.FindSerializationConstructors
    • Find legacy serialization constructors (SYSLIB0051)
    • Finds legacy serialization constructors .ctor(SerializationInfo, StreamingContext) which are obsolete in .NET 8 (SYSLIB0051). The ISerializable pattern is no longer recommended.
  • OpenRewrite.Recipes.Net8.FindTimeAbstraction
    • Find DateTime.Now/UtcNow usage (TimeProvider in .NET 8)
    • Finds usages of DateTime.Now, DateTime.UtcNow, DateTimeOffset.Now, and DateTimeOffset.UtcNow. In .NET 8+, TimeProvider is the recommended abstraction for time.
  • OpenRewrite.Recipes.Net9.FindAuthenticationManager
    • Find AuthenticationManager usage (SYSLIB0009)
    • Finds usages of AuthenticationManager which is not supported in .NET 9 (SYSLIB0009). Methods will no-op or throw PlatformNotSupportedException.
  • OpenRewrite.Recipes.Net9.FindBinaryFormatter
    • Find BinaryFormatter usage (removed in .NET 9)
    • Finds usages of BinaryFormatter which always throws NotSupportedException in .NET 9. Migrate to a different serializer such as System.Text.Json, XmlSerializer, or DataContractSerializer.
  • OpenRewrite.Recipes.Net9.FindBinaryReaderReadString
    • Find BinaryReader.ReadString behavior change
    • Finds calls to BinaryReader.ReadString() which now returns the Unicode replacement character (\uFFFD) for malformed UTF-8 byte sequences in .NET 9, instead of the previous behavior. Verify your code handles the replacement character correctly.
  • OpenRewrite.Recipes.Net9.FindDistributedCache
    • Find IDistributedCache usage (HybridCache in .NET 9)
    • Finds usages of IDistributedCache. In .NET 9, HybridCache is the recommended replacement with L1/L2 caching, stampede protection, and tag-based invalidation.
  • OpenRewrite.Recipes.Net9.FindEnumConverter
    • Find EnumConverter constructor validation change
    • Finds new EnumConverter() constructor calls. In .NET 9, EnumConverter validates that the registered type is actually an enum and throws ArgumentException if not.
  • OpenRewrite.Recipes.Net9.FindExecuteUpdateSync
    • Find synchronous ExecuteUpdate/ExecuteDelete (EF Core 9)
    • Finds usages of synchronous ExecuteUpdate() and ExecuteDelete() which were removed in EF Core 9. Use ExecuteUpdateAsync/ExecuteDeleteAsync instead.
  • OpenRewrite.Recipes.Net9.FindHttpClientHandlerCast
    • Find HttpClientHandler usage (HttpClientFactory default change)
    • Finds usages of HttpClientHandler which may break when HttpClientFactory switches its default handler to SocketsHttpHandler in .NET 9.
  • OpenRewrite.Recipes.Net9.FindHttpListenerRequestUserAgent
    • Find HttpListenerRequest.UserAgent nullable change
    • Finds accesses to HttpListenerRequest.UserAgent which changed from string to string? in .NET 9. Code that assumes UserAgent is non-null may throw NullReferenceException.
  • OpenRewrite.Recipes.Net9.FindImplicitAuthenticationDefault
    • Find implicit authentication default scheme (ASP.NET Core 9)
    • Finds calls to AddAuthentication() with no arguments. In .NET 9, a single registered authentication scheme is no longer automatically used as the default.
  • OpenRewrite.Recipes.Net9.FindInMemoryDirectoryInfo
    • Find InMemoryDirectoryInfo rootDir prepend change
    • Finds new InMemoryDirectoryInfo() constructor calls. In .NET 9, rootDir is prepended to file paths that don't start with the rootDir, which may change file matching behavior.
  • OpenRewrite.Recipes.Net9.FindIncrementingPollingCounter
    • Find IncrementingPollingCounter async callback change
    • Finds new IncrementingPollingCounter() constructor calls. In .NET 9, the initial callback invocation is asynchronous instead of synchronous, which may change timing behavior.
  • OpenRewrite.Recipes.Net9.FindJsonDocumentNullable
    • Find JsonSerializer.Deserialize nullable JsonDocument change
    • Finds JsonSerializer.Deserialize() calls. In .NET 9, nullable JsonDocument properties now deserialize to a JsonDocument with RootElement.ValueKind == JsonValueKind.Null instead of being null.
  • OpenRewrite.Recipes.Net9.FindJsonStringEnumConverter
    • Find non-generic JsonStringEnumConverter
    • Finds usages of the non-generic JsonStringEnumConverter. In .NET 9, the generic JsonStringEnumConverter<TEnum> is preferred for AOT compatibility.
  • OpenRewrite.Recipes.Net9.FindRuntimeHelpersGetSubArray
    • Find RuntimeHelpers.GetSubArray return type change
    • Finds calls to RuntimeHelpers.GetSubArray() which may return a different array type in .NET 9. Code that depends on the runtime type of the returned array may break.
  • OpenRewrite.Recipes.Net9.FindSafeEvpPKeyHandleDuplicate
    • Find SafeEvpPKeyHandle.DuplicateHandle up-ref change
    • Finds calls to SafeEvpPKeyHandle.DuplicateHandle(). In .NET 9, this method now increments the reference count instead of creating a deep copy, which may affect handle lifetime.
  • OpenRewrite.Recipes.Net9.FindServicePointManager
    • Find ServicePointManager usage (SYSLIB0014)
    • Finds usages of ServicePointManager which is fully obsolete in .NET 9 (SYSLIB0014). Settings on ServicePointManager don't affect SslStream or HttpClient.
  • OpenRewrite.Recipes.Net9.FindSwashbuckle
    • Find Swashbuckle usage (ASP.NET Core 9 built-in OpenAPI)
    • Finds usages of Swashbuckle APIs (AddSwaggerGen, UseSwagger, UseSwaggerUI). .NET 9 includes built-in OpenAPI support. Consider migrating to AddOpenApi()/MapOpenApi().
  • OpenRewrite.Recipes.Net9.FindX509CertificateConstructors
    • Find obsolete X509Certificate2/X509Certificate constructors (SYSLIB0057)
    • Finds usages of X509Certificate2 and X509Certificate constructors that accept binary content or file paths, which are obsolete in .NET 9 (SYSLIB0057). Use X509CertificateLoader methods instead.
  • OpenRewrite.Recipes.Net9.FindZipArchiveCompressionLevel
    • Find ZipArchive.CreateEntry with CompressionLevel (bit flag change)
    • Finds ZipArchive.CreateEntry() and ZipFileExtensions.CreateEntryFromFile() calls with a CompressionLevel parameter. In .NET 9, the CompressionLevel value now sets general-purpose bit flags in the ZIP central directory header, which may affect interoperability.
  • OpenRewrite.Recipes.Net9.FindZipArchiveEntryEncoding
    • Find ZipArchiveEntry name/comment UTF-8 encoding change
    • Finds access to ZipArchiveEntry.Name, FullName, or Comment properties. In .NET 9, these now respect the UTF-8 flag in ZIP entries, which may change decoded values.
  • io.moderne.java.spring.framework.FindDeprecatedPathMatcherUsage
    • Find deprecated PathMatcher usage
    • In Spring Framework 7.0, PathMatcher and AntPathMatcher are deprecated in favor of PathPatternParser. This recipe finds usages of the deprecated AntPathMatcher class that may require manual migration to PathPatternParser.
  • io.moderne.java.spring.framework7.FindRemovedAPIs
    • Find removed APIs in Spring Framework 7.0
    • Finds usages of APIs that were removed in Spring Framework 7.0 and require manual intervention. This includes Theme support, OkHttp3 integration, and servlet view document/feed classes which have no direct automated replacement.
  • org.openrewrite.gitlab.search.FindDeprecatedSyntax
    • Find deprecated GitLab CI syntax
    • Find usages of deprecated only and except keywords in .gitlab-ci.yml. These keywords are deprecated in favor of rules.
  • org.openrewrite.java.spring.security5.search.FindEncryptorsQueryableTextUses
    • Finds uses of Encryptors.queryableText()
    • Encryptors.queryableText() is insecure and is removed in Spring Security 6.

secrets

1 recipe

  • org.openrewrite.github.ReplaceOssrhSecretsWithSonatype
    • Replace OSSRH secrets with Sonatype secrets
    • 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.

security

74 recipes

serialization

8 recipes

  • OpenRewrite.Recipes.Net3_0.FindNewtonsoftJson
    • Find Newtonsoft.Json usage
    • Finds usages of Newtonsoft.Json types (JObject, JArray, JToken, JsonConvert) that should be migrated to System.Text.Json or explicitly preserved via Microsoft.AspNetCore.Mvc.NewtonsoftJson in ASP.NET Core 3.0+.
  • OpenRewrite.Recipes.Net6.FindIgnoreNullValues
    • Find JsonSerializerOptions.IgnoreNullValues usage (SYSLIB0020)
    • Finds usages of JsonSerializerOptions.IgnoreNullValues which is obsolete in .NET 6 (SYSLIB0020). Use DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull instead.
  • OpenRewrite.Recipes.Net8.FindAddContext
    • Find JsonSerializerOptions.AddContext usage (SYSLIB0049)
    • Finds calls to JsonSerializerOptions.AddContext<T>() which is obsolete in .NET 8 (SYSLIB0049). Use TypeInfoResolverChain or TypeInfoResolver instead.
  • OpenRewrite.Recipes.Net8.FindFormatterBasedSerialization
    • Find formatter-based serialization types (SYSLIB0050/0051)
    • Finds usage of formatter-based serialization types (FormatterConverter, IFormatter, ObjectIDGenerator, ObjectManager, SurrogateSelector, SerializationInfo, StreamingContext). These are obsolete in .NET 8 (SYSLIB0050/0051).
  • OpenRewrite.Recipes.Net8.FindSerializationConstructors
    • Find legacy serialization constructors (SYSLIB0051)
    • Finds legacy serialization constructors .ctor(SerializationInfo, StreamingContext) which are obsolete in .NET 8 (SYSLIB0051). The ISerializable pattern is no longer recommended.
  • OpenRewrite.Recipes.Net9.FindBinaryFormatter
    • Find BinaryFormatter usage (removed in .NET 9)
    • Finds usages of BinaryFormatter which always throws NotSupportedException in .NET 9. Migrate to a different serializer such as System.Text.Json, XmlSerializer, or DataContractSerializer.
  • OpenRewrite.Recipes.Net9.FindJsonDocumentNullable
    • Find JsonSerializer.Deserialize nullable JsonDocument change
    • Finds JsonSerializer.Deserialize() calls. In .NET 9, nullable JsonDocument properties now deserialize to a JsonDocument with RootElement.ValueKind == JsonValueKind.Null instead of being null.
  • OpenRewrite.Recipes.Net9.FindJsonStringEnumConverter
    • Find non-generic JsonStringEnumConverter
    • Finds usages of the non-generic JsonStringEnumConverter. In .NET 9, the generic JsonStringEnumConverter<TEnum> is preferred for AOT compatibility.

service

1 recipe

  • org.openrewrite.quarkus.spring.MigrateSpringCloudServiceDiscovery
    • Migrate Spring Cloud Service Discovery to Quarkus
    • Migrates Spring Cloud Service Discovery annotations and configurations to Quarkus equivalents. Converts @EnableDiscoveryClient and related patterns to Quarkus Stork service discovery.
    • Tags: service-discovery

servlet

1 recipe

session

1 recipe

  • io.moderne.java.spring.boot4.MigrateHazelcastSpringSession
    • Migrate Spring Session Hazelcast to Hazelcast Spring Session
    • Spring Boot 4.0 removed direct support for Spring Session Hazelcast. The Hazelcast team now maintains their own Spring Session integration. This recipe changes the dependency from org.springframework.session:spring-session-hazelcast to com.hazelcast.spring:hazelcast-spring-session and updates the package from org.springframework.session.hazelcast to com.hazelcast.spring.session.

shutil

1 recipe

  • org.openrewrite.python.migrate.FindShutilRmtreeOnerror
    • Find deprecated shutil.rmtree(onerror=...) parameter
    • The onerror parameter of shutil.rmtree() was deprecated in Python 3.12 in favor of onexc. The onexc callback receives the exception object directly rather than an exc_info tuple.

simplification

1 recipe

sleuth

2 recipes

slf4j

15 recipes

socket

1 recipe

spring

200 recipes

springdata

2 recipes

springdoc

10 recipes

springfox

2 recipes

springframework

9 recipes

sql

6 recipes

sqlserver

4 recipes

storybook

9 recipes

style

109 recipes

stylistic

87 recipes

subprocess

2 recipes

  • org.openrewrite.python.migrate.FindOsPopen
    • Find deprecated os.popen() usage
    • os.popen() has been deprecated since Python 3.6. Use subprocess.run() or subprocess.Popen() instead for better control over process creation and output handling.
  • org.openrewrite.python.migrate.FindOsSpawn
    • Find deprecated os.spawn*() usage
    • The os.spawn*() family of functions are deprecated. Use subprocess.run() or subprocess.Popen() instead.

supply

1 recipe

svelte

18 recipes

swagger

9 recipes

sys

2 recipes

  • org.openrewrite.python.migrate.FindSysCoroutineWrapper
    • Find removed sys.set_coroutine_wrapper() / sys.get_coroutine_wrapper()
    • sys.set_coroutine_wrapper() and sys.get_coroutine_wrapper() were deprecated in Python 3.7 and removed in Python 3.8.
  • org.openrewrite.python.migrate.ReplaceSysLastExcInfo
    • Replace sys.last_value with sys.last_exc and flag sys.last_type / sys.last_traceback
    • sys.last_type, sys.last_value, and sys.last_traceback were deprecated in Python 3.12. sys.last_value is auto-replaced with sys.last_exc; sys.last_type and sys.last_traceback are flagged for manual review.

taglib

3 recipes

taglibs

1 recipe

tapestry

4 recipes

tar

1 recipe

  • OpenRewrite.Recipes.Net10.FindGnuTarPaxTarEntry
    • Find GnuTarEntry/PaxTarEntry default timestamp change
    • Finds new GnuTarEntry(...) and new PaxTarEntry(...) constructor calls. In .NET 10, these no longer set atime and ctime by default. Set AccessTime/ChangeTime explicitly if needed.

tarfile

1 recipe

tempfile

1 recipe

templating

1 recipe

terraform

122 recipes

test

5 recipes

testing

68 recipes

testng

1 recipe

testwebxml

1 recipe

threading

11 recipes

thymeleaf

1 recipe

tld

1 recipe

tls

1 recipe

  • OpenRewrite.Recipes.Net10.FindSslAuthEnumTypes
    • Find obsolete SSL authentication enum types
    • Finds usage of ExchangeAlgorithmType, CipherAlgorithmType, and HashAlgorithmType from System.Security.Authentication. These enum types are obsolete in .NET 10 (SYSLIB0058). Use SslStream.NegotiatedCipherSuite instead.

tracing

1 recipe

transaction

3 recipes

truth

1 recipe

tunit

19 recipes

typescript

1 recipe

typing

2 recipes

unaffected

1 recipe

underscore

4 recipes

  • org.openrewrite.codemods.migrate.lodash.LodashUnderscoreArray
    • Replace lodash and underscore array functions with native JavaScript
      • _.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).
  • org.openrewrite.codemods.migrate.lodash.LodashUnderscoreFunction
    • Replace lodash and underscore function functions with native JavaScript
      • _.bind(fn, obj, ...x) -> fn.bind(obj, ...x) - _.partial(fn, a, b); -> (...args) => fn(a, b, ...args).
  • org.openrewrite.codemods.migrate.lodash.LodashUnderscoreObjects
    • Replace lodash and underscore object functions with native JavaScript
      • _.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).
  • org.openrewrite.codemods.migrate.lodash.LodashUnderscoreUtil
    • Replace lodash and underscore utility functions with native JavaScript
      • _.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'.

urllib

2 recipes

validation

5 recipes

var

1 recipe

  • org.openrewrite.java.migrate.lang.UseVar
    • Use local variable type inference
    • 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.

version

1 recipe

virtual

2 recipes

vue

57 recipes

web

10 recipes

webflux

1 recipe

weblogic

56 recipes

webservices

5 recipes

websocket

1 recipe

webxml

1 recipe

winforms

6 recipes

  • OpenRewrite.Recipes.Net10.FindClipboardGetData
    • Find obsolete Clipboard.GetData calls (WFDEV005)
    • Finds calls to Clipboard.GetData(string). In .NET 10, this method is obsolete (WFDEV005). Use Clipboard.TryGetData methods instead.
  • OpenRewrite.Recipes.Net10.FindFormOnClosingObsolete
    • Find obsolete Form.OnClosing/OnClosed usage (WFDEV004)
    • Finds usage of Form.OnClosing, Form.OnClosed, and the Closing/Closed events. In .NET 10, these are obsolete (WFDEV004). Use OnFormClosing/OnFormClosed and FormClosing/FormClosed instead.
  • OpenRewrite.Recipes.Net10.FindSystemDrawingExceptionChange
    • Find catch (OutOfMemoryException) that may need ExternalException
    • In .NET 10, System.Drawing GDI+ errors now throw ExternalException instead of OutOfMemoryException. This recipe finds catch blocks that catch OutOfMemoryException which may need to also catch ExternalException.
  • OpenRewrite.Recipes.Net10.FindWinFormsObsoleteApis
    • Find obsolete Windows Forms APIs (WFDEV004/005/006)
    • Finds usages of Windows Forms APIs that are obsolete in .NET 10, including Form.OnClosing/OnClosed (WFDEV004), Clipboard.GetData (WFDEV005), and legacy controls like ContextMenu, DataGrid, MainMenu (WFDEV006).
  • OpenRewrite.Recipes.Net10.FormOnClosingRename
    • Rename Form.OnClosing/OnClosed to OnFormClosing/OnFormClosed (WFDEV004)
    • Renames Form.OnClosing to OnFormClosing and Form.OnClosed to OnFormClosed for .NET 10 compatibility. Parameter type changes (CancelEventArgsFormClosingEventArgs, EventArgsFormClosedEventArgs) must be updated manually.
  • OpenRewrite.Recipes.Net10.InsertAdjacentElementOrientParameterRename
    • Rename orient parameter to orientation in HtmlElement.InsertAdjacentElement
    • The orient parameter of HtmlElement.InsertAdjacentElement was renamed to orientation in .NET 10. This recipe updates named arguments in method calls to use the new parameter name.

wsee

4 recipes

xhtml

1 recipe

xjb

1 recipe

xml

3 recipes

xmlunit

1 recipe

xunit

19 recipes

zipkin

2 recipes