jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFImageMetadata.java
changeset 40433 d0e7204495dc
parent 36448 a07e108d5722
child 40442 e97e9982be6d
equal deleted inserted replaced
40432:6a878eae7459 40433:d0e7204495dc
  1463             StringTokenizer st = new StringTokenizer(tagSetNames, ",");
  1463             StringTokenizer st = new StringTokenizer(tagSetNames, ",");
  1464             while (st.hasMoreTokens()) {
  1464             while (st.hasMoreTokens()) {
  1465                 String className = st.nextToken();
  1465                 String className = st.nextToken();
  1466 
  1466 
  1467                 Object o = null;
  1467                 Object o = null;
       
  1468                 Class<?> setClass = null;
  1468                 try {
  1469                 try {
  1469                     Class<?> setClass = Class.forName(className);
  1470                     ClassLoader cl = TIFFImageMetadata.class.getClassLoader();
       
  1471                     setClass = Class.forName(className, false, cl);
       
  1472                     if (!TIFFTagSet.class.isAssignableFrom(setClass)) {
       
  1473                         fatal(node, "TagSets in IFD must be subset of"
       
  1474                                 + " TIFFTagSet class");
       
  1475                     }
  1470                     Method getInstanceMethod =
  1476                     Method getInstanceMethod =
  1471                         setClass.getMethod("getInstance", (Class[])null);
  1477                         setClass.getMethod("getInstance", (Class[])null);
  1472                     o = getInstanceMethod.invoke(null, (Object[])null);
  1478                     o = getInstanceMethod.invoke(null, (Object[])null);
  1473                 } catch (NoSuchMethodException e) {
  1479                 } catch (NoSuchMethodException e) {
  1474                     throw new RuntimeException(e);
  1480                     throw new RuntimeException(e);