Skip to content

Conversation

@Claudenw
Copy link
Contributor

@Claudenw Claudenw commented Oct 19, 2024

Fix for #276 and #279 on V3

This change:

  • Adds a public String source() method to MatchPattern to return the "source" instance value.
  • Makes public MatchPattern method static String[] tokenizePathToString(String path, String separator)
  • Adds public List sources() method to MatchPatterns that to return a list of MatchPattern.source() for each enclosed pattern.
  • Makes public SelectorUtils static boolean isAntPrefixedPattern() method
  • Makes public SelectorUtils static boolean isRegexPrefixedPattern() method
  • Adds a SelectorUtils public static String extractPattern(final string pattern, final String separator) method to extract a simplified pattern without the Ant or Regex prefix and with the Ant path modified by a call to toOSRelatedPath to ensure that it is properly formatted.
@Claudenw
Copy link
Contributor Author

Claudenw commented Nov 4, 2024

@slachiewicz if we can get these enhancements in Apache Rat can go back to using this library rather than carrying our own implementations. Your assistance is appreciated.

@slachiewicz
Copy link
Member

Would You be able to add some tests?

@Claudenw
Copy link
Contributor Author

Claudenw commented Nov 4, 2024

Absolutely. I will work on them today, when I get time from my actual work.

@Claudenw
Copy link
Contributor Author

Claudenw commented Nov 4, 2024

I added the tests and think I found a but as noted in #279

If there is agreement that is a bug, I can fix it as part of this and PR 278

@Claudenw
Copy link
Contributor Author

Claudenw commented Nov 5, 2024

@slachiewicz I have added tests to both the V3 and V4 pull requests as well as fixes for #279

@slawekjaranowski
Copy link
Member

I'm not sure if we need maintain 3.x version

@Claudenw
Copy link
Contributor Author

Claudenw commented Nov 5, 2024 via email

@slachiewicz
Copy link
Member

that shouldn't be a problem - I can release 4.x and 3.x

@slachiewicz slachiewicz merged commit e8c2d72 into codehaus-plexus:plexus-utils-3.x Nov 6, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

3 participants