37
37
import lombok .RequiredArgsConstructor ;
38
38
import lombok .SneakyThrows ;
39
39
import lombok .val ;
40
+ import org .apache .commons .lang3 .SystemUtils ;
40
41
import org .apache .logging .log4j .LogManager ;
41
42
import org .apache .logging .log4j .Logger ;
42
43
import org .jetbrains .annotations .NotNull ;
@@ -603,12 +604,13 @@ private static void executeArtifactLoading() {
603
604
LOG .info ("-----------------------------------------------------------" );
604
605
LOG .info ("FalsePatternLib is downloading dependencies. Please wait..." );
605
606
LOG .info ("-----------------------------------------------------------" );
606
- JFrame theFrame ;
607
+ JFrame theFrame = null ;
607
608
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 {
610
612
try {
611
- jFrame = new JFrame ("Dependency Download" );
613
+ val jFrame = new JFrame ("Dependency Download" );
612
614
val constraints = new GridBagConstraints ();
613
615
jFrame .getContentPane ().setLayout (new GridBagLayout ());
614
616
constraints .gridy = 0 ;
@@ -629,9 +631,9 @@ private static void executeArtifactLoading() {
629
631
jFrame .setDefaultCloseOperation (WindowConstants .DO_NOTHING_ON_CLOSE );
630
632
Dimension dim = Toolkit .getDefaultToolkit ().getScreenSize ();
631
633
jFrame .setLocation (dim .width /2 -jFrame .getSize ().width /2 , dim .height /2 -jFrame .getSize ().height /2 );
634
+ theFrame = jFrame ;
632
635
} catch (Exception ignored ) {
633
636
}
634
- theFrame = jFrame ;
635
637
}
636
638
if (theFrame != null ) {
637
639
for (val task : artifactMap .values ()) {
0 commit comments