Skip to content

Commit

Permalink
Improve the wording of a few recipe description (#414)
Browse files Browse the repository at this point in the history
"JDK internals" is ambiguous, we can think that we're talking about JDK internal API that are not guaranteed for long term stability.
Fixes #411
  • Loading branch information
murdos authored and timtebeek committed Feb 14, 2024
1 parent a628585 commit 75b7048
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 64 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
@SuppressWarnings("ALL")
public class MavenSharedStringUtils {
@RecipeDescriptor(
name = "Replace `StringUtils.abbreviate(String, int)` with JDK internals",
description = "Replace Maven Shared `StringUtils.abbreviate(String str, int maxWidth)` with JDK internals.")
name = "Replace `StringUtils.abbreviate(String, int)` with JDK provided API",
description = "Replace Maven Shared `StringUtils.abbreviate(String str, int maxWidth)` with JDK provided API.")
public static class Abbreviate {
@BeforeTemplate
String before(@Matches(RepeatableArgumentMatcher.class) String s1,
Expand All @@ -43,8 +43,8 @@ String after(String s, int width) {
}

@RecipeDescriptor(
name = "Replace `StringUtils.capitalise(String)` with JDK internals",
description = "Replace Maven Shared `StringUtils.capitalise(String str)` with JDK internals.")
name = "Replace `StringUtils.capitalise(String)` with JDK provided API",
description = "Replace Maven Shared `StringUtils.capitalise(String str)` with JDK provided API.")
@SuppressWarnings("ConstantValue")
public static class Capitalise {
@BeforeTemplate
Expand All @@ -59,8 +59,8 @@ String after(String s) {
}

@RecipeDescriptor(
name = "Replace `StringUtils.defaultString(Object)` with JDK internals",
description = "Replace Maven Shared `StringUtils.defaultString(Object obj)` with JDK internals.")
name = "Replace `StringUtils.defaultString(Object)` with JDK provided API",
description = "Replace Maven Shared `StringUtils.defaultString(Object obj)` with JDK provided API.")
public static class DefaultString {
@BeforeTemplate
String before(String s) {
Expand All @@ -74,8 +74,8 @@ String after(String s) {
}

@RecipeDescriptor(
name = "Replace `StringUtils.defaultString(Object, String)` with JDK internals",
description = "Replace Maven Shared `StringUtils.defaultString(Object obj, String nullDefault)` with JDK internals.")
name = "Replace `StringUtils.defaultString(Object, String)` with JDK provided API",
description = "Replace Maven Shared `StringUtils.defaultString(Object obj, String nullDefault)` with JDK provided API.")
public static class DefaultStringFallback {
@BeforeTemplate
String before(String s, String nullDefault) {
Expand All @@ -89,8 +89,8 @@ String after(String s, String nullDefault) {
}

@RecipeDescriptor(
name = "Replace `StringUtils.deleteWhitespace(String)` with JDK internals",
description = "Replace Maven Shared `StringUtils.deleteWhitespace(String str)` with JDK internals.")
name = "Replace `StringUtils.deleteWhitespace(String)` with JDK provided API",
description = "Replace Maven Shared `StringUtils.deleteWhitespace(String str)` with JDK provided API.")
public static class DeleteWhitespace {
@BeforeTemplate
String before(@Matches(RepeatableArgumentMatcher.class) String s) {
Expand All @@ -104,8 +104,8 @@ String after(String s) {
}

@RecipeDescriptor(
name = "Replace `StringUtils.equalsIgnoreCase(String, String)` with JDK internals",
description = "Replace Maven Shared `StringUtils.equalsIgnoreCase(String str1, String str2)` with JDK internals.")
name = "Replace `StringUtils.equalsIgnoreCase(String, String)` with JDK provided API",
description = "Replace Maven Shared `StringUtils.equalsIgnoreCase(String str1, String str2)` with JDK provided API.")
public static class EqualsIgnoreCase {
@BeforeTemplate
boolean before(@Matches(RepeatableArgumentMatcher.class) String s,
Expand All @@ -120,8 +120,8 @@ boolean after(String s, String other) {
}

@RecipeDescriptor(
name = "Replace `StringUtils.equals(String, String)` with JDK internals",
description = "Replace Maven Shared `StringUtils.equals(String str1, String str2)` with JDK internals.")
name = "Replace `StringUtils.equals(String, String)` with JDK provided API",
description = "Replace Maven Shared `StringUtils.equals(String str1, String str2)` with JDK provided API.")
public static class Equals {
@BeforeTemplate
boolean before(String s, String other) {
Expand All @@ -135,8 +135,8 @@ boolean after(String s, String other) {
}

@RecipeDescriptor(
name = "Replace `StringUtils.lowerCase(String)` with JDK internals",
description = "Replace Maven Shared `StringUtils.lowerCase(String str)` with JDK internals.")
name = "Replace `StringUtils.lowerCase(String)` with JDK provided API",
description = "Replace Maven Shared `StringUtils.lowerCase(String str)` with JDK provided API.")
public static class Lowercase {
@BeforeTemplate
String before(@Matches(RepeatableArgumentMatcher.class) String s) {
Expand All @@ -150,8 +150,8 @@ String after(String s) {
}

@RecipeDescriptor(
name = "Replace `StringUtils.replace(String, String, String)` with JDK internals",
description = "Replace Maven Shared `StringUtils.replace(String text, String searchString, String replacement)` with JDK internals.")
name = "Replace `StringUtils.replace(String, String, String)` with JDK provided API",
description = "Replace Maven Shared `StringUtils.replace(String text, String searchString, String replacement)` with JDK provided API.")
public static class Replace {
@BeforeTemplate
String before(@Matches(RepeatableArgumentMatcher.class) String s,
Expand All @@ -167,8 +167,8 @@ String after(String s, String search, String replacement) {
}

@RecipeDescriptor(
name = "Replace `StringUtils.reverse(String)` with JDK internals",
description = "Replace Maven Shared `StringUtils.reverse(String str)` with JDK internals.")
name = "Replace `StringUtils.reverse(String)` with JDK provided API",
description = "Replace Maven Shared `StringUtils.reverse(String str)` with JDK provided API.")
public static class Reverse {
@BeforeTemplate
String before(@Matches(RepeatableArgumentMatcher.class) String s) {
Expand All @@ -182,8 +182,8 @@ String after(String s) {
}

@RecipeDescriptor(
name = "Replace `StringUtils.split(String)` with JDK internals",
description = "Replace Maven Shared `StringUtils.split(String str)` with JDK internals.")
name = "Replace `StringUtils.split(String)` with JDK provided API",
description = "Replace Maven Shared `StringUtils.split(String str)` with JDK provided API.")
public static class Split {
@BeforeTemplate
String[] before(@Matches(RepeatableArgumentMatcher.class) String s) {
Expand All @@ -197,8 +197,8 @@ String[] after(String s) {
}

@RecipeDescriptor(
name = "Replace `StringUtils.strip(String)` with JDK internals",
description = "Replace Maven Shared `StringUtils.strip(String str)` with JDK internals.")
name = "Replace `StringUtils.strip(String)` with JDK provided API",
description = "Replace Maven Shared `StringUtils.strip(String str)` with JDK provided API.")
public static class Strip {
@BeforeTemplate
String before(@Matches(RepeatableArgumentMatcher.class) String s) {
Expand All @@ -212,8 +212,8 @@ String after(String s) {
}

@RecipeDescriptor(
name = "Replace `StringUtils.trim(String)` with JDK internals",
description = "Replace Maven Shared `StringUtils.trim(String str)` with JDK internals.")
name = "Replace `StringUtils.trim(String)` with JDK provided API",
description = "Replace Maven Shared `StringUtils.trim(String str)` with JDK provided API.")
public static class Trim {
@BeforeTemplate
String before(@Matches(RepeatableArgumentMatcher.class) String s) {
Expand All @@ -227,8 +227,8 @@ String after(String s) {
}

@RecipeDescriptor(
name = "Replace `StringUtils.upperCase(String)` with JDK internals",
description = "Replace Maven Shared `StringUtils.upperCase(String str)` with JDK internals.")
name = "Replace `StringUtils.upperCase(String)` with JDK provided API",
description = "Replace Maven Shared `StringUtils.upperCase(String str)` with JDK provided API.")
public static class Uppercase {
@BeforeTemplate
String before(@Matches(RepeatableArgumentMatcher.class) String s) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ class PlexusFileUtils {
// https://github.com/codehaus-plexus/plexus-utils/blob/master/src/main/java/org/codehaus/plexus/util/StringUtils.java

@RecipeDescriptor(
name = "Replace `FileUtils.deleteDirectory(File)` with JDK internals",
description = "Replace Plexus `FileUtils.deleteDirectory(File directory)` with JDK internals.")
name = "Replace `FileUtils.deleteDirectory(File)` with JDK provided API",
description = "Replace Plexus `FileUtils.deleteDirectory(File directory)` with JDK provided API.")
static class DeleteDirectoryFile {
@BeforeTemplate
void before(File dir) throws Exception {
Expand All @@ -42,8 +42,8 @@ void after(File dir) throws Exception {
}

@RecipeDescriptor(
name = "Replace `FileUtils.deleteDirectory(String)` with JDK internals",
description = "Replace Plexus `FileUtils.deleteDirectory(String directory)` with JDK internals.")
name = "Replace `FileUtils.deleteDirectory(String)` with JDK provided API",
description = "Replace Plexus `FileUtils.deleteDirectory(String directory)` with JDK provided API.")
static class DeleteDirectoryString {
@BeforeTemplate
void before(String dir) throws Exception {
Expand All @@ -57,8 +57,8 @@ void after(String dir) throws Exception {
}

@RecipeDescriptor(
name = "Replace `FileUtils.fileExists(String)` with JDK internals",
description = "Replace Plexus `FileUtils.fileExists(String fileName)` with JDK internals.")
name = "Replace `FileUtils.fileExists(String)` with JDK provided API",
description = "Replace Plexus `FileUtils.fileExists(String fileName)` with JDK provided API.")
static class FileExistsString {
@BeforeTemplate
boolean before(String fileName) throws Exception {
Expand All @@ -72,8 +72,8 @@ boolean after(String fileName) throws Exception {
}

@RecipeDescriptor(
name = "Replace `FileUtils.getFile(String)` with JDK internals",
description = "Replace Plexus `FileUtils.getFile(String fileName)` with JDK internals.")
name = "Replace `FileUtils.getFile(String)` with JDK provided API",
description = "Replace Plexus `FileUtils.getFile(String fileName)` with JDK provided API.")
static class GetFile {
@BeforeTemplate
File before(String fileName) throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
@SuppressWarnings("ALL")
public class PlexusStringUtils {
@RecipeDescriptor(
name = "Replace `StringUtils.abbreviate(String, int)` with JDK internals",
description = "Replace Plexus `StringUtils.abbreviate(String str, int maxWidth)` with JDK internals.")
name = "Replace `StringUtils.abbreviate(String, int)` with JDK provided API",
description = "Replace Plexus `StringUtils.abbreviate(String str, int maxWidth)` with JDK provided API.")
public static class Abbreviate {
@BeforeTemplate
String before(@Matches(RepeatableArgumentMatcher.class) String s1,
Expand All @@ -43,8 +43,8 @@ String after(String s, int width) {
}

@RecipeDescriptor(
name = "Replace `StringUtils.capitalise(String)` with JDK internals",
description = "Replace Plexus `StringUtils.capitalise(String str)` with JDK internals.")
name = "Replace `StringUtils.capitalise(String)` with JDK provided API",
description = "Replace Plexus `StringUtils.capitalise(String str)` with JDK provided API.")
@SuppressWarnings("ConstantValue")
public static class Capitalise {
@BeforeTemplate
Expand All @@ -59,8 +59,8 @@ String after(String s) {
}

@RecipeDescriptor(
name = "Replace `StringUtils.defaultString(Object)` with JDK internals",
description = "Replace Plexus `StringUtils.defaultString(Object obj)` with JDK internals.")
name = "Replace `StringUtils.defaultString(Object)` with JDK provided API",
description = "Replace Plexus `StringUtils.defaultString(Object obj)` with JDK provided API.")
public static class DefaultString {
@BeforeTemplate
String before(String s) {
Expand All @@ -74,8 +74,8 @@ String after(String s) {
}

@RecipeDescriptor(
name = "Replace `StringUtils.defaultString(Object, String)` with JDK internals",
description = "Replace Plexus `StringUtils.defaultString(Object obj, String nullDefault)` with JDK internals.")
name = "Replace `StringUtils.defaultString(Object, String)` with JDK provided API",
description = "Replace Plexus `StringUtils.defaultString(Object obj, String nullDefault)` with JDK provided API.")
public static class DefaultStringFallback {
@BeforeTemplate
String before(String s, String nullDefault) {
Expand All @@ -89,8 +89,8 @@ String after(String s, String nullDefault) {
}

@RecipeDescriptor(
name = "Replace `StringUtils.deleteWhitespace(String)` with JDK internals",
description = "Replace Plexus `StringUtils.deleteWhitespace(String str)` with JDK internals.")
name = "Replace `StringUtils.deleteWhitespace(String)` with JDK provided API",
description = "Replace Plexus `StringUtils.deleteWhitespace(String str)` with JDK provided API.")
public static class DeleteWhitespace {
@BeforeTemplate
String before(@Matches(RepeatableArgumentMatcher.class) String s) {
Expand All @@ -104,8 +104,8 @@ String after(String s) {
}

@RecipeDescriptor(
name = "Replace `StringUtils.equalsIgnoreCase(String, String)` with JDK internals",
description = "Replace Plexus `StringUtils.equalsIgnoreCase(String str1, String str2)` with JDK internals.")
name = "Replace `StringUtils.equalsIgnoreCase(String, String)` with JDK provided API",
description = "Replace Plexus `StringUtils.equalsIgnoreCase(String str1, String str2)` with JDK provided API.")
public static class EqualsIgnoreCase {
@BeforeTemplate
boolean before(@Matches(RepeatableArgumentMatcher.class) String s,
Expand All @@ -120,8 +120,8 @@ boolean after(String s, String other) {
}

@RecipeDescriptor(
name = "Replace `StringUtils.equals(String, String)` with JDK internals",
description = "Replace Plexus `StringUtils.equals(String str1, String str2)` with JDK internals.")
name = "Replace `StringUtils.equals(String, String)` with JDK provided API",
description = "Replace Plexus `StringUtils.equals(String str1, String str2)` with JDK provided API.")
public static class Equals {
@BeforeTemplate
boolean before(String s, String other) {
Expand All @@ -135,8 +135,8 @@ boolean after(String s, String other) {
}

@RecipeDescriptor(
name = "Replace `StringUtils.lowerCase(String)` with JDK internals",
description = "Replace Plexus `StringUtils.lowerCase(String str)` with JDK internals.")
name = "Replace `StringUtils.lowerCase(String)` with JDK provided API",
description = "Replace Plexus `StringUtils.lowerCase(String str)` with JDK provided API.")
public static class Lowercase {
@BeforeTemplate
String before(@Matches(RepeatableArgumentMatcher.class) String s) {
Expand All @@ -150,8 +150,8 @@ String after(String s) {
}

@RecipeDescriptor(
name = "Replace `StringUtils.replace(String, String, String)` with JDK internals",
description = "Replace Plexus `StringUtils.replace(String text, String searchString, String replacement)` with JDK internals.")
name = "Replace `StringUtils.replace(String, String, String)` with JDK provided API",
description = "Replace Plexus `StringUtils.replace(String text, String searchString, String replacement)` with JDK provided API.")
public static class Replace {
@BeforeTemplate
String before(@Matches(RepeatableArgumentMatcher.class) String s,
Expand All @@ -167,8 +167,8 @@ String after(String s, String search, String replacement) {
}

@RecipeDescriptor(
name = "Replace `StringUtils.reverse(String)` with JDK internals",
description = "Replace Plexus `StringUtils.reverse(String str)` with JDK internals.")
name = "Replace `StringUtils.reverse(String)` with JDK provided API",
description = "Replace Plexus `StringUtils.reverse(String str)` with JDK provided API.")
public static class Reverse {
@BeforeTemplate
String before(@Matches(RepeatableArgumentMatcher.class) String s) {
Expand All @@ -182,8 +182,8 @@ String after(String s) {
}

@RecipeDescriptor(
name = "Replace `StringUtils.split(String)` with JDK internals",
description = "Replace Plexus `StringUtils.split(String str)` with JDK internals.")
name = "Replace `StringUtils.split(String)` with JDK provided API",
description = "Replace Plexus `StringUtils.split(String str)` with JDK provided API.")
public static class Split {
@BeforeTemplate
String[] before(@Matches(RepeatableArgumentMatcher.class) String s) {
Expand All @@ -197,8 +197,8 @@ String[] after(String s) {
}

@RecipeDescriptor(
name = "Replace `StringUtils.strip(String)` with JDK internals",
description = "Replace Plexus `StringUtils.strip(String str)` with JDK internals.")
name = "Replace `StringUtils.strip(String)` with JDK provided API",
description = "Replace Plexus `StringUtils.strip(String str)` with JDK provided API.")
public static class Strip {
@BeforeTemplate
String before(@Matches(RepeatableArgumentMatcher.class) String s) {
Expand All @@ -212,8 +212,8 @@ String after(String s) {
}

@RecipeDescriptor(
name = "Replace `StringUtils.trim(String)` with JDK internals",
description = "Replace Plexus `StringUtils.trim(String str)` with JDK internals.")
name = "Replace `StringUtils.trim(String)` with JDK provided API",
description = "Replace Plexus `StringUtils.trim(String str)` with JDK provided API.")
public static class Trim {
@BeforeTemplate
String before(@Matches(RepeatableArgumentMatcher.class) String s) {
Expand All @@ -227,8 +227,8 @@ String after(String s) {
}

@RecipeDescriptor(
name = "Replace `StringUtils.upperCase(String)` with JDK internals",
description = "Replace Plexus `StringUtils.upperCase(String str)` with JDK internals.")
name = "Replace `StringUtils.upperCase(String)` with JDK provided API",
description = "Replace Plexus `StringUtils.upperCase(String str)` with JDK provided API.")
public static class Uppercase {
@BeforeTemplate
String before(@Matches(RepeatableArgumentMatcher.class) String s) {
Expand Down

0 comments on commit 75b7048

Please sign in to comment.