3737import lombok .RequiredArgsConstructor ;
3838import lombok .SneakyThrows ;
3939import lombok .val ;
40+ import org .apache .commons .lang3 .SystemUtils ;
4041import org .apache .logging .log4j .LogManager ;
4142import org .apache .logging .log4j .Logger ;
4243import org .jetbrains .annotations .NotNull ;
@@ -603,12 +604,13 @@ private static void executeArtifactLoading() {
603604 LOG .info ("-----------------------------------------------------------" );
604605 LOG .info ("FalsePatternLib is downloading dependencies. Please wait..." );
605606 LOG .info ("-----------------------------------------------------------" );
606- JFrame theFrame ;
607+ JFrame theFrame = null ;
607608 val progresses = new HashMap <DependencyLoadTask , JProgressBar >();
608- {
609- JFrame jFrame = null ;
609+ if (SystemUtils .IS_OS_MAC ) {
610+ LOG .info ("MacOS detected, not creating progress window (your OS is buggy)" );
611+ } else {
610612 try {
611- jFrame = new JFrame ("Dependency Download" );
613+ val jFrame = new JFrame ("Dependency Download" );
612614 val constraints = new GridBagConstraints ();
613615 jFrame .getContentPane ().setLayout (new GridBagLayout ());
614616 constraints .gridy = 0 ;
@@ -629,9 +631,9 @@ private static void executeArtifactLoading() {
629631 jFrame .setDefaultCloseOperation (WindowConstants .DO_NOTHING_ON_CLOSE );
630632 Dimension dim = Toolkit .getDefaultToolkit ().getScreenSize ();
631633 jFrame .setLocation (dim .width /2 -jFrame .getSize ().width /2 , dim .height /2 -jFrame .getSize ().height /2 );
634+ theFrame = jFrame ;
632635 } catch (Exception ignored ) {
633636 }
634- theFrame = jFrame ;
635637 }
636638 if (theFrame != null ) {
637639 for (val task : artifactMap .values ()) {
0 commit comments