ws-xmlrpc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject cvs commit: xml-rpc/src/java/org/apache/xmlrpc XmlRpc.java
Date Thu, 17 Jan 2002 19:06:59 GMT
dlr         02/01/17 11:06:59

  Modified:    src/java/org/apache/xmlrpc XmlRpc.java
  Log:
  Made formatting for large if/else if tree more consistant.
  
  Revision  Changes    Path
  1.6       +36 -6     xml-rpc/src/java/org/apache/xmlrpc/XmlRpc.java
  
  Index: XmlRpc.java
  ===================================================================
  RCS file: /home/cvs/xml-rpc/src/java/org/apache/xmlrpc/XmlRpc.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -u -r1.5 -r1.6
  --- XmlRpc.java	8 Jan 2002 03:26:06 -0000	1.5
  +++ XmlRpc.java	17 Jan 2002 19:06:59 -0000	1.6
  @@ -145,7 +145,6 @@
           encodings.put ("ISO8859_1", "ISO-8859-1");
       }
   
  -
       /**
        * Set the SAX Parser to be used. The argument can either be the
        * full class name or a user friendly shortcut if the parser is
  @@ -258,7 +257,38 @@
           Parser parser = null;
           try
           {
  -            parser = (Parser) parserClass.newInstance ();
  +            Object p = parserClass.newInstance ();
  +            if (parserClass.isInstance(p))
  +                System.out.println("good");
  +            else
  +                System.out.println("bad");
  +            if (p instanceof Parser)
  +            {
  +                parser = (Parser) p;
  +            }
  +            else
  +            {
  +                System.out.println("___ p class loader: " + p.getClass().
  +                                   getClassLoader().getClass().getName());
  +                System.out.println("XmlRpc class loader: " +
  +                                   getClass().getClassLoader()
  +                                   .getClass().getName());
  +                System.out.println("Parser interface class loader: " +
  +                                   Parser.class
  +                                   .getClassLoader().getClass().getName());
  +                System.out.println("Class '" + parserClass +
  +                                   "' not an instance of org.xml.sax.Parser");
  +                Class[] a = parserClass.getInterfaces();
  +                for (int i = 0; i < a.length; i++)
  +                {
  +                    if (a[i].getClass().getName().equals("org.xml.sax.Parser"))
  +                    {
  +                        System.out.println("parserClass interface class " +
  +                                           "loader: " + a[i].getClassLoader()
  +                                           .getClass().getName());
  +                    }
  +                }
  +            }
           }
           catch (NoSuchMethodError nsm)
           {
  @@ -456,19 +486,16 @@
               cdata.setLength(0);
               readCdata = true;
           }
  -
           else if ("methodName".equals (name))
           {
               cdata.setLength(0);
               readCdata = true;
           }
  -
           else if ("name".equals (name))
           {
               cdata.setLength(0);
               readCdata = true;
           }
  -
           else if ("string".equals (name))
           {
               // currentValue.setType (STRING);
  @@ -506,11 +533,14 @@
               readCdata = true;
           }
           else if ("struct".equals (name))
  +        {
               currentValue.setType (STRUCT);
  +        }
           else if ("array".equals (name))
  +        {
               currentValue.setType (ARRAY);
  +        }
       }
  -
   
       public void error (SAXParseException e) throws SAXException
       {
  
  
  

Mime
View raw message