/[classpath]/classpath/gnu/java/awt/ClasspathToolkit.java
ViewVC logotype

Diff of /classpath/gnu/java/awt/ClasspathToolkit.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.16 by fitzsim, Fri Aug 19 02:16:09 2005 UTC revision 1.17 by fitzsim, Thu Aug 25 06:34:27 2005 UTC
# Line 139  public abstract class ClasspathToolkit Line 139  public abstract class ClasspathToolkit
139      // Circumvent the package-privateness of the      // Circumvent the package-privateness of the
140      // java.awt.Font.Font(String,Map) constructor.      // java.awt.Font.Font(String,Map) constructor.
141      try      try
142      {        {
143        Constructor fontConstructor = Component.class.getConstructor          Constructor fontConstructor = Component.class.getConstructor
144        (new Class[] { String.class, Map.class });            (new Class[] { String.class, Map.class });
145        AccessController.doPrivileged          AccessController.doPrivileged
146        (new SetAccessibleAction(fontConstructor));            (new SetAccessibleAction(fontConstructor));
147        f = (Font) fontConstructor.newInstance(new Object[] { name, attrs });          f = (Font) fontConstructor.newInstance(new Object[] { name, attrs });
148      }        }
149      catch (IllegalAccessException e)      catch (IllegalAccessException e)
150      {        {
151        // This should never happen.          throw new RuntimeException
152      }            ("couldn't call java.awt.Font.Font(String,Map) constructor");
153          }
154      catch (NoSuchMethodException e)      catch (NoSuchMethodException e)
155      {        {
156        // This should never happen.          throw new RuntimeException
157      }            ("couldn't call java.awt.Font.Font(String,Map) constructor");
158          }
159      catch (InstantiationException e)      catch (InstantiationException e)
160        {        {
161          // This should never happen.          throw new RuntimeException
162              ("couldn't call java.awt.Font.Font(String,Map) constructor");
163        }        }
164      catch (InvocationTargetException e)      catch (InvocationTargetException e)
165        {        {
166          // This should never happen.          throw new RuntimeException
167              ("couldn't call java.awt.Font.Font(String,Map) constructor");
168        }        }
169      return f;      return f;
170    }    }

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26