提交 43b64349 编写于 作者: B bae

7124400: [macosx] CGraphicsDevice.getConfigurations() returns reference to...

7124400: [macosx] CGraphicsDevice.getConfigurations() returns reference to member (does not copy configs)
Reviewed-by: anthony, kizune
上级 ed959b4b
......@@ -40,7 +40,7 @@ public class CGraphicsDevice extends GraphicsDevice {
private final int displayID;
// Array of all GraphicsConfig instances for this device
private final CGraphicsConfig[] configs;
private final GraphicsConfiguration[] configs;
// Default config (temporarily hard coded)
private final int DEFAULT_CONFIG = 0;
......@@ -49,7 +49,7 @@ public class CGraphicsDevice extends GraphicsDevice {
public CGraphicsDevice(int displayID) {
this.displayID = displayID;
configs = new CGraphicsConfig[] {
configs = new GraphicsConfiguration[] {
CGLGraphicsConfig.getConfig(this, 0)
};
}
......@@ -66,7 +66,7 @@ public class CGraphicsDevice extends GraphicsDevice {
*/
@Override
public GraphicsConfiguration[] getConfigurations() {
return configs;
return configs.clone();
}
/**
......
......@@ -23,7 +23,7 @@
/*
* @test
* @bug 6822057
* @bug 6822057 7124400
*
* @summary Test verifies that list of supported graphics configurations
* can not be changed via modification of elements of an array
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册