Skip to content

Commit

Permalink
(doc) Added version tag to Rat changes
Browse files Browse the repository at this point in the history
  • Loading branch information
slachiewicz committed Dec 15, 2024
1 parent 901a2e5 commit 796d539
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/org/codehaus/plexus/util/MatchPattern.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<String> ret = new ArrayList<String>();
StringTokenizer st = new StringTokenizer(path, separator);
Expand Down
1 change: 1 addition & 0 deletions src/main/java/org/codehaus/plexus/util/MatchPatterns.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> getSources() {
List<String> sources = new ArrayList<>();
Expand Down
7 changes: 7 additions & 0 deletions src/main/java/org/codehaus/plexus/util/SelectorUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)) {
Expand Down

0 comments on commit 796d539

Please sign in to comment.