geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject cvs commit: incubator-geronimo/modules/twiddle/src/java/org/apache/geronimo/twiddle/config ConfigurationReader.java Configurator.java
Date Wed, 03 Sep 2003 13:50:29 GMT
jdillon     2003/09/03 06:50:29

  Modified:    modules/common/src/java/org/apache/geronimo/common/propertyeditor
                        URLEditor.java
               modules/core/src/java/org/apache/geronimo/command
                        StartCommand.java
               modules/core/src/java/org/apache/geronimo/deployment/scanner
                        DeploymentScanner.java
               modules/twiddle/src/java/org/apache/geronimo/twiddle/config
                        ConfigurationReader.java Configurator.java
  Log:
   o Use URLFactory instead of Strings
  
  Revision  Changes    Path
  1.2       +3 -3      incubator-geronimo/modules/common/src/java/org/apache/geronimo/common/propertyeditor/URLEditor.java
  
  Index: URLEditor.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/common/src/java/org/apache/geronimo/common/propertyeditor/URLEditor.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- URLEditor.java	28 Aug 2003 09:40:53 -0000	1.1
  +++ URLEditor.java	3 Sep 2003 13:50:29 -0000	1.2
  @@ -58,7 +58,7 @@
   
   import java.net.MalformedURLException;
   
  -import org.apache.geronimo.common.Strings;
  +import org.apache.geronimo.common.net.URLFactory;
   
   /**
    * A property editor for {@link java.net.URL}.
  @@ -78,7 +78,7 @@
       public Object getValue()
       {
           try {
  -            return Strings.toURL(getAsText());
  +            return URLFactory.create(getAsText());
           }
           catch (MalformedURLException e) {
               throw new PropertyEditorException(e);
  
  
  
  1.7       +6 -6      incubator-geronimo/modules/core/src/java/org/apache/geronimo/command/StartCommand.java
  
  Index: StartCommand.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/core/src/java/org/apache/geronimo/command/StartCommand.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- StartCommand.java	29 Aug 2003 13:16:52 -0000	1.6
  +++ StartCommand.java	3 Sep 2003 13:50:29 -0000	1.7
  @@ -68,7 +68,7 @@
   import org.apache.geronimo.Main;
   
   import org.apache.geronimo.common.NullArgumentException;
  -import org.apache.geronimo.common.Strings;
  +import org.apache.geronimo.common.net.URLFactory;
   
   import org.apache.geronimo.twiddle.Twiddle;
   import org.apache.geronimo.twiddle.command.AbstractCommand;
  @@ -131,16 +131,16 @@
           String homeDir = Twiddle.getHomeDir().toString();
           System.setProperty("geronimo.home", homeDir);
           
  -        URL mletURL = Strings.toURL(homeDir + "/etc/boot.mlet");
  +        URL mletURL = URLFactory.create(homeDir + "/etc/boot.mlet");
           if (line.hasOption('m')) {
               String value = line.getOptionValue('m');
  -            mletURL = Strings.toURL(value);
  +            mletURL = URLFactory.create(value);
           }
           
  -        URL deployURL = Strings.toURL(homeDir + "/etc/boot-service.xml");
  +        URL deployURL = URLFactory.create(homeDir + "/etc/boot-service.xml");
           if (line.hasOption('d')) {
               String value = line.getOptionValue('d');
  -            deployURL = Strings.toURL(value);
  +            deployURL = URLFactory.create(value);
           }
           
           if (log.isDebugEnabled()) {
  
  
  
  1.15      +10 -4     incubator-geronimo/modules/core/src/java/org/apache/geronimo/deployment/scanner/DeploymentScanner.java
  
  Index: DeploymentScanner.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/core/src/java/org/apache/geronimo/deployment/scanner/DeploymentScanner.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- DeploymentScanner.java	1 Sep 2003 20:38:49 -0000	1.14
  +++ DeploymentScanner.java	3 Sep 2003 13:50:29 -0000	1.15
  @@ -75,7 +75,7 @@
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
   
  -import org.apache.geronimo.common.Strings;
  +import org.apache.geronimo.common.net.URLFactory;
   
   import org.apache.geronimo.jmx.JMXUtil;
   import org.apache.geronimo.management.AbstractManagedObject;
  @@ -147,7 +147,10 @@
        * @jmx:managed-operation
        */
       public void addURL(String url, boolean recurse) throws MalformedURLException {
  -        addURL(Strings.toURL(url), recurse);
  +        //
  +        // TODO: remove these evil string adapters, let the JMX interface deal with this
  +        //
  +        addURL(URLFactory.create(url), recurse);
       }
       
       /**
  @@ -175,7 +178,10 @@
        * @jmx:managed-operation
        */
       public void removeURL(String url) throws MalformedURLException {
  -        removeURL(new URL(url));
  +        //
  +        // TODO: remove these evil string adapters, let the JMX interface deal with this
  +        //
  +        removeURL(URLFactory.create(url));
       }
       
       /**
  
  
  
  1.8       +5 -3      incubator-geronimo/modules/twiddle/src/java/org/apache/geronimo/twiddle/config/ConfigurationReader.java
  
  Index: ConfigurationReader.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/twiddle/src/java/org/apache/geronimo/twiddle/config/ConfigurationReader.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ConfigurationReader.java	28 Aug 2003 13:32:09 -0000	1.7
  +++ ConfigurationReader.java	3 Sep 2003 13:50:29 -0000	1.8
  @@ -65,8 +65,10 @@
   
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  +
   import org.apache.geronimo.common.NullArgumentException;
  -import org.apache.geronimo.common.Strings;
  +import org.apache.geronimo.common.net.URLFactory;
  +
   import org.exolab.castor.xml.Unmarshaller;
   
   /**
  @@ -124,7 +126,7 @@
               throw new NullArgumentException("urlspec");
           }
           
  -        return read(Strings.toURL(urlspec));
  +        return read(URLFactory.create(urlspec));
       }
       
       /**
  
  
  
  1.11      +3 -3      incubator-geronimo/modules/twiddle/src/java/org/apache/geronimo/twiddle/config/Configurator.java
  
  Index: Configurator.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/twiddle/src/java/org/apache/geronimo/twiddle/config/Configurator.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- Configurator.java	27 Aug 2003 12:00:00 -0000	1.10
  +++ Configurator.java	3 Sep 2003 13:50:29 -0000	1.11
  @@ -74,8 +74,8 @@
   import org.apache.commons.logging.LogFactory;
   
   import org.apache.geronimo.common.NullArgumentException;
  -import org.apache.geronimo.common.Strings;
   import org.apache.geronimo.common.StringValueParser;
  +import org.apache.geronimo.common.net.URLFactory;
   
   import org.apache.geronimo.twiddle.Twiddle;
   
  @@ -282,7 +282,7 @@
               log.trace("Parsing glob URLs from spec: " + globspec);
           }
           
  -        URL baseURL = Strings.toURL(globspec);
  +        URL baseURL = URLFactory.create(globspec);
           if (!baseURL.getProtocol().equals("file")) {
               // only can glob on file urls
               return new URL[] { baseURL };
  
  
  

Mime
View raw message