Skip to content

Commit

Permalink
Corrected issue 54
Browse files Browse the repository at this point in the history
  • Loading branch information
adoble committed Aug 22, 2024
1 parent 1c76433 commit 9a2e0a2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and from version 3.2 this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Fixed

* [Issue 54](https://github.com/adoble/adr-j/issues/54) corrected. Many thanks to [Wesley Viana](https://github.com/wviana) for first identifying this and to [Sebastian Davids](https://github.com/sdavids) for providing the solution.


## [3.3.0]

### Added
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/org/doble/commands/CommandList.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ public Integer call() {
Path docsPath = rootPath.resolve(properties.getProperty("docPath"));

try (Stream<Path> stream = Files.list(docsPath)) {
stream.map(Path::getFileName).filter(ADRFilter.filter()).forEachOrdered(env.out::println);
// stream.map(Path::getFileName).filter(ADRFilter.filter()).forEachOrdered(env.out::println);
// Using sorted() here as oppsowd to forEachOrdered() to correct issue 54
// (https://github.com/adoble/adr-j/issues/54)
stream.map(Path::getFileName).filter(ADRFilter.filter()).sorted().forEach(env.out::println);
} catch (IOException e) {
env.out.println("FATAL: Cannot access directory. Exception message ->" + e.getMessage());
return ADR.ERRORGENERAL;
Expand Down

0 comments on commit 9a2e0a2

Please sign in to comment.