geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r706682 - in /geronimo/gshell/trunk: gshell-support/gshell-ivy/src/main/java/org/apache/geronimo/gshell/ivy/ gshell-support/gshell-vfs-meta/src/main/resources/META-INF/spring/ gshell-support/gshell-vfs/src/main/java/org/apache/geronimo/gshe...
Date Tue, 21 Oct 2008 16:45:33 GMT
Author: jdillon
Date: Tue Oct 21 09:45:33 2008
New Revision: 706682

URL: http://svn.apache.org/viewvc?rev=706682&view=rev
Log:
Some tidy & don't let failure to load cache'd cp fail, just null and re-resolve

Removed:
    geronimo/gshell/trunk/gshell-support/gshell-vfs/src/main/java/org/apache/geronimo/gshell/vfs/provider/
Modified:
    geronimo/gshell/trunk/gshell-support/gshell-ivy/src/main/java/org/apache/geronimo/gshell/ivy/Slf4jMessageLogger.java
    geronimo/gshell/trunk/gshell-support/gshell-vfs-meta/src/main/resources/META-INF/spring/components.xml
    geronimo/gshell/trunk/gshell-support/gshell-vfs/src/main/java/org/apache/geronimo/gshell/vfs/FileObjectNameCompleter.java
    geronimo/gshell/trunk/gshell-support/gshell-vfs/src/main/java/org/apache/geronimo/gshell/vfs/FileSystemAccessImpl.java
    geronimo/gshell/trunk/gshell-support/gshell-vfs/src/main/java/org/apache/geronimo/gshell/vfs/config/ConfigurableFileSystemManager.java
    geronimo/gshell/trunk/gshell-support/gshell-vfs/src/main/resources/META-INF/spring/components.xml
    geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ClassPathCache.java

Modified: geronimo/gshell/trunk/gshell-support/gshell-ivy/src/main/java/org/apache/geronimo/gshell/ivy/Slf4jMessageLogger.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-ivy/src/main/java/org/apache/geronimo/gshell/ivy/Slf4jMessageLogger.java?rev=706682&r1=706681&r2=706682&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-ivy/src/main/java/org/apache/geronimo/gshell/ivy/Slf4jMessageLogger.java
(original)
+++ geronimo/gshell/trunk/gshell-support/gshell-ivy/src/main/java/org/apache/geronimo/gshell/ivy/Slf4jMessageLogger.java
Tue Oct 21 09:45:33 2008
@@ -31,10 +31,10 @@
  *
  * @version $Rev$ $Date$
  */
