Bug 272307 [Mac] CocoaUIEnhancer crashes with NullPointer under Mac OS X Cocoa when running Riena example
When bringing up the Riena example app, we get a NullPointer Exception. The exception is logged and the app continues to run. I am unsure why that is happening. Same app runs without a problem with windows, linux, mac os x carbon. I will supply a screenshot of the debugger before the nullpointer happens and a screen shot of the actual app. Its a little tricky to set up the Riena example app yourself unless you like to download Riena and setup a target platform and all that. Then I am happy to post you a link with description. I will also attach the stacktrace with some error messages. Hope that helps to get to the cause of the problem.
bundles/org.eclipse.ui.cocoa/src/org/eclipse/ui/internal/cocoa/CocoaUIEnhancer.java
}
	private static Object invokeMethod(Class clazz, Object target,
			String methodName, Object[] args) throws IllegalArgumentException,
			IllegalAccessException, InvocationTargetException,
			SecurityException, NoSuchMethodException {
		Class[] signature = new Class[args.length];
		for (int i = 0; i < args.length; i++) {
			Class thisClass = args[i].getClass();
			if (thisClass == Integer.class)
				signature[i] = int.class;
			else if (thisClass == Long.class)
				signature[i] = long.class;
			else if (thisClass == Byte.class)
				signature[i] = byte.class;
			else
				signature[i] = thisClass;
		}
		Method method = clazz.getMethod(methodName, signature);
		return method.invoke(target, args);
	}
	
	private static Object wrapPointer(long value) {
		Class PTR_CLASS =  C.PTR_SIZEOF == 8 ? long.class : int.class;
		if (PTR_CLASS == long.class)
			return new Long(value);
		else 
			return new Integer((int)value);
	}
}