11/*
2- * Copyright 2002-2017 the original author or authors.
2+ * Copyright 2002-2018 the original author or authors.
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
3131/**
3232 * Utility for detecting and accessing JBoss VFS in the classpath.
3333 *
34- * <p>As of Spring 4.0, this class supports VFS 3.x on JBoss AS 6+ (package
35- * {@code org.jboss.vfs}) and is in particular compatible with JBoss AS 7 and
36- * WildFly 8.
34+ * <p>As of Spring 4.0, this class supports VFS 3.x on JBoss AS 6+
35+ * (package {@code org.jboss.vfs}) and is in particular compatible with
36+ * JBoss AS 7 and WildFly 8+ .
3737 *
3838 * <p>Thanks go to Marius Bogoevici for the initial patch.
3939 * <b>Note:</b> This is an internal class and should not be used outside the framework.
@@ -58,13 +58,13 @@ public abstract class VfsUtils {
5858 private static final Method VIRTUAL_FILE_METHOD_TO_URI ;
5959 private static final Method VIRTUAL_FILE_METHOD_GET_NAME ;
6060 private static final Method VIRTUAL_FILE_METHOD_GET_PATH_NAME ;
61+ private static final Method VIRTUAL_FILE_METHOD_GET_PHYSICAL_FILE ;
6162 private static final Method VIRTUAL_FILE_METHOD_GET_CHILD ;
6263
6364 protected static final Class <?> VIRTUAL_FILE_VISITOR_INTERFACE ;
6465 protected static final Method VIRTUAL_FILE_METHOD_VISIT ;
6566
6667 private static final Field VISITOR_ATTRIBUTES_FIELD_RECURSE ;
67- private static final Method GET_PHYSICAL_FILE ;
6868
6969 static {
7070 ClassLoader loader = VfsUtils .class .getClassLoader ();
@@ -82,7 +82,7 @@ public abstract class VfsUtils {
8282 VIRTUAL_FILE_METHOD_TO_URL = virtualFile .getMethod ("toURL" );
8383 VIRTUAL_FILE_METHOD_GET_NAME = virtualFile .getMethod ("getName" );
8484 VIRTUAL_FILE_METHOD_GET_PATH_NAME = virtualFile .getMethod ("getPathName" );
85- GET_PHYSICAL_FILE = virtualFile .getMethod ("getPhysicalFile" );
85+ VIRTUAL_FILE_METHOD_GET_PHYSICAL_FILE = virtualFile .getMethod ("getPhysicalFile" );
8686 VIRTUAL_FILE_METHOD_GET_CHILD = virtualFile .getMethod ("getChild" , String .class );
8787
8888 VIRTUAL_FILE_VISITOR_INTERFACE = loader .loadClass (VFS3_PKG + "VirtualFileVisitor" );
@@ -125,7 +125,7 @@ static boolean exists(Object vfsResource) {
125125
126126 static boolean isReadable (Object vfsResource ) {
127127 try {
128- return (( Long ) invokeVfsMethod (VIRTUAL_FILE_METHOD_GET_SIZE , vfsResource ) > 0 ) ;
128+ return (Long ) invokeVfsMethod (VIRTUAL_FILE_METHOD_GET_SIZE , vfsResource ) > 0 ;
129129 }
130130 catch (IOException ex ) {
131131 return false ;
@@ -170,7 +170,7 @@ static Object getChild(Object vfsResource, String path) throws IOException {
170170 }
171171
172172 static File getFile (Object vfsResource ) throws IOException {
173- return (File ) invokeVfsMethod (GET_PHYSICAL_FILE , vfsResource );
173+ return (File ) invokeVfsMethod (VIRTUAL_FILE_METHOD_GET_PHYSICAL_FILE , vfsResource );
174174 }
175175
176176 static Object getRoot (URI url ) throws IOException {
0 commit comments