Skip to content

Commit

Permalink
[#1930] Bugfix: Ensure tests pass in environments for Java 5-18
Browse files Browse the repository at this point in the history
  • Loading branch information
remkop committed Jan 24, 2023
1 parent 67a8717 commit b514ae6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
1 change: 1 addition & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Artifacts in this release are signed by Remko Popma (6601 E5C0 8DCC BB96).
## <a name="4.7.1-fixes"></a> Fixed issues
* [#1886][#1896] Bugfix: AsciiDoc generator now correctly outputs options even if all options are in ArgGroups. Thanks to [Ruud Senden](https://github.com/rsenden) for the discussion and the pull request.
* [#1878][#1876] Bugfix: Annotation processor now avoids loading resource bundles at compile time. Thanks to [Ruud Senden](https://github.com/rsenden) for the discussion and the pull request.
* [#1930] Bugfix: Ensure tests pass in environments for Java 5-18.
* [#1881] DOC: Many documentation improvements. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request.
* [#1855][#1857] DOC: Add new user manual section called [Rare Use Cases](https://picocli.info/#_rare_use_cases) detailing `System.exit` usage. Thanks to [Tadaya Tsuyukubo](https://github.com/ttddyy) for the pull request.
* [#1880] DOC: Improve documentation for negatable options that are true by default. Thanks to [Sebastian Hoß](https://github.com/sebhoss) for raising this.
Expand Down
11 changes: 4 additions & 7 deletions src/main/java/picocli/CommandLine.java
Original file line number Diff line number Diff line change
Expand Up @@ -11626,12 +11626,9 @@ private static ResourceBundle createBundle(String baseName) {
} else {
return new ResourceBundle() {
@Override
protected Object handleGetObject(String key) {
return null;
}
protected Object handleGetObject(String key) { return null; }
@Override
public Enumeration<String> getKeys() {
return Collections.emptyEnumeration(); }
public Enumeration<String> getKeys() { return Collections.enumeration(Collections.<String>emptyList()); }
};
}
}
Expand Down Expand Up @@ -11661,12 +11658,12 @@ private static Set<String> keys(ResourceBundle rb) {
for (Enumeration<String> k = rb.getKeys(); k.hasMoreElements(); keys.add(k.nextElement()));
return keys;
}

/**
* During annotation processing, resource bundles may not be available on the
* classpath and thereby cause failures. This method allows for disabling
* loading of resource bundles during annotation processing, preventing such
* errors.
* errors.
* @since 4.7.1
* @param loadBundles true if bundles should be loaded (default), false if bundles should not be loaded
*/
Expand Down

0 comments on commit b514ae6

Please sign in to comment.