Skip to content

Commit bf6a070

Browse files
authored
Rename ICalendarWriter to ICalendarGenerator, allow null whereArgs in iterateEventAndExceptions (#127)
* Rename ICalendarWriter to ICalendarGenerator * Allow null whereArgs in iterateEventAndExceptions * Allow null where argument in iterateEventAndExceptions
1 parent 0312164 commit bf6a070

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

lib/src/main/kotlin/at/bitfire/synctools/icalendar/ICalendarWriter.kt renamed to lib/src/main/kotlin/at/bitfire/synctools/icalendar/ICalendarGenerator.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import javax.annotation.WillNotClose
2626
* Writes an ical4j [net.fortuna.ical4j.model.Calendar] to a stream that contains an iCalendar
2727
* (VCALENDAR with respective components and optional VTIMEZONEs).
2828
*/
29-
class ICalendarWriter {
29+
class ICalendarGenerator {
3030

3131
/**
3232
* Generates an iCalendar from the given [AssociatedComponents].

lib/src/main/kotlin/at/bitfire/synctools/storage/calendar/AndroidRecurringCalendar.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class AndroidRecurringCalendar(
9191
* @param whereArgs arguments for selection
9292
* @param body callback that is called for each event (including exceptions)
9393
*/
94-
fun iterateEventAndExceptions(where: String, whereArgs: Array<String>, body: (EventAndExceptions) -> Unit) {
94+
fun iterateEventAndExceptions(where: String?, whereArgs: Array<String>?, body: (EventAndExceptions) -> Unit) {
9595
// iterate through main events and attach exceptions
9696
calendar.iterateEvents(where, whereArgs) { main ->
9797
val mainEventId = main.entityValues.getAsLong(Events._ID)

lib/src/test/kotlin/at/bitfire/synctools/icalendar/ICalendarWriterTest.kt renamed to lib/src/test/kotlin/at/bitfire/synctools/icalendar/ICalendarGeneratorTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ import org.junit.Test
2222
import java.io.StringWriter
2323
import java.time.Duration
2424

25-
class ICalendarWriterTest {
25+
class ICalendarGeneratorTest {
2626

2727
private val tzRegistry = TimeZoneRegistryFactory.getInstance().createRegistry()
2828
private val tzBerlin = tzRegistry.getTimeZone("Europe/Berlin")!!
2929
private val tzLondon = tzRegistry.getTimeZone("Europe/London")!!
3030
private val tzUTC = tzRegistry.getTimeZone(TimeZones.UTC_ID)!!
3131

3232
private val userAgent = "TestUA/1.0"
33-
private val writer = ICalendarWriter()
33+
private val writer = ICalendarGenerator()
3434

3535
@Test
3636
fun `Write event with exceptions and various timezones`() {

0 commit comments

Comments
 (0)