< prev index next >

src/com/sun/javatest/exec/TestTreeModel.java

Print this page
rev 145 : 7902237: Fixing raw use of parameterized class
Reviewed-by: jjg

*** 995,1018 **** * changed. If the cache is not invalidated at certain points, rendering * of the tree may be incorrect. */ void invalidateNodeInfo() { synchronized (htLock) { ! Enumeration e = cache.keys(); while (e.hasMoreElements()) { (cache.get(e.nextElement())).invalidate(); } // while cache = new Hashtable<>(); cacheQueue = new LinkedList<>(); suspendedQueue = new LinkedList<>(); } // reprocess any needed nodes ! Iterator it = relevantNodes.iterator(); while (it.hasNext()) { ! TT_TreeNode tn = (TT_TreeNode) it.next(); if (tn instanceof TT_BasicNode) { getNodeInfo(((TT_BasicNode) tn).getTableNode(), false); } } // while } --- 995,1018 ---- * changed. If the cache is not invalidated at certain points, rendering * of the tree may be incorrect. */ void invalidateNodeInfo() { synchronized (htLock) { ! Enumeration<TestResultTable.TreeNode> e = cache.keys(); while (e.hasMoreElements()) { (cache.get(e.nextElement())).invalidate(); } // while cache = new Hashtable<>(); cacheQueue = new LinkedList<>(); suspendedQueue = new LinkedList<>(); } // reprocess any needed nodes ! Iterator<TT_TreeNode> it = relevantNodes.iterator(); while (it.hasNext()) { ! TT_TreeNode tn = it.next(); if (tn instanceof TT_BasicNode) { getNodeInfo(((TT_BasicNode) tn).getTableNode(), false); } } // while }
*** 1335,1345 **** // note must already have htLock // note with this algo., the suspend and cache queues are // basically equivalent TT_NodeCache selected = null; int depth = -1; ! LinkedList theList = cacheQueue; boolean notDone = true; int count = 0; if (cacheQueue.size() == 0) { if (suspendedQueue.size() == 0) { --- 1335,1345 ---- // note must already have htLock // note with this algo., the suspend and cache queues are // basically equivalent TT_NodeCache selected = null; int depth = -1; ! LinkedList<TT_NodeCache> theList = cacheQueue; boolean notDone = true; int count = 0; if (cacheQueue.size() == 0) { if (suspendedQueue.size() == 0) {
*** 1349,1359 **** } } else { } while (notDone) { ! TT_NodeCache possible = (TT_NodeCache) (theList.get(count)); int thisDepth = TestResultTable.getObjectPath(possible.getNode()).length; if (thisDepth > depth) { theList.remove(count); --- 1349,1359 ---- } } else { } while (notDone) { ! TT_NodeCache possible = (theList.get(count)); int thisDepth = TestResultTable.getObjectPath(possible.getNode()).length; if (thisDepth > depth) { theList.remove(count);
< prev index next >