From 4e092f7b4604919528c13ca45e4d22b41be9a36c Mon Sep 17 00:00:00 2001 From: Peter Zhelezniakov Date: Tue, 1 Sep 2009 15:34:21 +0400 Subject: [PATCH] 6387579: Usage of package-private class as parameter of a method (javax.swing.tree.DefaultTreeSelectionModel) Reviewed-by: rupashka --- .../javax/swing/tree/DefaultTreeSelectionModel.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/jdk/src/share/classes/javax/swing/tree/DefaultTreeSelectionModel.java b/jdk/src/share/classes/javax/swing/tree/DefaultTreeSelectionModel.java index 2eb24e84616..0225fac4a03 100644 --- a/jdk/src/share/classes/javax/swing/tree/DefaultTreeSelectionModel.java +++ b/jdk/src/share/classes/javax/swing/tree/DefaultTreeSelectionModel.java @@ -1067,10 +1067,13 @@ public class DefaultTreeSelectionModel implements Cloneable, Serializable, TreeS } /** - * Notifies listeners of a change in path. changePaths should contain - * instances of PathPlaceHolder. - */ - protected void notifyPathChange(Vector changedPaths, + * Notifies listeners of a change in path. changePaths should contain + * instances of PathPlaceHolder. + * + * @deprecated As of JDK version 1.7 + */ + @Deprecated + protected void notifyPathChange(Vector changedPaths, TreePath oldLeadSelection) { int cPathCount = changedPaths.size(); boolean[] newness = new boolean[cPathCount]; @@ -1078,7 +1081,7 @@ public class DefaultTreeSelectionModel implements Cloneable, Serializable, TreeS PathPlaceHolder placeholder; for(int counter = 0; counter < cPathCount; counter++) { - placeholder = changedPaths.elementAt(counter); + placeholder = (PathPlaceHolder) changedPaths.elementAt(counter); newness[counter] = placeholder.isNew; paths[counter] = placeholder.path; }