diff options
Diffstat (limited to 'src/newt')
4 files changed, 4 insertions, 1 deletions
diff --git a/src/newt/classes/com/jogamp/newt/Display.java b/src/newt/classes/com/jogamp/newt/Display.java index 71ea12ad8..bec014c0b 100644 --- a/src/newt/classes/com/jogamp/newt/Display.java +++ b/src/newt/classes/com/jogamp/newt/Display.java @@ -44,6 +44,7 @@ public abstract class Display { /** return true if obj is of type Display and both FQN {@link #getFQName()} equals */ public boolean equals(Object obj) { + if (this == obj) { return true; } if (obj instanceof Display) { Display d = (Display)obj; return d.getFQName().equals(getFQName()); diff --git a/src/newt/classes/com/jogamp/newt/Screen.java b/src/newt/classes/com/jogamp/newt/Screen.java index fc91047c0..d7d6baea7 100644 --- a/src/newt/classes/com/jogamp/newt/Screen.java +++ b/src/newt/classes/com/jogamp/newt/Screen.java @@ -49,6 +49,7 @@ public abstract class Screen { /** return true if obj is of type Display and both FQN {@link #getFQName()} equals */ public boolean equals(Object obj) { + if (this == obj) { return true; } if (obj instanceof Screen) { Screen s = (Screen)obj; return s.getFQName().equals(getFQName()); diff --git a/src/newt/classes/com/jogamp/newt/ScreenMode.java b/src/newt/classes/com/jogamp/newt/ScreenMode.java index f87c41240..81ce70249 100644 --- a/src/newt/classes/com/jogamp/newt/ScreenMode.java +++ b/src/newt/classes/com/jogamp/newt/ScreenMode.java @@ -164,6 +164,7 @@ public class ScreenMode implements Cloneable { * <br> */ public final boolean equals(Object obj) { + if (this == obj) { return true; } if (obj instanceof ScreenMode) { ScreenMode sm = (ScreenMode)obj; return sm.getMonitorMode().equals(getMonitorMode()) && diff --git a/src/newt/classes/com/jogamp/newt/util/MonitorMode.java b/src/newt/classes/com/jogamp/newt/util/MonitorMode.java index 7f989e4ab..fb2d0ceb5 100644 --- a/src/newt/classes/com/jogamp/newt/util/MonitorMode.java +++ b/src/newt/classes/com/jogamp/newt/util/MonitorMode.java @@ -1,6 +1,5 @@ /** * Copyright 2010 JogAmp Community. All rights reserved. - * Copyright (c) 2010 JogAmp Community. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: @@ -85,6 +84,7 @@ public class MonitorMode implements Cloneable { * otherwise <code>false</code>. */ public final boolean equals(Object obj) { + if (this == obj) { return true; } if (obj instanceof MonitorMode) { MonitorMode p = (MonitorMode)obj; return getSurfaceSize().equals(p.getSurfaceSize()) && |