From 796d53900761da5ab4de3b97ab1281bdf6c95c0a Mon Sep 17 00:00:00 2001 From: Sylwester Lachiewicz Date: Sun, 15 Dec 2024 22:22:28 +0100 Subject: [PATCH] (doc) Added version tag to Rat changes --- src/main/java/org/codehaus/plexus/util/MatchPattern.java | 4 ++++ src/main/java/org/codehaus/plexus/util/MatchPatterns.java | 1 + src/main/java/org/codehaus/plexus/util/SelectorUtils.java | 7 +++++++ 3 files changed, 12 insertions(+) diff --git a/src/main/java/org/codehaus/plexus/util/MatchPattern.java b/src/main/java/org/codehaus/plexus/util/MatchPattern.java index 4b52de1d..d4f4c017 100644 --- a/src/main/java/org/codehaus/plexus/util/MatchPattern.java +++ b/src/main/java/org/codehaus/plexus/util/MatchPattern.java @@ -61,6 +61,7 @@ private MatchPattern(String source, String separator) { /** * Gets the source pattern for this matchpattern. * @return the source string without Ant or Regex pattern markers. + * @since 3.6.0 */ public String getSource() { return regexPattern == null ? source : regexPattern; @@ -107,6 +108,9 @@ public boolean startsWith(String string) { return source.startsWith(string); } + /** + * @since 3.6.0 + */ public static String[] tokenizePathToString(String path, String separator) { List ret = new ArrayList(); StringTokenizer st = new StringTokenizer(path, separator); diff --git a/src/main/java/org/codehaus/plexus/util/MatchPatterns.java b/src/main/java/org/codehaus/plexus/util/MatchPatterns.java index 9c14bf00..4128cebf 100644 --- a/src/main/java/org/codehaus/plexus/util/MatchPatterns.java +++ b/src/main/java/org/codehaus/plexus/util/MatchPatterns.java @@ -19,6 +19,7 @@ private MatchPatterns(MatchPattern[] patterns) { /** * Gets a list of enclosed MatchPattern sources. * @return A list of enclosed MatchPattern sources. + * @since 3.6.0 */ public List getSources() { List sources = new ArrayList<>(); diff --git a/src/main/java/org/codehaus/plexus/util/SelectorUtils.java b/src/main/java/org/codehaus/plexus/util/SelectorUtils.java index 571bc002..6b5f34a6 100644 --- a/src/main/java/org/codehaus/plexus/util/SelectorUtils.java +++ b/src/main/java/org/codehaus/plexus/util/SelectorUtils.java @@ -139,6 +139,9 @@ public static boolean matchPatternStart(String pattern, String str, boolean isCa } } + /** + * @since 3.6 + */ public static boolean isAntPrefixedPattern(String pattern) { return pattern.length() > (ANT_HANDLER_PREFIX.length() + PATTERN_HANDLER_SUFFIX.length()) && pattern.startsWith(ANT_HANDLER_PREFIX) @@ -253,6 +256,9 @@ private static String toOSRelatedPath(String pattern, String separator) { return pattern; } + /** + * @since 3.6.0 + */ public static boolean isRegexPrefixedPattern(String pattern) { return pattern.length() > (REGEX_HANDLER_PREFIX.length() + PATTERN_HANDLER_SUFFIX.length()) && pattern.startsWith(REGEX_HANDLER_PREFIX) @@ -715,6 +721,7 @@ public static String removeWhitespace(String input) { * @param pattern the pattern to extract from. * @param separator the system file name separator in the pattern. * @return The pattern without the Regex or Ant prefix. + * @since 3.6.0 */ public static String extractPattern(final String pattern, final String separator) { if (isRegexPrefixedPattern(pattern)) {