geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r662183 - in /geronimo/gshell/trunk: gshell-model/src/main/java/org/apache/geronimo/gshell/model/common/ gshell-model/src/main/java/org/apache/geronimo/gshell/model/interpolate/ gshell-model/src/main/java/org/apache/geronimo/gshell/model/la...
Date Sun, 01 Jun 2008 09:04:36 GMT
Author: jdillon
Date: Sun Jun  1 02:04:36 2008
New Revision: 662183

URL: http://svn.apache.org/viewvc?rev=662183&view=rev
Log:
Tidy + logging muck

Modified:
    geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/common/DependencyGroup.java
    geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/interpolate/InterpolatorSupport.java
    geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/layout/GroupNode.java
    geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/marshal/MarshallerSupport.java
    geronimo/gshell/trunk/gshell-plugin/src/main/java/org/apache/geronimo/gshell/plugin/PluginCollector.java
    geronimo/gshell/trunk/gshell-plugin/src/main/java/org/apache/geronimo/gshell/plugin/PluginDiscoverer.java

Modified: geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/common/DependencyGroup.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/common/DependencyGroup.java?rev=662183&r1=662182&r2=662183&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/common/DependencyGroup.java
(original)
+++ geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/common/DependencyGroup.java
Sun Jun  1 02:04:36 2008
@@ -62,6 +62,7 @@
     /**
      * Link children to their parent group when deserializing.
      */
+    @SuppressWarnings({"UnusedDeclaration"})
     private Object readResolve() {
         if (!isEmpty()) {
             for (Dependency child : dependencies()) {

Modified: geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/interpolate/InterpolatorSupport.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/interpolate/InterpolatorSupport.java?rev=662183&r1=662182&r2=662183&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/interpolate/InterpolatorSupport.java
(original)
+++ geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/interpolate/InterpolatorSupport.java
Sun Jun  1 02:04:36 2008
@@ -64,8 +64,9 @@
 
 	public T interpolate(final T input) throws InterpolationException {
 		assert input != null;
-		
-		Marshaller<T> marshaller = input.getMarshaller();
+
+        //noinspection unchecked
+        Marshaller<T> marshaller = input.getMarshaller();
 		String xml = marshaller.marshal(input);
 		
 		log.trace("Interpolating: {}", xml);

Modified: geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/layout/GroupNode.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/layout/GroupNode.java?rev=662183&r1=662182&r2=662183&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/layout/GroupNode.java
(original)
+++ geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/layout/GroupNode.java
Sun Jun  1 02:04:36 2008
@@ -21,10 +21,8 @@
 
 import com.thoughtworks.xstream.annotations.XStreamAlias;
 
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Set;
 import java.util.LinkedHashSet;
+import java.util.Set;
 
 /**
  * A group of nodes.

Modified: geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/marshal/MarshallerSupport.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/marshal/MarshallerSupport.java?rev=662183&r1=662182&r2=662183&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/marshal/MarshallerSupport.java
(original)
+++ geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/marshal/MarshallerSupport.java
Sun Jun  1 02:04:36 2008
@@ -82,18 +82,22 @@
         xs.processAnnotations(classes);
     }
     
-    public void marshal(final T root, final OutputStream output) {
-        assert root != null;
+    public void marshal(final T model, final OutputStream output) {
+        assert model != null;
         assert output != null;
 
-        createXStream().toXML(root, output);
+        log.debug("Marshalling: {}", model);
+
+        createXStream().toXML(model, output);
     }
 
-    public void marshal(final T root, final Writer writer) {
-        assert root != null;
+    public void marshal(final T model, final Writer writer) {
+        assert model != null;
         assert writer != null;
 
-        createXStream().toXML(root, writer);
+        log.debug("Marshalling: {}", model);
+
+        createXStream().toXML(model, writer);
     }
 
     public String marshal(final T root) {
@@ -110,6 +114,8 @@
 
         model.setMarshaller(this);
 
+        log.trace("Unmarshalled: {}", model);
+
         return model;
     }
 
@@ -120,6 +126,8 @@
         T model = (T)createXStream().fromXML(reader);
 
         model.setMarshaller(this);
+
+        log.trace("Unmarshalled: {}", model);
         
         return model;
     }

Modified: geronimo/gshell/trunk/gshell-plugin/src/main/java/org/apache/geronimo/gshell/plugin/PluginCollector.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-plugin/src/main/java/org/apache/geronimo/gshell/plugin/PluginCollector.java?rev=662183&r1=662182&r2=662183&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-plugin/src/main/java/org/apache/geronimo/gshell/plugin/PluginCollector.java
(original)
+++ geronimo/gshell/trunk/gshell-plugin/src/main/java/org/apache/geronimo/gshell/plugin/PluginCollector.java
Sun Jun  1 02:04:36 2008
@@ -30,7 +30,7 @@
  *
  * @version $Rev$ $Date$
  */
-@Component(role= CommandCollector.class)
+@Component(role=PluginCollector.class)
 public class PluginCollector
     implements ComponentDiscoveryListener
 {

Modified: geronimo/gshell/trunk/gshell-plugin/src/main/java/org/apache/geronimo/gshell/plugin/PluginDiscoverer.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-plugin/src/main/java/org/apache/geronimo/gshell/plugin/PluginDiscoverer.java?rev=662183&r1=662182&r2=662183&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-plugin/src/main/java/org/apache/geronimo/gshell/plugin/PluginDiscoverer.java
(original)
+++ geronimo/gshell/trunk/gshell-plugin/src/main/java/org/apache/geronimo/gshell/plugin/PluginDiscoverer.java
Sun Jun  1 02:04:36 2008
@@ -23,6 +23,7 @@
 import org.apache.geronimo.gshell.model.plugin.PluginMarshaller;
 import org.codehaus.plexus.component.discovery.AbstractComponentDiscoverer;
 import org.codehaus.plexus.component.repository.ComponentSetDescriptor;
+import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.configuration.PlexusConfigurationException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -34,9 +35,12 @@
  *
  * @version $Rev$ $Date$
  */
+@Component(role=PluginDiscoverer.class)
 public class PluginDiscoverer
     extends AbstractComponentDiscoverer
 {
+    public static final String DESCRIPTOR_LOCATION = "META-INF/gshell/plugin.xml";
+
     private final Logger log = LoggerFactory.getLogger(getClass());
 
     private final PluginMarshaller marshaller = new PluginMarshaller();
@@ -44,7 +48,7 @@
     public PluginDiscoverer() {}
 
     protected String getComponentDescriptorLocation() {
-        return "META-INF/gshell/plugin.xml";
+        return DESCRIPTOR_LOCATION;
     }
 
     protected ComponentSetDescriptor createComponentDescriptors(final Reader reader, final
String source) throws PlexusConfigurationException {



Mime
View raw message