-
Notifications
You must be signed in to change notification settings - Fork 27
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
replace deprecated code in favor of Java 7 core and apache commons libraries #13
Conversation
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 think that you should not remove the local variables delimiters in AbstractMavenFilteringRequestTest, since it makes the tests prone to interference from the other tests in the class.
This is a common misconception. Instance fields are not shared between test methods. |
My bad. Then we are good to go! |
|
||
File emptyDirectoryChild = new File( sourceDirectory, "empty-directory-child" ); | ||
emptyDirectory.mkdirs(); | ||
|
||
File emptyDirectoryChildEmptyChild = new File( emptyDirectoryChild, "empty-child" ); | ||
emptyDirectoryChildEmptyChild.mkdirs(); | ||
|
||
FileUtils.fileWrite( new File( emptyDirectoryChildEmptyChild, ".gitignore" ), "UTF-8", "# .gitignore file" ); | ||
FileUtils.write( new File( emptyDirectoryChildEmptyChild, ".gitignore" ), "# .gitignore file", "UTF-8" ); |
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.
simply using Files.write could avoid external dependencies
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.
not quite a 1:1 replacement. What we really need is Files.writeString from Java 11. We'd also need to change the File objects to Path objects. I'll leave this change for a separate PR if someone wants to take it.
java.io.FileNotFoundException: File does not exist: /home/jenkins/jenkins-slave/workspace/maven-box_maven-filtering_i912/m/target/sourceTestGitIgnoreFile |
Passes locally though. |
No description provided.