1
0
mirror of https://github.com/moparisthebest/davmail synced 2024-11-11 11:55:08 -05:00

Fix regression from revision 811

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@818 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2009-11-04 09:45:23 +00:00
parent 06e1a4896f
commit 6b23e40b4e

View File

@ -29,7 +29,7 @@ public class OSXAdapter implements InvocationHandler {
protected final Method targetMethod; protected final Method targetMethod;
protected final String proxySignature; protected final String proxySignature;
static Constructor<?> macOSXApplication; static Object macOSXApplication;
/** /**
* Pass this method an Object and Method equipped to perform application shutdown logic. * Pass this method an Object and Method equipped to perform application shutdown logic.
@ -135,7 +135,7 @@ public class OSXAdapter implements InvocationHandler {
public static void setHandler(OSXAdapter adapter) throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException, InstantiationException { public static void setHandler(OSXAdapter adapter) throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException, InstantiationException {
Class<?> applicationClass = Class.forName("com.apple.eawt.Application"); Class<?> applicationClass = Class.forName("com.apple.eawt.Application");
if (macOSXApplication == null) { if (macOSXApplication == null) {
macOSXApplication = (Constructor<?>) applicationClass.getConstructor((Class[]) null).newInstance((Object[]) null); macOSXApplication = applicationClass.getConstructor((Class[]) null).newInstance((Object[]) null);
} }
Class applicationListenerClass = Class.forName("com.apple.eawt.ApplicationListener"); Class applicationListenerClass = Class.forName("com.apple.eawt.ApplicationListener");
Method addListenerMethod = applicationClass.getDeclaredMethod("addApplicationListener", new Class[]{applicationListenerClass}); Method addListenerMethod = applicationClass.getDeclaredMethod("addApplicationListener", new Class[]{applicationListenerClass});