This repository was archived by the owner on Jun 9, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
main/kotlin/at/bitfire/ical4android/validation
test/kotlin/at/bitfire/ical4android/validation Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -170,16 +170,17 @@ object EventValidator {
170170 /* *
171171 * Removes all recurrence information of exceptions of (potentially recurring) events. This is:
172172 * `RRULE`, `RDATE` and `EXDATE`.
173- * Note: This repair step needs to be applied after all exceptions have been found
173+ * Note: This repair step needs to be applied after all exceptions have been found.
174174 *
175175 * @param exceptions exceptions of an event
176176 */
177177 @VisibleForTesting
178178 internal fun removeRecurrenceOfExceptions (exceptions : List <Event >) {
179179 for (exception in exceptions) {
180- exception.rRules.clear() // Drop all RRULEs for the exception
181- exception.rDates.clear() // Drop all RDATEs for the exception
182- exception.exDates.clear() // Drop all EXDATEs for the exception
180+ // Drop all RRULEs, RDATEs, EXDATEs for the exception
181+ exception.rRules.clear()
182+ exception.rDates.clear()
183+ exception.exDates.clear()
183184 }
184185 }
185186
Original file line number Diff line number Diff line change @@ -371,7 +371,7 @@ class EventValidatorTest {
371371 }
372372
373373 @Test
374- fun testRemoveRrulesOfRruleExceptions () {
374+ fun testRemoveRecurrencesOfRecurringWithExceptions () {
375375 // Test manually created event
376376 val tz = DateUtils .ical4jTimeZone(" Europe/Paris" )
377377 val manualEvent = Event ().apply {
@@ -475,6 +475,8 @@ class EventValidatorTest {
475475 )).first()
476476 assertTrue(eventFromReader.rRules.size == 1 )
477477 assertTrue(eventFromReader.exceptions.first().rRules.isEmpty())
478+ assertTrue(eventFromReader.exceptions.first().rDates.isEmpty())
479+ assertTrue(eventFromReader.exceptions.first().exDates.isEmpty())
478480 }
479481
480482 @Test
You can’t perform that action at this time.
0 commit comments