deyanTG / caldav4j

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

GCalDAVCalendarCollectionTest.java fails because of wrong exception type #33

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
When i execute GCalDAVCalendarCollectionTest, testAddRemove fails with 
the exception given below. testAddRemove expects a
ResourceNotFoundException exception, and this exception is correctly 
thrown in getETag. However, the "catch (Exception e)" in getETags 
catches this exception and rethrows it as a CalDAV4JException exception.

The attached patch fixes this problem, and
GCalDAVCalendarCollectionTest.testAddRemove successfully
passes.

org.osaf.caldav4j.CalDAV4JException: Problem executing get method
    at
org.osaf.caldav4j.CalDAVCalendarCollection.getETag(CalDAVCalendarCollection.java
:786)
    at
org.osaf.caldav4j.CalDAVCalendarCollection.getCalDAVResource(CalDAVCalendarColle
ction.java:665)
    at
org.osaf.caldav4j.CalDAVCalendarCollection.getCalendarByPath(CalDAVCalendarColle
ction.java:135)
    at
org.osaf.caldav4j.google.GCalDAVCalendarCollectionTest.testAddNewRemove(GCalDAVC
alendarCollectionTest.java:257)
    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)
Caused by: org.osaf.caldav4j.ResourceNotFoundException: Could not find
resource for the PATH
'/calendar/dav/tmende@informatik.uni-bremen.de/events/NEW_UID.ics'
    at
org.osaf.caldav4j.CalDAVCalendarCollection.getETag(CalDAVCalendarCollection.java
:776)
    ... 26 more

Original issue reported on code.google.com by tme...@gmail.com on 19 Nov 2009 at 2:37

Attachments:

GoogleCodeExporter commented 8 years ago
fixed with #182

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