summaryrefslogtreecommitdiffstats
path: root/src/newt/classes/jogamp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2019-11-22 17:18:57 +0100
committerSven Gothel <[email protected]>2019-11-22 17:18:57 +0100
commit3dcfa24384078fca34ce3cc877649f7e2c2c084b (patch)
tree6f57a32b96c4118e0292335e948aec11d341a0b5 /src/newt/classes/jogamp
parent30826d978258c16b06cdab34e5a4265406545c3f (diff)
Bug 1156: NEWT: NewtFactory.getCustomClass(..) Robustness
getCustomClass(..) shall throw all required exceptions upstream. Previous essential NEWT driver exception information got suppressed if failing, only disclosed in debug mode.
Diffstat (limited to 'src/newt/classes/jogamp')
-rw-r--r--src/newt/classes/jogamp/newt/DisplayImpl.java6
-rw-r--r--src/newt/classes/jogamp/newt/ScreenImpl.java6
-rw-r--r--src/newt/classes/jogamp/newt/WindowImpl.java6
3 files changed, 3 insertions, 15 deletions
diff --git a/src/newt/classes/jogamp/newt/DisplayImpl.java b/src/newt/classes/jogamp/newt/DisplayImpl.java
index 61a39c133..8037ffdce 100644
--- a/src/newt/classes/jogamp/newt/DisplayImpl.java
+++ b/src/newt/classes/jogamp/newt/DisplayImpl.java
@@ -272,11 +272,7 @@ public abstract class DisplayImpl extends Display {
private static Class<?> getDisplayClass(final String type)
throws ClassNotFoundException
{
- final Class<?> displayClass = NewtFactory.getCustomClass(type, "DisplayDriver");
- if(null==displayClass) {
- throw new ClassNotFoundException("Failed to find NEWT Display Class <"+type+".DisplayDriver>");
- }
- return displayClass;
+ return NewtFactory.getCustomClass(type, "DisplayDriver");
}
/** Make sure to reuse a Display with the same name */
diff --git a/src/newt/classes/jogamp/newt/ScreenImpl.java b/src/newt/classes/jogamp/newt/ScreenImpl.java
index 347ea650e..00bba64df 100644
--- a/src/newt/classes/jogamp/newt/ScreenImpl.java
+++ b/src/newt/classes/jogamp/newt/ScreenImpl.java
@@ -92,11 +92,7 @@ public abstract class ScreenImpl extends Screen implements MonitorModeListener {
private static Class<?> getScreenClass(final String type) throws ClassNotFoundException
{
- final Class<?> screenClass = NewtFactory.getCustomClass(type, "ScreenDriver");
- if(null==screenClass) {
- throw new ClassNotFoundException("Failed to find NEWT Screen Class <"+type+".ScreenDriver>");
- }
- return screenClass;
+ return NewtFactory.getCustomClass(type, "ScreenDriver");
}
public static Screen create(final Display display, int idx) {
diff --git a/src/newt/classes/jogamp/newt/WindowImpl.java b/src/newt/classes/jogamp/newt/WindowImpl.java
index 0f30f9458..47047f2b0 100644
--- a/src/newt/classes/jogamp/newt/WindowImpl.java
+++ b/src/newt/classes/jogamp/newt/WindowImpl.java
@@ -578,11 +578,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
private static Class<?> getWindowClass(final String type)
throws ClassNotFoundException
{
- final Class<?> windowClass = NewtFactory.getCustomClass(type, "WindowDriver");
- if(null==windowClass) {
- throw new ClassNotFoundException("Failed to find NEWT Window Class <"+type+".WindowDriver>");
- }
- return windowClass;
+ return NewtFactory.getCustomClass(type, "WindowDriver");
}
public static WindowImpl create(final NativeWindow parentWindow, final long parentWindowHandle, final Screen screen, final CapabilitiesImmutable caps) {