Skip to content

Commit 7928dff

Browse files
Merge pull request #105 from OneBusAway/release-please--branches--main--changes--next
release: 0.1.0-alpha.49
2 parents 1c1f3ac + 9a81f23 commit 7928dff

8 files changed

Lines changed: 69 additions & 24 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
- name: Get GitHub OIDC Token
6868
if: github.repository == 'stainless-sdks/open-transit-java'
6969
id: github-oidc
70-
uses: actions/github-script@v6
70+
uses: actions/github-script@v8
7171
with:
7272
script: core.setOutput('github_token', await core.getIDToken());
7373

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.1.0-alpha.48"
2+
".": "0.1.0-alpha.49"
33
}

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# Changelog
22

3+
## 0.1.0-alpha.49 (2026-01-24)
4+
5+
Full Changelog: [v0.1.0-alpha.48...v0.1.0-alpha.49](https://github.com/OneBusAway/java-sdk/compare/v0.1.0-alpha.48...v0.1.0-alpha.49)
6+
7+
### Bug Fixes
8+
9+
* **client:** preserve time zone in lenient date-time parsing ([99572e3](https://github.com/OneBusAway/java-sdk/commit/99572e3a8c05fb5d37d5ba1ed63aae58a49326d6))
10+
11+
12+
### Chores
13+
14+
* **ci:** upgrade `actions/github-script` ([7501fdc](https://github.com/OneBusAway/java-sdk/commit/7501fdca0669d7c6492620d8ab92206357fd142b))
15+
* **internal:** correct cache invalidation for `SKIP_MOCK_TESTS` ([2625cdd](https://github.com/OneBusAway/java-sdk/commit/2625cddb2178d4c800e97f12440f51d96cc22a97))
16+
317
## 0.1.0-alpha.48 (2026-01-22)
418

519
Full Changelog: [v0.1.0-alpha.47...v0.1.0-alpha.48](https://github.com/OneBusAway/java-sdk/compare/v0.1.0-alpha.47...v0.1.0-alpha.48)

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
<!-- x-release-please-start-version -->
44

5-
[![Maven Central](https://img.shields.io/maven-central/v/org.onebusaway/onebusaway-sdk-java)](https://central.sonatype.com/artifact/org.onebusaway/onebusaway-sdk-java/0.1.0-alpha.48)
6-
[![javadoc](https://javadoc.io/badge2/org.onebusaway/onebusaway-sdk-java/0.1.0-alpha.48/javadoc.svg)](https://javadoc.io/doc/org.onebusaway/onebusaway-sdk-java/0.1.0-alpha.48)
5+
[![Maven Central](https://img.shields.io/maven-central/v/org.onebusaway/onebusaway-sdk-java)](https://central.sonatype.com/artifact/org.onebusaway/onebusaway-sdk-java/0.1.0-alpha.49)
6+
[![javadoc](https://javadoc.io/badge2/org.onebusaway/onebusaway-sdk-java/0.1.0-alpha.49/javadoc.svg)](https://javadoc.io/doc/org.onebusaway/onebusaway-sdk-java/0.1.0-alpha.49)
77

88
<!-- x-release-please-end -->
99

@@ -15,7 +15,7 @@ It is generated with [Stainless](https://www.stainless.com/).
1515

1616
<!-- x-release-please-start-version -->
1717

18-
The REST API documentation can be found on [developer.onebusaway.org](https://developer.onebusaway.org). Javadocs are available on [javadoc.io](https://javadoc.io/doc/org.onebusaway/onebusaway-sdk-java/0.1.0-alpha.48).
18+
The REST API documentation can be found on [developer.onebusaway.org](https://developer.onebusaway.org). Javadocs are available on [javadoc.io](https://javadoc.io/doc/org.onebusaway/onebusaway-sdk-java/0.1.0-alpha.49).
1919

2020
<!-- x-release-please-end -->
2121

@@ -26,7 +26,7 @@ The REST API documentation can be found on [developer.onebusaway.org](https://de
2626
### Gradle
2727

2828
```kotlin
29-
implementation("org.onebusaway:onebusaway-sdk-java:0.1.0-alpha.48")
29+
implementation("org.onebusaway:onebusaway-sdk-java:0.1.0-alpha.49")
3030
```
3131

3232
### Maven
@@ -35,7 +35,7 @@ implementation("org.onebusaway:onebusaway-sdk-java:0.1.0-alpha.48")
3535
<dependency>
3636
<groupId>org.onebusaway</groupId>
3737
<artifactId>onebusaway-sdk-java</artifactId>
38-
<version>0.1.0-alpha.48</version>
38+
<version>0.1.0-alpha.49</version>
3939
</dependency>
4040
```
4141

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ repositories {
88

99
allprojects {
1010
group = "org.onebusaway"
11-
version = "0.1.0-alpha.48" // x-release-please-version
11+
version = "0.1.0-alpha.49" // x-release-please-version
1212
}
1313

1414
subprojects {

buildSrc/src/main/kotlin/onebusaway-sdk.kotlin.gradle.kts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ kotlin {
3333
tasks.withType<Test>().configureEach {
3434
systemProperty("junit.jupiter.execution.parallel.enabled", true)
3535
systemProperty("junit.jupiter.execution.parallel.mode.default", "concurrent")
36+
37+
// `SKIP_MOCK_TESTS` affects which tests run so it must be added as input for proper cache invalidation.
38+
inputs.property("skipMockTests", System.getenv("SKIP_MOCK_TESTS")).optional(true)
3639
}
3740

3841
val ktfmt by configurations.creating

onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/core/ObjectMappers.kt

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import java.time.DateTimeException
2525
import java.time.LocalDate
2626
import java.time.LocalDateTime
2727
import java.time.OffsetDateTime
28-
import java.time.ZonedDateTime
28+
import java.time.ZoneId
2929
import java.time.format.DateTimeFormatter
3030
import java.time.temporal.ChronoField
3131

@@ -157,14 +157,15 @@ private class LenientOffsetDateTimeDeserializer :
157157
val temporal = formatter.parse(p.text)
158158

159159
return when {
160-
!temporal.isSupported(ChronoField.HOUR_OF_DAY) ->
161-
LocalDate.from(temporal).atStartOfDay()
162-
!temporal.isSupported(ChronoField.OFFSET_SECONDS) ->
163-
LocalDateTime.from(temporal)
164-
else -> ZonedDateTime.from(temporal).toLocalDateTime()
165-
}
166-
.atZone(context.timeZone.toZoneId())
167-
.toOffsetDateTime()
160+
!temporal.isSupported(ChronoField.HOUR_OF_DAY) ->
161+
LocalDate.from(temporal)
162+
.atStartOfDay()
163+
.atZone(ZoneId.of("UTC"))
164+
.toOffsetDateTime()
165+
!temporal.isSupported(ChronoField.OFFSET_SECONDS) ->
166+
LocalDateTime.from(temporal).atZone(ZoneId.of("UTC")).toOffsetDateTime()
167+
else -> OffsetDateTime.from(temporal)
168+
}
168169
} catch (e: DateTimeException) {
169170
exceptions.add(e)
170171
}

onebusaway-sdk-java-core/src/test/kotlin/org/onebusaway/core/ObjectMappersTest.kt

Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@ package org.onebusaway.core
33
import com.fasterxml.jackson.annotation.JsonProperty
44
import com.fasterxml.jackson.databind.exc.MismatchedInputException
55
import com.fasterxml.jackson.module.kotlin.readValue
6+
import java.time.LocalDate
7+
import java.time.LocalTime
68
import java.time.OffsetDateTime
9+
import java.time.ZoneOffset
710
import kotlin.reflect.KClass
811
import org.assertj.core.api.Assertions.assertThat
912
import org.assertj.core.api.Assertions.catchThrowable
1013
import org.junit.jupiter.api.Test
11-
import org.junit.jupiter.api.assertDoesNotThrow
1214
import org.junit.jupiter.params.ParameterizedTest
1315
import org.junit.jupiter.params.provider.EnumSource
1416
import org.junitpioneer.jupiter.cartesian.CartesianTest
@@ -72,11 +74,34 @@ internal class ObjectMappersTest {
7274
}
7375
}
7476

75-
enum class LenientOffsetDateTimeTestCase(val string: String) {
76-
DATE("1998-04-21"),
77-
DATE_TIME("1998-04-21T04:00:00"),
78-
ZONED_DATE_TIME_1("1998-04-21T04:00:00+03:00"),
79-
ZONED_DATE_TIME_2("1998-04-21T04:00:00Z"),
77+
enum class LenientOffsetDateTimeTestCase(
78+
val string: String,
79+
val expectedOffsetDateTime: OffsetDateTime,
80+
) {
81+
DATE(
82+
"1998-04-21",
83+
expectedOffsetDateTime =
84+
OffsetDateTime.of(LocalDate.of(1998, 4, 21), LocalTime.of(0, 0), ZoneOffset.UTC),
85+
),
86+
DATE_TIME(
87+
"1998-04-21T04:00:00",
88+
expectedOffsetDateTime =
89+
OffsetDateTime.of(LocalDate.of(1998, 4, 21), LocalTime.of(4, 0), ZoneOffset.UTC),
90+
),
91+
ZONED_DATE_TIME_1(
92+
"1998-04-21T04:00:00+03:00",
93+
expectedOffsetDateTime =
94+
OffsetDateTime.of(
95+
LocalDate.of(1998, 4, 21),
96+
LocalTime.of(4, 0),
97+
ZoneOffset.ofHours(3),
98+
),
99+
),
100+
ZONED_DATE_TIME_2(
101+
"1998-04-21T04:00:00Z",
102+
expectedOffsetDateTime =
103+
OffsetDateTime.of(LocalDate.of(1998, 4, 21), LocalTime.of(4, 0), ZoneOffset.UTC),
104+
),
80105
}
81106

82107
@ParameterizedTest
@@ -85,6 +110,8 @@ internal class ObjectMappersTest {
85110
val jsonMapper = jsonMapper()
86111
val json = jsonMapper.writeValueAsString(testCase.string)
87112

88-
assertDoesNotThrow { jsonMapper().readValue<OffsetDateTime>(json) }
113+
val offsetDateTime = jsonMapper().readValue<OffsetDateTime>(json)
114+
115+
assertThat(offsetDateTime).isEqualTo(testCase.expectedOffsetDateTime)
89116
}
90117
}

0 commit comments

Comments
 (0)