Skip to content

Commit c5193a9

Browse files
Merge pull request #103 from OneBusAway/release-please--branches--main--changes--next
release: 0.1.0-alpha.47
2 parents 5308d95 + 9b9e311 commit c5193a9

14 files changed

Lines changed: 135 additions & 67 deletions

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ jobs:
2020
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
2121

2222
steps:
23-
- uses: actions/checkout@v4
23+
- uses: actions/checkout@v6
2424

2525
- name: Set up Java
26-
uses: actions/setup-java@v4
26+
uses: actions/setup-java@v5
2727
with:
2828
distribution: temurin
2929
java-version: |
@@ -47,10 +47,10 @@ jobs:
4747
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
4848

4949
steps:
50-
- uses: actions/checkout@v4
50+
- uses: actions/checkout@v6
5151

5252
- name: Set up Java
53-
uses: actions/setup-java@v4
53+
uses: actions/setup-java@v5
5454
with:
5555
distribution: temurin
5656
java-version: |
@@ -85,10 +85,10 @@ jobs:
8585
runs-on: ${{ github.repository == 'stainless-sdks/open-transit-java' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
8686
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
8787
steps:
88-
- uses: actions/checkout@v4
88+
- uses: actions/checkout@v6
8989

9090
- name: Set up Java
91-
uses: actions/setup-java@v4
91+
uses: actions/setup-java@v5
9292
with:
9393
distribution: temurin
9494
java-version: |

.github/workflows/publish-sonatype.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ jobs:
1414
runs-on: ubuntu-latest
1515

1616
steps:
17-
- uses: actions/checkout@v4
17+
- uses: actions/checkout@v6
1818

1919
- name: Set up Java
20-
uses: actions/setup-java@v4
20+
uses: actions/setup-java@v5
2121
with:
2222
distribution: temurin
2323
java-version: |

.github/workflows/release-doctor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
if: github.repository == 'OneBusAway/java-sdk' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')
1313

1414
steps:
15-
- uses: actions/checkout@v4
15+
- uses: actions/checkout@v6
1616

1717
- name: Check release environment
1818
run: |

.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.46"
2+
".": "0.1.0-alpha.47"
33
}

CHANGELOG.md

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

3+
## 0.1.0-alpha.47 (2026-01-17)
4+
5+
Full Changelog: [v0.1.0-alpha.46...v0.1.0-alpha.47](https://github.com/OneBusAway/java-sdk/compare/v0.1.0-alpha.46...v0.1.0-alpha.47)
6+
7+
### Bug Fixes
8+
9+
* **client:** disallow coercion from float to int ([7455e7f](https://github.com/OneBusAway/java-sdk/commit/7455e7fabfca0fa03bae97ffe09afc993f153d64))
10+
* **client:** fully respect max retries ([814f38c](https://github.com/OneBusAway/java-sdk/commit/814f38ce0cba11f4517205d2834d324ad62368dd))
11+
* **client:** send retry count header for max retries 0 ([814f38c](https://github.com/OneBusAway/java-sdk/commit/814f38ce0cba11f4517205d2834d324ad62368dd))
12+
* date time deserialization leniency ([32945ab](https://github.com/OneBusAway/java-sdk/commit/32945ab3cebb1771692105447c58669a1b015b66))
13+
14+
15+
### Chores
16+
17+
* **ci:** upgrade `actions/setup-java` ([efba5c4](https://github.com/OneBusAway/java-sdk/commit/efba5c4cfd981b9a40888f32fef1d8813d46b076))
18+
* **internal:** clean up maven repo artifact script and add html documentation to repo root ([75e739a](https://github.com/OneBusAway/java-sdk/commit/75e739ad6e188354083dc1edd80e2d5c4ce848dc))
19+
* **internal:** depend on packages directly in example ([814f38c](https://github.com/OneBusAway/java-sdk/commit/814f38ce0cba11f4517205d2834d324ad62368dd))
20+
* **internal:** improve maven repo docs ([214feba](https://github.com/OneBusAway/java-sdk/commit/214feba0154c64ddcfbe4142a18c581e5167074b))
21+
* **internal:** update `actions/checkout` version ([e69a85a](https://github.com/OneBusAway/java-sdk/commit/e69a85a1cef632cfe7519003453cd73cf707d279))
22+
* test on Jackson 2.14.0 to avoid encountering FasterXML/jackson-databind[#3240](https://github.com/OneBusAway/java-sdk/issues/3240) in tests ([32945ab](https://github.com/OneBusAway/java-sdk/commit/32945ab3cebb1771692105447c58669a1b015b66))
23+
324
## 0.1.0-alpha.46 (2026-01-13)
425

526
Full Changelog: [v0.1.0-alpha.45...v0.1.0-alpha.46](https://github.com/OneBusAway/java-sdk/compare/v0.1.0-alpha.45...v0.1.0-alpha.46)

README.md

Lines changed: 7 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.46)
6-
[![javadoc](https://javadoc.io/badge2/org.onebusaway/onebusaway-sdk-java/0.1.0-alpha.46/javadoc.svg)](https://javadoc.io/doc/org.onebusaway/onebusaway-sdk-java/0.1.0-alpha.46)
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.47)
6+
[![javadoc](https://javadoc.io/badge2/org.onebusaway/onebusaway-sdk-java/0.1.0-alpha.47/javadoc.svg)](https://javadoc.io/doc/org.onebusaway/onebusaway-sdk-java/0.1.0-alpha.47)
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.46).
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.47).
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.46")
29+
implementation("org.onebusaway:onebusaway-sdk-java:0.1.0-alpha.47")
3030
```
3131

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

@@ -260,6 +260,8 @@ If the SDK threw an exception, but you're _certain_ the version is compatible, t
260260
> [!CAUTION]
261261
> We make no guarantee that the SDK works correctly when the Jackson version check is disabled.
262262
263+
Also note that there are bugs in older Jackson versions that can affect the SDK. We don't work around all Jackson bugs ([example](https://github.com/FasterXML/jackson-databind/issues/3240)) and expect users to upgrade Jackson for those instead.
264+
263265
## Network options
264266

265267
### Retries

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.46" // x-release-please-version
11+
version = "0.1.0-alpha.47" // x-release-please-version
1212
}
1313

1414
subprojects {

onebusaway-sdk-java-client-okhttp/src/main/kotlin/org/onebusaway/client/okhttp/OkHttpClient.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,8 @@ private constructor(@JvmSynthetic internal val okHttpClient: okhttp3.OkHttpClien
232232
fun build(): OkHttpClient =
233233
OkHttpClient(
234234
okhttp3.OkHttpClient.Builder()
235+
// `RetryingHttpClient` handles retries if the user enabled them.
236+
.retryOnConnectionFailure(false)
235237
.connectTimeout(timeout.connect())
236238
.readTimeout(timeout.read())
237239
.writeTimeout(timeout.write())

onebusaway-sdk-java-core/build.gradle.kts

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,16 @@ plugins {
55

66
configurations.all {
77
resolutionStrategy {
8-
// Compile and test against a lower Jackson version to ensure we're compatible with it.
9-
// We publish with a higher version (see below) to ensure users depend on a secure version by default.
10-
force("com.fasterxml.jackson.core:jackson-core:2.13.4")
11-
force("com.fasterxml.jackson.core:jackson-databind:2.13.4")
12-
force("com.fasterxml.jackson.core:jackson-annotations:2.13.4")
13-
force("com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.13.4")
14-
force("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.13.4")
15-
force("com.fasterxml.jackson.module:jackson-module-kotlin:2.13.4")
8+
// Compile and test against a lower Jackson version to ensure we're compatible with it. Note that
9+
// we generally support 2.13.4, but test against 2.14.0 because 2.13.4 has some annoying (but
10+
// niche) bugs (users should upgrade if they encounter them). We publish with a higher version
11+
// (see below) to ensure users depend on a secure version by default.
12+
force("com.fasterxml.jackson.core:jackson-core:2.14.0")
13+
force("com.fasterxml.jackson.core:jackson-databind:2.14.0")
14+
force("com.fasterxml.jackson.core:jackson-annotations:2.14.0")
15+
force("com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.14.0")
16+
force("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.14.0")
17+
force("com.fasterxml.jackson.module:jackson-module-kotlin:2.14.0")
1618
}
1719
}
1820

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

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import java.io.InputStream
2424
import java.time.DateTimeException
2525
import java.time.LocalDate
2626
import java.time.LocalDateTime
27+
import java.time.OffsetDateTime
2728
import java.time.ZonedDateTime
2829
import java.time.format.DateTimeFormatter
2930
import java.time.temporal.ChronoField
@@ -36,7 +37,7 @@ fun jsonMapper(): JsonMapper =
3637
.addModule(
3738
SimpleModule()
3839
.addSerializer(InputStreamSerializer)
39-
.addDeserializer(LocalDateTime::class.java, LenientLocalDateTimeDeserializer())
40+
.addDeserializer(OffsetDateTime::class.java, LenientOffsetDateTimeDeserializer())
4041
)
4142
.withCoercionConfig(LogicalType.Boolean) {
4243
it.setCoercion(CoercionInputShape.Integer, CoercionAction.Fail)
@@ -47,6 +48,7 @@ fun jsonMapper(): JsonMapper =
4748
}
4849
.withCoercionConfig(LogicalType.Integer) {
4950
it.setCoercion(CoercionInputShape.Boolean, CoercionAction.Fail)
51+
.setCoercion(CoercionInputShape.Float, CoercionAction.Fail)
5052
.setCoercion(CoercionInputShape.String, CoercionAction.Fail)
5153
.setCoercion(CoercionInputShape.Array, CoercionAction.Fail)
5254
.setCoercion(CoercionInputShape.Object, CoercionAction.Fail)
@@ -64,6 +66,12 @@ fun jsonMapper(): JsonMapper =
6466
.setCoercion(CoercionInputShape.Array, CoercionAction.Fail)
6567
.setCoercion(CoercionInputShape.Object, CoercionAction.Fail)
6668
}
69+
.withCoercionConfig(LogicalType.DateTime) {
70+
it.setCoercion(CoercionInputShape.Integer, CoercionAction.Fail)
71+
.setCoercion(CoercionInputShape.Float, CoercionAction.Fail)
72+
.setCoercion(CoercionInputShape.Array, CoercionAction.Fail)
73+
.setCoercion(CoercionInputShape.Object, CoercionAction.Fail)
74+
}
6775
.withCoercionConfig(LogicalType.Array) {
6876
it.setCoercion(CoercionInputShape.Boolean, CoercionAction.Fail)
6977
.setCoercion(CoercionInputShape.Integer, CoercionAction.Fail)
@@ -124,10 +132,10 @@ private object InputStreamSerializer : BaseSerializer<InputStream>(InputStream::
124132
}
125133

126134
/**
127-
* A deserializer that can deserialize [LocalDateTime] from datetimes, dates, and zoned datetimes.
135+
* A deserializer that can deserialize [OffsetDateTime] from datetimes, dates, and zoned datetimes.
128136
*/
129-
private class LenientLocalDateTimeDeserializer :
130-
StdDeserializer<LocalDateTime>(LocalDateTime::class.java) {
137+
private class LenientOffsetDateTimeDeserializer :
138+
StdDeserializer<OffsetDateTime>(OffsetDateTime::class.java) {
131139

132140
companion object {
133141

@@ -141,26 +149,28 @@ private class LenientLocalDateTimeDeserializer :
141149

142150
override fun logicalType(): LogicalType = LogicalType.DateTime
143151

144-
override fun deserialize(p: JsonParser, context: DeserializationContext?): LocalDateTime {
152+
override fun deserialize(p: JsonParser, context: DeserializationContext): OffsetDateTime {
145153
val exceptions = mutableListOf<Exception>()
146154

147155
for (formatter in DATE_TIME_FORMATTERS) {
148156
try {
149157
val temporal = formatter.parse(p.text)
150158

151159
return when {
152-
!temporal.isSupported(ChronoField.HOUR_OF_DAY) ->
153-
LocalDate.from(temporal).atStartOfDay()
154-
!temporal.isSupported(ChronoField.OFFSET_SECONDS) ->
155-
LocalDateTime.from(temporal)
156-
else -> ZonedDateTime.from(temporal).toLocalDateTime()
157-
}
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()
158168
} catch (e: DateTimeException) {
159169
exceptions.add(e)
160170
}
161171
}
162172

163-
throw JsonParseException(p, "Cannot parse `LocalDateTime` from value: ${p.text}").apply {
173+
throw JsonParseException(p, "Cannot parse `OffsetDateTime` from value: ${p.text}").apply {
164174
exceptions.forEach { addSuppressed(it) }
165175
}
166176
}

0 commit comments

Comments
 (0)