MIG -- explicitly sets Java9 switch to true for SwingJS
authorhansonr <hansonr@STO24954W.ad.stolaf.edu>
Mon, 4 Feb 2019 14:50:46 +0000 (08:50 -0600)
committerhansonr <hansonr@STO24954W.ad.stolaf.edu>
Mon, 4 Feb 2019 14:50:46 +0000 (08:50 -0600)
srcjar/net/miginfocom/swing/SwingComponentWrapper.java

index 46a78fd..2b6f1aa 100644 (file)
@@ -136,17 +136,17 @@ public class SwingComponentWrapper implements ComponentWrapper
                }
        }
 
-       private static boolean isJava9orLater;
-       static {
-               try {
-                       // Java 9 version-String Scheme: http://openjdk.java.net/jeps/223
-                       StringTokenizer st = new StringTokenizer(System.getProperty("java.version"), "._-+");
-                       int majorVersion = Integer.parseInt(st.nextToken());
-                       isJava9orLater = majorVersion >= 9;
-               } catch (Exception e) {
-                       // Java 8 or older
-               }
-       }
+       private static boolean isJava9orLater = true;
+//     static {
+//             try {
+//                     // Java 9 version-String Scheme: http://openjdk.java.net/jeps/223
+//                     StringTokenizer st = new StringTokenizer(System.getProperty("java.version"), "._-+");
+//                     int majorVersion = Integer.parseInt(st.nextToken());
+//                     isJava9orLater = majorVersion >= 9;
+//             } catch (Exception e) {
+//                     // Java 8 or older
+//             }
+//     }
 
 //     /** Cache.
 //      */
@@ -226,6 +226,7 @@ public class SwingComponentWrapper implements ComponentWrapper
                        c.getPreferredSize(); // To defeat a bug where the minimum size is different before and after the first call to getPreferredSize();
                        prefCalled = true;
                }
+               
                return c.getMinimumSize().width;
        }
        @Override