[jboss-cvs] JBossAS SVN: r100829 - projects/vfs/trunk/src/main/java/org/jboss/vfs.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Feb 10 17:36:54 EST 2010
Author: johnbailey
Date: 2010-02-10 17:36:53 -0500 (Wed, 10 Feb 2010)
New Revision: 100829
Modified:
projects/vfs/trunk/src/main/java/org/jboss/vfs/VirtualFile.java
Log:
Use correct equals to allow the VirtualFile instance to change for a given path
Modified: projects/vfs/trunk/src/main/java/org/jboss/vfs/VirtualFile.java
===================================================================
--- projects/vfs/trunk/src/main/java/org/jboss/vfs/VirtualFile.java 2010-02-10 22:32:56 UTC (rev 100828)
+++ projects/vfs/trunk/src/main/java/org/jboss/vfs/VirtualFile.java 2010-02-10 22:36:53 UTC (rev 100829)
@@ -110,12 +110,12 @@
}
private void getPathNameRelativeTo(VirtualFile parent, StringBuilder builder) {
- if(this == parent) {
- return;
- }
if (this.parent == null) {
throw new IllegalArgumentException("Given parent is not an ancestor of this virtual file");
}
+ if(this.equals(parent)) {
+ return;
+ }
if (!this.parent.equals(parent)) {
this.parent.getPathNameRelativeTo(parent, builder);
builder.append('/');
More information about the jboss-cvs-commits
mailing list