--- old/src/share/classes/javax/swing/plaf/synth/DefaultSynthStyleFactory.java 2014-06-14 12:29:03.000000000 -0700 +++ new/src/share/classes/javax/swing/plaf/synth/DefaultSynthStyleFactory.java 2014-06-14 12:29:03.000000000 -0700 @@ -58,12 +58,12 @@ /** * Used during lookup. */ - private BakedArrayList _tmpList; + private BakedArrayList _tmpList; /** * Maps from a List (BakedArrayList to be precise) to the merged style. */ - private Map _resolvedStyles; + private Map, SynthStyle> _resolvedStyles; /** * Used if there are no styles matching a widget. @@ -72,9 +72,9 @@ DefaultSynthStyleFactory() { - _tmpList = new BakedArrayList(5); - _styles = new ArrayList(); - _resolvedStyles = new HashMap(); + _tmpList = new BakedArrayList(5); + _styles = new ArrayList<>(); + _resolvedStyles = new HashMap<>(); } public synchronized void addStyle(DefaultSynthStyle style, @@ -100,7 +100,7 @@ * @param id ID of the Component */ public synchronized SynthStyle getStyle(JComponent c, Region id) { - BakedArrayList matches = _tmpList; + BakedArrayList matches = _tmpList; matches.clear(); getMatchingStyles(matches, c, id); @@ -138,7 +138,7 @@ * Fetches any styles that match the passed into arguments into * matches. */ - private void getMatchingStyles(List matches, JComponent c, + private void getMatchingStyles(List matches, JComponent c, Region id) { String idName = id.getLowerCaseName(); String cName = c.getName(); @@ -166,8 +166,8 @@ /** * Caches the specified style. */ - private void cacheStyle(List styles, SynthStyle style) { - BakedArrayList cachedStyles = new BakedArrayList(styles); + private void cacheStyle(List styles, SynthStyle style) { + BakedArrayList cachedStyles = new BakedArrayList<>(styles); _resolvedStyles.put(cachedStyles, style); } @@ -175,7 +175,7 @@ /** * Returns the cached style from the passed in arguments. */ - private SynthStyle getCachedStyle(List styles) { + private SynthStyle getCachedStyle(List styles) { // ?? if (styles.size() == 0) { return null; } @@ -187,7 +187,7 @@ * is reverse sorted, that is the most recently added style found to * match will be first. */ - private SynthStyle mergeStyles(List styles) { + private SynthStyle mergeStyles(List styles) { int size = styles.size(); if (size == 0) {