deyanTG / caldav4j

Automatically exported from code.google.com/p/caldav4j
0 stars 0 forks source link

Fields in GCalDAVCalendarCollectionTest hide Fields in BaseTestCase => NPE #32

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
When i execute GCalDAVCalendarCollectionTest, i get a NullPointerException,
as shown below. 
The problem is that COLLECTION_PATH in GCalDAVCalendarCollectionTest hides 
the field COLLECTION_PATH defined in BaseTestCase. Same problem for 
httpClient and methodFactory. The attached patch fixes the problem, 
so that running GCalDAVCalendarCollectionTest does not end in an NPE.

java.lang.NullPointerException
    at
org.osaf.caldav4j.CalDAVCalendarCollectionBase.setCalendarCollectionRoot(CalDAVC
alendarCollectionBase.java:64)
    at
org.osaf.caldav4j.CalDAVCalendarCollection.<init>(CalDAVCalendarCollection.java:
102)
    at
org.osaf.caldav4j.google.GCalDAVCalendarCollectionTest.createCalDAVCalendarColle
ction(GCalDAVCalendarCollectionTest.java:393)
    at
org.osaf.caldav4j.google.GCalDAVCalendarCollectionTest.testAddNewRemove(GCalDAVC
alendarCollectionTest.java:254)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
    at
com.intellij.junit3.JUnit3IdeaTestRunner.doRun(JUnit3IdeaTestRunner.java:108)
    at
com.intellij.junit3.JUnit3IdeaTestRunner.startRunnerWithArgs(JUnit3IdeaTestRunne
r.java:42)
    at
com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter
.java:165)
    at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:60)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:105)

Original issue reported on code.google.com by tme...@informatik.uni-bremen.de on 19 Nov 2009 at 1:47

Attachments:

GoogleCodeExporter commented 8 years ago
fixed on trunk, thx.

Original comment by robipo...@gmail.com on 3 Feb 2010 at 6:40