You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Blair Zajac <bl...@orcaware.com> on 2007/10/01 18:15:10 UTC

Re: svn commit: r26872 - trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl

dlr@tigris.org wrote:
> Author: dlr
> Date: Mon Oct  1 11:01:43 2007
> New Revision: 26872
> 
> Log:
> JavaHL: Add new data type conversion routine for maintaining backwards
> compat while moving to newer APIs.
> 
> [ in subversion/bindings/javahl/ ]
> 
> * src/org/tigris/subversion/javahl/ClientException.java
>   (fromException): Add new static method which coerces or converts a
>    generic Throwable into a ClientException.
> 
> 
> Modified:
>    trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/ClientException.java
> 
> Modified: trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/ClientException.java
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/ClientException.java?pathrev=26872&r1=26871&r2=26872
> ==============================================================================
> --- trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/ClientException.java	(original)
> +++ trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/ClientException.java	Mon Oct  1 11:01:43 2007
> @@ -45,4 +45,21 @@
>      {
>          super(message, source, aprError);
>      }
> +
> +    /**
> +     * A conversion routine for maintaining backwards compatibility.
> +     * @return <code>e</code> coerced or converted into a
> +     * <code>ClientException</code>.
> +     */
> +    static ClientException fromException(Throwable t)
> +    {
> +        if (t instanceof ClientException)
> +        {
> +            return (ClientException) t;
> +        }
> +        else
> +        {
> +            return new ClientException(t.getMessage(), null, -1);
> +        }
> +    }

If would be great if we could support exception chaining here instead of just 
passing the Throwable's message.

What is the oldest version of Java we support?  If we require 1.4, then we could 
change that to:

     else
     {
         ClientException e = new ClientException(t.getMessage(), null, -1);
         e.initCause(t);
         return e;
     }

I hate to see exception information lost like this, which would loose the stack 
trace of the original exception.

Also, were do you see us using this static method?

Regards,
Blair

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Requiring JDK 1.4 (Was Re: svn commit: r26872 - trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl)

Posted by Mark Phippard <ma...@gmail.com>.
On 10/1/07, Blair Zajac <bl...@orcaware.com> wrote:
> Daniel Rall wrote:
> > On Mon, 01 Oct 2007, Mark Phippard wrote:
> >
> >> On 10/1/07, Daniel Rall <dl...@collab.net> wrote:
> >>>>>>> What is the oldest version of Java we support?
> >>>>>> subversion/bindings/javahl/README says 1.3.
> >>>>> How about we move to Java 1.4 for svn 1.5.  Java 1.3.x has reached
> >>>>> end-of-life (except for Solaris 8 users, which have till October 2009; I
> >>>>> wouldn't want to support 1.4 for 2 more years).
> >>>> s/support 1.4/support 1.3/.
> >>> I'd be +1 with that, but can't spend time on it ATM.  Blair, if you
> >>> want to spearhead that effort, by all means...  :)
> >> I thought we were supporting 1.2 ?  I am fine with moving to 1.4.  I
> >> believe the build system enforces the version now in the compiler
> >> settings, so that is probably all that needs to change.
> >
> > JAVAC_FLAGS = -g -target 1.2 -source 1.3
> >
> > Looks like we're currently source-compatible with 1.3, but are
> > byte-compiling for 1.2 JVM.
>
> So we would switch both to 1.4?  Any reason to keep byte-compatible with 1.2 or 1.3?

I do not know of any specific reasons we support back to 1.2.  I'd
suggest we be conservative in using 1.4 features this release in case
a reason surfaces.  Limit it to things like this ClientException
method where there is a quick and easy workaround.

-- 
Thanks

Mark Phippard
http://markphip.blogspot.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Requiring JDK 1.4 (Was Re: svn commit: r26872 - trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl)

Posted by Blair Zajac <bl...@orcaware.com>.
Daniel Rall wrote:
> On Mon, 01 Oct 2007, Mark Phippard wrote:
> 
>> On 10/1/07, Daniel Rall <dl...@collab.net> wrote:
>>>>>>> What is the oldest version of Java we support?
>>>>>> subversion/bindings/javahl/README says 1.3.
>>>>> How about we move to Java 1.4 for svn 1.5.  Java 1.3.x has reached
>>>>> end-of-life (except for Solaris 8 users, which have till October 2009; I
>>>>> wouldn't want to support 1.4 for 2 more years).
>>>> s/support 1.4/support 1.3/.
>>> I'd be +1 with that, but can't spend time on it ATM.  Blair, if you
>>> want to spearhead that effort, by all means...  :)
>> I thought we were supporting 1.2 ?  I am fine with moving to 1.4.  I
>> believe the build system enforces the version now in the compiler
>> settings, so that is probably all that needs to change.
> 
> JAVAC_FLAGS = -g -target 1.2 -source 1.3
> 
> Looks like we're currently source-compatible with 1.3, but are
> byte-compiling for 1.2 JVM.

