mbien commented on code in PR #4205:
URL: https://github.com/apache/netbeans/pull/4205#discussion_r902897537


##########
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:
   we do always set it, makes the results more reliable - but I can't remember 
what the issue was.
   `ea ? asList(ReleaseStatus.GA, ReleaseStatus.EA) : asList(ReleaseStatus.GA)`



-- 
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

Reply via email to