mbien commented on code in PR #4205:
URL: https://github.com/apache/netbeans/pull/4205#discussion_r902900602
##########
java/java.disco/src/org/netbeans/modules/java/disco/Client.java:
##########
@@ -68,28 +68,31 @@ private synchronized DiscoClient getDisco() {
private Client() {
}
- public synchronized final List<MajorVersion> getAllMajorVersions() {
+ /**
+ * Returns all major versions which are still maintained (excludes EA
releases).
+ */
+ public synchronized final List<MajorVersion>
getAllMaintainedMajorVersions() {
if (majorVersions == null) {
- majorVersions = Collections.unmodifiableList(
- getDisco().getAllMajorVersions(false).stream()
- .filter(majorVersion ->
majorVersion.isMaintained())
- .filter(majorVersion ->
majorVersion.isEarlyAccessOnly() != Boolean.TRUE)
- .collect(Collectors.toList()));
+ majorVersions = getDisco().getAllMajorVersions(
+ Optional.of(true), // maintained
+ Optional.of(false), // EA
+ Optional.of(true), // GA
+ Optional.of(false)); // build
}
return majorVersions;
}
- public synchronized MajorVersion getLatestLts(boolean b) {
- return getDisco().getLatestLts(b);
+ public synchronized MajorVersion getLatestLts(boolean includeEA) {
+ return getDisco().getLatestLts(includeEA);
}
- public synchronized MajorVersion getLatestSts(boolean b) {
- return getDisco().getLatestSts(b);
+ public synchronized MajorVersion getLatestSts(boolean includeEA) {
+ return getDisco().getLatestSts(includeEA);
}
public synchronized List<Pkg> getPkgs(final Distribution distribution,
final VersionNumber versionNumber, final Latest latest, final OperatingSystem
operatingSystem,
final Architecture architecture, final ArchiveType archiveType,
final PackageType packageType,
- final Boolean javafxBundled) {
+ final boolean ea, final boolean javafxBundled) {
Review Comment:
but looking at it again, I believe i simply thought it would be weird (and
potentially error prone) to use boolean for ea and Boolean for JavaFX. Thats
why I changed both. We also do actually set FX always to false and the API is
also not public so we know all call sites - it can be easily changed in the
next round.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists