[jboss-cvs] JBossAS SVN: r95243 - in projects/jboss-deployers/branches/vfs3/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure: explicit and 2 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Oct 20 23:26:19 EDT 2009
Author: david.lloyd at jboss.com
Date: 2009-10-20 23:26:19 -0400 (Tue, 20 Oct 2009)
New Revision: 95243
Modified:
projects/jboss-deployers/branches/vfs3/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/dir/GroupingStructure.java
projects/jboss-deployers/branches/vfs3/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/explicit/DeclaredStructure.java
projects/jboss-deployers/branches/vfs3/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/jar/JARStructure.java
projects/jboss-deployers/branches/vfs3/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/AbstractModificationTypeMatcher.java
projects/jboss-deployers/branches/vfs3/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/FileModificationTypeMatcher.java
Log:
Fix file existence checks some more
Modified: projects/jboss-deployers/branches/vfs3/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/dir/GroupingStructure.java
===================================================================
--- projects/jboss-deployers/branches/vfs3/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/dir/GroupingStructure.java 2009-10-21 03:24:01 UTC (rev 95242)
+++ projects/jboss-deployers/branches/vfs3/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/dir/GroupingStructure.java 2009-10-21 03:26:19 UTC (rev 95243)
@@ -95,7 +95,7 @@
for (String lib : libs)
{
VirtualFile libVF = file.getChild(lib);
- if (libVF != null)
+ if (libVF.exists())
{
VirtualFileFilter lf = filters.get(lib);
if (lf == null)
@@ -116,7 +116,7 @@
for (String group : groups)
{
VirtualFile groupVF = file.getChild(group);
- if (groupVF != null)
+ if (groupVF.exists())
{
VirtualFileFilter gf = filters.get(group);
if (gf == null)
Modified: projects/jboss-deployers/branches/vfs3/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/explicit/DeclaredStructure.java
===================================================================
--- projects/jboss-deployers/branches/vfs3/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/explicit/DeclaredStructure.java 2009-10-21 03:24:01 UTC (rev 95242)
+++ projects/jboss-deployers/branches/vfs3/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/explicit/DeclaredStructure.java 2009-10-21 03:26:19 UTC (rev 95243)
@@ -62,7 +62,7 @@
try
{
VirtualFile jbossStructure = file.getChild("META-INF/jboss-structure.xml");
- if (jbossStructure != null)
+ if (jbossStructure.exists())
{
if (trace)
log.trace("... context has a META-INF/jboss-structure.xml");
Modified: projects/jboss-deployers/branches/vfs3/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/jar/JARStructure.java
===================================================================
--- projects/jboss-deployers/branches/vfs3/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/jar/JARStructure.java 2009-10-21 03:24:01 UTC (rev 95242)
+++ projects/jboss-deployers/branches/vfs3/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/jar/JARStructure.java 2009-10-21 03:26:19 UTC (rev 95243)
@@ -169,7 +169,7 @@
if (structureContext.isTopLevel() == false)
{
VirtualFile child = file.getChild("META-INF");
- if (child != null && child.exists())
+ if (child.exists())
{
if (trace)
log.trace("... ok - non top level directory has a META-INF subdirectory");
Modified: projects/jboss-deployers/branches/vfs3/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/AbstractModificationTypeMatcher.java
===================================================================
--- projects/jboss-deployers/branches/vfs3/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/AbstractModificationTypeMatcher.java 2009-10-21 03:24:01 UTC (rev 95242)
+++ projects/jboss-deployers/branches/vfs3/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/AbstractModificationTypeMatcher.java 2009-10-21 03:26:19 UTC (rev 95243)
@@ -71,7 +71,7 @@
try
{
VirtualFile file = root.getChild(path);
- if (file != null && isModificationDetermined(file, child))
+ if (file.exists() && isModificationDetermined(file, child))
{
contextInfo.setModificationType(modificationType);
return true;
Modified: projects/jboss-deployers/branches/vfs3/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/FileModificationTypeMatcher.java
===================================================================
--- projects/jboss-deployers/branches/vfs3/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/FileModificationTypeMatcher.java 2009-10-21 03:24:01 UTC (rev 95242)
+++ projects/jboss-deployers/branches/vfs3/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/FileModificationTypeMatcher.java 2009-10-21 03:26:19 UTC (rev 95243)
@@ -52,15 +52,8 @@
{
for (VirtualFile file : getStartingFiles(root, contextInfo))
{
- try
- {
- if (file.getChild(path) != null)
- return true;
- }
- catch (Exception e)
- {
- log.debug("Cannot determine modification type, cause: " + e);
- }
+ if (file.getChild(path).exists())
+ return true;
}
}
return false;
@@ -87,15 +80,9 @@
List<VirtualFile> result = new ArrayList<VirtualFile>(metadataPaths.size());
for (String metadataPath : metadataPaths)
{
- try
- {
- VirtualFile child = file.getChild(metadataPath);
- if (child != null)
- result.add(child);
- }
- catch (Exception ignored)
- {
- }
+ VirtualFile child = file.getChild(metadataPath);
+ if (child.exists())
+ result.add(child);
}
return result;
}
More information about the jboss-cvs-commits
mailing list