Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ All notable changes to this project will be documented in this file.
### Breaking
* Java 17 or later required (#91)
* Updated JUnit to 6.0.3 (#92)
* Updated Jackson dependency to 3.1.3 (#93)


## 2.0.11 - 2026-05-14
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This client allows to simply connect any Java application to the public transpor
local bus station or any other custom queries. API versions 1.x and 2.x are supported.

## Supported versions
Version 3.x requires Java 17 or later.
Version 3.x requires Java 17 or later and depends on _Jackson_ 3.

Version 2.x requires Java 11 or later.
It also contains some new features and allows configuration using a dedicated configuration object.
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@

<dependencies>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<groupId>tools.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.21.3</version>
<version>3.1.3</version>
</dependency>

<dependency>
Expand Down
9 changes: 5 additions & 4 deletions src/main/java/de/stklcode/pubtrans/ura/UraClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@

package de.stklcode.pubtrans.ura;

import com.fasterxml.jackson.databind.ObjectMapper;
import de.stklcode.pubtrans.ura.exception.UraClientConfigurationException;
import de.stklcode.pubtrans.ura.exception.UraClientException;
import de.stklcode.pubtrans.ura.model.Message;
import de.stklcode.pubtrans.ura.model.Stop;
import de.stklcode.pubtrans.ura.model.Trip;
import de.stklcode.pubtrans.ura.reader.AsyncUraTripReader;
import tools.jackson.core.JacksonException;
import tools.jackson.databind.ObjectMapper;

import java.io.*;
import java.net.URI;
Expand Down Expand Up @@ -280,7 +281,7 @@ public List<Trip> getTrips(final Query query, final Integer limit) throws UraCli
}
line = br.readLine();
}
} catch (IOException e) {
} catch (IOException | JacksonException e) {
throw new UraClientException("Failed to read trips from API", e);
}
return trips;
Expand Down Expand Up @@ -362,7 +363,7 @@ public List<Stop> getStops(final Query query) throws UraClientException {
stops.add(new Stop(l));
}
}
} catch (IOException e) {
} catch (IOException | JacksonException e) {
throw new UraClientException("Failed to read stops from API", e);
}
return stops;
Expand Down Expand Up @@ -437,7 +438,7 @@ public List<Message> getMessages(final Query query, final Integer limit) throws
}
line = br.readLine();
}
} catch (IOException e) {
} catch (IOException | JacksonException e) {
throw new UraClientException("Failed to read messages from API", e);
}
return messages;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@

package de.stklcode.pubtrans.ura.reader;

import com.fasterxml.jackson.databind.ObjectMapper;
import de.stklcode.pubtrans.ura.UraClientConfiguration;
import de.stklcode.pubtrans.ura.model.Trip;
import tools.jackson.core.JacksonException;
import tools.jackson.databind.ObjectMapper;

import java.io.IOException;
import java.io.Serializable;
Expand Down Expand Up @@ -188,7 +189,7 @@ public void onNext(String item) {

// Request next item.
this.subscription.request(1);
} catch (IOException e) {
} catch (IOException | JacksonException e) {
onError(e);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@

requires java.base;
requires java.net.http;
requires com.fasterxml.jackson.databind;
requires tools.jackson.databind;
}