So we would switch both to 1.4?  Any reason to keep byte-compatible with 1.2 or 1.3?

Blair

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Requiring JDK 1.4 (Was Re: svn commit: r26872 - trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl)

Posted by Daniel Rall <dl...@collab.net>.
On Mon, 01 Oct 2007, Mark Phippard wrote:

> On 10/1/07, Daniel Rall <dl...@collab.net> wrote:
> > > >>>What is the oldest version of Java we support?
> > > >>
> > > >>subversion/bindings/javahl/README says 1.3.
> > > >
> > > >How about we move to Java 1.4 for svn 1.5.  Java 1.3.x has reached
> > > >end-of-life (except for Solaris 8 users, which have till October 2009; I
> > > >wouldn't want to support 1.4 for 2 more years).
> > >
> > > s/support 1.4/support 1.3/.
> >
> > I'd be +1 with that, but can't spend time on it ATM.  Blair, if you
> > want to spearhead that effort, by all means...  :)
> 
> I thought we were supporting 1.2 ?  I am fine with moving to 1.4.  I
> believe the build system enforces the version now in the compiler
> settings, so that is probably all that needs to change.

JAVAC_FLAGS = -g -target 1.2 -source 1.3

Looks like we're currently source-compatible with 1.3, but are
byte-compiling for 1.2 JVM.

> Is there any issue on Linux where open source compilers (gcj, jikes)
> are used?  Do they all support 1.4 and have the necessary runtime
> libraries?

jikes is a compiler, and depends on the classes from an external JRE.
http://jikes.sourceforge.net/faq/user-index.shtml#jikespath

gcj used to have similar characteristics, but these days is bundling
GNU Classpath, and is itself something more than just a compiler.

Re: Requiring JDK 1.4 (Was Re: svn commit: r26872 - trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl)

Posted by Mark Phippard <ma...@gmail.com>.
On 10/1/07, Daniel Rall <dl...@collab.net> wrote:
> > >>>What is the oldest version of Java we support?
> > >>
> > >>subversion/bindings/javahl/README says 1.3.
> > >
> > >How about we move to Java 1.4 for svn 1.5.  Java 1.3.x has reached
> > >end-of-life (except for Solaris 8 users, which have till October 2009; I
> > >wouldn't want to support 1.4 for 2 more years).
> >
> > s/support 1.4/support 1.3/.
>
> I'd be +1 with that, but can't spend time on it ATM.  Blair, if you
> want to spearhead that effort, by all means...  :)

I thought we were supporting 1.2 ?  I am fine with moving to 1.4.  I
believe the build system enforces the version now in the compiler
settings, so that is probably all that needs to change.

Is there any issue on Linux where open source compilers (gcj, jikes)
are used?  Do they all support 1.4 and have the necessary runtime
libraries?

-- 
Thanks

Mark Phippard
http://markphip.blogspot.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Requiring JDK 1.4 (Was Re: svn commit: r26872 - trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl)

Posted by Daniel Rall <dl...@collab.net>.
On Mon, 01 Oct 2007, Blair Zajac wrote:

