test/javax/imageio/metadata/GetObjectMinValue.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.

@@ -22,18 +22,16 @@
  */
 
 /*
  * @test
  * @bug 4429875 7186799
- * @compile -source 1.4 GetObjectMinValue.java
+ * @compile GetObjectMinValue.java
  * @run main GetObjectMinValue
  * @summary Tests the getObject{Min,Max}Value method of
  * IIOMetadataFormatImpl for an inclusive range
  */
 
-// Compiled with -source 1.4 to work around javac bug 5041233
-
 import javax.imageio.metadata.IIOMetadataFormatImpl;
 import javax.imageio.ImageTypeSpecifier;
 
 public class GetObjectMinValue {
 

@@ -77,16 +75,16 @@
         MyFormatImpl(String root, int minChildren, int maxChildren) {
             super(root, minChildren, maxChildren);
         }
 
         public void addObjectValue(String elementName,
-                                   Class classType, Object defaultValue,
+                                   Class<?> classType, Integer defaultValue,
                                    Comparable minValue, Comparable maxValue,
                                    boolean minInclusive, boolean maxInclusive) {
-            super.addObjectValue(elementName,
-                                 classType, defaultValue,
-                                 minValue, maxValue,
+            super.<Integer>addObjectValue(elementName,
+                                          (Class<Integer>)classType, defaultValue,
+                                          (Comparable<? super Integer>) minValue, (Comparable<? super Integer>) maxValue,
                                  minInclusive, maxInclusive);
         }
 
         public boolean canNodeAppear(String elementName,
                                      ImageTypeSpecifier imageType) {