summaryrefslogtreecommitdiff
path: root/gnu/java/awt/ClasspathToolkit.java
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/java/awt/ClasspathToolkit.java')
-rw-r--r--gnu/java/awt/ClasspathToolkit.java34
1 files changed, 19 insertions, 15 deletions
diff --git a/gnu/java/awt/ClasspathToolkit.java b/gnu/java/awt/ClasspathToolkit.java
index 58bbda3f9..c0be43ce8 100644
--- a/gnu/java/awt/ClasspathToolkit.java
+++ b/gnu/java/awt/ClasspathToolkit.java
@@ -139,28 +139,32 @@ public abstract class ClasspathToolkit
// Circumvent the package-privateness of the
// java.awt.Font.Font(String,Map) constructor.
try
- {
- Constructor fontConstructor = Component.class.getConstructor
- (new Class[] { String.class, Map.class });
- AccessController.doPrivileged
- (new SetAccessibleAction(fontConstructor));
- f = (Font) fontConstructor.newInstance(new Object[] { name, attrs });
- }
+ {
+ Constructor fontConstructor = Component.class.getConstructor
+ (new Class[] { String.class, Map.class });
+ AccessController.doPrivileged
+ (new SetAccessibleAction(fontConstructor));
+ f = (Font) fontConstructor.newInstance(new Object[] { name, attrs });
+ }
catch (IllegalAccessException e)
- {
- // This should never happen.
- }
+ {
+ throw new RuntimeException
+ ("couldn't call java.awt.Font.Font(String,Map) constructor");
+ }
catch (NoSuchMethodException e)
- {
- // This should never happen.
- }
+ {
+ throw new RuntimeException
+ ("couldn't call java.awt.Font.Font(String,Map) constructor");
+ }
catch (InstantiationException e)
{
- // This should never happen.
+ throw new RuntimeException
+ ("couldn't call java.awt.Font.Font(String,Map) constructor");
}
catch (InvocationTargetException e)
{
- // This should never happen.
+ throw new RuntimeException
+ ("couldn't call java.awt.Font.Font(String,Map) constructor");
}
return f;
}