-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rework directory scanner to ensure it can enforce exclusions and it uses path #54
base: master
Are you sure you want to change the base?
rework directory scanner to ensure it can enforce exclusions and it uses path #54
Conversation
import java.io.File; | ||
|
||
/** | ||
* If an exclude is defined on a folder it will bypass the visit of the children |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will bypass --> bypasses
In general, tech writing prefers the present tense
better yet bypass the visit --> does not visit
@@ -243,14 +243,6 @@ public void testSimpleExcludes() | |||
/* expExclDirs */ NONE ); | |||
} | |||
|
|||
public void testIsSymbolicLink() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this test removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No more relevant since there we use directly Files API and it was testing an internal
import org.junit.rules.TemporaryFolder; | ||
|
||
import java.io.File; | ||
import java.io.FileWriter; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
danger: this class depends on platform default encoding. Avoid.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is fine, it is just used to "touch" the file, not write content
src/test/java/org/apache/maven/shared/utils/io/conductor/EnforceExcludesOverIncludesTest.java
Outdated
Show resolved
Hide resolved
@@ -33,9 +33,7 @@ | |||
* Significantly more efficient than using strings, since re-evaluation and re-tokenizing is avoided. | |||
* | |||
* @author Kristian Rosenvold | |||
* @deprecated use {@code java.nio.filejava.nio.file.DirectoryStream.Filter<T>} and related classes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please retain this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this comment is wrong, it shouldn't have been merged IMO
@rmannibucau Is this PR still valid and needed? We're looking to release maven-shared-utils and I'm wondering if we should include this. |
IMHO this is relevant and would fix https://issues.apache.org/jira/browse/MSHARED-989. |
* If an exclude is defined on a folder it does not visit of the children | ||
* even if some include can match children. | ||
*/ | ||
public class EnforceExcludesOverIncludes implements ScanConductor, ScannerAware |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it make sense if this class would directly implement https://docs.oracle.com/javase/7/docs/api/java/nio/file/DirectoryStream.Filter.html instead? That way one could get rid of the ScanConductor interface...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @kwin let's make it slim
Any progress? |
@rmannibucau @kwin Do you guys want to pick this up? I would merge this into 4.0.0. |
I don't have capacity for this unfortunately. |
Alright, then I will remove the fix version and retain the class as-is for 4.0.0. |
No description provided.