7124400: [macosx] CGraphicsDevice.getConfigurations() returns reference to member (does not copy configs)
Reviewed-by: anthony, kizune
This commit is contained in:
parent
2e89926eab
commit
9ea4ab4133
jdk
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user