7175704: [macosx] "8" PIT: NPE in GetDisplayMode fullscreen test
Reviewed-by: serb, leonidr
--- a/jdk/src/macosx/classes/sun/awt/CGraphicsDevice.java Tue Oct 16 20:11:19 2012 +0400
+++ b/jdk/src/macosx/classes/sun/awt/CGraphicsDevice.java Wed Oct 17 14:32:15 2012 +0400
@@ -194,6 +194,9 @@
@Override
public void setDisplayMode(DisplayMode dm) {
+ if (dm == null) {
+ throw new IllegalArgumentException("Invalid display mode");
+ }
nativeSetDisplayMode(displayID, dm.getWidth(), dm.getHeight(), dm.getBitDepth(), dm.getRefreshRate());
if (isFullScreenSupported() && getFullScreenWindow() != null) {
getFullScreenWindow().setSize(dm.getWidth(), dm.getHeight());