src/java.desktop/share/classes/sun/java2d/SurfaceManagerFactory.java
Print this page
*** 48,58 ****
* Returns the surface manager factory instance. This returns a factory
* that has been set by {@link #setInstance(SurfaceManagerFactory)}.
*
* @return the surface manager factory
*/
! public synchronized static SurfaceManagerFactory getInstance() {
if (instance == null) {
throw new IllegalStateException("No SurfaceManagerFactory set.");
}
return instance;
--- 48,58 ----
* Returns the surface manager factory instance. This returns a factory
* that has been set by {@link #setInstance(SurfaceManagerFactory)}.
*
* @return the surface manager factory
*/
! public static synchronized SurfaceManagerFactory getInstance() {
if (instance == null) {
throw new IllegalStateException("No SurfaceManagerFactory set.");
}
return instance;
*** 63,73 ****
* may not be set back to {@code null} when the factory is already
* instantiated.
*
* @param factory the factory to set
*/
! public synchronized static void setInstance(SurfaceManagerFactory factory) {
if (factory == null) {
// We don't want to allow setting this to null at any time.
throw new IllegalArgumentException("factory must be non-null");
}
--- 63,73 ----
* may not be set back to {@code null} when the factory is already
* instantiated.
*
* @param factory the factory to set
*/
! public static synchronized void setInstance(SurfaceManagerFactory factory) {
if (factory == null) {
// We don't want to allow setting this to null at any time.
throw new IllegalArgumentException("factory must be non-null");
}