META-INF.rewrite.apache-commons-io.yml Maven / Gradle / Ivy
#
# Copyright 2021 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
---
type: specs.openrewrite.org/v1beta/recipe
name: org.openrewrite.apache.commons.io.RelocateApacheCommonsIo
displayName: Relocate `org.apache.commons:commons-io` to `commons-io:commons-io`
description: The deployment of `org.apache.commons:commons-io` [was a publishing mistake around 2012](https://issues.sonatype.org/browse/MVNCENTRAL-244) which was corrected by changing the deployment GAV to be located under `commons-io:commons-io`.
tags:
- apache
- commons
- security
recipeList:
- org.openrewrite.java.dependencies.ChangeDependency:
oldGroupId: org.apache.commons
oldArtifactId: commons-io
newGroupId: commons-io
newArtifactId: commons-io
---
type: specs.openrewrite.org/v1beta/recipe
name: org.openrewrite.apache.commons.io.UseSystemLineSeparator
displayName: Prefer `System.lineSeparator()`
description: Prefer the Java standard library's `System.lineSeparator()` over third-party usage of apache's `IOUtils.LINE_SEPARATOR`.
tags:
- apache
- commons
recipeList:
- org.openrewrite.java.ChangeStaticFieldToMethod:
oldClassName: org.apache.commons.io.IOUtils
oldFieldName: LINE_SEPARATOR
newClassName: java.lang.System
newMethodName: lineSeparator
---
type: specs.openrewrite.org/v1beta/recipe
name: org.openrewrite.apache.commons.io.UseStandardCharsets
displayName: Prefer `java.nio.charset.StandardCharsets`
description: Prefer the Java standard library's `java.nio.charset.StandardCharsets` over third-party usage of apache's `org.apache.commons.io.Charsets`.
tags:
- apache
- commons
recipeList:
- org.openrewrite.java.ReplaceConstantWithAnotherConstant:
existingFullyQualifiedConstantName: org.apache.commons.io.Charsets.ISO_8859_1
fullyQualifiedConstantName: java.nio.charset.StandardCharsets.ISO_8859_1
- org.openrewrite.java.ReplaceConstantWithAnotherConstant:
existingFullyQualifiedConstantName: org.apache.commons.io.Charsets.US_ASCII
fullyQualifiedConstantName: java.nio.charset.StandardCharsets.US_ASCII
- org.openrewrite.java.ReplaceConstantWithAnotherConstant:
existingFullyQualifiedConstantName: org.apache.commons.io.Charsets.UTF_8
fullyQualifiedConstantName: java.nio.charset.StandardCharsets.UTF_8
- org.openrewrite.java.ReplaceConstantWithAnotherConstant:
existingFullyQualifiedConstantName: org.apache.commons.io.Charsets.UTF_16
fullyQualifiedConstantName: java.nio.charset.StandardCharsets.UTF_16
- org.openrewrite.java.ReplaceConstantWithAnotherConstant:
existingFullyQualifiedConstantName: org.apache.commons.io.Charsets.UTF_16BE
fullyQualifiedConstantName: java.nio.charset.StandardCharsets.UTF_16BE
- org.openrewrite.java.ReplaceConstantWithAnotherConstant:
existingFullyQualifiedConstantName: org.apache.commons.io.Charsets.UTF_16LE
fullyQualifiedConstantName: java.nio.charset.StandardCharsets.UTF_16LE