From 62cc46116f8a9075ca774deac28dda28777c844a Mon Sep 17 00:00:00 2001 From: jjg Date: Tue, 15 Dec 2009 13:26:06 -0800 Subject: [PATCH] 6910317: [classfile] typo and other issues in Dependency classes Reviewed-by: ksrini --- .../classes/com/sun/tools/classfile/Dependencies.java | 8 ++++---- src/share/classes/com/sun/tools/classfile/Dependency.java | 2 +- test/tools/javap/classfile/deps/GetDeps.java | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/share/classes/com/sun/tools/classfile/Dependencies.java b/src/share/classes/com/sun/tools/classfile/Dependencies.java index 4daa6ac8..c42ae8ec 100644 --- a/src/share/classes/com/sun/tools/classfile/Dependencies.java +++ b/src/share/classes/com/sun/tools/classfile/Dependencies.java @@ -414,7 +414,7 @@ public class Dependencies { return pattern.matcher(dependency.getTarget().getClassName()).matches(); } - Pattern pattern; + private final Pattern pattern; } /** @@ -448,8 +448,8 @@ public class Dependencies { return false; } - Set packageNames; - boolean matchSubpackages; + private final Set packageNames; + private final boolean matchSubpackages; } @@ -543,8 +543,8 @@ public class Dependencies { class Visitor implements ConstantPool.Visitor, Type.Visitor { private ConstantPool constant_pool; - private Set deps; private Location origin; + Set deps; Visitor(ClassFile classFile) { try { diff --git a/src/share/classes/com/sun/tools/classfile/Dependency.java b/src/share/classes/com/sun/tools/classfile/Dependency.java index b145f808..bf09a7ca 100644 --- a/src/share/classes/com/sun/tools/classfile/Dependency.java +++ b/src/share/classes/com/sun/tools/classfile/Dependency.java @@ -54,7 +54,7 @@ public interface Dependency { /** * Find the immediate dependencies of a given class file. * @param classfile the class file to be examined - * @return the set of dependencies located in the given class file. + * @return the dependencies located in the given class file. */ public Iterable findDependencies(ClassFile classfile); } diff --git a/test/tools/javap/classfile/deps/GetDeps.java b/test/tools/javap/classfile/deps/GetDeps.java index f5db9770..5621a778 100644 --- a/test/tools/javap/classfile/deps/GetDeps.java +++ b/test/tools/javap/classfile/deps/GetDeps.java @@ -186,7 +186,7 @@ public class GetDeps { private Comparator originComparator = new Comparator() { public int compare(Dependency o1, Dependency o2) { - return o1.getTarget().toString().compareTo(o2.getOrigin().toString()); + return o1.getOrigin().toString().compareTo(o2.getOrigin().toString()); } }; -- GitLab