-
Notifications
You must be signed in to change notification settings - Fork 2.5k
BATCH-2698 - Remove commons io from test module #587
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
BATCH-2698 - Remove commons io from test module #587
Conversation
|
Thank you for this PR. Removing a dependency is always welcome! I opened a JIRA ticket for this improvement: BATCH-2698.
Please open a separate ticket/PR for this. |
|
Done! See BATCH-2701 and BATCH-2702. I'll open a PR for those changes too once this is merged in first. |
|
Running a full build on this fails with a number of |
bc3c9d4 to
197d2cb
Compare
|
Thanks @mminella for the update and info. Very helpful. I've updated my changes to include |
197d2cb to
1c1a032
Compare
|
Hi @drumonii , Thank you for updating the PR. I would use Kr, |
|
While testing this PR, I noticed that while the build is passing on the command line, some tests are failing when I run them from my IDE (I use IntelliJ Idea on MacOS with Oracle JDK 1.8.0_161 from both the IDE and command line). The tests in the following classes are failing: When I debug one of the cases, I see the the URI passed to the It looks like it is the same case as in the last answer of the SO thread given by Michael. When I add a fallback to the default file system like this: private void initFileSystem(URI uri) throws IOException {
try {
FileSystems.getFileSystem(uri);
}
catch (FileSystemNotFoundException e) {
FileSystems.newFileSystem(uri, Collections.emptyMap());
+ } catch(IllegalArgumentException e) {
+ FileSystems.getDefault();
}
}It works fine.. @drumonii May I ask you on which platform are you building/testing the project? Can you confirm those tests are passing from both your IDE and the command line? Thank you upfront! |
Prefer Files.lines over common io's readLines
1c1a032 to
24132b9
Compare
|
Thanks for the in depth analysis @benas! I'm on Win 10, JDK In regards to your other comment about the |
The only occurrence of it used was
IOUtils.readLinesinDataSourceInitializer. And since Spring Batch 4 requires Java 8, we can make use ofFiles.linesinstead of common io'sIOUtils.readLines.Also noticed in the
spring-batch-testmodule thatcommons-collections:commons-collectionsis not used? Andhamcrest-libraryshould be atestCompile?