Added support for getting a list of files from a jar directory in ResourceOf.#1757
Added support for getting a list of files from a jar directory in ResourceOf.#1757PeJetuz wants to merge 3 commits intoyegor256:masterfrom
Conversation
80cef20 to
7ebc4cd
Compare
|
@yegor256 Will you please review? |
|
@PeJetuz thanks for the contribution! I'm not sure the location of the |
7ebc4cd to
08d9555
Compare
|
@yegor256 Thanks! I don't like |
|
@PeJetuz indeed, it's good to have sources in Git repo, instead of a binary |
|
@yegor256 Now |
|
@PeJetuz "force push" is a bad idea in general, because it's confusing for the reviewer (just FYI) |
|
@PeJetuz it's not a good idea to keep binary files inside Git repository. Better generate/build this JAR in compile time, and place into |
|
@yegor256 I thought it was important to you that the intermediate results were not included in the final commit. Thank you, I will fix it! |
Added building test data in test-lib.jar before compilation.
|
@yegor256 Done. Thanks! |
| Collectors.joining("\n") | ||
| ) | ||
| .getBytes(StandardCharsets.UTF_8) | ||
| ); |
There was a problem hiding this comment.
@PeJetuz why not this formatting instead?
return new InputStreamOf(
names
.stream()
.collect(Collectors.joining("\n"))
.getBytes(StandardCharsets.UTF_8)
);
| final String name = entry.getName(); | ||
| if (this.path.equals(name)) { | ||
| continue; | ||
| } else if (name.lastIndexOf(this.path) >= 0) { |
There was a problem hiding this comment.
@PeJetuz read this, please: https://www.yegor256.com/2015/01/21/if-then-throw-else.html
There was a problem hiding this comment.
@yegor256 Thanks for the article. I replaced while/if/else with stream.
|
@PeJetuz looks much better now, but I still suggest placing it into |
Replaced while and if/else to stream.
b7830db to
ea68437
Compare
|
@yegor256 I changed the location of test-lib to src/test. I replaced while/if/else with stream and fixed the formatting. |
|
@yegor256 Hi! Is there anything else that needs to be improved? |
Added support for getting file names when reading a directory from a jar.
Added a test for getting file names when reading a directory.
Added 'test-data' module that builds a test jar file.