Skip to content

Commit

Permalink
Update protobuf, OSM parser and Google cloud tools
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardehrenfried committed Dec 17, 2024
1 parent 5f9b448 commit fd0b1fe
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 11 deletions.
6 changes: 3 additions & 3 deletions application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -312,9 +312,9 @@
</dependency>
<!-- OpenStreetMap protobuf (PBF) definitions and parser -->
<dependency>
<groupId>org.openstreetmap.osmosis</groupId>
<artifactId>osmosis-osm-binary</artifactId>
<version>0.48.3</version>
<groupId>org.openstreetmap.pbf</groupId>
<artifactId>osmpbf</artifactId>
<version>1.6.0</version>
</dependency>
<!-- Command line parameter parsing -->
<dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package org.opentripplanner.osm;

import crosby.binary.BinaryParser;
import crosby.binary.Osmformat;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import org.openstreetmap.osmosis.osmbinary.BinaryParser;
import org.openstreetmap.osmosis.osmbinary.Osmformat;
import org.opentripplanner.graph_builder.module.osm.OsmDatabase;
import org.opentripplanner.osm.model.OsmMemberType;
import org.opentripplanner.osm.model.OsmNode;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package org.opentripplanner.osm;

import crosby.binary.file.BlockInputStream;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.time.ZoneId;
import org.openstreetmap.osmosis.osmbinary.file.BlockInputStream;
import org.opentripplanner.datastore.api.DataSource;
import org.opentripplanner.datastore.api.FileType;
import org.opentripplanner.datastore.file.FileDataSource;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ protected void runPolling() {
final FeedMessage feed = otpHttpClient.getAndMap(
URI.create(url),
this.headers.asMap(),
FeedMessage.PARSER::parseFrom
FeedMessage::parseFrom
);

long feedTimestamp = feed.getHeader().getTimestamp();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public void messageArrived(String topic, MqttMessage message) {
UpdateIncrementality updateIncrementality = FULL_DATASET;
try {
// Decode message
GtfsRealtime.FeedMessage feedMessage = GtfsRealtime.FeedMessage.PARSER.parseFrom(
GtfsRealtime.FeedMessage feedMessage = GtfsRealtime.FeedMessage.parseFrom(
message.getPayload()
);
List<GtfsRealtime.FeedEntity> feedEntityList = feedMessage.getEntityList();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ protected void setUp() throws Exception {

try {
InputStream inputStream = new FileInputStream(gtfsRealTime);
FeedMessage feedMessage = FeedMessage.PARSER.parseFrom(inputStream);
FeedMessage feedMessage = FeedMessage.parseFrom(inputStream);
List<FeedEntity> feedEntityList = feedMessage.getEntityList();
List<TripUpdate> updates = new ArrayList<>(feedEntityList.size());
for (FeedEntity feedEntity : feedEntityList) {
Expand Down
7 changes: 6 additions & 1 deletion gtfs-realtime-protobuf/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,15 @@
<artifactId>gtfs-realtime-protobuf</artifactId>
<name>OpenTripPlanner - GTFS Realtime (protobuf)</name>

<properties>
<protobuf.version>4.28.3</protobuf.version>
</properties>

<dependencies>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<version>${protobuf.version}</version>
</dependency>
</dependencies>
<build>
Expand Down Expand Up @@ -46,7 +51,7 @@
</execution>
</executions>
<configuration>
<protocArtifact>com.google.protobuf:protoc:3.22.0:exe:${os.detected.classifier}</protocArtifact>
<protocArtifact>com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}</protocArtifact>
</configuration>
</plugin>
</plugins>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@
<!-- This make sure all google libraries are using compatible versions. -->
<groupId>com.google.cloud</groupId>
<artifactId>libraries-bom</artifactId>
<version>26.48.0</version>
<version>26.51.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down

0 comments on commit fd0b1fe

Please sign in to comment.