If Info was called on a URL, schedule is non-existent (and non-sensical).
The new C info stuff doesn't even return a schedule for a URL, so we
mimic that in Java by using null.
-Hyrum
On Thu, Apr 28, 2011 at 4:42 PM, Greg Stein <gstein_at_gmail.com> wrote:
> Why would getSchedule() ever return null? Seems that it should always
> have some kind of value in it... ??
>
> On Thu, Apr 28, 2011 at 16:39, <hwright_at_apache.org> wrote:
>> Author: hwright
>> Date: Thu Apr 28 20:39:21 2011
>> New Revision: 1097600
>>
>> URL: http://svn.apache.org/viewvc?rev=1097600&view=rev
>> Log:
>> * subversion/bindings/javahl/src/org/tigris/subversion/javahl/Info.java:
>> (Info): Fix one more null-pointer exception. JavaHL tests should pass now.
>>
>> Modified:
>> subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/Info.java
>>
>> Modified: subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/Info.java
>> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/Info.java?rev=1097600&r1=1097599&r2=1097600&view=diff
>> ==============================================================================
>> --- subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/Info.java (original)
>> +++ subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/Info.java Thu Apr 28 20:39:21 2011
>> @@ -148,7 +148,7 @@ public class Info implements java.io.Ser
>> {
>> this((new File(aInfo.getPath())).getName(), aInfo.getUrl(),
>> aInfo.getReposUUID(), aInfo.getReposRootUrl(),
>> - aInfo.getSchedule().ordinal(),
>> + aInfo.getSchedule() == null ? 0 : aInfo.getSchedule().ordinal(),
>> NodeKind.fromApache(aInfo.getKind()),
>> aInfo.getLastChangedAuthor(), aInfo.getRev(),
>> aInfo.getLastChangedRev(), aInfo.getLastChangedDate(),
>>
>>
>>
>
Received on 2011-04-29 01:03:10 CEST