mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
ui util.isRetina: process IllegalArgumentException as well
This commit is contained in:
@@ -314,13 +314,16 @@ public class UIUtil {
|
||||
}
|
||||
|
||||
try {
|
||||
isRetina = (getScaleFactorMethod == null) || ((Integer)getScaleFactorMethod.invoke(device) != 1);
|
||||
isRetina = getScaleFactorMethod == null || (Integer)getScaleFactorMethod.invoke(device) != 1;
|
||||
} catch (IllegalAccessException e) {
|
||||
LOG.debug("CGraphicsDevice.getScaleFactor(): Access issue");
|
||||
isRetina = false;
|
||||
} catch (InvocationTargetException e) {
|
||||
LOG.debug("CGraphicsDevice.getScaleFactor(): Invocation issue");
|
||||
isRetina = false;
|
||||
} catch (IllegalArgumentException e) {
|
||||
LOG.debug("object is not an instance of declaring class: " + device.getClass().getName());
|
||||
isRetina = false;
|
||||
}
|
||||
|
||||
devicesToRetinaSupportCacheMap.put(device, isRetina);
|
||||
|
||||
Reference in New Issue
Block a user