src/share/classes/javax/swing/plaf/synth/Region.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 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.  Oracle designates this

@@ -425,10 +425,11 @@
      */
     public static final Region VIEWPORT = new Region("Viewport", false);
 
     private static Map<String, Region> getUItoRegionMap() {
         AppContext context = AppContext.getAppContext();
+        @SuppressWarnings("unchecked")
         Map<String, Region> map = (Map<String, Region>) context.get(UI_TO_REGION_MAP_KEY);
         if (map == null) {
             map = new HashMap<String, Region>();
             map.put("ArrowButtonUI", ARROW_BUTTON);
             map.put("ButtonUI", BUTTON);

@@ -480,10 +481,11 @@
         return map;
     }
 
     private static Map<Region, String> getLowerCaseNameMap() {
         AppContext context = AppContext.getAppContext();
+        @SuppressWarnings("unchecked")
         Map<Region, String> map = (Map<Region, String>) context.get(LOWER_CASE_NAME_MAP_KEY);
         if (map == null) {
             map = new HashMap<Region, String>();
             context.put(LOWER_CASE_NAME_MAP_KEY, map);
         }