> Blair Zajac wrote:
> >Daniel Rall wrote:
> >>On Mon, 01 Oct 2007, Blair Zajac wrote:
> >>
> >>>dlr@tigris.org wrote:
> >>>>Author: dlr
> >>>>Date: Mon Oct  1 11:01:43 2007
> >>>>New Revision: 26872
> >>>>
> >>>>Log:
> >>>>JavaHL: Add new data type conversion routine for maintaining backwards
> >>>>compat while moving to newer APIs.
> >>>>
> >>>>[ in subversion/bindings/javahl/ ]
> >>>>
> >>>>* src/org/tigris/subversion/javahl/ClientException.java
> >>>> (fromException): Add new static method which coerces or converts a
> >>>>  generic Throwable into a ClientException.
> >>>>
> >>>>
> >>>>Modified:
> >>>>  
> >>>>trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/ClientException.java 
> >>>>
> >>>>
> >>>>Modified: 
> >>>>trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/ClientException.java 
> >>>>
> >>>>URL: 
> >>>>http://svn.collab.net/viewvc/svn/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/ClientException.java?pathrev=26872&r1=26871&r2=26872 
> >>>>
> >>>>============================================================================== 
> >>>>
> >>>>--- 
> >>>>trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/ClientException.java    
> >>>>(original)
> >>>>+++ 
> >>>>trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/ClientException.java    
> >>>>Mon Oct  1 11:01:43 2007
> >>>>@@ -45,4 +45,21 @@
> >>>>    {
> >>>>        super(message, source, aprError);
> >>>>    }
> >>>>+
> >>>>+    /**
> >>>>+     * A conversion routine for maintaining backwards compatibility.
> >>>>+     * @return <code>e</code> coerced or converted into a
> >>>>+     * <code>ClientException</code>.
> >>>>+     */
> >>>>+    static ClientException fromException(Throwable t)
> >>>>+    {
> >>>>+        if (t instanceof ClientException)
> >>>>+        {
> >>>>+            return (ClientException) t;
> >>>>+        }
> >>>>+        else
> >>>>+        {
> >>>>+            return new ClientException(t.getMessage(), null, -1);
> >>>>+        }
> >>>>+    }
> >>>If would be great if we could support exception chaining here instead 
> >>>of just passing the Throwable's message.
> >>
> >>Yeah, I thought of that.  I didn't want to rely on the corresponding
> >>constructor being defined -- as you mention below, it requires a
> >>minimum JRE version (which is why I didn't go there).
> >>
> >>>What is the oldest version of Java we support?
> >>
> >>subversion/bindings/javahl/README says 1.3.
> >
> >How about we move to Java 1.4 for svn 1.5.  Java 1.3.x has reached 
> >end-of-life (except for Solaris 8 users, which have till October 2009; I 
> >wouldn't want to support 1.4 for 2 more years).
> 
> s/support 1.4/support 1.3/.

I'd be +1 with that, but can't spend time on it ATM.  Blair, if you
want to spearhead that effort, by all means...  :)

Re: Requiring JDK 1.4 (Was Re: svn commit: r26872 - trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl)

Posted by Blair Zajac <bl...@orcaware.com>.
Blair Zajac wrote:
> Daniel Rall wrote:
>> On Mon, 01 Oct 2007, Blair Zajac wrote:
>>
>>> dlr@tigris.org wrote:
>>>> Author: dlr
>>>> Date: Mon Oct  1 11:01:43 2007
>>>> New Revision: 26872
>>>>
>>>> Log:
>>>> JavaHL: Add new data type conversion routine for maintaining backwards
>>>> compat while moving to newer APIs.
>>>>
>>>> [ in subversion/bindings/javahl/ ]
>>>>
>>>> * src/org/tigris/subversion/javahl/ClientException.java
>>>>  (fromException): Add new static method which coerces or converts a
>>>>   generic Throwable into a ClientException.
>>>>
>>>>
>>>> Modified:
>>>>   
>>>> trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/ClientException.java 
>>>>
>>>>
>>>> Modified: 
>>>> trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/ClientException.java 
>>>>
>>>> URL: 
>>>> http://svn.collab.net/viewvc/svn/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/ClientException.java?pathrev=26872&r1=26871&r2=26872 
>>>>
>>>> ============================================================================== 
>>>>
>>>> --- 
>>>> trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/ClientException.java    
>>>> (original)
>>>> +++ 
>>>> trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/ClientException.java    
>>>> Mon Oct  1 11:01:43 2007
>>>> @@ -45,4 +45,21 @@
>>>>     {
>>>>         super(message, source, aprError);
>>>>     }
>>>> +
>>>> +    /**
>>>> +     * A conversion routine for maintaining backwards compatibility.
>>>> +     * @return <code>e</code> coerced or converted into a
>>>> +     * <code>ClientException</code>.
>>>> +     */
>>>> +    static ClientException fromException(Throwable t)
>>>> +    {
>>>> +        if (t instanceof ClientException)
>>>> +        {
>>>> +            return (ClientException) t;
>>>> +        }
>>>> +        else
>>>> +        {
>>>> +            return new ClientException(t.getMessage(), null, -1);
>>>> +        }
>>>> +    }
>>> If would be great if we could support exception chaining here instead 
>>> of just passing the Throwable's message.
>>
>> Yeah, I thought of that.  I didn't want to rely on the corresponding
>> constructor being defined -- as you mention below, it requires a
>> minimum JRE version (which is why I didn't go there).
>>
>>> What is the oldest version of Java we support?
>>
>> subversion/bindings/javahl/README says 1.3.
> 
> How about we move to Java 1.4 for svn 1.5.  Java 1.3.x has reached 
> end-of-life (except for Solaris 8 users, which have till October 2009; I 
> wouldn't want to support 1.4 for 2 more years).

s/support 1.4/support 1.3/.

Blair

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Requiring JDK 1.4 (Was Re: svn commit: r26872 - trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl)

Posted by Blair Zajac <bl...@orcaware.com>.
Daniel Rall wrote:
> On Mon, 01 Oct 2007, Blair Zajac wrote:
> 
>> dlr@tigris.org wrote:
>>> Author: dlr
>>> Date: Mon Oct  1 11:01:43 2007
>>> New Revision: 26872
>>>
>>> Log:
>>> JavaHL: Add new data type conversion routine for maintaining backwards
>>> compat while moving to newer APIs.
>>>
>>> [ in subversion/bindings/javahl/ ]
>>>
>>> * src/org/tigris/subversion/javahl/ClientException.java
>>>  (fromException): Add new static method which coerces or converts a
>>>   generic Throwable into a ClientException.
>>>
>>>
>>> Modified:
>>>   trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/ClientException.java
>>>
>>> Modified: 
>>> trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/ClientException.java
>>> URL: 
>>> http://svn.collab.net/viewvc/svn/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/ClientException.java?pathrev=26872&r1=26871&r2=26872
>>> ==============================================================================
>>> --- 
>>> trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/ClientException.java	(original)
>>> +++ 
>>> trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/ClientException.java	Mon Oct  1 11:01:43 2007
>>> @@ -45,4 +45,21 @@
>>>     {
>>>         super(message, source, aprError);
>>>     }
>>> +
>>> +    /**
>>> +     * A conversion routine for maintaining backwards compatibility.
>>> +     * @return <code>e</code> coerced or converted into a
>>> +     * <code>ClientException</code>.
>>> +     */
>>> +    static ClientException fromException(Throwable t)
>>> +    {
>>> +        if (t instanceof ClientException)
>>> +        {
>>> +            return (ClientException) t;
>>> +        }
>>> +        else
>>> +        {
>>> +            return new ClientException(t.getMessage(), null, -1);
>>> +        }
>>> +    }
>> If would be great if we could support exception chaining here instead of 
>> just passing the Throwable's message.
> 
> Yeah, I thought of that.  I didn't want to rely on the corresponding
> constructor being defined -- as you mention below, it requires a
> minimum JRE version (which is why I didn't go there).
> 
>> What is the oldest version of Java we support?
> 
> subversion/bindings/javahl/README says 1.3.

How about we move to Java 1.4 for svn 1.5.  Java 1.3.x has reached end-of-life 
(except for Solaris 8 users, which have till October 2009; I wouldn't want to 
support 1.4 for 2 more years).

http://java.sun.com/j2se/1.3/download.html

Blair

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: r26872 - trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl

Posted by Daniel Rall <dl...@collab.net>.
On Mon, 01 Oct 2007, Blair Zajac wrote:

> dlr@tigris.org wrote:
> >Author: dlr
> >Date: Mon Oct  1 11:01:43 2007
> >New Revision: 26872
> >
> >Log:
> >JavaHL: Add new data type conversion routine for maintaining backwards
> >compat while moving to newer APIs.
> >
> >[ in subversion/bindings/javahl/ ]
> >
> >* src/org/tigris/subversion/javahl/ClientException.java
> >  (fromException): Add new static method which coerces or converts a
> >   generic Throwable into a ClientException.
> >
> >
> >Modified:
> >   trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/ClientException.java
> >
> >Modified: 
> >trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/ClientException.java
> >URL: 
> >http://svn.collab.net/viewvc/svn/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/ClientException.java?pathrev=26872&r1=26871&r2=26872
> >==============================================================================
> >--- 
> >trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/ClientException.java	(original)
> >+++ 
> >trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/ClientException.java	Mon Oct  1 11:01:43 2007
> >@@ -45,4 +45,21 @@
> >     {
> >         super(message, source, aprError);
> >     }
> >+
> >+    /**
> >+     * A conversion routine for maintaining backwards compatibility.
> >+     * @return <code>e</code> coerced or converted into a
> >+     * <code>ClientException</code>.
> >+     */
> >+    static ClientException fromException(Throwable t)
> >+    {
> >+        if (t instanceof ClientException)
> >+        {
> >+            return (ClientException) t;
> >+        }
> >+        else
> >+        {
> >+            return new ClientException(t.getMessage(), null, -1);
> >+        }
> >+    }
> 
> If would be great if we could support exception chaining here instead of 
> just passing the Throwable's message.

Yeah, I thought of that.  I didn't want to rely on the corresponding
constructor being defined -- as you mention below, it requires a
minimum JRE version (which is why I didn't go there).

> What is the oldest version of Java we support?

subversion/bindings/javahl/README says 1.3.

> If we require 1.4, then we 
> could change that to:
> 
>     else
>     {
>         ClientException e = new ClientException(t.getMessage(), null, -1);
>         e.initCause(t);
>         return e;
>     }
> 
> I hate to see exception information lost like this, which would loose the 
> stack trace of the original exception.

Me too, though, I care a lot less for deprecated methods.

> Also, were do you see us using this static method?

See r26873, committed immediately after r26872.