vgritsenko    2002/08/03 22:08:45

  Modified:    .        changes.xml
               src/scratchpad/src/org/apache/cocoon/components/source/impl
                        XMLDBSource.java
  Log:
  optimize imports
  
  Revision  Changes    Path
  1.228     +5 -4      xml-cocoon2/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/changes.xml,v
  retrieving revision 1.227
  retrieving revision 1.228
  diff -u -r1.227 -r1.228
  --- changes.xml       3 Aug 2002 15:11:03 -0000       1.227
  +++ changes.xml       4 Aug 2002 05:08:44 -0000       1.228
  @@ -344,7 +344,7 @@
      When building Cocoon it is required to set the targetted JVM (either 1.3 (means 
1.3 or lower) or 1.4.
     </action>
     <action dev="VG" type="fix" fixes-bug="10311" due-to="Joachim Piketz" 
due-to-email="[EMAIL PROTECTED]">
  -   Fix NullPointerException in Notifier.
  +   Fixed NullPointerException in Notifier.
     </action>
     <action dev="CH" type="update">
      Multiple results seem not to be supported by some DBMSs (i.e. Oracle and
  @@ -362,10 +362,11 @@
      returning an error.
     </action>
     <action dev="VG" type="fix" fixes-bug="8658" due-to="Michael Melhem" 
due-to-email="[EMAIL PROTECTED]">
  -   Fix sitemap compilation error when matchers are used within view or resource.
  +   Fixed sitemap compilation error when matchers are used within view
  +   or resource.
     </action>
     <action dev="VG" type="fix" fixes-bug="8509" due-to="Michael Melhem" 
due-to-email="[EMAIL PROTECTED]">
  -   Fix sitemap compilation error when actions are used within view.
  +   Fixed sitemap compilation error when actions are used within view.
     </action>
     <action dev="VG" type="fix" fixes-bug="3782">
      TraxTransformer and XSLTProcessor components now correctly handle
  
  
  
  1.2       +2 -22     
xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/source/impl/XMLDBSource.java
  
  Index: XMLDBSource.java
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/source/impl/XMLDBSource.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XMLDBSource.java  30 Jun 2002 23:29:22 -0000      1.1
  +++ XMLDBSource.java  4 Aug 2002 05:08:45 -0000       1.2
  @@ -68,17 +68,12 @@
   
   import org.xmldb.api.DatabaseManager;
   import org.xmldb.api.base.Collection;
  -import org.xmldb.api.base.Database;
  -import org.xmldb.api.base.ErrorCodes;
  -import org.xmldb.api.base.Resource;
  -import org.xmldb.api.base.Service;
   import org.xmldb.api.base.XMLDBException;
   import org.xmldb.api.base.ResourceSet;
   import org.xmldb.api.base.ResourceIterator;
   import org.xmldb.api.modules.XMLResource;
   import org.xmldb.api.modules.XPathQueryService;
   
  -import org.xml.sax.InputSource;
   import org.xml.sax.ContentHandler;
   import org.xml.sax.SAXException;
   import org.xml.sax.helpers.AttributesImpl;
  @@ -87,8 +82,6 @@
   import java.io.InputStream;
   import java.io.ByteArrayOutputStream;
   import java.io.ByteArrayInputStream;
  -import java.net.MalformedURLException;
  -import java.net.URL;
   import java.util.Iterator;
   
   /**
  @@ -152,15 +145,10 @@
   
       /**
        * The constructor.
  -     *
  -     * @param environment the Cocoon Environment.
        * @param url the URL being queried.
  -     * @param driver the XML:DB driver class name.
        */
       public XMLDBSource(String url) {
  -
           int start;
  -
           if ((start = url.indexOf('#')) != -1) {
               this.url = url.substring(0, start);
               this.query = url.substring(start + 1);
  @@ -276,13 +264,7 @@
        * source implementation, like an expires date, HTTP headers etc.
        */
       public Iterator getParameterNames() {
  -        return new EmptyIterator();
  -    }
  -
  -    class EmptyIterator implements Iterator {
  -        public boolean hasNext() { return false; }
  -        public Object next() { return null; }
  -        public void remove() {}
  +        return java.util.Collections.EMPTY_LIST.iterator();
       }
   
       /**
  @@ -290,12 +272,10 @@
        * resource is a collection, build an XML view of it.
        */
       public void toSAX(ContentHandler handler) throws SAXException {
  -
           if (url.endsWith("/"))
               this.collectionToSAX(handler);
           else
               this.resourceToSAX(handler);
  -
       }
   
       private void resourceToSAX(ContentHandler handler) throws SAXException {
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     [EMAIL PROTECTED]
To unsubscribe, e-mail:          [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to