-public class Slf4jMessageLogger
+public final class Slf4jMessageLogger
     extends AbstractMessageLogger
 {
-    private final Logger log = LoggerFactory.getLogger(Ivy.class);
+    private static final Logger log = LoggerFactory.getLogger(Ivy.class);
 
     public void log(final String msg, final int level) {
         switch (level) {

Modified: geronimo/gshell/trunk/gshell-support/gshell-vfs-meta/src/main/resources/META-INF/spring/components.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-vfs-meta/src/main/resources/META-INF/spring/components.xml?rev=706682&r1=706681&r2=706682&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-vfs-meta/src/main/resources/META-INF/spring/components.xml
(original)
+++ geronimo/gshell/trunk/gshell-support/gshell-vfs-meta/src/main/resources/META-INF/spring/components.xml
Tue Oct 21 09:45:33 2008
@@ -25,7 +25,7 @@
        xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"
        default-autowire="no">
 
-    <bean id="metaDataRegistry" class="org.apache.geronimo.gshell.vfs.provider.meta.data.MetaDataRegistryImpl"/>
+    <bean id="metaDataRegistry" class="org.apache.geronimo.gshell.vfs.provider.meta.data.MetaDataRegistryImpl"
lazy-init="true"/>
     
     <bean id="metaFileProviderConfigurer" class="org.apache.geronimo.gshell.vfs.config.FileProviderConfigurer">
         <property name="fileSystemManager" ref="fileSystemManager"/>

Modified: geronimo/gshell/trunk/gshell-support/gshell-vfs/src/main/java/org/apache/geronimo/gshell/vfs/FileObjectNameCompleter.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-vfs/src/main/java/org/apache/geronimo/gshell/vfs/FileObjectNameCompleter.java?rev=706682&r1=706681&r2=706682&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-vfs/src/main/java/org/apache/geronimo/gshell/vfs/FileObjectNameCompleter.java
(original)
+++ geronimo/gshell/trunk/gshell-support/gshell-vfs/src/main/java/org/apache/geronimo/gshell/vfs/FileObjectNameCompleter.java
Tue Oct 21 09:45:33 2008
@@ -61,7 +61,6 @@
         log.trace("Path: '{}'", path);
         
         try {
-            assert fileSystemAccess != null;
             FileObject file = fileSystemAccess.resolveFile(path);
 
             log.trace("Resolved file: {}", file);

Modified: geronimo/gshell/trunk/gshell-support/gshell-vfs/src/main/java/org/apache/geronimo/gshell/vfs/FileSystemAccessImpl.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-vfs/src/main/java/org/apache/geronimo/gshell/vfs/FileSystemAccessImpl.java?rev=706682&r1=706681&r2=706682&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-vfs/src/main/java/org/apache/geronimo/gshell/vfs/FileSystemAccessImpl.java
(original)
+++ geronimo/gshell/trunk/gshell-support/gshell-vfs/src/main/java/org/apache/geronimo/gshell/vfs/FileSystemAccessImpl.java
Tue Oct 21 09:45:33 2008
@@ -53,7 +53,6 @@
     }
 
     public FileSystemManager getManager() {
-        assert fileSystemManager != null;
         return fileSystemManager;
     }
 
@@ -87,8 +86,6 @@
     }
 
     public FileObject getCurrentDirectory() throws FileSystemException {
-        assert applicationManager != null;
-
         log.trace("Resolving CWD from application variables");
 
         return getCurrentDirectory(applicationManager.getApplication().getVariables());
@@ -114,8 +111,6 @@
     public void setCurrentDirectory(final FileObject dir) throws FileSystemException {
         assert dir != null;
 
-        assert applicationManager != null;
-
         log.trace("Setting CWD to application variables");
 
         setCurrentDirectory(applicationManager.getApplication().getVariables(), dir);

Modified: geronimo/gshell/trunk/gshell-support/gshell-vfs/src/main/java/org/apache/geronimo/gshell/vfs/config/ConfigurableFileSystemManager.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-vfs/src/main/java/org/apache/geronimo/gshell/vfs/config/ConfigurableFileSystemManager.java?rev=706682&r1=706681&r2=706682&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-vfs/src/main/java/org/apache/geronimo/gshell/vfs/config/ConfigurableFileSystemManager.java
(original)
+++ geronimo/gshell/trunk/gshell-support/gshell-vfs/src/main/java/org/apache/geronimo/gshell/vfs/config/ConfigurableFileSystemManager.java
Tue Oct 21 09:45:33 2008
@@ -37,6 +37,10 @@
 {
     private final Logger log = LoggerFactory.getLogger(getClass());
 
+    //
+    // TODO: Consider implementing a way to dynamically load providers for a given scheme
when requested
+    //
+    
     @Override
     public FileName resolveName(final FileName base, final String name, final NameScope scope)
throws FileSystemException {
         if (log.isTraceEnabled()) {

Modified: geronimo/gshell/trunk/gshell-support/gshell-vfs/src/main/resources/META-INF/spring/components.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-vfs/src/main/resources/META-INF/spring/components.xml?rev=706682&r1=706681&r2=706682&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-vfs/src/main/resources/META-INF/spring/components.xml
(original)
+++ geronimo/gshell/trunk/gshell-support/gshell-vfs/src/main/resources/META-INF/spring/components.xml
Tue Oct 21 09:45:33 2008
@@ -128,12 +128,12 @@
     </bean>
     -->
 
-    <bean id="fileSystemAccess" class="org.apache.geronimo.gshell.vfs.FileSystemAccessImpl">
+    <bean id="fileSystemAccess" class="org.apache.geronimo.gshell.vfs.FileSystemAccessImpl"
lazy-init="true">
         <constructor-arg ref="applicationManager"/>
         <constructor-arg ref="fileSystemManager"/>
     </bean>
     
-    <bean id="fileObjectNameCompleter" class="org.apache.geronimo.gshell.vfs.FileObjectNameCompleter">
+    <bean id="fileObjectNameCompleter" class="org.apache.geronimo.gshell.vfs.FileObjectNameCompleter"
lazy-init="true">
         <constructor-arg ref="fileSystemAccess"/>
     </bean>
 

Modified: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ClassPathCache.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ClassPathCache.java?rev=706682&r1=706681&r2=706682&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ClassPathCache.java
(original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ClassPathCache.java
Tue Oct 21 09:45:33 2008
@@ -64,22 +64,28 @@
         }
     }
 
-    public ClassPath get() throws IOException, ClassNotFoundException {
+    public ClassPath get() {
         if (!file.exists()) {
             return null;
         }
 
         ClassPath classPath;
 
-        ObjectInputStream input = new ObjectInputStream(new BufferedInputStream(new FileInputStream(file)));
         try {
-            classPath = (ClassPath)input.readObject();
-            log.debug("Loaded classpath from cache: {}", file);
+            ObjectInputStream input = new ObjectInputStream(new BufferedInputStream(new FileInputStream(file)));
+            try {
+                classPath = (ClassPath)input.readObject();
+                log.debug("Loaded classpath from cache: {}", file);
+            }
+            finally {
+                Closer.close(input);
+            }
         }
-        finally {
-            Closer.close(input);
+        catch (Exception e) {
+            log.warn("Failed to load classpath from cache", e);
+            return null;
         }
-
+        
         if (classPath.isValid()) {
             return classPath;
         }



Mime
View raw message