Skip to content

replace deprecated code in favor of Java 7 core and apache commons libraries - #13

Merged
elharo merged 16 commits into
masterfrom
i912
Jul 22, 2020
Merged

elharo merged 16 commits into
masterfrom
i912

Conversation

@elharo

@elharo elharo commented Jul 16, 2020

Copy link
Copy Markdown
Contributor

No description provided.

@dennisl dennisl left a comment

Copy link
Copy Markdown
Contributor

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.

@elharo

elharo commented Jul 17, 2020

Copy link
Copy Markdown
Contributor Author

This is a common misconception. Instance fields are not shared between test methods.

@dennisl

dennisl commented Jul 17, 2020

Copy link
Copy Markdown
Contributor

My bad. Then we are good to go!

@elharo elharo changed the title replace deprecated code in favor Java 7 core and apache commons libraries replace deprecated code in favor of Java 7 core and apache commons libraries Jul 17, 2020
emptyDirectoryChildEmptyChild.mkdirs();

FileUtils.fileWrite( new File( emptyDirectoryChildEmptyChild, ".gitignore" ), "UTF-8", "# .gitignore file" );
FileUtils.write( new File( emptyDirectoryChildEmptyChild, ".gitignore" ), "# .gitignore file", "UTF-8" );

Copy link
Copy Markdown
Member

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

Copy link
Copy Markdown
Contributor Author

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.

@elharo

elharo commented Jul 22, 2020

Copy link
Copy Markdown
Contributor Author

java.io.FileNotFoundException: File does not exist: /home/jenkins/jenkins-slave/workspace/maven-box_maven-filtering_i912/m/target/sourceTestGitIgnoreFile
at org.apache.maven.shared.filtering.DefaultMavenResourcesFilteringTest.testShouldReturnGitIgnoreFiles(DefaultMavenResourcesFilteringTest.java:677)

@elharo

elharo commented Jul 22, 2020

Copy link
Copy Markdown
Contributor Author

Passes locally though.

@elharo
elharo merged commit 1a097bd into master Jul 22, 2020
@elharo
elharo deleted the i912 branch July 22, 2020 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants