You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xmlrpc-dev@ws.apache.org by jo...@apache.org on 2005/04/15 22:16:19 UTC

cvs commit: ws-xmlrpc/src/java/org/apache/xmlrpc XmlRpc.java

jochen      2005/04/15 13:16:19

  Modified:    src/java/org/apache/xmlrpc XmlRpc.java
  Log:
  Fixed URL typos.
  
  Revision  Changes    Path
  1.39      +35 -9     ws-xmlrpc/src/java/org/apache/xmlrpc/XmlRpc.java
  
  Index: XmlRpc.java
  ===================================================================
  RCS file: /home/cvs/ws-xmlrpc/src/java/org/apache/xmlrpc/XmlRpc.java,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- XmlRpc.java	30 Mar 2005 11:19:18 -0000	1.38
  +++ XmlRpc.java	15 Apr 2005 20:16:19 -0000	1.39
  @@ -196,9 +196,10 @@
        * is not compatible with ASCII (eg. EBCDIC) but the network is
        * still ASCII-like.
        */
  -    static String inputEncoding = null;
  +    static String defaultInputEncoding = null;
    
       private TypeFactory typeFactory;
  +	private String inputEncoding;
   
       /**
        * Creates a new instance with the {@link
  @@ -227,6 +228,7 @@
               }
           }
           this.typeFactory = createTypeFactory(typeFactoryName);
  +		this.inputEncoding = defaultInputEncoding;
       }
   
       /**
  @@ -351,24 +353,48 @@
           return XmlWriter.canonicalizeEncoding(encoding);
       }
   
  -    /**
  -     * Set the input encoding of the XML.
  +    /** Set the default input encoding of the XML.
        * This is used only if set.
        *
        * @param enc The Java name of the encoding.
  +     * @see #setInputEncoding(String)
        */
  -    public static void setInputEncoding(String enc)
  +    public static void setDefaultInputEncoding(String enc)
       {
  -        inputEncoding = enc;
  +        defaultInputEncoding = enc;
       }
   
       /**
  -     * Return the input encoding. This may be null. This is always a
  -     * Java encoding name, it is not transformed.
  +     * Return the default input encoding. This may be null.
  +     * This is always a Java encoding name, it is not transformed.
        *
        * @return the Java encoding name to use, if set, otherwise null.
  +     * @see #getInputEncoding()
  +     */
  +    public static String getDefaultInputEncoding ()
  +    {
  +        return defaultInputEncoding;
  +    }
  +
  +    /**
  +     * Set the input encoding for this XmlRpc instance.  This can be
  +     * used when the XMLRPC response does not contain the proper
  +     * encoding information in the XML declaration.
  +     *
  +     * @param enc The Java name of the encoding.
  +     */
  +    public void setInputEncoding(String enc)
  +    {
  +        inputEncoding = enc;
  +    }
  +
  +    /**
  +     * Get the input encoding for this XmlRpc instance.  This is a Java
  +     * encoding name.
  +     *
  +     * @return The Java encoding name to use.  <code>null</code> if not set.
        */
  -    public static String getInputEncoding ()
  +    public String getInputEncoding()
       {
           return inputEncoding;
       }
  
  
  

Re: cvs commit: ws-xmlrpc/src/java/org/apache/xmlrpc XmlRpc.java

Posted by Daniel Rall <dl...@finemaltcoding.com>.
On Fri, 2005-04-29 at 02:17 +0200, Jochen Wiedmann wrote:
>Daniel Rall wrote:
>
>> Regarding Eclipse, I don't know of a published one, but you can give one
>> of the attached ones a try.  If that works for everyone, we could stick
>> it up on the web site somewhere.
>
>As of Eclipse 3.1, one can save that as "project specific settings" in
>the CVS. In other words, I suggest that you do so.

I don't use Eclipse (XEmacs here), but I'm fine with any Eclipse user
who's also a committer saving these settings to our CVS repo.
Alternately, if none of the committers use Eclipse, perhaps an Eclipse
user could suggest the appropriate location in the CVS repo for these
settings?


Re: cvs commit: ws-xmlrpc/src/java/org/apache/xmlrpc XmlRpc.java

Posted by Jochen Wiedmann <jo...@gmail.com>.
Daniel Rall wrote:

> Regarding Eclipse, I don't know of a published one, but you can give one
> of the attached ones a try.  If that works for everyone, we could stick
> it up on the web site somewhere.

As of Eclipse 3.1, one can save that as "project specific settings" in
the CVS. In other words, I suggest that you do so.


Jochen

Re: cvs commit: ws-xmlrpc/src/java/org/apache/xmlrpc XmlRpc.java

Posted by Daniel Rall <dl...@finemaltcoding.com>.
On Thu, 2005-04-28 at 10:54 -0700, Steve Quint wrote:
>At 12:43 AM -0700 4/28/05, Daniel L. Rall wrote:
>>  >   +     * @see #getInputEncoding()
>>>    +     */
>>>    +    public static String getDefaultInputEncoding ()
>>                                                      ^
>>
>>Extra space here not consistent with formatting style used in this
>>source file.
>
>I'll have to take responsibility for those, as Jochen just committed 
>the patch I sent.  I'm just working with way too many formatting 
>styles.  Is there an Eclipse code formatter profile that I can just 
>download somewhere?

Thanks.  And to be fair, when applying your patch (CVS rev 1.41), I
actually found some other instances of that style in source file.

Regarding Eclipse, I don't know of a published one, but you can give one
of the attached ones a try.  If that works for everyone, we could stick
it up on the web site somewhere.


Re: cvs commit: ws-xmlrpc/src/java/org/apache/xmlrpc XmlRpc.java

Posted by Marcel Gleis <gl...@netz-profis.de>.
unsubscribe

Re: cvs commit: ws-xmlrpc/src/java/org/apache/xmlrpc XmlRpc.java

Posted by Steve Quint <li...@nanohertz.com>.
At 12:43 AM -0700 4/28/05, Daniel L. Rall wrote:
>  >   +     * @see #getInputEncoding()
>>    +     */
>>    +    public static String getDefaultInputEncoding ()
>                                                      ^
>
>Extra space here not consistent with formatting style used in this
>source file.

I'll have to take responsibility for those, as Jochen just committed 
the patch I sent.  I'm just working with way too many formatting 
styles.  Is there an Eclipse code formatter profile that I can just 
download somewhere?

Index: src/java/org/apache/xmlrpc/XmlRpc.java
===================================================================
RCS file: /home/cvspublic/ws-xmlrpc/src/java/org/apache/xmlrpc/XmlRpc.java,v
retrieving revision 1.40
diff -u -r1.40 XmlRpc.java
--- src/java/org/apache/xmlrpc/XmlRpc.java      22 Apr 2005 10:25:57 
-0000      1.40
+++ src/java/org/apache/xmlrpc/XmlRpc.java      28 Apr 2005 17:42:47 -0000
@@ -310,7 +310,7 @@
       *
       * @see org.apache.xmlrpc.XmlWriter#canonicalizeEncoding(String)
       */
-    public String getEncoding ()
+    public String getEncoding()
      {
          return XmlWriter.canonicalizeEncoding(encoding);
      }
@@ -333,7 +333,7 @@
       * @return the Java encoding name to use, if set, otherwise null.
       * @see #getInputEncoding()
       */
-    public static String getDefaultInputEncoding ()
+    public static String getDefaultInputEncoding()
      {
          return defaultInputEncoding;
      }

-- 

Steve

------------------------------------------------------------
"Always ... always remember: Less is less. More is more. More is
better. And twice as much is good too. Not enough is bad. And too
much is never enough except when it's just about right."
			-- The Tick
------------------------------------------------------------

Re: cvs commit: ws-xmlrpc/src/java/org/apache/xmlrpc XmlRpc.java

Posted by "Daniel L. Rall" <dl...@collab.net>.
On Fri, 2005-04-15 at 20:16 +0000, jochen@apache.org wrote:
> jochen      2005/04/15 13:16:19
> 
>   Modified:    src/java/org/apache/xmlrpc XmlRpc.java
>   Log:
>   Fixed URL typos.

Jochen, this change log message has nothing to do with this commit.  Has
the change log been corrected yet?

I like the addition of the static defaults, and instance particulars for
encoding.
  
>   Revision  Changes    Path
>   1.39      +35 -9     ws-xmlrpc/src/java/org/apache/xmlrpc/XmlRpc.java
>   
>   Index: XmlRpc.java
>   ===================================================================
>   RCS file: /home/cvs/ws-xmlrpc/src/java/org/apache/xmlrpc/XmlRpc.java,v
>   retrieving revision 1.38
>   retrieving revision 1.39
>   diff -u -r1.38 -r1.39
>   --- XmlRpc.java	30 Mar 2005 11:19:18 -0000	1.38
>   +++ XmlRpc.java	15 Apr 2005 20:16:19 -0000	1.39
>   @@ -196,9 +196,10 @@
>         * is not compatible with ASCII (eg. EBCDIC) but the network is
>         * still ASCII-like.
>         */
>   -    static String inputEncoding = null;
>   +    static String defaultInputEncoding = null;
>     
>        private TypeFactory typeFactory;
>   +	private String inputEncoding;

The indentation is off here for inputEncoding.
   
>        /**
>         * Creates a new instance with the {@link
>   @@ -227,6 +228,7 @@
>                }
>            }
>            this.typeFactory = createTypeFactory(typeFactoryName);
>   +		this.inputEncoding = defaultInputEncoding;

Another indentation problem.

>        }
>    
>        /**
>   @@ -351,24 +353,48 @@
>            return XmlWriter.canonicalizeEncoding(encoding);
>        }
>    
>   -    /**
>   -     * Set the input encoding of the XML.
>   +    /** Set the default input encoding of the XML.
>         * This is used only if set.
>         *
>         * @param enc The Java name of the encoding.
>   +     * @see #setInputEncoding(String)
>         */
>   -    public static void setInputEncoding(String enc)
>   +    public static void setDefaultInputEncoding(String enc)
>        {
>   -        inputEncoding = enc;
>   +        defaultInputEncoding = enc;
>        }
>    
>        /**
>   -     * Return the input encoding. This may be null. This is always a
>   -     * Java encoding name, it is not transformed.
>   +     * Return the default input encoding. This may be null.
>   +     * This is always a Java encoding name, it is not transformed.
>         *
>         * @return the Java encoding name to use, if set, otherwise null.
>   +     * @see #getInputEncoding()
>   +     */
>   +    public static String getDefaultInputEncoding ()
                                                     ^

Extra space here not consistent with formatting style used in this
source file.

>   +    {
>   +        return defaultInputEncoding;
>   +    }
>   +
>   +    /**
>   +     * Set the input encoding for this XmlRpc instance.  This can be
>   +     * used when the XMLRPC response does not contain the proper
>   +     * encoding information in the XML declaration.
>   +     *
>   +     * @param enc The Java name of the encoding.
>   +     */
>   +    public void setInputEncoding(String enc)
>   +    {
>   +        inputEncoding = enc;
>   +    }
>   +
>   +    /**
>   +     * Get the input encoding for this XmlRpc instance.  This is a Java
>   +     * encoding name.
>   +     *
>   +     * @return The Java encoding name to use.  <code>null</code> if not set.
>         */
>   -    public static String getInputEncoding ()
>   +    public String getInputEncoding()
>        {
>            return inputEncoding;
>        }
>