@@ -236,6 +236,12 @@ public String getUrlForMoreAvailablePkgs(final VersionNumber versionNumber) {
236236 } else {
237237 Pkg pkg = getPkgForOperatingSystem (versionNumber , os , architecture , releaseStatus );
238238 if (null == pkg ) { continue ; }
239+
240+ if (WINDOWS == pkg .getOperatingSystem ()) {
241+ if (pkg .getFilename ().contains ("linux" )) { continue ; }
242+ if (pkg .getFilename ().contains ("macos" )) { continue ; }
243+ }
244+
239245 pkgs .add (pkg );
240246 }
241247 }
@@ -380,6 +386,11 @@ public String getUrlForMoreAvailablePkgs(final VersionNumber versionNumber) {
380386
381387 pkg .setSize (Helper .getFileSize (downloadLink ));
382388
389+ if (WINDOWS == pkg .getOperatingSystem ()) {
390+ if (pkg .getFilename ().contains ("linux" )) { continue ; }
391+ if (pkg .getFilename ().contains ("macos" )) { continue ; }
392+ }
393+
383394 pkgs .add (pkg );
384395 }
385396 }
@@ -506,6 +517,11 @@ public List<Pkg> getAllPkgs(final JsonArray jsonArray, final boolean onlyNewPkgs
506517
507518 pkg .setSize (Helper .getFileSize (downloadLink ));
508519
520+ if (WINDOWS == pkg .getOperatingSystem ()) {
521+ if (pkg .getFilename ().contains ("linux" )) { continue ; }
522+ if (pkg .getFilename ().contains ("macos" )) { continue ; }
523+ }
524+
509525 pkgs .add (pkg );
510526 }
511527 }
@@ -640,6 +656,11 @@ public List<Pkg> getAllCRaCPkgsFromJson(final JsonArray jsonArray, final boolean
640656 features .add (Feature .CRAC );
641657 pkg .setFeatures (features );
642658
659+ if (WINDOWS == pkg .getOperatingSystem ()) {
660+ if (pkg .getFilename ().contains ("linux" )) { continue ; }
661+ if (pkg .getFilename ().contains ("macos" )) { continue ; }
662+ }
663+
643664 pkgs .add (pkg );
644665 }
645666 }
@@ -657,7 +678,16 @@ public List<Pkg> getAllPkgsFromJavaDotNet(final boolean onlyNewPkgs) {
657678 if (null != response ) {
658679 String html = response .body ();
659680 if (!html .isEmpty ()) {
660- pkgs .addAll (extractPackagesFromHtml (html , false , onlyNewPkgs ));
681+ List <Pkg > pkgsFromHtml = extractPackagesFromHtml (html , false , onlyNewPkgs );
682+ pkgsFromHtml .forEach (pkg -> {
683+ if (WINDOWS == pkg .getOperatingSystem ()) {
684+ if (!pkg .getFilename ().contains ("linux" ) && !pkg .getFilename ().contains ("macos" )) {
685+ pkgs .add (pkg );
686+ }
687+ } else {
688+ pkgs .add (pkg );
689+ }
690+ });
661691 }
662692 }
663693 } catch (Exception e ) {
@@ -675,7 +705,16 @@ public List<Pkg> getAllPkgsFromJavaDotNet(final boolean onlyNewPkgs) {
675705 String html = response .body ();
676706 if (!html .isEmpty ()) {
677707 isReleaseCandidate = html .contains ("Release-Candidate" );
678- pkgs .addAll (extractPackagesFromHtml (html , isReleaseCandidate , onlyNewPkgs ));
708+ List <Pkg > pkgsFromHtml = extractPackagesFromHtml (html , isReleaseCandidate , onlyNewPkgs );
709+ pkgsFromHtml .forEach (pkg -> {
710+ if (WINDOWS == pkg .getOperatingSystem ()) {
711+ if (!pkg .getFilename ().contains ("linux" ) && !pkg .getFilename ().contains ("macos" )) {
712+ pkgs .add (pkg );
713+ }
714+ } else {
715+ pkgs .add (pkg );
716+ }
717+ });
679718 }
680719 }
681720 } catch (Exception e ) {
@@ -817,7 +856,15 @@ public Collection<Pkg> getAllPkgs(final boolean onlyNewPkgs) {
817856
818857 pkg .setSize (Helper .getFileSize (downloadLink ));
819858
820- if (!pkgMap .containsKey (pkg )) { pkgMap .put (pkg .getId (), pkg ); }
859+ if (!pkgMap .containsKey (pkg )) {
860+ if (WINDOWS == pkg .getOperatingSystem ()) {
861+ if (!pkg .getFilename ().contains ("linux" ) && !pkg .getFilename ().contains ("macos" )) {
862+ pkgMap .put (pkg .getId (), pkg );
863+ }
864+ } else {
865+ pkgMap .put (pkg .getId (), pkg );
866+ }
867+ }
821868 }
822869 });
823870
@@ -903,6 +950,10 @@ private Pkg getPkgForOperatingSystem(final VersionNumber versionNumber, final Op
903950
904951 pkg .setSize (Helper .getFileSize (downloadLink ));
905952
953+ if (WINDOWS == pkg .getOperatingSystem () && (pkg .getFilename ().contains ("linux" ) || pkg .getFilename ().contains ("macos" ))) {
954+ return null ;
955+ }
956+
906957 return pkg ;
907958 }
908959
@@ -971,6 +1022,12 @@ private List<Pkg> extractPackagesFromHtml(final String html, final boolean isRel
9711022
9721023 pkg .setFreeUseInProduction (Boolean .TRUE );
9731024 pkg .setSize (Helper .getFileSize (downloadLink ));
1025+
1026+ if (WINDOWS == pkg .getOperatingSystem ()) {
1027+ if (pkg .getFilename ().contains ("linux" )) { continue ; }
1028+ if (pkg .getFilename ().contains ("macos" )) { continue ; }
1029+ }
1030+
9741031 pkgs .add (pkg );
9751032 }
9761033
0 commit comments