IGNITE-2019 Fixed schema import on Mac OSX El Capitan. - Fixes #292.

Signed-off-by: Andrey <anovi...@gridgain.com>


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/11d668b2
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/11d668b2
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/11d668b2

Branch: refs/heads/master
Commit: 11d668b2f77b12e7dc9bbc8ebdbfeb5e2ddad716
Parents: e6f6f40
Author: Andrey <anovi...@gridgain.com>
Authored: Fri Dec 4 15:52:14 2015 +0700
Committer: Andrey <anovi...@gridgain.com>
Committed: Fri Dec 4 15:52:14 2015 +0700

----------------------------------------------------------------------
 .../org/apache/ignite/schema/ui/SchemaImportApp.java  | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/11d668b2/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/SchemaImportApp.java
----------------------------------------------------------------------
diff --git 
a/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/SchemaImportApp.java
 
b/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/SchemaImportApp.java
index 495c316..6f9e05b 100644
--- 
a/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/SchemaImportApp.java
+++ 
b/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/SchemaImportApp.java
@@ -22,6 +22,7 @@ import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
 import java.io.IOException;
+import java.lang.reflect.Field;
 import java.net.URL;
 import java.net.URLClassLoader;
 import java.sql.Connection;
@@ -1738,6 +1739,19 @@ public class SchemaImportApp extends Application {
             catch (Exception ignore) {
                 // No-op.
             }
+
+            // Workaround for JDK 7/JavaFX 2 application on Mac OSX El Capitan.
+            try {
+                Class<?> fontFinderCls = 
Class.forName("com.sun.t2k.MacFontFinder");
+
+                Field psNameToPathMap = 
fontFinderCls.getDeclaredField("psNameToPathMap");
+
+                psNameToPathMap.setAccessible(true);
+                psNameToPathMap.set(null, new HashMap<String, String>());
+            }
+            catch (Exception ignore) {
+                // No-op.
+            }
         }
 
         launch(args);

Reply via email to