-
+
diff --git a/onebusaway-enterprise-webapp/src/main/webapp/WEB-INF/content/where/iphone/stop-redirect.jspx b/onebusaway-enterprise-webapp/src/main/webapp/WEB-INF/content/where/iphone/stop-redirect.jspx
index a30f152da7..c8469848d8 100644
--- a/onebusaway-enterprise-webapp/src/main/webapp/WEB-INF/content/where/iphone/stop-redirect.jspx
+++ b/onebusaway-enterprise-webapp/src/main/webapp/WEB-INF/content/where/iphone/stop-redirect.jspx
@@ -24,7 +24,7 @@
Refresh
- 10;url=
+ 10;url=
diff --git a/onebusaway-enterprise-webapp/src/main/webapp/WEB-INF/content/where/iphone/stop.jspx b/onebusaway-enterprise-webapp/src/main/webapp/WEB-INF/content/where/iphone/stop.jspx
index ab0b4f016e..c2b6ee3e35 100644
--- a/onebusaway-enterprise-webapp/src/main/webapp/WEB-INF/content/where/iphone/stop.jspx
+++ b/onebusaway-enterprise-webapp/src/main/webapp/WEB-INF/content/where/iphone/stop.jspx
@@ -21,7 +21,7 @@
xmlns:s="/struts-tags"
xmlns:oba="/oba-tags">
-
+
@@ -56,8 +56,8 @@
minutes
-
-
+
+
arrivalsRouteEntry arrivalsRouteLongNameEntry
diff --git a/onebusaway-enterprise-webapp/src/main/webapp/WEB-INF/content/where/schedule.jspx b/onebusaway-enterprise-webapp/src/main/webapp/WEB-INF/content/where/schedule.jspx
index 3c06ea8b7b..c9e7fd2daf 100644
--- a/onebusaway-enterprise-webapp/src/main/webapp/WEB-INF/content/where/schedule.jspx
+++ b/onebusaway-enterprise-webapp/src/main/webapp/WEB-INF/content/where/schedule.jspx
@@ -19,7 +19,7 @@
-
+
@@ -262,7 +262,7 @@
stopScheduleMinutes
-
+
diff --git a/onebusaway-enterprise-webapp/src/main/webapp/WEB-INF/content/where/trip.jspx b/onebusaway-enterprise-webapp/src/main/webapp/WEB-INF/content/where/trip.jspx
index 2718bd53e5..ef1a1cac14 100644
--- a/onebusaway-enterprise-webapp/src/main/webapp/WEB-INF/content/where/trip.jspx
+++ b/onebusaway-enterprise-webapp/src/main/webapp/WEB-INF/content/where/trip.jspx
@@ -23,8 +23,8 @@
Route - - Trip #
-
-
+
+
diff --git a/onebusaway-enterprise-webapp/src/main/webapp/WEB-INF/web.xml b/onebusaway-enterprise-webapp/src/main/webapp/WEB-INF/web.xml
index 22e3937226..b196bdd87c 100644
--- a/onebusaway-enterprise-webapp/src/main/webapp/WEB-INF/web.xml
+++ b/onebusaway-enterprise-webapp/src/main/webapp/WEB-INF/web.xml
@@ -59,7 +59,7 @@
action2-cleanup
- org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter
+ org.apache.struts2.dispatcher.filter.StrutsPrepareFilter
sitemesh
@@ -67,7 +67,7 @@
action2
- org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter
+ org.apache.struts2.dispatcher.filter.StrutsExecuteFilter
CorsFilter
@@ -84,6 +84,19 @@
httpHeaderSecurity
org.apache.catalina.filters.HttpHeaderSecurityFilter
+ true
+
+ hstsEnabled
+ true
+
+
+ hstsMaxAgeSeconds
+ 31536000
+
+
+ hstsIncludeSubDomains
+ true
+
antiClickJackingOption
SAMEORIGIN
diff --git a/onebusaway-enterprise-webapp/src/main/webapp/js/oba/sign/Sign.js b/onebusaway-enterprise-webapp/src/main/webapp/js/oba/sign/Sign.js
index 2ca50e13ae..d7a7655ec9 100644
--- a/onebusaway-enterprise-webapp/src/main/webapp/js/oba/sign/Sign.js
+++ b/onebusaway-enterprise-webapp/src/main/webapp/js/oba/sign/Sign.js
@@ -224,8 +224,7 @@ OBA.Sign = function() {
function initStop(stopId, initMonitor) {
var stopIdStr = stopId.agency + "_" + stopId.id;
- var params = { stopId: stopIdStr };
-
+ var params = { stopId: stopIdStr, "type": "json", "key": "OBAKEY" };
jQuery.getJSON(baseUrl + "/" + OBA.Config.stopForId, params, function(json) {
stopInfo[stopIdStr] = json.stop;
jQuery.each(json.stop.routesAvailable, function(_, route) {
@@ -612,12 +611,15 @@ OBA.Sign = function() {
headsignToDistanceAways[routeIdAndHeadsign] = [];
r++;
}
-
- jQuery.each(journey.SituationRef, function(_, situationRef) {
- if(typeof situationsById[situationRef.SituationSimpleRef] !== 'undefined') {
- applicableSituations[situationRef.SituationSimpleRef] = situationsById[situationRef.SituationSimpleRef];
- }
- });
+ if (typeof journey.SituationRef === 'undefined') {
+ console.log("issue with journey");
+ } else {
+ jQuery.each(journey.SituationRef, function (_, situationRef) {
+ if (typeof situationsById[situationRef.SituationSimpleRef] !== 'undefined') {
+ applicableSituations[situationRef.SituationSimpleRef] = situationsById[situationRef.SituationSimpleRef];
+ }
+ });
+ }
var vehicleInfo = {};
vehicleInfo.distanceAway = journey.MonitoredCall.Extensions.Distances.PresentableDistance;
diff --git a/onebusaway-enterprise-webapp/src/main/webapp/template/xhtml/arrival-and-departure-table-row-snippet.jspx b/onebusaway-enterprise-webapp/src/main/webapp/template/xhtml/arrival-and-departure-table-row-snippet.jspx
index c4ff89151c..a25a7429a4 100644
--- a/onebusaway-enterprise-webapp/src/main/webapp/template/xhtml/arrival-and-departure-table-row-snippet.jspx
+++ b/onebusaway-enterprise-webapp/src/main/webapp/template/xhtml/arrival-and-departure-table-row-snippet.jspx
@@ -30,8 +30,8 @@
-
-
+
diff --git a/onebusaway-enterprise-webapp/src/main/webapp/template/xhtml/stops-title-head-snippet.jspx b/onebusaway-enterprise-webapp/src/main/webapp/template/xhtml/stops-title-head-snippet.jspx
index 0ad7ab2daa..5a395eece1 100644
--- a/onebusaway-enterprise-webapp/src/main/webapp/template/xhtml/stops-title-head-snippet.jspx
+++ b/onebusaway-enterprise-webapp/src/main/webapp/template/xhtml/stops-title-head-snippet.jspx
@@ -31,7 +31,7 @@
- bound - Stop #
-
+
\ No newline at end of file
diff --git a/onebusaway-enterprise-webapp/src/main/webapp/template/xhtml/stops-title-snippet.jspx b/onebusaway-enterprise-webapp/src/main/webapp/template/xhtml/stops-title-snippet.jspx
index e376bc7319..4dc13da67d 100644
--- a/onebusaway-enterprise-webapp/src/main/webapp/template/xhtml/stops-title-snippet.jspx
+++ b/onebusaway-enterprise-webapp/src/main/webapp/template/xhtml/stops-title-snippet.jspx
@@ -33,7 +33,7 @@
-
+
index.action#p(index)m(location)lat()lon()accuracy(8)stop()
diff --git a/onebusaway-enterprise-webapp/src/test/java/org/onebusaway/enterprise/webapp/api/ApiKeyInterceptorTest.java b/onebusaway-enterprise-webapp/src/test/java/org/onebusaway/enterprise/webapp/api/ApiKeyInterceptorTest.java
index ad6f9ce107..24f4caaad7 100644
--- a/onebusaway-enterprise-webapp/src/test/java/org/onebusaway/enterprise/webapp/api/ApiKeyInterceptorTest.java
+++ b/onebusaway-enterprise-webapp/src/test/java/org/onebusaway/enterprise/webapp/api/ApiKeyInterceptorTest.java
@@ -23,6 +23,8 @@
import java.util.HashMap;
import java.util.Map;
+import org.apache.struts2.dispatcher.HttpParameters;
+import org.apache.struts2.dispatcher.Parameter;
import org.junit.Before;
import org.junit.Test;
import org.onebusaway.users.services.ApiKeyPermissionService;
@@ -43,6 +45,7 @@ public class ApiKeyInterceptorTest {
private ActionContext _ac;
private ActionInvocation _ai;
private ApiKeyPermissionService _ks;
+ private HttpParameters _httpParams;
private Map
_params = new HashMap();
@Before
@@ -52,20 +55,27 @@ public void setUp() throws Exception {
_ai = mock(ActionInvocation.class);
_ks = mock(ApiKeyPermissionService.class);
_aki.setKeyService(_ks);
-
+ _httpParams = mock(HttpParameters.class);
+ Parameter key = mock(Parameter.class);
+
_params = new HashMap();
String[] keys = {"akey"};
_params.put("key", keys);
+
when(_ai.getInvocationContext()).thenReturn(_ac);
- when(_ac.getParameters()).thenReturn(_params);
+ when(_ac.getParameters()).thenReturn(_httpParams);
+ when(_httpParams.get("key")).thenReturn(key);
+ when(_httpParams.containsKey("key")).thenReturn(true);
+ when(key.getMultipleValues()).thenReturn((String[]) _params.get("key"));
}
@Test
public void testIsAllowedNoUser() {
// try it with now valid API key
assertNotNull(_params.remove("key"));
+ when(_httpParams.containsKey("key")).thenReturn(false);
// here we return 401 as the authentication failed/key not found
assertEquals(401, _aki.isAllowed(_ai));
}
@@ -73,6 +83,11 @@ public void testIsAllowedNoUser() {
@Test
public void testIsAllowedValidUser() {
when(_ks.getPermission((String)anyObject(), (String)anyObject())).thenReturn(Status.AUTHORIZED);
+ assertNotNull(_params.get("key"));
+ assertNotNull(_httpParams.get("key"));
+ assertNotNull(_httpParams.get("key").getMultipleValues());
+ assertNotNull(_ac.getParameters());
+ assertTrue(_ac.getParameters().containsKey("key"));
assertEquals(200, _aki.isAllowed(_ai));
}
diff --git a/onebusaway-enterprise-webapp/src/test/java/org/onebusaway/enterprise/webapp/api/LoadApiKeysOnInitActionTest.java b/onebusaway-enterprise-webapp/src/test/java/org/onebusaway/enterprise/webapp/api/LoadApiKeysOnInitActionTest.java
new file mode 100644
index 0000000000..23dbb58f89
--- /dev/null
+++ b/onebusaway-enterprise-webapp/src/test/java/org/onebusaway/enterprise/webapp/api/LoadApiKeysOnInitActionTest.java
@@ -0,0 +1,74 @@
+/**
+ * Copyright (C) 2021 Cambridge Systematics, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onebusaway.enterprise.webapp.api;
+
+import org.junit.Test;
+
+import java.util.List;
+
+import static org.junit.Assert.*;
+import static org.onebusaway.enterprise.webapp.api.LoadApiKeysOnInitAction.*;
+
+/**
+ * test various combinations of API key data entry.
+ */
+public class LoadApiKeysOnInitActionTest {
+
+ String R1 = "aaaaaaaa-1111-1111-1111-aaaaaaaaaaaa,,,,,0";
+ String R2 = "\"aaaaaaaa-1111-1111-1111-aaaaaaaaaaa1, aaaaaaaa-1111-1111-1111-aaaaaaaaaaa2\",,,,,0";
+ String R3 = ",,,,,";
+ String R4 = ", ,,,,";
+ String R5 = "aaaaaaaa-1111-1111-1111-aaaaaaaaaaaa,First Last,Com Pany,user@example.com,key for Trip Planner Maps,0";
+ String R6 = "aaaaaaaa-1111-1111-1111-aaaaaaaaaaaa,First Last,\"Three Word Company, LLC\",user@example.com,,0";
+ String R7 = "\"aaaaaaaa-1111-1111-1111-aaaaaaaaaaa1, aaaaaaaa-1111-1111-1111-aaaaaaaaaaa2\",First Last,,user@example.com,,0";
+ String R8 = "795d483d-514e-4eac-8acc-0cb86754363f,Drew Dara-Abrams,Interline Technologies,drew@interline.io,\"Interline's Transitland platform\",100";
+ @Test
+ public void testGetColumn() {
+ LoadApiKeysOnInitAction action = new LoadApiKeysOnInitAction();
+ List values = action.getColumn(R1, 0, true);
+ assertNotNull(values);
+ assertEquals(1, values.size());
+ assertEquals("aaaaaaaa-1111-1111-1111-aaaaaaaaaaaa", values.get(0));
+
+ values = action.getColumn(R2, 0, true);
+ assertNotNull(values);
+ assertEquals(2, values.size());
+ assertEquals("aaaaaaaa-1111-1111-1111-aaaaaaaaaaa1", values.get(0));
+ assertEquals("aaaaaaaa-1111-1111-1111-aaaaaaaaaaa2", values.get(1));
+
+ values = action.getColumn(R3, 0, true);
+ assertNotNull(values);
+ assertEquals(0, values.size());
+
+ values = action.getColumn(R4, 0, true);
+ assertNotNull(values);
+ assertEquals(0, values.size());
+
+ compareApiKey(action, R5, "aaaaaaaa-1111-1111-1111-aaaaaaaaaaaa", "First Last", "Com Pany", "user@example.com", "key for Trip Planner Maps", "0");
+ compareApiKey(action, R6, "aaaaaaaa-1111-1111-1111-aaaaaaaaaaaa", "First Last", "Three Word Company, LLC", "user@example.com", null, "0");
+ compareApiKey(action, R7, "aaaaaaaa-1111-1111-1111-aaaaaaaaaaa1", "First Last", null, "user@example.com", null, "0");
+ compareApiKey(action, R8, "795d483d-514e-4eac-8acc-0cb86754363f", "Drew Dara-Abrams", "Interline Technologies", "drew@interline.io", "Interline's Transitland platform", "100");
+ }
+
+ private void compareApiKey(LoadApiKeysOnInitAction action, String line, String key, String name, String company, String email, String details, String limit) {
+// assertEquals(key, action.getColumn(line, KEY, true).get(0));
+// assertEquals(name, action.getSafeColumn(line, NAME));
+// assertEquals(company, action.getSafeColumn(line, COMPANY));
+// assertEquals(email, action.getSafeColumn(line, EMAIL));
+// assertEquals(details, action.getSafeColumn(line, DETAILS));
+ assertEquals(limit, action.getSafeColumn(line, LIMIT));
+ }
+}
\ No newline at end of file
diff --git a/onebusaway-federations-webapp/pom.xml b/onebusaway-federations-webapp/pom.xml
index 960077fd9d..ba8e162817 100644
--- a/onebusaway-federations-webapp/pom.xml
+++ b/onebusaway-federations-webapp/pom.xml
@@ -3,7 +3,7 @@
onebusaway-application-modules
org.onebusaway
- 2.0.79-cs-SNAPSHOT
+ 2.1.12-cs-SNAPSHOT
onebusaway-federations-webapp
war
@@ -73,6 +73,7 @@
org.apache.maven.plugins
maven-surefire-plugin
+ 3.0.0-M3
integration-tests
diff --git a/onebusaway-federations-webapp/src/main/webapp/WEB-INF/remoting-servlet.xml b/onebusaway-federations-webapp/src/main/webapp/WEB-INF/remoting-servlet.xml
index 759d7880cb..ed21e44d62 100644
--- a/onebusaway-federations-webapp/src/main/webapp/WEB-INF/remoting-servlet.xml
+++ b/onebusaway-federations-webapp/src/main/webapp/WEB-INF/remoting-servlet.xml
@@ -19,19 +19,33 @@
+ xmlns:mvc="http://www.springframework.org/schema/mvc"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
+ http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
+ http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
+ http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security.xsd
+ http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/onebusaway-federations/pom.xml b/onebusaway-federations/pom.xml
index cd20fca8e4..5064bb6c13 100644
--- a/onebusaway-federations/pom.xml
+++ b/onebusaway-federations/pom.xml
@@ -3,7 +3,7 @@
org.onebusaway
onebusaway-application-modules
- 2.0.79-cs-SNAPSHOT
+ 2.1.12-cs-SNAPSHOT
onebusaway-federations
jar
diff --git a/onebusaway-federations/src/main/java/org/onebusaway/federations/impl/FederatedServiceCollectionImpl.java b/onebusaway-federations/src/main/java/org/onebusaway/federations/impl/FederatedServiceCollectionImpl.java
index 1b4df4b9c4..cd6ed45061 100644
--- a/onebusaway-federations/src/main/java/org/onebusaway/federations/impl/FederatedServiceCollectionImpl.java
+++ b/onebusaway-federations/src/main/java/org/onebusaway/federations/impl/FederatedServiceCollectionImpl.java
@@ -22,6 +22,9 @@
import java.util.Map;
import java.util.Set;
+import org.locationtech.jts.geom.Envelope;
+import org.locationtech.jts.index.ItemVisitor;
+import org.locationtech.jts.index.strtree.STRtree;
import org.onebusaway.exceptions.MultipleServiceAreasServiceException;
import org.onebusaway.exceptions.NoSuchAgencyServiceException;
import org.onebusaway.exceptions.OutOfServiceAreaServiceException;
@@ -31,9 +34,6 @@
import org.onebusaway.geospatial.model.CoordinateBounds;
import org.onebusaway.geospatial.model.CoordinatePoint;
-import com.vividsolutions.jts.geom.Envelope;
-import com.vividsolutions.jts.index.ItemVisitor;
-import com.vividsolutions.jts.index.strtree.STRtree;
/**
* A basic {@link FederatedServiceCollection} implementation that provides
diff --git a/onebusaway-federations/src/test/java/org/onebusaway/federations/impl/DynamicFederatedServiceCollectionImplTest.java b/onebusaway-federations/src/test/java/org/onebusaway/federations/impl/DynamicFederatedServiceCollectionImplTest.java
index caa073a2b0..eced29941a 100644
--- a/onebusaway-federations/src/test/java/org/onebusaway/federations/impl/DynamicFederatedServiceCollectionImplTest.java
+++ b/onebusaway-federations/src/test/java/org/onebusaway/federations/impl/DynamicFederatedServiceCollectionImplTest.java
@@ -40,7 +40,7 @@ public class DynamicFederatedServiceCollectionImplTest {
private static final int TIMEOUT = 10000;
- private static final int PORT = 9999;
+ private static final int PORT = 9991;
private FederatedServiceRegistryImpl _registry;
diff --git a/onebusaway-frontend-webapp/pom.xml b/onebusaway-frontend-webapp/pom.xml
index 0052273f45..cc746a23d1 100644
--- a/onebusaway-frontend-webapp/pom.xml
+++ b/onebusaway-frontend-webapp/pom.xml
@@ -3,7 +3,7 @@
onebusaway-application-modules
org.onebusaway
- 2.0.79-cs-SNAPSHOT
+ 2.1.12-cs-SNAPSHOT
4.0.0
diff --git a/onebusaway-frontend-webapp/src/main/webapp/WEB-INF/content/api/stop-for-id.jspx b/onebusaway-frontend-webapp/src/main/webapp/WEB-INF/content/api/stop-for-id.jspx
index 3a7a608ff6..2c2cc01879 100644
--- a/onebusaway-frontend-webapp/src/main/webapp/WEB-INF/content/api/stop-for-id.jspx
+++ b/onebusaway-frontend-webapp/src/main/webapp/WEB-INF/content/api/stop-for-id.jspx
@@ -18,5 +18,5 @@
-{"siri": ,"stop": }
+{"siri": ,"stop": }
\ No newline at end of file
diff --git a/onebusaway-frontend-webapp/src/main/webapp/WEB-INF/content/routes/index.jspx b/onebusaway-frontend-webapp/src/main/webapp/WEB-INF/content/routes/index.jspx
index d31d6be54e..cc18c5de83 100644
--- a/onebusaway-frontend-webapp/src/main/webapp/WEB-INF/content/routes/index.jspx
+++ b/onebusaway-frontend-webapp/src/main/webapp/WEB-INF/content/routes/index.jspx
@@ -20,8 +20,8 @@
xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:s="/struts-tags"
xmlns:wiki="/oba-wiki-tags">
-
-
+
+
diff --git a/onebusaway-frontend-webapp/src/main/webapp/WEB-INF/content/wiki/index.jspx b/onebusaway-frontend-webapp/src/main/webapp/WEB-INF/content/wiki/index.jspx
index b0d2fc678a..9a99a4d4a3 100644
--- a/onebusaway-frontend-webapp/src/main/webapp/WEB-INF/content/wiki/index.jspx
+++ b/onebusaway-frontend-webapp/src/main/webapp/WEB-INF/content/wiki/index.jspx
@@ -39,13 +39,13 @@
Table of Contents
-
+
-
+
@@ -58,7 +58,7 @@
-
+
diff --git a/onebusaway-frontend-webapp/src/main/webapp/WEB-INF/web.xml b/onebusaway-frontend-webapp/src/main/webapp/WEB-INF/web.xml
index c01b63d3a9..13947ec826 100644
--- a/onebusaway-frontend-webapp/src/main/webapp/WEB-INF/web.xml
+++ b/onebusaway-frontend-webapp/src/main/webapp/WEB-INF/web.xml
@@ -69,7 +69,7 @@
action2-cleanup
- org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter
+ org.apache.struts2.dispatcher.filter.StrutsPrepareFilter
sitemesh
@@ -77,7 +77,7 @@
action2
- org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter
+ org.apache.struts2.dispatcher.filter.StrutsExecuteFilter
CorsFilter
diff --git a/onebusaway-frontend-webapp/src/main/webapp/js/oba/map/Popups.js b/onebusaway-frontend-webapp/src/main/webapp/js/oba/map/Popups.js
index 85f299025c..780c251d4d 100644
--- a/onebusaway-frontend-webapp/src/main/webapp/js/oba/map/Popups.js
+++ b/onebusaway-frontend-webapp/src/main/webapp/js/oba/map/Popups.js
@@ -474,7 +474,13 @@ OBA.Popups = (function() {
// update time across all arrivals
var updateTimestampReference = OBA.Util.ISO8601StringToDate(siri.Siri.ServiceDelivery.ResponseTimestamp).getTime();
var maxUpdateTimestamp = null;
- jQuery.each(siri.Siri.ServiceDelivery.StopMonitoringDelivery[0].MonitoredStopVisit, function(_, monitoredJourney) {
+
+ var monitoredStopVisit = [];
+ if(siri.Siri.ServiceDelivery.StopMonitoringDelivery[0].MonitoredStopVisit){
+ monitoredStopVisit = siri.Siri.ServiceDelivery.StopMonitoringDelivery[0].MonitoredStopVisit;
+ }
+
+ jQuery.each(monitoredStopVisit, function(_, monitoredJourney) {
var updateTimestamp = OBA.Util.ISO8601StringToDate(monitoredJourney.RecordedAtTime).getTime();
if(updateTimestamp > maxUpdateTimestamp) {
maxUpdateTimestamp = updateTimestamp;
@@ -591,7 +597,10 @@ OBA.Popups = (function() {
});
// ...now those with and without arrivals
- var visits = siri.Siri.ServiceDelivery.StopMonitoringDelivery[0].MonitoredStopVisit;
+ var visits = [];
+ if(siri.Siri.ServiceDelivery.StopMonitoringDelivery[0].MonitoredStopVisit){
+ var visits = siri.Siri.ServiceDelivery.StopMonitoringDelivery[0].MonitoredStopVisit;
+ }
jQuery.each(visits, function(_, monitoredJourney) {
var routeId = monitoredJourney.MonitoredVehicleJourney.LineRef;
var routeShortName = monitoredJourney.MonitoredVehicleJourney.PublishedLineName;
diff --git a/onebusaway-frontend-webapp/src/main/webapp/js/oba/map/RouteMap.js b/onebusaway-frontend-webapp/src/main/webapp/js/oba/map/RouteMap.js
index 3a1b4ecee5..798ff0523f 100644
--- a/onebusaway-frontend-webapp/src/main/webapp/js/oba/map/RouteMap.js
+++ b/onebusaway-frontend-webapp/src/main/webapp/js/oba/map/RouteMap.js
@@ -236,7 +236,9 @@ OBA.RouteMap = function(mapNode, initCallbackFn, serviceAlertCallbackFn) {
function(json) {
// service alerts
if(typeof serviceAlertCallbackFn === 'function') {
- if(typeof json.Siri.ServiceDelivery.SituationExchangeDelivery !== 'undefined' && json.Siri.ServiceDelivery.SituationExchangeDelivery.length > 0) {
+ if(typeof json.Siri !== 'undefined'
+ && typeof json.Siri.ServiceDelivery.SituationExchangeDelivery !== 'undefined'
+ && json.Siri.ServiceDelivery.SituationExchangeDelivery.length > 0) {
serviceAlertCallbackFn(routeId,
json.Siri.ServiceDelivery.SituationExchangeDelivery[0].Situations.PtSituationElement);
}
diff --git a/onebusaway-geocoder/pom.xml b/onebusaway-geocoder/pom.xml
index 6ff6467216..fdf31dce7c 100644
--- a/onebusaway-geocoder/pom.xml
+++ b/onebusaway-geocoder/pom.xml
@@ -3,16 +3,24 @@
onebusaway-application-modules
org.onebusaway
- 2.0.79-cs-SNAPSHOT
+ 2.1.12-cs-SNAPSHOT
onebusaway-geocoder
onebusaway-geocoder
- 11-beta
+ 20.5
+
+
+ osgeo
+ Open Source Geospatial Foundation Repository
+ https://repo.osgeo.org/repository/release/
+
+
+
org.onebusaway
@@ -67,6 +75,12 @@
org.geotools
gt-main
${geotools.version}
+
+
+ com.fasterxml.jackson.core
+ jackson-core
+
+
commons-codec
@@ -74,6 +88,17 @@
1.4
provided
+
+
+ jakarta.xml.bind
+ jakarta.xml.bind-api
+ 2.3.3
+
+
+ org.glassfish.jaxb
+ jaxb-runtime
+ 2.3.3
+
diff --git a/onebusaway-geocoder/src/main/java/org/onebusaway/geocoder/enterprise/impl/EnterpriseFilteredGeocoderBase.java b/onebusaway-geocoder/src/main/java/org/onebusaway/geocoder/enterprise/impl/EnterpriseFilteredGeocoderBase.java
index e931a0abd2..826153ec35 100644
--- a/onebusaway-geocoder/src/main/java/org/onebusaway/geocoder/enterprise/impl/EnterpriseFilteredGeocoderBase.java
+++ b/onebusaway-geocoder/src/main/java/org/onebusaway/geocoder/enterprise/impl/EnterpriseFilteredGeocoderBase.java
@@ -15,19 +15,18 @@
*/
package org.onebusaway.geocoder.enterprise.impl;
+import org.geotools.geometry.jts.JTSFactoryFinder;
+import org.locationtech.jts.geom.Coordinate;
+import org.locationtech.jts.geom.Geometry;
+import org.locationtech.jts.geom.GeometryFactory;
+import org.locationtech.jts.geom.Polygon;
+import org.locationtech.jts.io.ParseException;
+import org.locationtech.jts.io.WKTReader;
import org.onebusaway.geocoder.enterprise.services.EnterpriseGeocoderResult;
import org.onebusaway.geocoder.enterprise.services.EnterpriseGeocoderService;
import org.onebusaway.geocoder.model.GeocoderResults;
import org.onebusaway.geocoder.services.GeocoderService;
-import com.vividsolutions.jts.geom.Coordinate;
-import com.vividsolutions.jts.geom.Geometry;
-import com.vividsolutions.jts.geom.GeometryFactory;
-import com.vividsolutions.jts.geom.Polygon;
-import com.vividsolutions.jts.io.ParseException;
-import com.vividsolutions.jts.io.WKTReader;
-
-import org.geotools.geometry.jts.JTSFactoryFinder;
import java.util.ArrayList;
import java.util.List;
diff --git a/onebusaway-geocoder/src/main/resources/org/onebusaway/geocoder/application-context.xml b/onebusaway-geocoder/src/main/resources/org/onebusaway/geocoder/application-context.xml
index 6eb796f7ff..abb51682a2 100644
--- a/onebusaway-geocoder/src/main/resources/org/onebusaway/geocoder/application-context.xml
+++ b/onebusaway-geocoder/src/main/resources/org/onebusaway/geocoder/application-context.xml
@@ -23,7 +23,7 @@
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
- http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-4.2.xsd">
+ http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-5.3.xsd">
diff --git a/onebusaway-geocoder/src/test/java/org/onebusaway/geocoder/impl/DatabaseCachingGeocoderImplTest.java b/onebusaway-geocoder/src/test/java/org/onebusaway/geocoder/impl/DatabaseCachingGeocoderImplTest.java
index 6eab6624a1..8f75454942 100644
--- a/onebusaway-geocoder/src/test/java/org/onebusaway/geocoder/impl/DatabaseCachingGeocoderImplTest.java
+++ b/onebusaway-geocoder/src/test/java/org/onebusaway/geocoder/impl/DatabaseCachingGeocoderImplTest.java
@@ -20,11 +20,6 @@
import java.util.List;
import org.hibernate.SessionFactory;
-import org.hibernate.cfg.AnnotationConfiguration;
-import org.hibernate.cfg.Configuration;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mockito;
@@ -34,11 +29,9 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
-import org.springframework.test.context.transaction.TransactionConfiguration;
import org.springframework.transaction.annotation.Transactional;
@ContextConfiguration(locations = "classpath:org/onebusaway/geocoder/impl/application-context-test.xml")
-@TransactionConfiguration(transactionManager="transactionManager", defaultRollback=true)
@RunWith(SpringJUnit4ClassRunner.class)
public class DatabaseCachingGeocoderImplTest {
diff --git a/onebusaway-geocoder/src/test/resources/org/onebusaway/geocoder/impl/application-context-hibernate-test.xml b/onebusaway-geocoder/src/test/resources/org/onebusaway/geocoder/impl/application-context-hibernate-test.xml
index 51a4d4121e..037755002c 100644
--- a/onebusaway-geocoder/src/test/resources/org/onebusaway/geocoder/impl/application-context-hibernate-test.xml
+++ b/onebusaway-geocoder/src/test/resources/org/onebusaway/geocoder/impl/application-context-hibernate-test.xml
@@ -78,7 +78,7 @@
-
@@ -88,7 +88,7 @@
-
+
diff --git a/onebusaway-geospatial/pom.xml b/onebusaway-geospatial/pom.xml
index 150c630f79..2461418bbc 100644
--- a/onebusaway-geospatial/pom.xml
+++ b/onebusaway-geospatial/pom.xml
@@ -4,7 +4,7 @@
onebusaway-application-modules
org.onebusaway
- 2.0.79-cs-SNAPSHOT
+ 2.1.12-cs-SNAPSHOT
onebusaway-geospatial
@@ -17,8 +17,8 @@
${project.version}
- com.vividsolutions
- jts
+ org.locationtech.jts
+ jts-core
edu.washington.cs.rse
diff --git a/onebusaway-geospatial/src/main/java/org/onebusaway/geospatial/HierarchicalSTRtree.java b/onebusaway-geospatial/src/main/java/org/onebusaway/geospatial/HierarchicalSTRtree.java
index 83e0339f78..8e81f7d532 100644
--- a/onebusaway-geospatial/src/main/java/org/onebusaway/geospatial/HierarchicalSTRtree.java
+++ b/onebusaway-geospatial/src/main/java/org/onebusaway/geospatial/HierarchicalSTRtree.java
@@ -18,11 +18,10 @@
import java.util.ArrayList;
import java.util.List;
+import org.locationtech.jts.geom.Envelope;
+import org.locationtech.jts.index.strtree.STRtree;
import org.onebusaway.geospatial.model.CoordinateBounds;
-import com.vividsolutions.jts.geom.Envelope;
-import com.vividsolutions.jts.index.strtree.STRtree;
-
public class HierarchicalSTRtree {
private STRtree _parentTree;
diff --git a/onebusaway-geospatial/src/main/java/org/onebusaway/geospatial/HierarchicalSTRtreeFactory.java b/onebusaway-geospatial/src/main/java/org/onebusaway/geospatial/HierarchicalSTRtreeFactory.java
index 23d0d2fa42..7111fb67ee 100644
--- a/onebusaway-geospatial/src/main/java/org/onebusaway/geospatial/HierarchicalSTRtreeFactory.java
+++ b/onebusaway-geospatial/src/main/java/org/onebusaway/geospatial/HierarchicalSTRtreeFactory.java
@@ -18,11 +18,11 @@
import java.util.HashMap;
import java.util.Map;
+import org.locationtech.jts.geom.Envelope;
+import org.locationtech.jts.index.strtree.STRtree;
import org.onebusaway.geospatial.model.CoordinateBounds;
import org.onebusaway.geospatial.services.SphericalGeometryLibrary;
-import com.vividsolutions.jts.geom.Envelope;
-import com.vividsolutions.jts.index.strtree.STRtree;
public class HierarchicalSTRtreeFactory {
diff --git a/onebusaway-geospatial/src/main/java/org/onebusaway/geospatial/model/CoordinateBounds.java b/onebusaway-geospatial/src/main/java/org/onebusaway/geospatial/model/CoordinateBounds.java
index cb01bb3a24..eb1c156874 100644
--- a/onebusaway-geospatial/src/main/java/org/onebusaway/geospatial/model/CoordinateBounds.java
+++ b/onebusaway-geospatial/src/main/java/org/onebusaway/geospatial/model/CoordinateBounds.java
@@ -159,10 +159,10 @@ public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + (_empty ? 1231 : 1237);
- result = prime * result + new Double(_maxLat).hashCode();
- result = prime * result + new Double(_maxLon).hashCode();
- result = prime * result + new Double(_minLat).hashCode();
- result = prime * result + new Double(_minLon).hashCode();
+ result = prime * result + Double.valueOf(_maxLat).hashCode();
+ result = prime * result + Double.valueOf(_maxLon).hashCode();
+ result = prime * result + Double.valueOf(_minLat).hashCode();
+ result = prime * result + Double.valueOf(_minLon).hashCode();
return result;
}
diff --git a/onebusaway-gtfs-hibernate-spring/pom.xml b/onebusaway-gtfs-hibernate-spring/pom.xml
index 81dd41e485..bae505c557 100644
--- a/onebusaway-gtfs-hibernate-spring/pom.xml
+++ b/onebusaway-gtfs-hibernate-spring/pom.xml
@@ -6,7 +6,7 @@
onebusaway-application-modules
org.onebusaway
- 2.0.79-cs-SNAPSHOT
+ 2.1.12-cs-SNAPSHOT
diff --git a/onebusaway-gtfs-hibernate-spring/src/main/resources/org/onebusaway/gtfs/application-context.xml b/onebusaway-gtfs-hibernate-spring/src/main/resources/org/onebusaway/gtfs/application-context.xml
index 0a1100b9af..ff7e16ed39 100644
--- a/onebusaway-gtfs-hibernate-spring/src/main/resources/org/onebusaway/gtfs/application-context.xml
+++ b/onebusaway-gtfs-hibernate-spring/src/main/resources/org/onebusaway/gtfs/application-context.xml
@@ -23,7 +23,7 @@
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
- http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-4.2.xsd">
+ http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-5.3.xsd">
diff --git a/onebusaway-gtfs-realtime-archiver/pom.xml b/onebusaway-gtfs-realtime-archiver/pom.xml
index 29e87f3216..4a542c31da 100644
--- a/onebusaway-gtfs-realtime-archiver/pom.xml
+++ b/onebusaway-gtfs-realtime-archiver/pom.xml
@@ -3,7 +3,7 @@
org.onebusaway
onebusaway-application-modules
- 2.0.79-cs-SNAPSHOT
+ 2.1.12-cs-SNAPSHOT
onebusaway-gtfs-realtime-archiver
war
@@ -35,7 +35,6 @@
onebusaway-gtfs-realtime-model
${project.version}
-
org.slf4j
slf4j-log4j12
@@ -61,7 +60,7 @@
org.apache.commons
commons-lang3
- 3.1
+ 3.8.1
junit
@@ -71,7 +70,7 @@
org.mockito
mockito-core
- 1.9.0-rc1
+ 3.3.3
test
@@ -83,7 +82,6 @@
mysql
mysql-connector-java
- 5.1.17
@@ -92,13 +90,6 @@
spring-webmvc
-
-
- com.fasterxml.jackson.core
- jackson-core
- 2.6.3
-
-
diff --git a/onebusaway-gtfs-realtime-archiver/src/main/java/org/onebusaway/gtfs_realtime/archiver/listener/LinkAvlRealtimeArchiverTask.java b/onebusaway-gtfs-realtime-archiver/src/main/java/org/onebusaway/gtfs_realtime/archiver/listener/LinkAvlRealtimeArchiverTask.java
index 615acb31e3..4b68319f7b 100644
--- a/onebusaway-gtfs-realtime-archiver/src/main/java/org/onebusaway/gtfs_realtime/archiver/listener/LinkAvlRealtimeArchiverTask.java
+++ b/onebusaway-gtfs-realtime-archiver/src/main/java/org/onebusaway/gtfs_realtime/archiver/listener/LinkAvlRealtimeArchiverTask.java
@@ -34,11 +34,11 @@
import javax.net.ssl.TrustManager;
import javax.net.ssl.X509TrustManager;
-import org.codehaus.jackson.JsonParseException;
-import org.codehaus.jackson.map.DeserializationConfig;
-import org.codehaus.jackson.map.JsonMappingException;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jackson.map.SerializationConfig;
+import com.fasterxml.jackson.core.JsonParseException;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.JsonMappingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.MapperFeature;
import org.onebusaway.gtfs_realtime.archiver.model.LinkAVLData;
import org.onebusaway.gtfs_realtime.archiver.model.StopUpdate;
import org.onebusaway.gtfs_realtime.archiver.model.TripInfo;
@@ -155,9 +155,8 @@ public void run() {
private LinkAVLData deserializeAvlJson(String avlJson) {
LinkAVLData avlData = new LinkAVLData();
- ObjectMapper mapper = new ObjectMapper().enable(DeserializationConfig
- .Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY);
- mapper.configure(SerializationConfig.Feature.AUTO_DETECT_FIELDS, true);
+ ObjectMapper mapper = new ObjectMapper().enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY);
+ mapper.configure(MapperFeature.AUTO_DETECT_FIELDS, true);
try {
avlData = mapper.readValue(avlJson, LinkAVLData.class);
}
diff --git a/onebusaway-gtfs-realtime-archiver/src/main/java/org/onebusaway/gtfs_realtime/archiver/model/ArrivalTime.java b/onebusaway-gtfs-realtime-archiver/src/main/java/org/onebusaway/gtfs_realtime/archiver/model/ArrivalTime.java
index bbc62208cf..e335bc26fd 100644
--- a/onebusaway-gtfs-realtime-archiver/src/main/java/org/onebusaway/gtfs_realtime/archiver/model/ArrivalTime.java
+++ b/onebusaway-gtfs-realtime-archiver/src/main/java/org/onebusaway/gtfs_realtime/archiver/model/ArrivalTime.java
@@ -15,7 +15,7 @@
*/
package org.onebusaway.gtfs_realtime.archiver.model;
-import org.codehaus.jackson.annotate.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonProperty;
public class ArrivalTime {
diff --git a/onebusaway-gtfs-realtime-archiver/src/main/java/org/onebusaway/gtfs_realtime/archiver/model/LinkAVLData.java b/onebusaway-gtfs-realtime-archiver/src/main/java/org/onebusaway/gtfs_realtime/archiver/model/LinkAVLData.java
index a463a2d7cb..fbd58434cc 100644
--- a/onebusaway-gtfs-realtime-archiver/src/main/java/org/onebusaway/gtfs_realtime/archiver/model/LinkAVLData.java
+++ b/onebusaway-gtfs-realtime-archiver/src/main/java/org/onebusaway/gtfs_realtime/archiver/model/LinkAVLData.java
@@ -28,8 +28,8 @@
import javax.persistence.OneToMany;
import javax.persistence.Table;
-import org.codehaus.jackson.annotate.JsonIgnore;
-import org.codehaus.jackson.annotate.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
import org.hibernate.annotations.GenericGenerator;
@Entity
diff --git a/onebusaway-gtfs-realtime-archiver/src/main/java/org/onebusaway/gtfs_realtime/archiver/model/StopUpdate.java b/onebusaway-gtfs-realtime-archiver/src/main/java/org/onebusaway/gtfs_realtime/archiver/model/StopUpdate.java
index f6a893efee..60fdae36ee 100644
--- a/onebusaway-gtfs-realtime-archiver/src/main/java/org/onebusaway/gtfs_realtime/archiver/model/StopUpdate.java
+++ b/onebusaway-gtfs-realtime-archiver/src/main/java/org/onebusaway/gtfs_realtime/archiver/model/StopUpdate.java
@@ -23,8 +23,8 @@
import javax.persistence.ManyToOne;
import javax.persistence.Table;
-import org.codehaus.jackson.annotate.JsonIgnore;
-import org.codehaus.jackson.annotate.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
import org.hibernate.annotations.GenericGenerator;
@Entity
diff --git a/onebusaway-gtfs-realtime-archiver/src/main/java/org/onebusaway/gtfs_realtime/archiver/model/StopUpdatesList.java b/onebusaway-gtfs-realtime-archiver/src/main/java/org/onebusaway/gtfs_realtime/archiver/model/StopUpdatesList.java
index d992712889..2ef84dc890 100644
--- a/onebusaway-gtfs-realtime-archiver/src/main/java/org/onebusaway/gtfs_realtime/archiver/model/StopUpdatesList.java
+++ b/onebusaway-gtfs-realtime-archiver/src/main/java/org/onebusaway/gtfs_realtime/archiver/model/StopUpdatesList.java
@@ -17,7 +17,7 @@
import java.util.List;
-import org.codehaus.jackson.annotate.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonProperty;
public class StopUpdatesList {
diff --git a/onebusaway-gtfs-realtime-archiver/src/main/java/org/onebusaway/gtfs_realtime/archiver/model/TripInfo.java b/onebusaway-gtfs-realtime-archiver/src/main/java/org/onebusaway/gtfs_realtime/archiver/model/TripInfo.java
index 952d33f9d9..c3a35f41b0 100644
--- a/onebusaway-gtfs-realtime-archiver/src/main/java/org/onebusaway/gtfs_realtime/archiver/model/TripInfo.java
+++ b/onebusaway-gtfs-realtime-archiver/src/main/java/org/onebusaway/gtfs_realtime/archiver/model/TripInfo.java
@@ -29,8 +29,8 @@
import javax.persistence.OneToMany;
import javax.persistence.Table;
-import org.codehaus.jackson.annotate.JsonIgnore;
-import org.codehaus.jackson.annotate.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
import org.hibernate.annotations.Fetch;
import org.hibernate.annotations.FetchMode;
import org.hibernate.annotations.GenericGenerator;
diff --git a/onebusaway-gtfs-realtime-archiver/src/main/java/org/onebusaway/gtfs_realtime/archiver/model/TripInfoList.java b/onebusaway-gtfs-realtime-archiver/src/main/java/org/onebusaway/gtfs_realtime/archiver/model/TripInfoList.java
index acba6d38b5..e4490bdb8e 100644
--- a/onebusaway-gtfs-realtime-archiver/src/main/java/org/onebusaway/gtfs_realtime/archiver/model/TripInfoList.java
+++ b/onebusaway-gtfs-realtime-archiver/src/main/java/org/onebusaway/gtfs_realtime/archiver/model/TripInfoList.java
@@ -17,7 +17,7 @@
import java.util.List;
-import org.codehaus.jackson.annotate.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonProperty;
public class TripInfoList {
diff --git a/onebusaway-gtfs-realtime-archiver/src/main/java/org/onebusaway/gtfs_realtime/archiver/service/AlertDaoImpl.java b/onebusaway-gtfs-realtime-archiver/src/main/java/org/onebusaway/gtfs_realtime/archiver/service/AlertDaoImpl.java
index 67b9612d55..9aa5a9dd09 100644
--- a/onebusaway-gtfs-realtime-archiver/src/main/java/org/onebusaway/gtfs_realtime/archiver/service/AlertDaoImpl.java
+++ b/onebusaway-gtfs-realtime-archiver/src/main/java/org/onebusaway/gtfs_realtime/archiver/service/AlertDaoImpl.java
@@ -38,7 +38,7 @@ public class AlertDaoImpl implements AlertDao {
private SessionFactory _sessionFactory;
@Autowired
- @Qualifier("gtfsRealtimeArchiveSessionFactory")
+// @Qualifier("gtfsRealtimeArchiveSessionFactory")
public void setSessionFactory(SessionFactory sessionFactory) {
_sessionFactory = sessionFactory;
}
diff --git a/onebusaway-gtfs-realtime-archiver/src/main/java/org/onebusaway/gtfs_realtime/archiver/service/LinkAvlDaoImpl.java b/onebusaway-gtfs-realtime-archiver/src/main/java/org/onebusaway/gtfs_realtime/archiver/service/LinkAvlDaoImpl.java
index 8dfcacc74c..9d7d27fae8 100644
--- a/onebusaway-gtfs-realtime-archiver/src/main/java/org/onebusaway/gtfs_realtime/archiver/service/LinkAvlDaoImpl.java
+++ b/onebusaway-gtfs-realtime-archiver/src/main/java/org/onebusaway/gtfs_realtime/archiver/service/LinkAvlDaoImpl.java
@@ -39,7 +39,7 @@ public class LinkAvlDaoImpl implements LinkAvlDao {
private SessionFactory _sessionFactory;
@Autowired
- @Qualifier("gtfsRealtimeArchiveSessionFactory")
+// @Qualifier("gtfsRealtimeArchiveSessionFactory")
public void setSessionFactory(SessionFactory sessionFactory) {
_sessionFactory = sessionFactory;
}
diff --git a/onebusaway-gtfs-realtime-archiver/src/main/java/org/onebusaway/gtfs_realtime/archiver/service/TripUpdateDaoImpl.java b/onebusaway-gtfs-realtime-archiver/src/main/java/org/onebusaway/gtfs_realtime/archiver/service/TripUpdateDaoImpl.java
index e6a41b427c..c1a5a5feb3 100644
--- a/onebusaway-gtfs-realtime-archiver/src/main/java/org/onebusaway/gtfs_realtime/archiver/service/TripUpdateDaoImpl.java
+++ b/onebusaway-gtfs-realtime-archiver/src/main/java/org/onebusaway/gtfs_realtime/archiver/service/TripUpdateDaoImpl.java
@@ -44,7 +44,7 @@ public class TripUpdateDaoImpl implements TripUpdateDao {
private SessionFactory _sessionFactory;
@Autowired
- @Qualifier("gtfsRealtimeArchiveSessionFactory")
+// @Qualifier("gtfsRealtimeArchiveSessionFactory")
public void setSessionFactory(SessionFactory sessionFactory) {
_sessionFactory = sessionFactory;
}
diff --git a/onebusaway-gtfs-realtime-archiver/src/main/java/org/onebusaway/gtfs_realtime/archiver/service/VehiclePositionDaoImpl.java b/onebusaway-gtfs-realtime-archiver/src/main/java/org/onebusaway/gtfs_realtime/archiver/service/VehiclePositionDaoImpl.java
index 535a4374f2..8d5eb2f54a 100644
--- a/onebusaway-gtfs-realtime-archiver/src/main/java/org/onebusaway/gtfs_realtime/archiver/service/VehiclePositionDaoImpl.java
+++ b/onebusaway-gtfs-realtime-archiver/src/main/java/org/onebusaway/gtfs_realtime/archiver/service/VehiclePositionDaoImpl.java
@@ -46,7 +46,7 @@ private Session getSession(){
}
@Autowired
- @Qualifier("gtfsRealtimeArchiveSessionFactory")
+// @Qualifier("gtfsRealtimeArchiveSessionFactory")
public void setSessionFactory(SessionFactory sessionFactory) {
_sessionFactory = sessionFactory;
}
diff --git a/onebusaway-gtfs-realtime-archiver/src/main/resources/data-sources.xml b/onebusaway-gtfs-realtime-archiver/src/main/resources/data-sources.xml
index 53f51aebcc..24c56cb8a9 100644
--- a/onebusaway-gtfs-realtime-archiver/src/main/resources/data-sources.xml
+++ b/onebusaway-gtfs-realtime-archiver/src/main/resources/data-sources.xml
@@ -89,7 +89,7 @@
-
+
@@ -147,7 +147,7 @@
-
@@ -93,7 +93,7 @@
-
+
diff --git a/onebusaway-gtfs-realtime-archiver/src/main/resources/org/onebusaway/archiver/application-context-testing.xml b/onebusaway-gtfs-realtime-archiver/src/main/resources/org/onebusaway/archiver/application-context-testing.xml
index af05014545..508c233291 100644
--- a/onebusaway-gtfs-realtime-archiver/src/main/resources/org/onebusaway/archiver/application-context-testing.xml
+++ b/onebusaway-gtfs-realtime-archiver/src/main/resources/org/onebusaway/archiver/application-context-testing.xml
@@ -23,7 +23,7 @@
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
- http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-4.2.xsd">
+ http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-5.3.xsd">
@@ -59,7 +59,7 @@
-
+
diff --git a/onebusaway-gtfs-realtime-archiver/src/main/resources/org/onebusaway/archiver/application-context-webapp.xml b/onebusaway-gtfs-realtime-archiver/src/main/resources/org/onebusaway/archiver/application-context-webapp.xml
index 2b9b6b2436..b8d5ed37f1 100644
--- a/onebusaway-gtfs-realtime-archiver/src/main/resources/org/onebusaway/archiver/application-context-webapp.xml
+++ b/onebusaway-gtfs-realtime-archiver/src/main/resources/org/onebusaway/archiver/application-context-webapp.xml
@@ -23,7 +23,7 @@
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
- http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-4.2.xsd">
+ http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-5.3.xsd">
@@ -51,7 +51,7 @@
-
+
diff --git a/onebusaway-gtfs-realtime-archiver/src/test/java/org/onebusaway/gtfs_realtime/archiver/service/FeedServiceImplTest.java b/onebusaway-gtfs-realtime-archiver/src/test/java/org/onebusaway/gtfs_realtime/archiver/service/FeedServiceImplTest.java
index 529c545ed9..8521f2b22c 100644
--- a/onebusaway-gtfs-realtime-archiver/src/test/java/org/onebusaway/gtfs_realtime/archiver/service/FeedServiceImplTest.java
+++ b/onebusaway-gtfs-realtime-archiver/src/test/java/org/onebusaway/gtfs_realtime/archiver/service/FeedServiceImplTest.java
@@ -102,7 +102,7 @@ public class FeedServiceImplTest {
private FeedService _feedService;
@Autowired
- @Qualifier("gtfsRealtimeArchiveSessionFactory")
+// @Qualifier("gtfsRealtimeArchiveSessionFactory")
private SessionFactory _sessionFactory;
private Session getSession() {
diff --git a/onebusaway-gtfs-realtime-archiver/src/test/resources/service-alerts-data-sources.xml b/onebusaway-gtfs-realtime-archiver/src/test/resources/service-alerts-data-sources.xml
index 4456113f76..dd00dc2dc7 100644
--- a/onebusaway-gtfs-realtime-archiver/src/test/resources/service-alerts-data-sources.xml
+++ b/onebusaway-gtfs-realtime-archiver/src/test/resources/service-alerts-data-sources.xml
@@ -40,7 +40,7 @@
-
+
diff --git a/onebusaway-gtfs-realtime-model/pom.xml b/onebusaway-gtfs-realtime-model/pom.xml
index ff3e527bba..ce00fcfaa6 100644
--- a/onebusaway-gtfs-realtime-model/pom.xml
+++ b/onebusaway-gtfs-realtime-model/pom.xml
@@ -3,7 +3,7 @@
org.onebusaway
onebusaway-application-modules
- 2.0.79-cs-SNAPSHOT
+ 2.1.12-cs-SNAPSHOT
onebusaway-gtfs-realtime-model
onebusaway-gtfs-realtime-model
@@ -24,7 +24,7 @@
org.onebusaway
onebusaway-container
- 2.0.79-cs-SNAPSHOT
+ 2.1.12-cs-SNAPSHOT
@@ -36,7 +36,7 @@
org.apache.commons
commons-lang3
- 3.1
+ 3.8.1
diff --git a/onebusaway-gwt-common/pom.xml b/onebusaway-gwt-common/pom.xml
index ba3f3af106..db309f6158 100644
--- a/onebusaway-gwt-common/pom.xml
+++ b/onebusaway-gwt-common/pom.xml
@@ -2,7 +2,7 @@
org.onebusaway
onebusaway-application-modules
- 2.0.79-cs-SNAPSHOT
+ 2.1.12-cs-SNAPSHOT
4.0.0
onebusaway-gwt-common
diff --git a/onebusaway-nextbus-api-webapp/pom.xml b/onebusaway-nextbus-api-webapp/pom.xml
index 41c7c94b0b..eb02494dca 100644
--- a/onebusaway-nextbus-api-webapp/pom.xml
+++ b/onebusaway-nextbus-api-webapp/pom.xml
@@ -3,7 +3,7 @@
org.onebusaway
onebusaway-application-modules
- 2.0.79-cs-SNAPSHOT
+ 2.1.12-cs-SNAPSHOT
onebusaway-nextbus-api-webapp
war
@@ -82,6 +82,13 @@
org.apache.struts
struts2-rest-plugin
+
+
+ net.sf.json-lib
+ json-lib
+ 2.4
+ jdk15
+
@@ -116,14 +123,9 @@
com.fasterxml.jackson.jaxrs
jackson-jaxrs-json-provider
- 2.6.3
+ ${jackson-version}
-
-
-
-
-
junit
junit
@@ -134,7 +136,6 @@
mysql
mysql-connector-java
- 5.1.17
org.mockito
@@ -166,6 +167,17 @@
comparators
1.0.0
+
+
+ jakarta.xml.bind
+ jakarta.xml.bind-api
+ 2.3.3
+
+
+ org.glassfish.jaxb
+ jaxb-runtime
+ 2.3.3
+
diff --git a/onebusaway-nextbus-api-webapp/src/main/resources/org/onebusaway/nextbus/application-context-webapp.xml b/onebusaway-nextbus-api-webapp/src/main/resources/org/onebusaway/nextbus/application-context-webapp.xml
index 1fb835a21c..e86eb14be1 100644
--- a/onebusaway-nextbus-api-webapp/src/main/resources/org/onebusaway/nextbus/application-context-webapp.xml
+++ b/onebusaway-nextbus-api-webapp/src/main/resources/org/onebusaway/nextbus/application-context-webapp.xml
@@ -24,7 +24,7 @@
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
- http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-4.2.xsd">
+ http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-5.3.xsd">
diff --git a/onebusaway-nextbus-api-webapp/src/main/resources/struts-onebusaway-api-webapp.xml b/onebusaway-nextbus-api-webapp/src/main/resources/struts-onebusaway-api-webapp.xml
index f9c353e62f..90054a3093 100644
--- a/onebusaway-nextbus-api-webapp/src/main/resources/struts-onebusaway-api-webapp.xml
+++ b/onebusaway-nextbus-api-webapp/src/main/resources/struts-onebusaway-api-webapp.xml
@@ -18,7 +18,7 @@
-->
+ "http://struts.apache.org/dtds/struts-2.5.dtd">
diff --git a/onebusaway-nextbus-api-webapp/src/main/resources/struts.xml b/onebusaway-nextbus-api-webapp/src/main/resources/struts.xml
index 66a51505a1..355d3b50b6 100644
--- a/onebusaway-nextbus-api-webapp/src/main/resources/struts.xml
+++ b/onebusaway-nextbus-api-webapp/src/main/resources/struts.xml
@@ -18,7 +18,7 @@
-->
+ "http://struts.apache.org/dtds/struts-2.5.dtd">
diff --git a/onebusaway-nextbus-api-webapp/src/main/webapp/WEB-INF/web.xml b/onebusaway-nextbus-api-webapp/src/main/webapp/WEB-INF/web.xml
index f2fbf88e61..5d0fa55e3f 100644
--- a/onebusaway-nextbus-api-webapp/src/main/webapp/WEB-INF/web.xml
+++ b/onebusaway-nextbus-api-webapp/src/main/webapp/WEB-INF/web.xml
@@ -59,7 +59,7 @@
struts-prepare-and-execute
- org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
+ org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter
UrlRewriteFilter
diff --git a/onebusaway-phone-webapp/pom.xml b/onebusaway-phone-webapp/pom.xml
index 5cfcaa9b5a..02884b1f10 100644
--- a/onebusaway-phone-webapp/pom.xml
+++ b/onebusaway-phone-webapp/pom.xml
@@ -4,7 +4,7 @@
onebusaway-application-modules
org.onebusaway
- 2.0.79-cs-SNAPSHOT
+ 2.1.12-cs-SNAPSHOT
onebusaway-phone-webapp
war
diff --git a/onebusaway-phone-webapp/src/main/resources/org/onebusaway/phone/application-context-webapp.xml b/onebusaway-phone-webapp/src/main/resources/org/onebusaway/phone/application-context-webapp.xml
index fb6a796551..edc79ca4ab 100644
--- a/onebusaway-phone-webapp/src/main/resources/org/onebusaway/phone/application-context-webapp.xml
+++ b/onebusaway-phone-webapp/src/main/resources/org/onebusaway/phone/application-context-webapp.xml
@@ -23,7 +23,7 @@
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
- http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-4.2.xsd">
+ http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-5.3.xsd">
diff --git a/onebusaway-phone/pom.xml b/onebusaway-phone/pom.xml
index 9c5363d43f..8ede04b08c 100644
--- a/onebusaway-phone/pom.xml
+++ b/onebusaway-phone/pom.xml
@@ -3,7 +3,7 @@
org.onebusaway
onebusaway-application-modules
- 2.0.79-cs-SNAPSHOT
+ 2.1.12-cs-SNAPSHOT
onebusaway-phone
jar
diff --git a/onebusaway-phone/src/main/java/org/onebusaway/phone/SpringContainer.java b/onebusaway-phone/src/main/java/org/onebusaway/phone/SpringContainer.java
index 16488300cb..d69db1340f 100644
--- a/onebusaway-phone/src/main/java/org/onebusaway/phone/SpringContainer.java
+++ b/onebusaway-phone/src/main/java/org/onebusaway/phone/SpringContainer.java
@@ -59,6 +59,11 @@ public ObjectFactory create(Context xworkContext) throws Exception {
return f;
}
+
+ @Override
+ public Class extends ObjectFactory> type() {
+ return ObjectFactory.class;
+ }
});
}
}
diff --git a/onebusaway-phone/src/main/java/org/onebusaway/phone/XWorkConfigurationFactoryBean.java b/onebusaway-phone/src/main/java/org/onebusaway/phone/XWorkConfigurationFactoryBean.java
index 74cd07cdda..4692bfdd2c 100644
--- a/onebusaway-phone/src/main/java/org/onebusaway/phone/XWorkConfigurationFactoryBean.java
+++ b/onebusaway-phone/src/main/java/org/onebusaway/phone/XWorkConfigurationFactoryBean.java
@@ -52,7 +52,7 @@ public void setXmlConfigurationSources(List xmlConfigurationSources) {
public Configuration getObject() throws Exception {
- ConfigurationManager confManager = new ConfigurationManager();
+ ConfigurationManager confManager = new ConfigurationManager("XWorkConfigurationFactoryBean");
confManager.addContainerProvider(new XWorkConfigurationProvider());
diff --git a/onebusaway-phone/src/main/java/org/onebusaway/phone/impl/IntegrationTestingInterceptor.java b/onebusaway-phone/src/main/java/org/onebusaway/phone/impl/IntegrationTestingInterceptor.java
index 5d0346adae..ab4d4f006e 100644
--- a/onebusaway-phone/src/main/java/org/onebusaway/phone/impl/IntegrationTestingInterceptor.java
+++ b/onebusaway-phone/src/main/java/org/onebusaway/phone/impl/IntegrationTestingInterceptor.java
@@ -15,6 +15,7 @@
*/
package org.onebusaway.phone.impl;
+import java.util.HashMap;
import java.util.Map;
import org.asteriskjava.fastagi.AgiRequest;
@@ -44,9 +45,12 @@ public String intercept(ActionInvocation invocation) throws Exception {
*/
Object value = r.remove(RESET_USER);
- if (value != null && value.equals("true"))
- context.getParameters().put(PhoneNumberLoginInterceptor.RESET_USER,
- Boolean.TRUE);
+ if (value != null && value.equals("true")) {
+ Map resetMap = new HashMap();
+ resetMap.put(PhoneNumberLoginInterceptor.RESET_USER,
+ Boolean.TRUE);
+ context.getParameters().appendAll(resetMap);
+ }
return invocation.invoke();
}
diff --git a/onebusaway-phone/src/main/resources/org/onebusaway/phone/application-context.xml b/onebusaway-phone/src/main/resources/org/onebusaway/phone/application-context.xml
index 9f8763cda9..a74281da5c 100644
--- a/onebusaway-phone/src/main/resources/org/onebusaway/phone/application-context.xml
+++ b/onebusaway-phone/src/main/resources/org/onebusaway/phone/application-context.xml
@@ -23,7 +23,7 @@
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
- http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-4.2.xsd">
+ http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-5.3.xsd">
diff --git a/onebusaway-presentation/pom.xml b/onebusaway-presentation/pom.xml
index 39b1b43bc2..d7741a88ab 100644
--- a/onebusaway-presentation/pom.xml
+++ b/onebusaway-presentation/pom.xml
@@ -3,7 +3,7 @@
org.onebusaway
onebusaway-application-modules
- 2.0.79-cs-SNAPSHOT
+ 2.1.12-cs-SNAPSHOT
onebusaway-presentation
jar
@@ -68,6 +68,16 @@
org.apache.struts
struts2-convention-plugin
+
+ org.ow2.asm
+ asm
+ ${asm-version}
+
+
+ org.ow2.asm
+ asm-commons
+ ${asm-version}
+
org.apache.struts
struts2-json-plugin
@@ -137,6 +147,10 @@
comparators
1.0.0
+
+ commons-collections
+ commons-collections
+
diff --git a/onebusaway-presentation/src/main/java/org/onebusaway/presentation/bundles/ResourceBundleSupport.java b/onebusaway-presentation/src/main/java/org/onebusaway/presentation/bundles/ResourceBundleSupport.java
index 154b1e3106..f8d22d9c51 100644
--- a/onebusaway-presentation/src/main/java/org/onebusaway/presentation/bundles/ResourceBundleSupport.java
+++ b/onebusaway-presentation/src/main/java/org/onebusaway/presentation/bundles/ResourceBundleSupport.java
@@ -17,18 +17,17 @@
import java.util.Enumeration;
import java.util.LinkedHashMap;
+import java.util.Locale;
import java.util.Map;
import java.util.ResourceBundle;
import com.opensymphony.xwork2.LocaleProvider;
-import com.opensymphony.xwork2.TextProvider;
-import com.opensymphony.xwork2.TextProviderFactory;
+import com.opensymphony.xwork2.util.StrutsLocalizedTextProvider;
public class ResourceBundleSupport {
public static Map getLocaleMap(LocaleProvider localeProvider, Class> resourceType) {
- TextProviderFactory factory = new TextProviderFactory();
- TextProvider provider = factory.createInstance(resourceType, localeProvider);
- ResourceBundle bundle = provider.getTexts();
+ StrutsLocalizedTextProvider localizedTextProvider = new StrutsLocalizedTextProvider();
+ ResourceBundle bundle = localizedTextProvider.findResourceBundle(resourceType.getName(), Locale.getDefault());
Map m = new LinkedHashMap();
for (Enumeration en = bundle.getKeys(); en.hasMoreElements();) {
String key = en.nextElement();
diff --git a/onebusaway-presentation/src/main/java/org/onebusaway/presentation/impl/NextActionSupport.java b/onebusaway-presentation/src/main/java/org/onebusaway/presentation/impl/NextActionSupport.java
index 85aa31accd..a14a696b76 100644
--- a/onebusaway-presentation/src/main/java/org/onebusaway/presentation/impl/NextActionSupport.java
+++ b/onebusaway-presentation/src/main/java/org/onebusaway/presentation/impl/NextActionSupport.java
@@ -16,9 +16,11 @@
package org.onebusaway.presentation.impl;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import org.apache.struts2.dispatcher.HttpParameters;
import org.apache.struts2.interceptor.SessionAware;
import org.onebusaway.presentation.model.NextAction;
@@ -60,8 +62,11 @@ protected String getNextActionOrSuccess() {
Map params = next.getParameters();
if (params != null && !params.isEmpty()) {
ActionContext context = ActionContext.getContext();
- Map contextParameters = context.getParameters();
- contextParameters.putAll(params);
+ HttpParameters parameters = context.getParameters();
+ Map contextParameters = new HashMap<>();
+ for (String key : parameters.keySet()) {
+ contextParameters.put(key, parameters.get(key).getValue());
+ }
}
return next.getAction();
diff --git a/onebusaway-presentation/src/main/java/org/onebusaway/presentation/impl/resources/ResourceServiceImpl.java b/onebusaway-presentation/src/main/java/org/onebusaway/presentation/impl/resources/ResourceServiceImpl.java
index 718e347f95..c4835b15dc 100644
--- a/onebusaway-presentation/src/main/java/org/onebusaway/presentation/impl/resources/ResourceServiceImpl.java
+++ b/onebusaway-presentation/src/main/java/org/onebusaway/presentation/impl/resources/ResourceServiceImpl.java
@@ -43,6 +43,7 @@
import javax.annotation.PostConstruct;
import javax.servlet.ServletContext;
+import com.opensymphony.xwork2.StrutsTextProviderFactory;
import org.json.JSONObject;
import org.onebusaway.presentation.impl.ServletLibrary;
import org.onebusaway.presentation.services.resources.Resource;
@@ -80,7 +81,7 @@ public class ResourceServiceImpl implements ResourceService {
private static Logger _log = LoggerFactory.getLogger(ResourceServiceImpl.class);
- private static TextProviderFactory _textProviderFactory = new TextProviderFactory();
+ private static StrutsTextProviderFactory _textProviderFactory = new StrutsTextProviderFactory();
private ConcurrentMap _resourceEntriesByResourcePath = new ConcurrentHashMap();
@@ -403,7 +404,7 @@ private URL getMessagesResourceAsSourceUrl(String resourceName,
}
TextProvider provider = _textProviderFactory.createInstance(
- messagesResourceClass, localeProvider);
+ messagesResourceClass);
ResourceBundle bundle = provider.getTexts();
Map resourceMapping = new HashMap();
@@ -855,6 +856,21 @@ public LocaleProviderImpl(Locale locale) {
public Locale getLocale() {
return _locale;
}
+
+ @Override
+ public boolean isValidLocaleString(String s) {
+ if ("en".equalsIgnoreCase(s))
+ return true;
+ return false;
+ }
+
+ @Override
+ public boolean isValidLocale(Locale locale) {
+ if (locale.getDisplayName().equalsIgnoreCase("en"))
+ return true;
+ return false;
+ }
+
}
}
diff --git a/onebusaway-presentation/src/main/java/org/onebusaway/presentation/impl/users/PhoneNumberLoginInterceptor.java b/onebusaway-presentation/src/main/java/org/onebusaway/presentation/impl/users/PhoneNumberLoginInterceptor.java
index 908cfb42a6..a3641326e8 100644
--- a/onebusaway-presentation/src/main/java/org/onebusaway/presentation/impl/users/PhoneNumberLoginInterceptor.java
+++ b/onebusaway-presentation/src/main/java/org/onebusaway/presentation/impl/users/PhoneNumberLoginInterceptor.java
@@ -15,6 +15,7 @@
*/
package org.onebusaway.presentation.impl.users;
+import java.util.HashMap;
import java.util.Map;
import org.onebusaway.users.impl.PhoneNumberLibrary;
@@ -55,7 +56,11 @@ public void setPhoneNumberParameterName(String phoneNumberParameterName) {
public String intercept(ActionInvocation invocation) throws Exception {
ActionContext context = invocation.getInvocationContext();
- Map params = context.getParameters();
+ Map params = new HashMap<>();
+ for (String key : context.getParameters().keySet()) {
+ params.put(key, context.getParameters().get(key).getValue());
+ }
+
String phoneNumber = getPhoneNumber(params);
phoneNumber = PhoneNumberLibrary.normalizePhoneNumber(phoneNumber);
diff --git a/onebusaway-presentation/src/main/java/org/onebusaway/presentation/impl/users/XWorkRequestAttributes.java b/onebusaway-presentation/src/main/java/org/onebusaway/presentation/impl/users/XWorkRequestAttributes.java
index e4bc607d2c..ab4e4e75f8 100644
--- a/onebusaway-presentation/src/main/java/org/onebusaway/presentation/impl/users/XWorkRequestAttributes.java
+++ b/onebusaway-presentation/src/main/java/org/onebusaway/presentation/impl/users/XWorkRequestAttributes.java
@@ -15,6 +15,7 @@
*/
package org.onebusaway.presentation.impl.users;
+import java.util.HashMap;
import java.util.Map;
import java.util.Set;
@@ -98,11 +99,13 @@ protected void updateAccessedSessionAttributes() {
private Map getScopedMap(int scope) {
switch (scope) {
case SCOPE_REQUEST:
- return _context.getParameters();
+ Map map = new HashMap<>();
+ for (String key : _context.getParameters().keySet()) {
+ map.put(key, _context.getParameters().get(key).getValue());
+ }
+ return map;
case SCOPE_SESSION:
return _context.getSession();
- case SCOPE_GLOBAL_SESSION:
- return _context.getApplication();
default:
throw new IllegalStateException("unknown scope=" + scope);
}
diff --git a/onebusaway-presentation/src/main/java/org/onebusaway/presentation/rss/RomeResult.java b/onebusaway-presentation/src/main/java/org/onebusaway/presentation/rss/RomeResult.java
index fcf054a3b6..6b9d65e1ce 100644
--- a/onebusaway-presentation/src/main/java/org/onebusaway/presentation/rss/RomeResult.java
+++ b/onebusaway-presentation/src/main/java/org/onebusaway/presentation/rss/RomeResult.java
@@ -20,7 +20,7 @@
import com.rometools.rome.feed.synd.SyndFeed;
import com.rometools.rome.io.SyndFeedOutput;
import org.apache.struts2.ServletActionContext;
-import org.apache.struts2.dispatcher.StrutsResultSupport;
+import org.apache.struts2.result.StrutsResultSupport;
import java.io.Writer;
@@ -66,7 +66,7 @@ public void setEncoding(String encoding) {
/**
* Implementation of
- * {@link org.apache.struts2.dispatcher.StrutsResultSupport#doExecute(String, com.opensymphony.xwork2.ActionInvocation)}
+ * {@link org.apache.struts2.result.StrutsResultSupport#doExecute(String, com.opensymphony.xwork2.ActionInvocation)}
*
* @param location final location (jsp page, action, etc)
* @param actionInvocation the ActionInvocation
diff --git a/onebusaway-presentation/src/main/java/org/onebusaway/presentation/tags/JsonComponent.java b/onebusaway-presentation/src/main/java/org/onebusaway/presentation/tags/JsonComponent.java
index 383c13f208..610df8cb40 100644
--- a/onebusaway-presentation/src/main/java/org/onebusaway/presentation/tags/JsonComponent.java
+++ b/onebusaway-presentation/src/main/java/org/onebusaway/presentation/tags/JsonComponent.java
@@ -23,6 +23,7 @@
import org.apache.commons.lang3.StringEscapeUtils;
import org.apache.struts2.components.ContextBean;
+import org.apache.struts2.json.DefaultJSONWriter;
import org.apache.struts2.json.JSONException;
import org.apache.struts2.json.JSONUtil;
@@ -72,12 +73,6 @@ public boolean end(Writer writer, String body) {
String json = null;
- try {
- Collection empty = Collections.emptyList();
- json = JSONUtil.serialize(value, empty, empty, _ignoreHierarchy, _excludeNullProperties);
- } catch (JSONException ex) {
- LOG.error("Could not generate json from value", ex);
- }
if (json != null) {
@@ -89,14 +84,22 @@ public boolean end(Writer writer, String body) {
/**
* We either write the url out to a variable
*/
+ Collection empty = Collections.emptyList();
+ try {
+ json = new DefaultJSONWriter().write(value, empty, empty, _excludeNullProperties);
+ } catch (JSONException e) {
+ LOG.error("Could not write out json value", e);
+ }
putInContext(json);
} else {
/**
* Or otherwise print out the url directly
*/
try {
- writer.write(json);
- } catch (IOException e) {
+ Collection empty = Collections.emptyList();
+ new JSONUtil().serialize(writer, value, empty, empty,_ignoreHierarchy, _excludeNullProperties);
+
+ } catch (IOException | JSONException e) {
LOG.error("Could not write out json value", e);
}
}
diff --git a/onebusaway-presentation/src/main/resources/org/onebusaway/presentation/application-context.xml b/onebusaway-presentation/src/main/resources/org/onebusaway/presentation/application-context.xml
index 66b669fa88..3df60fb624 100644
--- a/onebusaway-presentation/src/main/resources/org/onebusaway/presentation/application-context.xml
+++ b/onebusaway-presentation/src/main/resources/org/onebusaway/presentation/application-context.xml
@@ -17,13 +17,13 @@
-->
+ http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-5.3.xsd">
diff --git a/onebusaway-presentation/src/main/resources/template/xhtml/oba-stop-info-window-template.ftl b/onebusaway-presentation/src/main/resources/template/xhtml/oba-stop-info-window-template.ftl
index f4d324ae0f..31b90cb2bf 100644
--- a/onebusaway-presentation/src/main/resources/template/xhtml/oba-stop-info-window-template.ftl
+++ b/onebusaway-presentation/src/main/resources/template/xhtml/oba-stop-info-window-template.ftl
@@ -18,7 +18,7 @@
Stop Name
<@s.text name="StopNum"/> - <@s.text name="bound"/>
-
<@s.property value="parameters.content" escape="false"/>
+
<@s.property value="parameters.content" escapeHtml="false"/>
<@s.text name="Routes"/>:
diff --git a/onebusaway-quickstart/onebusaway-quickstart-assembly/pom.xml b/onebusaway-quickstart/onebusaway-quickstart-assembly/pom.xml
index 88eb04b57b..dedbd753f1 100644
--- a/onebusaway-quickstart/onebusaway-quickstart-assembly/pom.xml
+++ b/onebusaway-quickstart/onebusaway-quickstart-assembly/pom.xml
@@ -3,7 +3,7 @@
onebusaway-quickstart
org.onebusaway
- 2.0.79-cs-SNAPSHOT
+ 2.1.12-cs-SNAPSHOT
onebusaway-quickstart-assembly
pom
diff --git a/onebusaway-quickstart/onebusaway-quickstart-bootstrap/pom.xml b/onebusaway-quickstart/onebusaway-quickstart-bootstrap/pom.xml
index 3024ea7259..454b4c882d 100644
--- a/onebusaway-quickstart/onebusaway-quickstart-bootstrap/pom.xml
+++ b/onebusaway-quickstart/onebusaway-quickstart-bootstrap/pom.xml
@@ -3,7 +3,7 @@
onebusaway-quickstart
org.onebusaway
- 2.0.79-cs-SNAPSHOT
+ 2.1.12-cs-SNAPSHOT
onebusaway-quickstart-bootstrap
onebusaway-quickstart-bootstrap
diff --git a/onebusaway-quickstart/onebusaway-quickstart-common/pom.xml b/onebusaway-quickstart/onebusaway-quickstart-common/pom.xml
index 0d7932501a..96847c3f31 100644
--- a/onebusaway-quickstart/onebusaway-quickstart-common/pom.xml
+++ b/onebusaway-quickstart/onebusaway-quickstart-common/pom.xml
@@ -3,7 +3,7 @@
onebusaway-quickstart
org.onebusaway
- 2.0.79-cs-SNAPSHOT
+ 2.1.12-cs-SNAPSHOT
onebusaway-quickstart-common
onebusaway-quickstart-common
diff --git a/onebusaway-quickstart/onebusaway-quickstart-mains/pom.xml b/onebusaway-quickstart/onebusaway-quickstart-mains/pom.xml
index a0a6e071ab..f513a548e6 100644
--- a/onebusaway-quickstart/onebusaway-quickstart-mains/pom.xml
+++ b/onebusaway-quickstart/onebusaway-quickstart-mains/pom.xml
@@ -3,7 +3,7 @@
onebusaway-quickstart
org.onebusaway
- 2.0.79-cs-SNAPSHOT
+ 2.1.12-cs-SNAPSHOT
onebusaway-quickstart-mains
onebusaway-quickstart-mains
diff --git a/onebusaway-quickstart/onebusaway-quickstart-webapp/pom.xml b/onebusaway-quickstart/onebusaway-quickstart-webapp/pom.xml
index 347c24d8bd..45ab49d074 100644
--- a/onebusaway-quickstart/onebusaway-quickstart-webapp/pom.xml
+++ b/onebusaway-quickstart/onebusaway-quickstart-webapp/pom.xml
@@ -4,7 +4,7 @@
onebusaway-quickstart
org.onebusaway
- 2.0.79-cs-SNAPSHOT
+ 2.1.12-cs-SNAPSHOT
onebusaway-quickstart-webapp
jar
@@ -37,6 +37,11 @@
spring-web
provided
+
+ org.springframework
+ spring-context
+ provided
+
diff --git a/onebusaway-quickstart/pom.xml b/onebusaway-quickstart/pom.xml
index 37e8c442a1..10937280c6 100644
--- a/onebusaway-quickstart/pom.xml
+++ b/onebusaway-quickstart/pom.xml
@@ -3,7 +3,7 @@
org.onebusaway
onebusaway-application-modules
- 2.0.79-cs-SNAPSHOT
+ 2.1.12-cs-SNAPSHOT
onebusaway-quickstart
pom
@@ -44,7 +44,7 @@
org.springframework
spring-web
- 3.0.3.RELEASE
+ 5.2.6.RELEASE
diff --git a/onebusaway-realtime-api/pom.xml b/onebusaway-realtime-api/pom.xml
index bb5b66ff97..89fc8f5b3b 100644
--- a/onebusaway-realtime-api/pom.xml
+++ b/onebusaway-realtime-api/pom.xml
@@ -3,7 +3,7 @@
org.onebusaway
onebusaway-application-modules
- 2.0.79-cs-SNAPSHOT
+ 2.1.12-cs-SNAPSHOT
onebusaway-realtime-api
jar
diff --git a/onebusaway-sms-webapp/pom.xml b/onebusaway-sms-webapp/pom.xml
index b769b99600..7104313737 100644
--- a/onebusaway-sms-webapp/pom.xml
+++ b/onebusaway-sms-webapp/pom.xml
@@ -5,7 +5,7 @@
onebusaway-application-modules
org.onebusaway
- 2.0.79-cs-SNAPSHOT
+ 2.1.12-cs-SNAPSHOT
onebusaway-sms-webapp
@@ -24,10 +24,30 @@
onebusaway-util
${project.version}
+
+
+ mysql
+ mysql-connector-java
+
org.slf4j
slf4j-log4j12
+
+ log4j
+ log4j
+ 1.2.16
+
+
+ log4j
+ apache-log4j-extras
+ 1.1
+
+
+ commons-logging
+ commons-logging
+ 1.1.2
+
junit
junit
diff --git a/onebusaway-sms-webapp/src/main/java/org/onebusaway/sms/impl/TextmarksSessionInterceptor.java b/onebusaway-sms-webapp/src/main/java/org/onebusaway/sms/impl/TextmarksSessionInterceptor.java
index 60b2a5de92..241180846c 100644
--- a/onebusaway-sms-webapp/src/main/java/org/onebusaway/sms/impl/TextmarksSessionInterceptor.java
+++ b/onebusaway-sms-webapp/src/main/java/org/onebusaway/sms/impl/TextmarksSessionInterceptor.java
@@ -15,6 +15,7 @@
*/
package org.onebusaway.sms.impl;
+import java.util.HashMap;
import java.util.Map;
import org.apache.commons.lang.StringUtils;
@@ -58,7 +59,10 @@ public String intercept(ActionInvocation invocation) throws Exception {
processGoogleAnalytics();
ActionContext context = invocation.getInvocationContext();
- Map parameters = context.getParameters();
+ Map parameters = new HashMap<>();
+ for (String key : context.getParameters().keySet()) {
+ parameters.put(key, context.getParameters().get(key));
+ }
Object phoneNumber = parameters.get(_phoneNumberParameterName);
diff --git a/onebusaway-sms-webapp/src/main/resources/log4j.xml b/onebusaway-sms-webapp/src/main/resources/log4j.xml
new file mode 100644
index 0000000000..dee7f24375
--- /dev/null
+++ b/onebusaway-sms-webapp/src/main/resources/log4j.xml
@@ -0,0 +1,57 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/onebusaway-sms-webapp/src/main/resources/org/onebusaway/sms/application-context-webapp.xml b/onebusaway-sms-webapp/src/main/resources/org/onebusaway/sms/application-context-webapp.xml
index e31a8ca8fa..e59abd157a 100644
--- a/onebusaway-sms-webapp/src/main/resources/org/onebusaway/sms/application-context-webapp.xml
+++ b/onebusaway-sms-webapp/src/main/resources/org/onebusaway/sms/application-context-webapp.xml
@@ -23,7 +23,7 @@
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
- http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-4.2.xsd">
+ http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-5.3.xsd">
diff --git a/onebusaway-sms-webapp/src/main/resources/struts-onebusaway-sms-webapp.xml b/onebusaway-sms-webapp/src/main/resources/struts-onebusaway-sms-webapp.xml
index b982bc9f0c..923d3d089b 100644
--- a/onebusaway-sms-webapp/src/main/resources/struts-onebusaway-sms-webapp.xml
+++ b/onebusaway-sms-webapp/src/main/resources/struts-onebusaway-sms-webapp.xml
@@ -18,7 +18,7 @@
-->
+ "http://struts.apache.org/dtds/struts-2.5.dtd">
diff --git a/onebusaway-sms-webapp/src/main/resources/struts.xml b/onebusaway-sms-webapp/src/main/resources/struts.xml
index 241c33d1af..026dfb3b02 100644
--- a/onebusaway-sms-webapp/src/main/resources/struts.xml
+++ b/onebusaway-sms-webapp/src/main/resources/struts.xml
@@ -18,7 +18,7 @@
-->
+ "http://struts.apache.org/dtds/struts-2.5.dtd">
diff --git a/onebusaway-sms-webapp/src/main/webapp/WEB-INF/content/sms/arrivals-and-departures.jspx b/onebusaway-sms-webapp/src/main/webapp/WEB-INF/content/sms/arrivals-and-departures.jspx
index 1aad9b21b6..3f6014a816 100644
--- a/onebusaway-sms-webapp/src/main/webapp/WEB-INF/content/sms/arrivals-and-departures.jspx
+++ b/onebusaway-sms-webapp/src/main/webapp/WEB-INF/content/sms/arrivals-and-departures.jspx
@@ -18,7 +18,7 @@
-->
-
+
Real-Time Arrival Information
diff --git a/onebusaway-sms-webapp/src/main/webapp/WEB-INF/web.xml b/onebusaway-sms-webapp/src/main/webapp/WEB-INF/web.xml
index 7453c1f865..6c503dcd1f 100644
--- a/onebusaway-sms-webapp/src/main/webapp/WEB-INF/web.xml
+++ b/onebusaway-sms-webapp/src/main/webapp/WEB-INF/web.xml
@@ -38,7 +38,7 @@
struts-prepare-and-execute
- org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
+ org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter
struts-prepare-and-execute
diff --git a/onebusaway-status-agent/pom.xml b/onebusaway-status-agent/pom.xml
index 949da0226e..5df72716b6 100644
--- a/onebusaway-status-agent/pom.xml
+++ b/onebusaway-status-agent/pom.xml
@@ -3,7 +3,7 @@
onebusaway-application-modules
org.onebusaway
- 2.0.79-cs-SNAPSHOT
+ 2.1.12-cs-SNAPSHOT
4.0.0
jar
@@ -18,14 +18,13 @@
3.0.1
- org.codehaus.jackson
- jackson-mapper-asl
- 1.9.2
+ com.fasterxml.jackson.core
+ jackson-databind
+ ${jackson-version}
mysql
mysql-connector-java
- 5.1.17
diff --git a/onebusaway-status-agent/src/main/java/org/onebusaway/statusagent/StatusAgentMain.java b/onebusaway-status-agent/src/main/java/org/onebusaway/statusagent/StatusAgentMain.java
index bda4c50482..11ae3b6ecf 100644
--- a/onebusaway-status-agent/src/main/java/org/onebusaway/statusagent/StatusAgentMain.java
+++ b/onebusaway-status-agent/src/main/java/org/onebusaway/statusagent/StatusAgentMain.java
@@ -30,7 +30,7 @@
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;
-import org.codehaus.jackson.map.ObjectMapper;
+import com.fasterxml.jackson.databind.ObjectMapper;
import org.onebusaway.statusagent.model.IcingaResponse;
import org.onebusaway.statusagent.model.IcingaItem;
diff --git a/onebusaway-status-agent/src/main/java/org/onebusaway/statusagent/model/IcingaItem.java b/onebusaway-status-agent/src/main/java/org/onebusaway/statusagent/model/IcingaItem.java
index bfd40e70d6..7daa4ace11 100644
--- a/onebusaway-status-agent/src/main/java/org/onebusaway/statusagent/model/IcingaItem.java
+++ b/onebusaway-status-agent/src/main/java/org/onebusaway/statusagent/model/IcingaItem.java
@@ -15,7 +15,7 @@
*/
package org.onebusaway.statusagent.model;
-import org.codehaus.jackson.annotate.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonProperty;
public class IcingaItem {
diff --git a/onebusaway-transit-data-federation-builder/pom.xml b/onebusaway-transit-data-federation-builder/pom.xml
index bd3967b6d6..93c22a1f50 100644
--- a/onebusaway-transit-data-federation-builder/pom.xml
+++ b/onebusaway-transit-data-federation-builder/pom.xml
@@ -3,7 +3,7 @@
onebusaway-application-modules
org.onebusaway
- 2.0.79-cs-SNAPSHOT
+ 2.1.12-cs-SNAPSHOT
onebusaway-transit-data-federation-builder
diff --git a/onebusaway-transit-data-federation-builder/src/main/java/org/onebusaway/transit_data_federation/bundle/tasks/stif/NonRevenueStopData.java b/onebusaway-transit-data-federation-builder/src/main/java/org/onebusaway/transit_data_federation/bundle/tasks/stif/NonRevenueStopData.java
index eb563bd7ab..3d34b2d13b 100644
--- a/onebusaway-transit-data-federation-builder/src/main/java/org/onebusaway/transit_data_federation/bundle/tasks/stif/NonRevenueStopData.java
+++ b/onebusaway-transit-data-federation-builder/src/main/java/org/onebusaway/transit_data_federation/bundle/tasks/stif/NonRevenueStopData.java
@@ -17,7 +17,7 @@
import java.io.Serializable;
-import com.vividsolutions.jts.geom.Coordinate;
+import org.locationtech.jts.geom.Coordinate;
public class NonRevenueStopData implements Serializable {
diff --git a/onebusaway-transit-data-federation-builder/src/main/java/org/onebusaway/transit_data_federation/bundle/tasks/stif/StifTripLoader.java b/onebusaway-transit-data-federation-builder/src/main/java/org/onebusaway/transit_data_federation/bundle/tasks/stif/StifTripLoader.java
index b82857e3f2..5a7d9c82b7 100644
--- a/onebusaway-transit-data-federation-builder/src/main/java/org/onebusaway/transit_data_federation/bundle/tasks/stif/StifTripLoader.java
+++ b/onebusaway-transit-data-federation-builder/src/main/java/org/onebusaway/transit_data_federation/bundle/tasks/stif/StifTripLoader.java
@@ -43,8 +43,8 @@
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
-import com.vividsolutions.jts.geom.Coordinate;
-import com.vividsolutions.jts.geom.GeometryFactory;
+import org.locationtech.jts.geom.Coordinate;
+import org.locationtech.jts.geom.GeometryFactory;
/**
* Create a mapping from Destination Sign Code (DSC) to GTFS Trip objects using
diff --git a/onebusaway-transit-data-federation-builder/src/main/java/org/onebusaway/transit_data_federation/bundle/tasks/transit_graph/StopTimeEntriesFactory.java b/onebusaway-transit-data-federation-builder/src/main/java/org/onebusaway/transit_data_federation/bundle/tasks/transit_graph/StopTimeEntriesFactory.java
index 7f77739fa9..cdf9c08f5a 100644
--- a/onebusaway-transit-data-federation-builder/src/main/java/org/onebusaway/transit_data_federation/bundle/tasks/transit_graph/StopTimeEntriesFactory.java
+++ b/onebusaway-transit-data-federation-builder/src/main/java/org/onebusaway/transit_data_federation/bundle/tasks/transit_graph/StopTimeEntriesFactory.java
@@ -469,7 +469,7 @@ private double[] getDistanceTraveledForStopTimes(
*
* @param stopTimes
* @param distances
- * @param arrivalTimesByDistanceTraveled
+ * @param scheduleTimesByDistanceTraveled
*/
private void populateArrivalAndDepartureTimesByDistanceTravelledForStopTimes(
List stopTimes, double[] distances,
diff --git a/onebusaway-transit-data-federation-builder/src/main/java/org/onebusaway/transit_data_federation/bundle/utilities/GtfsComputePolylineBoundaryForStopsMain.java b/onebusaway-transit-data-federation-builder/src/main/java/org/onebusaway/transit_data_federation/bundle/utilities/GtfsComputePolylineBoundaryForStopsMain.java
index 75108dee30..2368bdfe10 100644
--- a/onebusaway-transit-data-federation-builder/src/main/java/org/onebusaway/transit_data_federation/bundle/utilities/GtfsComputePolylineBoundaryForStopsMain.java
+++ b/onebusaway-transit-data-federation-builder/src/main/java/org/onebusaway/transit_data_federation/bundle/utilities/GtfsComputePolylineBoundaryForStopsMain.java
@@ -37,13 +37,13 @@
import org.onebusaway.gtfs.serialization.GtfsReader;
import org.onebusaway.transit_data_federation.bundle.model.GtfsBundle;
-import com.vividsolutions.jts.geom.Coordinate;
-import com.vividsolutions.jts.geom.Geometry;
-import com.vividsolutions.jts.geom.GeometryFactory;
-import com.vividsolutions.jts.geom.LineString;
-import com.vividsolutions.jts.geom.MultiPolygon;
-import com.vividsolutions.jts.geom.Point;
-import com.vividsolutions.jts.geom.Polygon;
+import org.locationtech.jts.geom.Coordinate;
+import org.locationtech.jts.geom.Geometry;
+import org.locationtech.jts.geom.GeometryFactory;
+import org.locationtech.jts.geom.LineString;
+import org.locationtech.jts.geom.MultiPolygon;
+import org.locationtech.jts.geom.Point;
+import org.locationtech.jts.geom.Polygon;
/**
* Utility script to compute a polygon boundary for the set of stops in a GTFS,
diff --git a/onebusaway-transit-data-federation-builder/src/main/java/org/onebusaway/transit_data_federation/bundle/utilities/GtfsStopsInPolygonMain.java b/onebusaway-transit-data-federation-builder/src/main/java/org/onebusaway/transit_data_federation/bundle/utilities/GtfsStopsInPolygonMain.java
index 20c3205e0b..0f7799d3b6 100644
--- a/onebusaway-transit-data-federation-builder/src/main/java/org/onebusaway/transit_data_federation/bundle/utilities/GtfsStopsInPolygonMain.java
+++ b/onebusaway-transit-data-federation-builder/src/main/java/org/onebusaway/transit_data_federation/bundle/utilities/GtfsStopsInPolygonMain.java
@@ -27,11 +27,11 @@
import org.onebusaway.gtfs.model.Stop;
import org.onebusaway.gtfs.serialization.GtfsReader;
-import com.vividsolutions.jts.geom.Coordinate;
-import com.vividsolutions.jts.geom.Geometry;
-import com.vividsolutions.jts.geom.GeometryFactory;
-import com.vividsolutions.jts.geom.LinearRing;
-import com.vividsolutions.jts.geom.Point;
+import org.locationtech.jts.geom.Coordinate;
+import org.locationtech.jts.geom.Geometry;
+import org.locationtech.jts.geom.GeometryFactory;
+import org.locationtech.jts.geom.LinearRing;
+import org.locationtech.jts.geom.Point;
/**
* Utility script to compute the set of stops from a gtfs feed that fall within
diff --git a/onebusaway-transit-data-federation-builder/src/test/java/org/onebusaway/transit_data_federation/bundle/tasks/ShapeGeospatialIndexTaskTest.java b/onebusaway-transit-data-federation-builder/src/test/java/org/onebusaway/transit_data_federation/bundle/tasks/ShapeGeospatialIndexTaskTest.java
index 229c75d56c..fa025c20ec 100644
--- a/onebusaway-transit-data-federation-builder/src/test/java/org/onebusaway/transit_data_federation/bundle/tasks/ShapeGeospatialIndexTaskTest.java
+++ b/onebusaway-transit-data-federation-builder/src/test/java/org/onebusaway/transit_data_federation/bundle/tasks/ShapeGeospatialIndexTaskTest.java
@@ -16,6 +16,7 @@
package org.onebusaway.transit_data_federation.bundle.tasks;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
import static org.onebusaway.transit_data_federation.testing.UnitTestingSupport.aid;
import static org.onebusaway.transit_data_federation.testing.UnitTestingSupport.*;
@@ -103,24 +104,46 @@ public void test() throws IOException, ClassNotFoundException {
Mockito.verify(refreshService).refresh(
RefreshableResources.SHAPE_GEOSPATIAL_INDEX);
+ // results are 5 cells bounding the two shapes:
+ //http://developer.onebusaway.org/images/ShapeGeospatialIndexTaskTest.png
Map> shapeIdsByBounds = ObjectSerializationLibrary.readObject(path);
assertEquals(5, shapeIdsByBounds.size());
- CoordinateBounds b = new CoordinateBounds(47.65048049686506,
- -122.30767397879845, 47.654977097836735, -122.300997795721);
+// CoordinateBounds b = new CoordinateBounds(47.65048049686506,
+// -122.30767397879845, 47.654977097836735, -122.300997795721);
+ // in java11 the precision of this bounding box changed, perhaps due to changes in sin/cos calculation
+ CoordinateBounds b = new CoordinateBounds(47.65048049678976,-122.30767397879845,
+ 47.65497709776143,-122.300997795721);
+ assertEquals(shapeIdA.toString(), "1_shapeA");
+ assertNotNull(shapeIdsByBounds.get(b));
assertEquals(Arrays.asList(shapeIdA), shapeIdsByBounds.get(b));
- b = new CoordinateBounds(47.65947369880841, -122.32102634495334,
- 47.66397029978009, -122.3143501618759);
+// b = new CoordinateBounds(47.65947369880841, -122.32102634495334,
+// 47.66397029978009, -122.3143501618759);
+ // in java11 the precision of this bounding box changed, perhaps due to changes in sin/cos calculation
+ b = new CoordinateBounds(47.6594736987331,-122.32102634495334,
+ 47.66397029970477,-122.3143501618759);
assertEquals(Arrays.asList(shapeIdB), shapeIdsByBounds.get(b));
- b = new CoordinateBounds(47.66397029978009, -122.32770252803078,
- 47.66846690075177, -122.32102634495334);
+// b = new CoordinateBounds(47.66397029978009, -122.32770252803078,
+// 47.66846690075177, -122.32102634495334);
+ // in java11 the precision of this bounding box changed, perhaps due to changes in sin/cos calculation
+ b = new CoordinateBounds(47.66397029970477,-122.32770252803078,
+ 47.66846690067644,-122.32102634495334);
+
assertEquals(Arrays.asList(shapeIdB), shapeIdsByBounds.get(b));
- b = new CoordinateBounds(47.65947369880841, -122.3143501618759,
- 47.66397029978009, -122.30767397879845);
+// b = new CoordinateBounds(47.65947369880841, -122.3143501618759,
+// 47.66397029978009, -122.30767397879845);
+ // in java11 the precision of this bounding box changed, perhaps due to changes in sin/cos calculation
+ b = new CoordinateBounds(47.6594736987331,-122.3143501618759,
+ 47.66397029970477,-122.30767397879845);
+
assertEquals(Arrays.asList(shapeIdB), shapeIdsByBounds.get(b));
- b = new CoordinateBounds(47.65947369880841, -122.32770252803078,
- 47.66397029978009, -122.32102634495334);
+// b = new CoordinateBounds(47.65947369880841, -122.32770252803078,
+// 47.66397029978009, -122.32102634495334);
+ // in java11 the precision of this bounding box changed, perhaps due to changes in sin/cos calculation
+ b = new CoordinateBounds(47.6594736987331,-122.32770252803078,
+ 47.66397029970477,-122.32102634495334);
+
assertEquals(Arrays.asList(shapeIdB), shapeIdsByBounds.get(b));
}
}
diff --git a/onebusaway-transit-data-federation-webapp/pom.xml b/onebusaway-transit-data-federation-webapp/pom.xml
index 06f41b9952..52674b9867 100644
--- a/onebusaway-transit-data-federation-webapp/pom.xml
+++ b/onebusaway-transit-data-federation-webapp/pom.xml
@@ -3,7 +3,7 @@
org.onebusaway
onebusaway-application-modules
- 2.0.79-cs-SNAPSHOT
+ 2.1.12-cs-SNAPSHOT
onebusaway-transit-data-federation-webapp
war
@@ -23,11 +23,6 @@
onebusaway-siri-core
${onebusaway-siri-version}
-
- mysql
- mysql-connector-java
- 5.1.17
-
com.caucho
@@ -82,7 +77,6 @@
mysql
mysql-connector-java
- 5.1.17
diff --git a/onebusaway-transit-data-federation-webapp/src/main/java/org/onebusaway/transit_data_federation_webapp/controllers/BoundingBoxController.java b/onebusaway-transit-data-federation-webapp/src/main/java/org/onebusaway/transit_data_federation_webapp/controllers/BoundingBoxController.java
index 47ae87fbba..eb95a68a46 100644
--- a/onebusaway-transit-data-federation-webapp/src/main/java/org/onebusaway/transit_data_federation_webapp/controllers/BoundingBoxController.java
+++ b/onebusaway-transit-data-federation-webapp/src/main/java/org/onebusaway/transit_data_federation_webapp/controllers/BoundingBoxController.java
@@ -19,11 +19,11 @@
import java.util.List;
import java.util.Map;
-import com.vividsolutions.jts.geom.Envelope;
-import com.vividsolutions.jts.geom.Geometry;
-import com.vividsolutions.jts.geom.GeometryFactory;
-import com.vividsolutions.jts.geom.MultiPolygon;
-import com.vividsolutions.jts.geom.Polygon;
+import org.locationtech.jts.geom.Envelope;
+import org.locationtech.jts.geom.Geometry;
+import org.locationtech.jts.geom.GeometryFactory;
+import org.locationtech.jts.geom.MultiPolygon;
+import org.locationtech.jts.geom.Polygon;
import org.onebusaway.geospatial.model.CoordinateBounds;
import org.onebusaway.transit_data_federation.services.AgencyService;
diff --git a/onebusaway-transit-data-federation-webapp/src/main/resources/data-sources.xml b/onebusaway-transit-data-federation-webapp/src/main/resources/data-sources.xml
index 0360a06a9f..dd1ba89a81 100644
--- a/onebusaway-transit-data-federation-webapp/src/main/resources/data-sources.xml
+++ b/onebusaway-transit-data-federation-webapp/src/main/resources/data-sources.xml
@@ -48,7 +48,7 @@ http://www.springframework.org/schema/context http://www.springframework.org/sch
-
+
diff --git a/onebusaway-transit-data-federation-webapp/src/main/resources/log4j.xml b/onebusaway-transit-data-federation-webapp/src/main/resources/log4j.xml
index 9c2d93afac..909f357de1 100644
--- a/onebusaway-transit-data-federation-webapp/src/main/resources/log4j.xml
+++ b/onebusaway-transit-data-federation-webapp/src/main/resources/log4j.xml
@@ -26,7 +26,7 @@
-
+
diff --git a/onebusaway-transit-data-federation-webapp/src/main/resources/org/onebusaway/transit_data_federation/application-context-webapp.xml b/onebusaway-transit-data-federation-webapp/src/main/resources/org/onebusaway/transit_data_federation/application-context-webapp.xml
index dc9df5692f..41b288f2b9 100644
--- a/onebusaway-transit-data-federation-webapp/src/main/resources/org/onebusaway/transit_data_federation/application-context-webapp.xml
+++ b/onebusaway-transit-data-federation-webapp/src/main/resources/org/onebusaway/transit_data_federation/application-context-webapp.xml
@@ -23,7 +23,7 @@
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
- http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-4.2.xsd">
+ http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-5.3.xsd">
diff --git a/onebusaway-transit-data-federation-webapp/src/main/webapp/WEB-INF/remoting-servlet-extra.xml b/onebusaway-transit-data-federation-webapp/src/main/webapp/WEB-INF/remoting-servlet-extra.xml
index 63ac88de06..cb7197e2dc 100644
--- a/onebusaway-transit-data-federation-webapp/src/main/webapp/WEB-INF/remoting-servlet-extra.xml
+++ b/onebusaway-transit-data-federation-webapp/src/main/webapp/WEB-INF/remoting-servlet-extra.xml
@@ -19,16 +19,29 @@
+ xmlns:mvc="http://www.springframework.org/schema/mvc"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
+ http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
+ http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
+ http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security.xsd
+ http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
-
+
diff --git a/onebusaway-transit-data-federation-webapp/src/main/webapp/WEB-INF/remoting-servlet.xml b/onebusaway-transit-data-federation-webapp/src/main/webapp/WEB-INF/remoting-servlet.xml
index 93a633c4ab..b96aa7f0e3 100644
--- a/onebusaway-transit-data-federation-webapp/src/main/webapp/WEB-INF/remoting-servlet.xml
+++ b/onebusaway-transit-data-federation-webapp/src/main/webapp/WEB-INF/remoting-servlet.xml
@@ -20,21 +20,19 @@
xmlns:context="http://www.springframework.org/schema/context" xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:sec="http://www.springframework.org/schema/security"
xmlns:mvc="http://www.springframework.org/schema/mvc"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
- http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
- http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
- http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
- http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-4.2.xsd
- http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd">
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
+ http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
+ http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
+ http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security.xsd
+ http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
-
-
diff --git a/onebusaway-transit-data-federation/pom.xml b/onebusaway-transit-data-federation/pom.xml
index 4ae6b2b4c2..f28c942502 100644
--- a/onebusaway-transit-data-federation/pom.xml
+++ b/onebusaway-transit-data-federation/pom.xml
@@ -3,7 +3,7 @@
org.onebusaway
onebusaway-application-modules
- 2.0.79-cs-SNAPSHOT
+ 2.1.12-cs-SNAPSHOT
onebusaway-transit-data-federation
jar
@@ -57,14 +57,24 @@
${onebusaway-siri-2-api-version}
- org.codehaus.jackson
- jackson-mapper-asl
- 1.9.2
+ com.fasterxml.jackson.core
+ jackson-core
+ ${jackson-version}
- org.codehaus.jackson
- jackson-jaxrs
- 1.9.2
+ com.fasterxml.jackson.core
+ jackson-databind
+ ${jackson-version}
+
+
+ com.fasterxml.jackson.jaxrs
+ jackson-jaxrs-json-provider
+ ${jackson-version}
+
+
+ com.fasterxml.jackson.module
+ jackson-module-jaxb-annotations
+ ${jackson-version}
@@ -145,13 +155,23 @@
joda-time
joda-time
2.0
-
+
- org.codehaus.jackson
- jackson-xc
- 1.9.2
+ com.fasterxml.jackson.module
+ jackson-module-jaxb-annotations
+ ${jackson-version}
+
+
+
+ jakarta.xml.bind
+ jakarta.xml.bind-api
+ 2.3.3
+
+
+ org.glassfish.jaxb
+ jaxb-runtime
+ 2.3.3
-
com.jcraft
diff --git a/onebusaway-transit-data-federation/src/main/java/org/onebusaway/transit_data_federation/impl/WhereGeospatialServiceImpl.java b/onebusaway-transit-data-federation/src/main/java/org/onebusaway/transit_data_federation/impl/WhereGeospatialServiceImpl.java
index b8096ac8b2..475157281b 100644
--- a/onebusaway-transit-data-federation/src/main/java/org/onebusaway/transit_data_federation/impl/WhereGeospatialServiceImpl.java
+++ b/onebusaway-transit-data-federation/src/main/java/org/onebusaway/transit_data_federation/impl/WhereGeospatialServiceImpl.java
@@ -16,6 +16,7 @@
*/
package org.onebusaway.transit_data_federation.impl;
+import org.locationtech.jts.index.strtree.STRtree;
import org.onebusaway.container.refresh.Refreshable;
import org.onebusaway.geospatial.model.CoordinateBounds;
import org.onebusaway.gtfs.model.AgencyAndId;
@@ -24,9 +25,8 @@
import org.onebusaway.transit_data_federation.services.transit_graph.StopEntry;
import org.onebusaway.transit_data_federation.services.transit_graph.TransitGraphDao;
-import com.vividsolutions.jts.geom.Envelope;
-import com.vividsolutions.jts.index.ItemVisitor;
-import com.vividsolutions.jts.index.strtree.STRtree;
+import org.locationtech.jts.geom.Envelope;
+import org.locationtech.jts.index.ItemVisitor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/onebusaway-transit-data-federation/src/main/java/org/onebusaway/transit_data_federation/impl/beans/RoutesBeanServiceImpl.java b/onebusaway-transit-data-federation/src/main/java/org/onebusaway/transit_data_federation/impl/beans/RoutesBeanServiceImpl.java
index ac77f9e885..01d9b0f4d4 100644
--- a/onebusaway-transit-data-federation/src/main/java/org/onebusaway/transit_data_federation/impl/beans/RoutesBeanServiceImpl.java
+++ b/onebusaway-transit-data-federation/src/main/java/org/onebusaway/transit_data_federation/impl/beans/RoutesBeanServiceImpl.java
@@ -17,6 +17,9 @@
package org.onebusaway.transit_data_federation.impl.beans;
import org.apache.lucene.queryparser.classic.ParseException;
+import org.locationtech.jts.geom.Envelope;
+import org.locationtech.jts.index.ItemVisitor;
+import org.locationtech.jts.index.strtree.STRtree;
import org.onebusaway.container.cache.Cacheable;
import org.onebusaway.container.refresh.Refreshable;
import org.onebusaway.exceptions.InvalidArgumentServiceException;
@@ -43,23 +46,13 @@
import org.onebusaway.transit_data_federation.services.transit_graph.StopEntry;
import org.onebusaway.transit_data_federation.services.transit_graph.TransitGraphDao;
-import com.vividsolutions.jts.geom.Envelope;
-import com.vividsolutions.jts.index.ItemVisitor;
-import com.vividsolutions.jts.index.strtree.STRtree;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
+import java.util.*;
import javax.annotation.PostConstruct;
diff --git a/onebusaway-transit-data-federation/src/main/java/org/onebusaway/transit_data_federation/impl/beans/TripStopTimesBeanServiceImpl.java b/onebusaway-transit-data-federation/src/main/java/org/onebusaway/transit_data_federation/impl/beans/TripStopTimesBeanServiceImpl.java
index 05882fe24a..84f2a69904 100644
--- a/onebusaway-transit-data-federation/src/main/java/org/onebusaway/transit_data_federation/impl/beans/TripStopTimesBeanServiceImpl.java
+++ b/onebusaway-transit-data-federation/src/main/java/org/onebusaway/transit_data_federation/impl/beans/TripStopTimesBeanServiceImpl.java
@@ -131,6 +131,8 @@ private TripStopTimesBean getStopTimesForTrip(TripEntry trip, long serviceDate)
StopBean stopBean = _stopBeanService.getStopForId(stopEntry.getId(), null);
stBean.setStop(stopBean);
stBean.setDistanceAlongTrip(stopTime.getShapeDistTraveled());
+ stBean.setGtfsSequence(stopTime.getGtfsSequence());
+
List rid = _ridershipService.getHistoricalRiderships(trip.getRoute().getId(), trip.getId(), stopEntry.getId(), serviceDate);
if(rid != null && rid.size() > 0) stBean.setHistoricalOccupancy(OccupancyStatus.toEnum(rid.get(0).getLoadFactor()));
diff --git a/onebusaway-transit-data-federation/src/main/java/org/onebusaway/transit_data_federation/impl/blocks/BlockGeospatialServiceImpl.java b/onebusaway-transit-data-federation/src/main/java/org/onebusaway/transit_data_federation/impl/blocks/BlockGeospatialServiceImpl.java
index 33b6d5419a..760a8c04ca 100644
--- a/onebusaway-transit-data-federation/src/main/java/org/onebusaway/transit_data_federation/impl/blocks/BlockGeospatialServiceImpl.java
+++ b/onebusaway-transit-data-federation/src/main/java/org/onebusaway/transit_data_federation/impl/blocks/BlockGeospatialServiceImpl.java
@@ -28,6 +28,8 @@
import javax.annotation.PostConstruct;
+import org.locationtech.jts.geom.Envelope;
+import org.locationtech.jts.index.strtree.STRtree;
import org.onebusaway.collections.CollectionsLibrary;
import org.onebusaway.collections.MappingLibrary;
import org.onebusaway.collections.Min;
@@ -67,9 +69,6 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
-import com.vividsolutions.jts.geom.Envelope;
-import com.vividsolutions.jts.index.strtree.STRtree;
-
@Component
class BlockGeospatialServiceImpl implements BlockGeospatialService {
diff --git a/onebusaway-transit-data-federation/src/main/java/org/onebusaway/transit_data_federation/impl/bundle/LocalBundleStoreImpl.java b/onebusaway-transit-data-federation/src/main/java/org/onebusaway/transit_data_federation/impl/bundle/LocalBundleStoreImpl.java
index 41d2e4a7bc..e0c372600d 100644
--- a/onebusaway-transit-data-federation/src/main/java/org/onebusaway/transit_data_federation/impl/bundle/LocalBundleStoreImpl.java
+++ b/onebusaway-transit-data-federation/src/main/java/org/onebusaway/transit_data_federation/impl/bundle/LocalBundleStoreImpl.java
@@ -16,14 +16,13 @@
package org.onebusaway.transit_data_federation.impl.bundle;
-import org.codehaus.jackson.map.DeserializationConfig;
-import org.codehaus.jackson.map.ObjectMapper;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
import org.joda.time.DateTime;
import org.onebusaway.gtfs.model.AgencyAndId;
import org.onebusaway.gtfs.model.calendar.CalendarServiceData;
import org.onebusaway.gtfs.model.calendar.ServiceDate;
import org.onebusaway.transit_data.model.config.BundleMetadata;
-import org.onebusaway.transit_data_federation.impl.config.BundleConfigDao;
import org.onebusaway.transit_data_federation.model.bundle.BundleItem;
import org.onebusaway.transit_data_federation.services.bundle.BundleStoreService;
import org.onebusaway.utility.ObjectSerializationLibrary;
@@ -119,7 +118,7 @@ private BundleItem createBundleItem(File calendarServiceObjectFile, File metadat
ServiceDate maxServiceDate = null;
try {
ObjectMapper mapper = new ObjectMapper();
- mapper.configure(DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
BundleMetadata meta = null;
meta = mapper.readValue(metadataFile, BundleMetadata.class);
diff --git a/onebusaway-transit-data-federation/src/main/java/org/onebusaway/transit_data_federation/impl/config/BundleConfigDao.java b/onebusaway-transit-data-federation/src/main/java/org/onebusaway/transit_data_federation/impl/config/BundleConfigDao.java
index 5d3721dee7..5170da2d7b 100644
--- a/onebusaway-transit-data-federation/src/main/java/org/onebusaway/transit_data_federation/impl/config/BundleConfigDao.java
+++ b/onebusaway-transit-data-federation/src/main/java/org/onebusaway/transit_data_federation/impl/config/BundleConfigDao.java
@@ -21,8 +21,8 @@
import javax.annotation.PostConstruct;
-import org.codehaus.jackson.map.DeserializationConfig;
-import org.codehaus.jackson.map.ObjectMapper;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
import org.onebusaway.container.refresh.Refreshable;
import org.onebusaway.transit_data.model.config.BundleMetadata;
import org.onebusaway.transit_data_federation.impl.RefreshableResources;
@@ -59,7 +59,7 @@ public void setup() throws IOException, ClassNotFoundException {
_log.info("looking for metadata file " + path);
if (path.exists()) {
ObjectMapper mapper = new ObjectMapper();
- mapper.configure(DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
BundleMetadata meta = null;
try {
meta = mapper.readValue(path, BundleMetadata.class);
diff --git a/onebusaway-transit-data-federation/src/main/java/org/onebusaway/transit_data_federation/impl/federated/TransitDataServiceTemplateImpl.java b/onebusaway-transit-data-federation/src/main/java/org/onebusaway/transit_data_federation/impl/federated/TransitDataServiceTemplateImpl.java
index 8b238cbf87..c1881f661a 100644
--- a/onebusaway-transit-data-federation/src/main/java/org/onebusaway/transit_data_federation/impl/federated/TransitDataServiceTemplateImpl.java
+++ b/onebusaway-transit-data-federation/src/main/java/org/onebusaway/transit_data_federation/impl/federated/TransitDataServiceTemplateImpl.java
@@ -59,6 +59,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
import java.util.*;
diff --git a/onebusaway-transit-data-federation/src/main/java/org/onebusaway/transit_data_federation/impl/realtime/BlockLocationServiceImpl.java b/onebusaway-transit-data-federation/src/main/java/org/onebusaway/transit_data_federation/impl/realtime/BlockLocationServiceImpl.java
index 9273f6f5d6..e906444487 100644
--- a/onebusaway-transit-data-federation/src/main/java/org/onebusaway/transit_data_federation/impl/realtime/BlockLocationServiceImpl.java
+++ b/onebusaway-transit-data-federation/src/main/java/org/onebusaway/transit_data_federation/impl/realtime/BlockLocationServiceImpl.java
@@ -18,7 +18,6 @@
*/
package org.onebusaway.transit_data_federation.impl.realtime;
-import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
@@ -42,7 +41,6 @@
import org.onebusaway.container.ConfigurationParameter;
import org.onebusaway.geospatial.model.CoordinatePoint;
import org.onebusaway.gtfs.model.AgencyAndId;
-import org.onebusaway.realtime.api.EVehicleStatus;
import org.onebusaway.realtime.api.EVehicleType;
import org.onebusaway.realtime.api.TimepointPredictionRecord;
import org.onebusaway.realtime.api.VehicleLocationRecord;
diff --git a/onebusaway-transit-data-federation/src/main/java/org/onebusaway/transit_data_federation/impl/transit_graph/TransitGraphImpl.java b/onebusaway-transit-data-federation/src/main/java/org/onebusaway/transit_data_federation/impl/transit_graph/TransitGraphImpl.java
index 2cb914baae..28f60abdf4 100644
--- a/onebusaway-transit-data-federation/src/main/java/org/onebusaway/transit_data_federation/impl/transit_graph/TransitGraphImpl.java
+++ b/onebusaway-transit-data-federation/src/main/java/org/onebusaway/transit_data_federation/impl/transit_graph/TransitGraphImpl.java
@@ -42,9 +42,9 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.vividsolutions.jts.geom.Envelope;
-import com.vividsolutions.jts.index.ItemVisitor;
-import com.vividsolutions.jts.index.strtree.STRtree;
+import org.locationtech.jts.geom.Envelope;
+import org.locationtech.jts.index.ItemVisitor;
+import org.locationtech.jts.index.strtree.STRtree;
public class TransitGraphImpl implements Serializable, TransitGraph {
diff --git a/onebusaway-transit-data-federation/src/main/java/org/onebusaway/transit_data_federation/model/StopSequenceCollection.java b/onebusaway-transit-data-federation/src/main/java/org/onebusaway/transit_data_federation/model/StopSequenceCollection.java
index f4166cb7ea..f6f260b6c9 100644
--- a/onebusaway-transit-data-federation/src/main/java/org/onebusaway/transit_data_federation/model/StopSequenceCollection.java
+++ b/onebusaway-transit-data-federation/src/main/java/org/onebusaway/transit_data_federation/model/StopSequenceCollection.java
@@ -17,11 +17,10 @@
import java.util.List;
+import org.locationtech.jts.geom.Point;
import org.onebusaway.container.model.IdentityBean;
import org.onebusaway.transit_data_federation.services.StopSequenceCollectionService;
-import com.vividsolutions.jts.geom.Point;
-
/**
* A stop sequence collection contains a list of {@link StopSequence} sequences
* that are headed in the same direction for a particular
diff --git a/onebusaway-transit-data-federation/src/main/java/org/onebusaway/transit_data_federation/siri/SiriJsonSerializer.java b/onebusaway-transit-data-federation/src/main/java/org/onebusaway/transit_data_federation/siri/SiriJsonSerializer.java
index 85929f010f..6c399e639a 100644
--- a/onebusaway-transit-data-federation/src/main/java/org/onebusaway/transit_data_federation/siri/SiriJsonSerializer.java
+++ b/onebusaway-transit-data-federation/src/main/java/org/onebusaway/transit_data_federation/siri/SiriJsonSerializer.java
@@ -15,23 +15,26 @@
*/
package org.onebusaway.transit_data_federation.siri;
-import org.codehaus.jackson.JsonGenerationException;
-import org.codehaus.jackson.JsonGenerator;
-import org.codehaus.jackson.Version;
-import org.codehaus.jackson.map.AnnotationIntrospector;
-import org.codehaus.jackson.map.BeanPropertyDefinition;
-import org.codehaus.jackson.map.JsonSerializer;
-import org.codehaus.jackson.map.Module;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jackson.map.SerializationConfig;
-import org.codehaus.jackson.map.SerializerProvider;
-import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
-import org.codehaus.jackson.map.introspect.BasicBeanDescription;
-import org.codehaus.jackson.map.ser.BeanSerializer;
-import org.codehaus.jackson.map.ser.BeanSerializerModifier;
-import org.codehaus.jackson.map.ser.std.BeanSerializerBase;
-import org.codehaus.jackson.xc.JaxbAnnotationIntrospector;
+import com.fasterxml.jackson.core.JsonGenerationException;
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.Version;
+import com.fasterxml.jackson.databind.BeanDescription;
+import com.fasterxml.jackson.databind.*;
+import com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition;
+import com.fasterxml.jackson.databind.JsonSerializer;
+import com.fasterxml.jackson.databind.Module;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializationConfig;
+import com.fasterxml.jackson.databind.SerializationFeature;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import com.fasterxml.jackson.databind.ser.BeanPropertyWriter;
+import com.fasterxml.jackson.databind.ser.BeanSerializer;
+import com.fasterxml.jackson.databind.ser.BeanSerializerModifier;
+import com.fasterxml.jackson.databind.ser.impl.ObjectIdWriter;
+import com.fasterxml.jackson.databind.ser.std.BeanSerializerBase;
+import com.fasterxml.jackson.module.jaxb.JaxbAnnotationModule;
import org.springframework.util.ReflectionUtils;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
import uk.org.siri.siri.Siri;
@@ -41,6 +44,7 @@
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
+import java.util.Set;
/**
* Serializer for XSD-generated SIRI classes, creating JSON in the format suitable
@@ -76,32 +80,60 @@ public void serialize(Object bean, JsonGenerator jgen,
jgen.writeNull();
}
}
-
+
+ public BeanSerializerBase withObjectIdWriter(ObjectIdWriter var1) {
+ return null;
+ }
+
+ public BeanSerializerBase withFilterId(Object var1) {
+ return null;
+ }
+
+ @Override
+ protected BeanSerializerBase withProperties(BeanPropertyWriter[] beanPropertyWriters, BeanPropertyWriter[] beanPropertyWriters1) {
+ return null;
+ }
+
+ protected BeanSerializerBase withIgnorals(Set var1) {
+ return null;
+ }
+
+ @Override
+ protected BeanSerializerBase withByNameInclusion(Set set, Set set1) {
+ return null;
+ }
+
+ public BeanSerializerBase asArraySerializer() {
+ return null;
+ }
+
}
-
+
private static class CustomBeanSerializerModifier extends BeanSerializerModifier {
+
@Override
public JsonSerializer> modifySerializer(SerializationConfig config,
- BasicBeanDescription beanDesc, JsonSerializer> serializer) {
-
- if(serializer instanceof BeanSerializer) {
+ BeanDescription beanDesc, JsonSerializer> serializer) {
+
+
+ if (serializer instanceof BeanSerializer) {
List properties = beanDesc.findProperties();
for(BeanPropertyDefinition property : properties) {
- if(property.getName().equals("value") || property.getName().equals("any")) {
- String fieldName = property.getField().getName();
+ // Enums contain value property
+ if(property.getInternalName().equals("value") || property.getInternalName().equals("any")) {
+ String fieldName = property.getInternalName();
if(fieldName != null)
return super.modifySerializer(config, beanDesc, new CustomValueObjectSerializer((BeanSerializer)serializer, fieldName));
}
}
}
-
return super.modifySerializer(config, beanDesc, serializer);
}
}
- private static class JacksonModule extends Module {
+ private static class SiriJacksonModule extends Module {
private final static Version VERSION = new Version(1,0,0, null);
@Override
@@ -141,17 +173,18 @@ public String getJson(Siri siri) throws Exception {
public String getJson(Siri siri, String callback) throws Exception {
ObjectMapper mapper = new ObjectMapper();
- mapper.setSerializationInclusion(Inclusion.NON_NULL);
- mapper.configure(SerializationConfig.Feature.INDENT_OUTPUT, false);
- mapper.configure(SerializationConfig.Feature.WRAP_ROOT_VALUE, true);
-
+ mapper.setSerializationInclusion(Include.NON_EMPTY);
+ mapper.configure(SerializationFeature.INDENT_OUTPUT, false);
+ mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, true);
+ mapper.setPropertyNamingStrategy(PropertyNamingStrategies.UPPER_CAMEL_CASE);
mapper.setDateFormat(new RFC822SimpleDateFormat());
- AnnotationIntrospector introspector = new JaxbAnnotationIntrospector();
- SerializationConfig config = mapper.getSerializationConfig().withAnnotationIntrospector(introspector);
- mapper.setSerializationConfig(config);
+ // Method A: Standard registration -- Direct introspection not necessary
+ SiriJacksonModule module = new SiriJacksonModule();
+ mapper.registerModule(module);
- mapper.registerModule(new JacksonModule());
+ // Needed to process SIRI JAXB Annotations
+ mapper.registerModules(new JaxbAnnotationModule());
String output = "";
diff --git a/onebusaway-transit-data-federation/src/main/java/org/onebusaway/transit_data_federation/siri/SiriJsonSerializerV2.java b/onebusaway-transit-data-federation/src/main/java/org/onebusaway/transit_data_federation/siri/SiriJsonSerializerV2.java
index 76111cca11..5396920be6 100644
--- a/onebusaway-transit-data-federation/src/main/java/org/onebusaway/transit_data_federation/siri/SiriJsonSerializerV2.java
+++ b/onebusaway-transit-data-federation/src/main/java/org/onebusaway/transit_data_federation/siri/SiriJsonSerializerV2.java
@@ -21,24 +21,27 @@
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
-
-import org.codehaus.jackson.JsonGenerationException;
-import org.codehaus.jackson.JsonGenerator;
-import org.codehaus.jackson.Version;
-import org.codehaus.jackson.map.AnnotationIntrospector;
-import org.codehaus.jackson.map.BeanPropertyDefinition;
-import org.codehaus.jackson.map.JsonSerializer;
-import org.codehaus.jackson.map.Module;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jackson.map.SerializationConfig;
-import org.codehaus.jackson.map.SerializerProvider;
-import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
-import org.codehaus.jackson.map.introspect.BasicBeanDescription;
-import org.codehaus.jackson.map.ser.BeanSerializer;
-import org.codehaus.jackson.map.ser.BeanSerializerModifier;
-import org.codehaus.jackson.map.ser.std.BeanSerializerBase;
-import org.codehaus.jackson.xc.JaxbAnnotationIntrospector;
+import java.util.Set;
+
+import com.fasterxml.jackson.core.JsonGenerationException;
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.Version;
+import com.fasterxml.jackson.databind.BeanDescription;
+import com.fasterxml.jackson.databind.PropertyNamingStrategy;
+import com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition;
+import com.fasterxml.jackson.databind.JsonSerializer;
+import com.fasterxml.jackson.databind.Module;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializationConfig;
+import com.fasterxml.jackson.databind.SerializationFeature;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import com.fasterxml.jackson.databind.ser.BeanPropertyWriter;
+import com.fasterxml.jackson.databind.ser.BeanSerializer;
+import com.fasterxml.jackson.databind.ser.BeanSerializerModifier;
+import com.fasterxml.jackson.databind.ser.std.BeanSerializerBase;
import org.springframework.util.ReflectionUtils;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+import com.fasterxml.jackson.databind.ser.impl.ObjectIdWriter;
import uk.org.siri.siri_2.Siri;
@@ -76,32 +79,56 @@ public void serialize(Object bean, JsonGenerator jgen,
jgen.writeNull();
}
}
-
+
+ public BeanSerializerBase withObjectIdWriter(ObjectIdWriter var1) {
+ return null;
+ }
+
+ public BeanSerializerBase withFilterId(Object var1) {
+ return null;
+ }
+
+ @Override
+ protected BeanSerializerBase withProperties(BeanPropertyWriter[] beanPropertyWriters, BeanPropertyWriter[] beanPropertyWriters1) {
+ return null;
+ }
+
+ protected BeanSerializerBase withIgnorals(Set var1) {
+ return null;
+ }
+
+ @Override
+ protected BeanSerializerBase withByNameInclusion(Set set, Set set1) {
+ return null;
+ }
+
+ public BeanSerializerBase asArraySerializer() {
+ return null;
+ }
}
private static class CustomBeanSerializerModifier extends BeanSerializerModifier {
@Override
public JsonSerializer> modifySerializer(SerializationConfig config,
- BasicBeanDescription beanDesc, JsonSerializer> serializer) {
+ BeanDescription beanDesc, JsonSerializer> serializer) {
- if(serializer instanceof BeanSerializer) {
+ if (serializer instanceof BeanSerializer) {
List properties = beanDesc.findProperties();
for(BeanPropertyDefinition property : properties) {
- if(property.getName().equals("value") || property.getName().equals("any")) {
- String fieldName = property.getField().getName();
+ if(property.getInternalName().equalsIgnoreCase("value") || property.getInternalName().equalsIgnoreCase("any")) {
+ String fieldName = property.getInternalName();
if(fieldName != null)
return super.modifySerializer(config, beanDesc, new CustomValueObjectSerializer((BeanSerializer)serializer, fieldName));
}
}
-
}
return super.modifySerializer(config, beanDesc, serializer);
}
}
- private static class JacksonModule extends Module {
+ private static class SiriJacksonModule extends Module {
private final static Version VERSION = new Version(1,0,0, null);
@Override
@@ -141,17 +168,16 @@ public String getJson(Siri siri) throws Exception {
public String getJson(Siri siri, String callback) throws Exception {
ObjectMapper mapper = new ObjectMapper();
- mapper.setSerializationInclusion(Inclusion.NON_NULL);
- mapper.configure(SerializationConfig.Feature.INDENT_OUTPUT, false);
- mapper.configure(SerializationConfig.Feature.WRAP_ROOT_VALUE, true);
+ mapper.setSerializationInclusion(Include.NON_EMPTY);
+ mapper.setPropertyNamingStrategy(PropertyNamingStrategy.UPPER_CAMEL_CASE);
+ mapper.configure(SerializationFeature.INDENT_OUTPUT, false);
+ mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, true);
mapper.setDateFormat(new RFC822SimpleDateFormat());
- AnnotationIntrospector introspector = new JaxbAnnotationIntrospector();
- SerializationConfig config = mapper.getSerializationConfig().withAnnotationIntrospector(introspector);
- mapper.setSerializationConfig(config);
-
- mapper.registerModule(new JacksonModule());
+ // Method A: Standard registration -- Direct introspection not necessary
+ SiriJsonSerializerV2.SiriJacksonModule module = new SiriJsonSerializerV2.SiriJacksonModule();
+ mapper.registerModule(module);
String output = "";
@@ -164,6 +190,6 @@ public String getJson(Siri siri, String callback) throws Exception {
output += ")";
return output;
- }
+ }
}
diff --git a/onebusaway-transit-data-federation/src/main/resources/org/onebusaway/transit_data_federation/application-context-common.xml b/onebusaway-transit-data-federation/src/main/resources/org/onebusaway/transit_data_federation/application-context-common.xml
index 55b9a7b333..9764f1fc17 100644
--- a/onebusaway-transit-data-federation/src/main/resources/org/onebusaway/transit_data_federation/application-context-common.xml
+++ b/onebusaway-transit-data-federation/src/main/resources/org/onebusaway/transit_data_federation/application-context-common.xml
@@ -28,7 +28,7 @@
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
- http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-4.2.xsd">
+ http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-5.3.xsd">
diff --git a/onebusaway-transit-data-federation/src/main/resources/org/onebusaway/transit_data_federation/application-context-services.xml b/onebusaway-transit-data-federation/src/main/resources/org/onebusaway/transit_data_federation/application-context-services.xml
index 304de92e4c..a1a9abf531 100644
--- a/onebusaway-transit-data-federation/src/main/resources/org/onebusaway/transit_data_federation/application-context-services.xml
+++ b/onebusaway-transit-data-federation/src/main/resources/org/onebusaway/transit_data_federation/application-context-services.xml
@@ -23,7 +23,7 @@
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
- http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-4.2.xsd">
+ http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-5.3.xsd">
diff --git a/onebusaway-transit-data-federation/src/main/resources/org/onebusaway/transit_data_federation/application-context.xml b/onebusaway-transit-data-federation/src/main/resources/org/onebusaway/transit_data_federation/application-context.xml
index b12501cf4e..2b64e72301 100644
--- a/onebusaway-transit-data-federation/src/main/resources/org/onebusaway/transit_data_federation/application-context.xml
+++ b/onebusaway-transit-data-federation/src/main/resources/org/onebusaway/transit_data_federation/application-context.xml
@@ -23,7 +23,7 @@
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
- http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-4.2.xsd">
+ http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-5.3.xsd">
diff --git a/onebusaway-transit-data-federation/src/test/java/org/onebusaway/transit_data_federation/impl/realtime/gtfs_realtime/GtfsRealtimeTripLibraryTest.java b/onebusaway-transit-data-federation/src/test/java/org/onebusaway/transit_data_federation/impl/realtime/gtfs_realtime/GtfsRealtimeTripLibraryTest.java
index 7f6ff8ba8f..614aff583d 100644
--- a/onebusaway-transit-data-federation/src/test/java/org/onebusaway/transit_data_federation/impl/realtime/gtfs_realtime/GtfsRealtimeTripLibraryTest.java
+++ b/onebusaway-transit-data-federation/src/test/java/org/onebusaway/transit_data_federation/impl/realtime/gtfs_realtime/GtfsRealtimeTripLibraryTest.java
@@ -301,7 +301,7 @@ public void testCreateVehicleLocationRecordForUpdate_FutureDay() {
Mockito.when(
_blockCalendarService.getActiveBlocks(Mockito.eq(blockA.getId()),
- Mockito.anyLong(), Mockito.longThat(new ArgumentMatcher() {
+ Mockito.anyLong(), Mockito.longThat(new ArgumentMatcher() {
@Override
public boolean matches(Object argument) {
return ((Long) argument) < day;
@@ -310,7 +310,7 @@ public boolean matches(Object argument) {
Mockito.when(
_blockCalendarService.getActiveBlocks(Mockito.eq(blockA.getId()),
- Mockito.anyLong(), Mockito.longThat(new ArgumentMatcher() {
+ Mockito.anyLong(), Mockito.longThat(new ArgumentMatcher() {
@Override
public boolean matches(Object argument) {
return ((Long) argument) >= day;
@@ -593,7 +593,7 @@ public void testCreateVehicleOccupancyRecordFromUpdate() {
Mockito.when(
_blockCalendarService.getActiveBlocks(Mockito.eq(blockA.getId()),
- Mockito.anyLong(), Mockito.longThat(new ArgumentMatcher() {
+ Mockito.anyLong(), Mockito.longThat(new ArgumentMatcher() {
@Override
public boolean matches(Object argument) {
return ((Long) argument) < day;
@@ -602,7 +602,7 @@ public boolean matches(Object argument) {
Mockito.when(
_blockCalendarService.getActiveBlocks(Mockito.eq(blockA.getId()),
- Mockito.anyLong(), Mockito.longThat(new ArgumentMatcher() {
+ Mockito.anyLong(), Mockito.longThat(new ArgumentMatcher() {
@Override
public boolean matches(Object argument) {
return ((Long) argument) >= day;
diff --git a/onebusaway-transit-data-federation/src/test/java/org/onebusaway/transit_data_federation/impl/reporting/UserReportingDaoImplTest.java b/onebusaway-transit-data-federation/src/test/java/org/onebusaway/transit_data_federation/impl/reporting/UserReportingDaoImplTest.java
index 1abf2d4c39..5cf32fc64e 100644
--- a/onebusaway-transit-data-federation/src/test/java/org/onebusaway/transit_data_federation/impl/reporting/UserReportingDaoImplTest.java
+++ b/onebusaway-transit-data-federation/src/test/java/org/onebusaway/transit_data_federation/impl/reporting/UserReportingDaoImplTest.java
@@ -34,11 +34,9 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
-import org.springframework.test.context.transaction.TransactionConfiguration;
import org.springframework.transaction.annotation.Transactional;
@ContextConfiguration(locations = "classpath:org/onebusaway/transit_data_federation/application-context-test.xml")
-@TransactionConfiguration(transactionManager="transactionManager", defaultRollback=true)
@RunWith(SpringJUnit4ClassRunner.class)
public class UserReportingDaoImplTest {
diff --git a/onebusaway-transit-data-federation/src/test/java/org/onebusaway/transit_data_federation/impl/service_alerts/ServiceAlertsServiceImplTest.java b/onebusaway-transit-data-federation/src/test/java/org/onebusaway/transit_data_federation/impl/service_alerts/ServiceAlertsServiceImplTest.java
index db593e5452..330212a725 100644
--- a/onebusaway-transit-data-federation/src/test/java/org/onebusaway/transit_data_federation/impl/service_alerts/ServiceAlertsServiceImplTest.java
+++ b/onebusaway-transit-data-federation/src/test/java/org/onebusaway/transit_data_federation/impl/service_alerts/ServiceAlertsServiceImplTest.java
@@ -68,7 +68,6 @@
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations={"classpath:service-alerts-data-sources.xml",
"classpath:org/onebusaway/transit_data_federation/application-context-services.xml"})
-@TestPropertySource(properties = { "bundlePath = /tmp/foo"})
@Transactional(transactionManager = "transactionManager")
public class ServiceAlertsServiceImplTest extends AbstractTransactionalJUnit4SpringContextTests {
diff --git a/onebusaway-transit-data-federation/src/test/resources/org/onebusaway/transit_data_federation/application-context-hibernate-test.xml b/onebusaway-transit-data-federation/src/test/resources/org/onebusaway/transit_data_federation/application-context-hibernate-test.xml
index d353c9033f..becb6dd0bc 100644
--- a/onebusaway-transit-data-federation/src/test/resources/org/onebusaway/transit_data_federation/application-context-hibernate-test.xml
+++ b/onebusaway-transit-data-federation/src/test/resources/org/onebusaway/transit_data_federation/application-context-hibernate-test.xml
@@ -85,7 +85,7 @@
-
@@ -95,7 +95,7 @@
-
+
diff --git a/onebusaway-transit-data/pom.xml b/onebusaway-transit-data/pom.xml
index d688a007fb..03de3c71f0 100644
--- a/onebusaway-transit-data/pom.xml
+++ b/onebusaway-transit-data/pom.xml
@@ -3,7 +3,7 @@
org.onebusaway
onebusaway-application-modules
- 2.0.79-cs-SNAPSHOT
+ 2.1.12-cs-SNAPSHOT
onebusaway-transit-data
jar
diff --git a/onebusaway-transit-data/src/main/java/org/onebusaway/transit_data/model/TripStopTimeBean.java b/onebusaway-transit-data/src/main/java/org/onebusaway/transit_data/model/TripStopTimeBean.java
index d6a1b25654..5630c3ca21 100644
--- a/onebusaway-transit-data/src/main/java/org/onebusaway/transit_data/model/TripStopTimeBean.java
+++ b/onebusaway-transit-data/src/main/java/org/onebusaway/transit_data/model/TripStopTimeBean.java
@@ -35,6 +35,8 @@ public class TripStopTimeBean implements Serializable {
private String historicalOccupancy;
+ private int gtfsSequence;
+
public int getArrivalTime() {
return arrivalTime;
}
@@ -75,6 +77,14 @@ public void setDistanceAlongTrip(double distanceAlongTrip) {
this.distanceAlongTrip = distanceAlongTrip;
}
+ public int getGtfsSequence() {
+ return gtfsSequence;
+ }
+
+ public void setGtfsSequence(int gtfsSequence) {
+ this.gtfsSequence = gtfsSequence;
+ }
+
public String getHistoricalOccupancy() {return historicalOccupancy; }
public void setHistoricalOccupancy(OccupancyStatus historicalOccupancy) {this.historicalOccupancy = historicalOccupancy.toString(); }
diff --git a/onebusaway-transit-data/src/main/java/org/onebusaway/transit_data/model/trips/TimepointPredictionBean.java b/onebusaway-transit-data/src/main/java/org/onebusaway/transit_data/model/trips/TimepointPredictionBean.java
index 06420c9cd0..58eacf51db 100644
--- a/onebusaway-transit-data/src/main/java/org/onebusaway/transit_data/model/trips/TimepointPredictionBean.java
+++ b/onebusaway-transit-data/src/main/java/org/onebusaway/transit_data/model/trips/TimepointPredictionBean.java
@@ -16,8 +16,6 @@
*/
package org.onebusaway.transit_data.model.trips;
-import org.onebusaway.realtime.api.TimepointPredictionRecord;
-
import java.io.Serializable;
public class TimepointPredictionBean implements Serializable {
diff --git a/onebusaway-transit-data/src/main/java/org/onebusaway/transit_data/services/TransitDataService.java b/onebusaway-transit-data/src/main/java/org/onebusaway/transit_data/services/TransitDataService.java
index 0dab1f84be..bdd05b1108 100644
--- a/onebusaway-transit-data/src/main/java/org/onebusaway/transit_data/services/TransitDataService.java
+++ b/onebusaway-transit-data/src/main/java/org/onebusaway/transit_data/services/TransitDataService.java
@@ -277,8 +277,7 @@ public TripDetailsBean getTripDetailsForVehicleAndTime(
/**
* @param stopId
- * @param timeFrom
- * @param timeTo
+ * @param query
* @return stop with arrival and departure information for the specified stop
* and time range, or null if not found
* @throws ServiceException
@@ -290,8 +289,7 @@ public StopWithArrivalsAndDeparturesBean getStopWithArrivalsAndDepartures(
/**
* @param stopIds
- * @param timeFrom
- * @param timeTo
+ * @param query
* @return stops with arrival and departure information for the specified
* stops and time range
* @throws ServiceException
@@ -617,5 +615,4 @@ public Boolean stopHasRevenueServiceOnRoute(String agencyId, String stopId,
@FederatedByAgencyIdMethod
public ListBean getAllServiceAlertRecordsForAgencyId(
String agencyId);
-
}
diff --git a/onebusaway-twilio-webapp/pom.xml b/onebusaway-twilio-webapp/pom.xml
index 29f0ab9b2f..ad517d3ddf 100644
--- a/onebusaway-twilio-webapp/pom.xml
+++ b/onebusaway-twilio-webapp/pom.xml
@@ -3,7 +3,7 @@
onebusaway-application-modules
org.onebusaway
- 2.0.79-cs-SNAPSHOT
+ 2.1.12-cs-SNAPSHOT
onebusaway-twilio-webapp
war
@@ -20,8 +20,7 @@
mysql
mysql-connector-java
- 5.1.17
-
+
javax.servlet
@@ -44,6 +43,17 @@
twilio-java-sdk
3.4.4
compile
+
+
+ org.codehaus.jackson
+ jackson-mapper-asl
+
+
+ org.codehaus.jackson
+ jackson-core-asl
+
+
+
diff --git a/onebusaway-twilio-webapp/src/main/java/org/onebusaway/twilio/actions/TwilioSupport.java b/onebusaway-twilio-webapp/src/main/java/org/onebusaway/twilio/actions/TwilioSupport.java
index f4bce182c5..d8ac6ffc01 100644
--- a/onebusaway-twilio-webapp/src/main/java/org/onebusaway/twilio/actions/TwilioSupport.java
+++ b/onebusaway-twilio-webapp/src/main/java/org/onebusaway/twilio/actions/TwilioSupport.java
@@ -20,6 +20,7 @@
import java.util.Locale;
import java.util.Map;
+import com.opensymphony.xwork2.util.StrutsLocalizedTextProvider;
import org.apache.struts2.interceptor.ParameterAware;
import org.apache.struts2.interceptor.SessionAware;
import org.onebusaway.geospatial.model.CoordinateBounds;
@@ -35,7 +36,6 @@
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
-import com.opensymphony.xwork2.util.LocalizedTextUtil;
import com.opensymphony.xwork2.util.ValueStack;
public class TwilioSupport extends ActionSupport implements ParameterAware, CurrentUserAware, SessionAware {
@@ -72,7 +72,7 @@ protected void addMessage(String msg, Object... args) {
ActionContext context = ActionContext.getContext();
Locale locale = context.getLocale();
ValueStack valueStack = context.getValueStack();
- String text = LocalizedTextUtil.findText(TwilioSupport.this.getClass(), msg, locale, msg, args, valueStack);
+ String text = new StrutsLocalizedTextProvider().findText(TwilioSupport.this.getClass(), msg, locale, msg, args, valueStack);
_log.debug("message: " + text);
_message.append(" " + text + " ");
_log.debug(getText(msg));
diff --git a/onebusaway-twilio-webapp/src/main/java/org/onebusaway/twilio/impl/TwilioInterceptor.java b/onebusaway-twilio-webapp/src/main/java/org/onebusaway/twilio/impl/TwilioInterceptor.java
index f260d0e614..3f5f503613 100644
--- a/onebusaway-twilio-webapp/src/main/java/org/onebusaway/twilio/impl/TwilioInterceptor.java
+++ b/onebusaway-twilio-webapp/src/main/java/org/onebusaway/twilio/impl/TwilioInterceptor.java
@@ -17,6 +17,7 @@
import java.util.Arrays;
+import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
@@ -55,7 +56,10 @@ public void setSessionManager(SessionManager sessionManager) {
@Override
public String intercept(ActionInvocation invocation) throws Exception {
ActionContext context = invocation.getInvocationContext();
- Map parameters = context.getParameters();
+ Map parameters = new HashMap<>();
+ for (String key : context.getParameters().keySet()) {
+ parameters.put(key, context.getParameters().get(key));
+ }
/* Stringify parameters for debugging output */
String paramString = "";
diff --git a/onebusaway-twilio-webapp/src/main/resources/org/onebusaway/twilio/application-context-webapp.xml b/onebusaway-twilio-webapp/src/main/resources/org/onebusaway/twilio/application-context-webapp.xml
index 5bd61c3bb4..f5bc1df6b9 100644
--- a/onebusaway-twilio-webapp/src/main/resources/org/onebusaway/twilio/application-context-webapp.xml
+++ b/onebusaway-twilio-webapp/src/main/resources/org/onebusaway/twilio/application-context-webapp.xml
@@ -23,7 +23,7 @@
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
- http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-4.2.xsd">
+ http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-5.3.xsd">
diff --git a/onebusaway-twilio-webapp/src/main/resources/org/onebusaway/twilio/application-context.xml b/onebusaway-twilio-webapp/src/main/resources/org/onebusaway/twilio/application-context.xml
index 611219ac67..65e2b00515 100644
--- a/onebusaway-twilio-webapp/src/main/resources/org/onebusaway/twilio/application-context.xml
+++ b/onebusaway-twilio-webapp/src/main/resources/org/onebusaway/twilio/application-context.xml
@@ -23,7 +23,7 @@
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
- http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-4.2.xsd">
+ http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-5.3.xsd">
diff --git a/onebusaway-twilio-webapp/src/main/resources/struts-twilio-webapp.xml b/onebusaway-twilio-webapp/src/main/resources/struts-twilio-webapp.xml
index 0702f372c2..8fd3d414fa 100644
--- a/onebusaway-twilio-webapp/src/main/resources/struts-twilio-webapp.xml
+++ b/onebusaway-twilio-webapp/src/main/resources/struts-twilio-webapp.xml
@@ -18,7 +18,7 @@
-->
+ "http://struts.apache.org/dtds/struts-2.5.dtd">
diff --git a/onebusaway-twilio-webapp/src/main/resources/struts.xml b/onebusaway-twilio-webapp/src/main/resources/struts.xml
index 81471fc678..ae411d64c3 100644
--- a/onebusaway-twilio-webapp/src/main/resources/struts.xml
+++ b/onebusaway-twilio-webapp/src/main/resources/struts.xml
@@ -18,7 +18,7 @@
-->
+ "http://struts.apache.org/dtds/struts-2.5.dtd">
diff --git a/onebusaway-twilio-webapp/src/main/webapp/WEB-INF/web.xml b/onebusaway-twilio-webapp/src/main/webapp/WEB-INF/web.xml
index 5f74339d3d..bbb393876d 100644
--- a/onebusaway-twilio-webapp/src/main/webapp/WEB-INF/web.xml
+++ b/onebusaway-twilio-webapp/src/main/webapp/WEB-INF/web.xml
@@ -38,7 +38,7 @@
struts2
- org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
+ org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter
actionPackages
org.onebusaway.twilio.actions
diff --git a/onebusaway-users/pom.xml b/onebusaway-users/pom.xml
index 0449046bee..0a9c18a968 100644
--- a/onebusaway-users/pom.xml
+++ b/onebusaway-users/pom.xml
@@ -3,7 +3,7 @@
org.onebusaway
onebusaway-application-modules
- 2.0.79-cs-SNAPSHOT
+ 2.1.12-cs-SNAPSHOT
onebusaway-users
jar
@@ -11,7 +11,7 @@
onebusaway-users
- 4.2.2.RELEASE
+ 5.3.2.RELEASE
@@ -69,6 +69,17 @@
provided
+
+
+ jakarta.xml.bind
+ jakarta.xml.bind-api
+ 2.3.3
+
+
+ org.glassfish.jaxb
+ jaxb-runtime
+ 2.3.3
+
junit
junit
diff --git a/onebusaway-users/src/main/java/org/onebusaway/users/impl/UserServiceImpl.java b/onebusaway-users/src/main/java/org/onebusaway/users/impl/UserServiceImpl.java
index f7808bf5f2..b287d66f1c 100644
--- a/onebusaway-users/src/main/java/org/onebusaway/users/impl/UserServiceImpl.java
+++ b/onebusaway-users/src/main/java/org/onebusaway/users/impl/UserServiceImpl.java
@@ -33,10 +33,10 @@
import org.onebusaway.container.cache.CacheableArgument;
import org.onebusaway.users.client.model.UserBean;
import org.onebusaway.users.client.model.UserIndexBean;
+import org.onebusaway.users.impl.authentication.VersionedPasswordEncoder;
import org.onebusaway.users.model.User;
import org.onebusaway.users.model.UserIndex;
import org.onebusaway.users.model.UserIndexKey;
-import org.onebusaway.users.model.UserPropertiesV1;
import org.onebusaway.users.model.UserRole;
import org.onebusaway.users.model.properties.UserPropertiesV4;
import org.onebusaway.users.services.StandardAuthoritiesService;
@@ -49,7 +49,7 @@
import org.onebusaway.users.services.internal.UserIndexRegistrationService;
import org.onebusaway.users.services.internal.UserRegistration;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.authentication.encoding.PasswordEncoder;
+import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
@@ -67,7 +67,7 @@ public class UserServiceImpl implements UserService {
private UserIndexRegistrationService _userIndexRegistrationService;
- private PasswordEncoder _passwordEncoder;
+ private VersionedPasswordEncoder _passwordEncoder;
private ExecutorService _executors;
@@ -99,7 +99,8 @@ public void setUserIndexRegistrationService(
}
@Autowired
- public void setPasswordEncoder(PasswordEncoder passwordEncoder) {
+ @Qualifier(value = "passwordEncoderV1")
+ public void setPasswordEncoder(VersionedPasswordEncoder passwordEncoder) {
_passwordEncoder = passwordEncoder;
}
diff --git a/onebusaway-users/src/main/java/org/onebusaway/users/impl/authentication/IndexedUserDetailsSaltSourceImpl.java b/onebusaway-users/src/main/java/org/onebusaway/users/impl/authentication/LegacyBaseDigestPasswordEncoder.java
similarity index 52%
rename from onebusaway-users/src/main/java/org/onebusaway/users/impl/authentication/IndexedUserDetailsSaltSourceImpl.java
rename to onebusaway-users/src/main/java/org/onebusaway/users/impl/authentication/LegacyBaseDigestPasswordEncoder.java
index ede7a9a08e..4081258ecf 100644
--- a/onebusaway-users/src/main/java/org/onebusaway/users/impl/authentication/IndexedUserDetailsSaltSourceImpl.java
+++ b/onebusaway-users/src/main/java/org/onebusaway/users/impl/authentication/LegacyBaseDigestPasswordEncoder.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2011 Brian Ferris
+ * Copyright (C) 2021 Cambridge Systematics, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,18 +15,20 @@
*/
package org.onebusaway.users.impl.authentication;
-import org.onebusaway.users.model.IndexedUserDetails;
-import org.springframework.security.authentication.dao.SaltSource;
-import org.springframework.security.core.userdetails.UserDetails;
+import org.springframework.security.crypto.password.PasswordEncoder;
-public class IndexedUserDetailsSaltSourceImpl implements SaltSource {
+/**
+ * Legacy support for Digest Passwords encoding. Not considered secure.
+ */
+public abstract class LegacyBaseDigestPasswordEncoder implements PasswordEncoder {
+ private boolean encodeHashAsBase64 = false;
- @Override
- public Object getSalt(UserDetails user) {
- if (user instanceof IndexedUserDetails) {
- IndexedUserDetails details = (IndexedUserDetails) user;
- return details.getUserIndexKey().getValue();
- }
- return user.getUsername();
+ public boolean getEncodeHashAsBase64() {
+ return this.encodeHashAsBase64;
}
+
+ public void setEncodeHashAsBase64(boolean encodeHashAsBase64) {
+ this.encodeHashAsBase64 = encodeHashAsBase64;
+ }
+
}
diff --git a/onebusaway-users/src/main/java/org/onebusaway/users/impl/authentication/LegacyMessageDigestPasswordEncoder.java b/onebusaway-users/src/main/java/org/onebusaway/users/impl/authentication/LegacyMessageDigestPasswordEncoder.java
new file mode 100644
index 0000000000..a78df0c64b
--- /dev/null
+++ b/onebusaway-users/src/main/java/org/onebusaway/users/impl/authentication/LegacyMessageDigestPasswordEncoder.java
@@ -0,0 +1,149 @@
+/**
+ * Copyright (c) 2018 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onebusaway.users.impl.authentication;
+
+import org.springframework.security.crypto.codec.Base64;
+import org.springframework.security.crypto.codec.Hex;
+import org.springframework.security.crypto.codec.Utf8;
+import org.springframework.util.Assert;
+
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+
+/**
+ * This is a port of Spring Core's original MessageDigestEncoder to maintain
+ * backwards compatibility. It is not considered secure!
+ * It maintains the original license header which by coincidence is the same license
+ * as this project.
+ */
+public class LegacyMessageDigestPasswordEncoder extends LegacyBaseDigestPasswordEncoder {
+ private final String algorithm;
+ private int iterations;
+
+ public LegacyMessageDigestPasswordEncoder(String algorithm) {
+ this(algorithm, false);
+ }
+
+ public LegacyMessageDigestPasswordEncoder(String algorithm, boolean encodeHashAsBase64) throws IllegalArgumentException {
+ this.iterations = 1;
+ this.algorithm = algorithm;
+ this.setEncodeHashAsBase64(encodeHashAsBase64);
+ this.getMessageDigest();
+ }
+
+ public String encodePassword(String rawPass, Object salt) {
+ String saltedPass = this.mergePasswordAndSalt(rawPass, salt, false);
+ MessageDigest messageDigest = this.getMessageDigest();
+ byte[] digest = messageDigest.digest(Utf8.encode(saltedPass));
+
+ for (int i = 1; i < this.iterations; ++i) {
+ digest = messageDigest.digest(digest);
+ }
+
+ return this.getEncodeHashAsBase64() ? Utf8.decode(Base64.encode(digest)) : new String(Hex.encode(digest));
+ }
+
+ protected final MessageDigest getMessageDigest() throws IllegalArgumentException {
+ try {
+ return MessageDigest.getInstance(this.algorithm);
+ } catch (NoSuchAlgorithmException var2) {
+ throw new IllegalArgumentException("No such algorithm [" + this.algorithm + "]");
+ }
+ }
+
+ public boolean isPasswordValid(String encPass, String rawPass, Object salt) {
+ String pass1 = "" + encPass;
+ String pass2 = this.encodePassword(rawPass, salt);
+ return PasswordEncoderUtils.equals(pass1, pass2);
+ }
+
+ public String getAlgorithm() {
+ return this.algorithm;
+ }
+
+ public void setIterations(int iterations) {
+ Assert.isTrue(iterations > 0, "Iterations value must be greater than zero");
+ this.iterations = iterations;
+ }
+
+ @Override
+ // format of {salt}password to stay compatible!
+ public String encode(CharSequence charSequence) {
+ String salt = extractSalt((String) charSequence);
+ String password = (String) charSequence;
+ if (salt != null && salt.length() > 2)
+ password = ((String) charSequence).substring(salt.length()+2);
+ return encodePassword(password, salt);
+ }
+
+ @Override
+ public boolean matches(CharSequence charSequence, String s) {
+ return false;
+ }
+ private String extractSalt(String prefixEncodedPassword) {
+ String delimitedSalt = null;
+ int start = prefixEncodedPassword.indexOf("{");
+ if (start != 0) {
+ return "";
+ } else {
+ int end = prefixEncodedPassword.indexOf("}", start);
+ delimitedSalt = end < 0 ? "" : prefixEncodedPassword.substring(start, end + 1);
+ }
+ if (delimitedSalt != null & delimitedSalt.length() > 1) {
+ delimitedSalt = delimitedSalt.substring(1, delimitedSalt.length()-1);
+ return delimitedSalt;
+ }
+ return "";
+ }
+
+ protected String mergePasswordAndSalt(String password, Object salt, boolean strict) {
+ if (password == null) {
+ password = "";
+ }
+
+ if (strict && salt != null && (salt.toString().lastIndexOf("{") != -1 || salt.toString().lastIndexOf("}") != -1)) {
+ throw new IllegalArgumentException("Cannot use { or } in salt.toString()");
+ } else {
+ return salt != null && !"".equals(salt) ? password + "{" + salt.toString() + "}" : password;
+ }
+ }
+
+ static class PasswordEncoderUtils {
+ static boolean equals(String expected, String actual) {
+ byte[] expectedBytes = bytesUtf8(expected);
+ byte[] actualBytes = bytesUtf8(actual);
+ int expectedLength = expectedBytes == null ? -1 : expectedBytes.length;
+ int actualLength = actualBytes == null ? -1 : actualBytes.length;
+ int result = expectedLength == actualLength ? 0 : 1;
+
+ for (int i = 0; i < actualLength; ++i) {
+ byte expectedByte = expectedLength <= 0 ? 0 : expectedBytes[i % expectedLength];
+ byte actualByte = actualBytes[i % actualLength];
+ result |= expectedByte ^ actualByte;
+ }
+
+ return result == 0;
+ }
+
+ private static byte[] bytesUtf8(String s) {
+ return s == null ? null : Utf8.encode(s);
+ }
+
+ private PasswordEncoderUtils() {
+ }
+
+ }
+}
diff --git a/onebusaway-users/src/main/java/org/onebusaway/users/impl/authentication/LegacyPasswordEncoder.java b/onebusaway-users/src/main/java/org/onebusaway/users/impl/authentication/LegacyPasswordEncoder.java
new file mode 100644
index 0000000000..70fca44f9a
--- /dev/null
+++ b/onebusaway-users/src/main/java/org/onebusaway/users/impl/authentication/LegacyPasswordEncoder.java
@@ -0,0 +1,34 @@
+/**
+ * Copyright (C) 2021 Cambridge Systematics, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onebusaway.users.impl.authentication;
+
+/**
+ * Support legacy style salting of passwords. This is not considered secure,
+ * it is only present for backwards compatibility.
+ */
+public class LegacyPasswordEncoder extends LegacyMessageDigestPasswordEncoder{
+ public LegacyPasswordEncoder(String algorithm) {
+ super(algorithm);
+ }
+
+ public LegacyPasswordEncoder(String algorithm, boolean encodeHashAsBase64) throws IllegalArgumentException {
+ super(algorithm, encodeHashAsBase64);
+ }
+
+ public String encodePassword(String user, String salt) {
+ return encode("{" + user + "}" + salt);
+ }
+}
diff --git a/onebusaway-users/src/main/java/org/onebusaway/users/impl/authentication/SaltedDaoAuthenticationProvider.java b/onebusaway-users/src/main/java/org/onebusaway/users/impl/authentication/SaltedDaoAuthenticationProvider.java
new file mode 100644
index 0000000000..37a2a82346
--- /dev/null
+++ b/onebusaway-users/src/main/java/org/onebusaway/users/impl/authentication/SaltedDaoAuthenticationProvider.java
@@ -0,0 +1,147 @@
+/**
+ * Copyright (C) 2021 Cambridge Systematics, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onebusaway.users.impl.authentication;
+
+import org.onebusaway.users.model.IndexedUserDetails;
+import org.onebusaway.users.services.CurrentUserService;
+import org.onebusaway.users.services.UserService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.authentication.BadCredentialsException;
+import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
+import org.springframework.security.authentication.dao.DaoAuthenticationProvider;
+import org.springframework.security.core.Authentication;
+import org.springframework.security.core.AuthenticationException;
+import org.springframework.security.core.GrantedAuthority;
+import org.springframework.security.core.authority.mapping.GrantedAuthoritiesMapper;
+import org.springframework.security.core.authority.mapping.NullAuthoritiesMapper;
+import org.springframework.security.core.userdetails.UserDetails;
+
+import java.util.Collection;
+
+/**
+ * Legacy support for Salted Passwords.
+ */
+public class SaltedDaoAuthenticationProvider extends DaoAuthenticationProvider {
+
+ private static final Logger _log = LoggerFactory.getLogger(SaltedDaoAuthenticationProvider.class);
+ private static final String DEFAULT_VERSION_PREFIX = "v1|";
+
+ private LegacyPasswordEncoder passwordEncoder = new LegacyPasswordEncoder("SHA-256", true);
+ private GrantedAuthoritiesMapper authoritiesMapper = new NullAuthoritiesMapper();
+ private UserService userService;
+ private CurrentUserService currentUserService;
+ private String versionPrefix = DEFAULT_VERSION_PREFIX;
+
+ @Autowired
+ public void setUserService(UserService userService) {
+ this.userService = userService;
+ }
+ @Autowired
+ public void setCurrentUserService(CurrentUserService currentUserService) { this.currentUserService = currentUserService; }
+
+ public void setAuthoritiesMapper(GrantedAuthoritiesMapper authoritiesMapper) {
+ super.setAuthoritiesMapper(authoritiesMapper);
+ this.authoritiesMapper = authoritiesMapper;
+ }
+
+ public void setVersionPrefix(String prefix) {
+ versionPrefix = prefix;
+ }
+
+ @Override
+ protected Authentication createSuccessAuthentication(Object principal, Authentication authentication, UserDetails user) {
+ SaltedUsernamePasswordAuthenticationToken result = new SaltedUsernamePasswordAuthenticationToken(principal, authentication.getCredentials(), this.authoritiesMapper.mapAuthorities(user.getAuthorities()));
+ result.setDetails(authentication.getDetails());
+ return result;
+ }
+
+ @Override
+ public Authentication authenticate(Authentication authentication) {
+
+ Object principal = authentication.getPrincipal();
+
+ SaltedUsernamePasswordAuthenticationToken result = null;
+
+ if (!supports(authentication.getClass()))
+ return null;
+
+ result = authenticateNow(authentication);
+
+ if (principal instanceof IndexedUserDetails) {
+ result.setDetails(principal);
+ } else if (principal instanceof String && result.getDetails() == null) {
+ result.setDetails(getUserDetailsService().loadUserByUsername((String)principal));
+ }
+ return result;
+
+ }
+
+ private SaltedUsernamePasswordAuthenticationToken authenticateNow(Authentication authentication) {
+ UserDetails userDetails = null;
+
+ Collection extends GrantedAuthority> authorities = authentication.getAuthorities();
+ if (authorities == null || authorities.isEmpty()) {
+ Object details = authentication.getDetails();
+ if (details != null) {
+ if (details instanceof UserDetails) {
+ userDetails = (UserDetails)details;
+ authorities = userDetails.getAuthorities();
+ } else {
+ userDetails = getUserDetailsService().loadUserByUsername((String) authentication.getPrincipal());
+ authorities = userDetails.getAuthorities();
+ }
+ }
+ }
+
+ if (userDetails == null) {
+ _log.error("unable to retrieve user details for user ", authentication.getName());
+ return null;
+ }
+
+ String username = ((IndexedUserDetails)userDetails).getUserIndexKey().getValue();
+ String encPassword = userDetails.getPassword();
+ String rawPassword = (String) authentication.getCredentials();
+
+ String proposedPassword = versionPrefix + passwordEncoder.encodePassword(username, rawPassword);
+
+
+ if (!LegacyMessageDigestPasswordEncoder.PasswordEncoderUtils.equals(proposedPassword, encPassword)) {
+ throw new BadCredentialsException("authentication failed for " + username);
+ }
+
+ return new SaltedUsernamePasswordAuthenticationToken(
+ authentication.getPrincipal(),
+ authentication.getCredentials(),
+ authoritiesMapper.mapAuthorities(authorities));
+ }
+
+ @Override
+ public boolean supports(Class authentication) {
+ return authentication == SaltedUsernamePasswordAuthenticationToken.class
+ || authentication == UsernamePasswordAuthenticationToken.class;
+ }
+
+ @Override
+ protected void additionalAuthenticationChecks(UserDetails details, UsernamePasswordAuthenticationToken auth)
+ throws AuthenticationException {
+ super.additionalAuthenticationChecks(details, auth);
+ }
+
+
+}
+
diff --git a/onebusaway-users/src/main/java/org/onebusaway/users/impl/authentication/SaltedSha256PasswordEncoder.java b/onebusaway-users/src/main/java/org/onebusaway/users/impl/authentication/SaltedSha256PasswordEncoder.java
new file mode 100644
index 0000000000..f9718f540b
--- /dev/null
+++ b/onebusaway-users/src/main/java/org/onebusaway/users/impl/authentication/SaltedSha256PasswordEncoder.java
@@ -0,0 +1,36 @@
+/**
+ * Copyright (C) 2021 Cambridge Systematics, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onebusaway.users.impl.authentication;
+
+import org.springframework.security.crypto.password.MessageDigestPasswordEncoder;
+
+/**
+ * Retain compatibility with the previous salted password setup.
+ */
+public class SaltedSha256PasswordEncoder extends MessageDigestPasswordEncoder {
+
+
+ public SaltedSha256PasswordEncoder(String algorithm) {
+ super(algorithm);
+ }
+
+ public String encodePassword(String password, String salt) {
+ //MessageDigest will extract the salt if its of this format below
+ return encode("{" + salt + "}" + password);
+ }
+
+}
+
diff --git a/onebusaway-users/src/main/java/org/onebusaway/users/impl/authentication/SaltedUsernamePasswordAuthenticationToken.java b/onebusaway-users/src/main/java/org/onebusaway/users/impl/authentication/SaltedUsernamePasswordAuthenticationToken.java
new file mode 100644
index 0000000000..6f2ddc3853
--- /dev/null
+++ b/onebusaway-users/src/main/java/org/onebusaway/users/impl/authentication/SaltedUsernamePasswordAuthenticationToken.java
@@ -0,0 +1,51 @@
+/**
+ * Copyright (C) 2021 Cambridge Systematics, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onebusaway.users.impl.authentication;
+
+import org.onebusaway.users.model.IndexedUserDetails;
+import org.onebusaway.users.services.CurrentUserService;
+import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
+import org.springframework.security.core.GrantedAuthority;
+import java.util.Collection;
+
+public class SaltedUsernamePasswordAuthenticationToken extends UsernamePasswordAuthenticationToken {
+
+ private Object principal;
+ private Object credentials;
+ private CurrentUserService userService;
+
+ SaltedUsernamePasswordAuthenticationToken(Object principal, Object credentials,
+ Collection extends GrantedAuthority> authorities) {
+ super(principal, credentials, authorities);
+ this.principal = principal;
+ this.credentials = credentials;
+ }
+
+ @Override
+ public Object getCredentials() {
+ String salt = null;
+ if (principal instanceof IndexedUserDetails) {
+ IndexedUserDetails userDetails = (IndexedUserDetails) this.principal;
+ salt = userDetails.getUsername();
+ } else if (principal instanceof String) {
+ salt = (String) this.principal;
+ }
+ SaltedSha256PasswordEncoder encoder = new SaltedSha256PasswordEncoder("SHA");
+ return encoder.encodePassword(credentials.toString(), salt);
+
+ }
+
+} // end Salted class
diff --git a/onebusaway-users/src/main/java/org/onebusaway/users/impl/authentication/VersionedPasswordEncoder.java b/onebusaway-users/src/main/java/org/onebusaway/users/impl/authentication/VersionedPasswordEncoder.java
index f8dbeb52d0..69c84282c4 100644
--- a/onebusaway-users/src/main/java/org/onebusaway/users/impl/authentication/VersionedPasswordEncoder.java
+++ b/onebusaway-users/src/main/java/org/onebusaway/users/impl/authentication/VersionedPasswordEncoder.java
@@ -16,41 +16,49 @@
package org.onebusaway.users.impl.authentication;
import org.springframework.dao.DataAccessException;
-import org.springframework.security.authentication.encoding.PasswordEncoder;
+import org.springframework.security.crypto.password.PasswordEncoder;
public class VersionedPasswordEncoder implements PasswordEncoder {
- private static final String DEFAULT_SEPARATOR_CHARACTER = "|";
+ private static final String DEFAULT_SEPARATOR_CHARACTER = "|";
- private String _versionId;
+ private String _versionId;
- private PasswordEncoder _passwordEncoder;
+ private LegacyPasswordEncoder _passwordEncoder;
- private String _separatorCharacter = DEFAULT_SEPARATOR_CHARACTER;
+ private String _separatorCharacter = DEFAULT_SEPARATOR_CHARACTER;
- public void setVersionId(String versionId) {
- _versionId = versionId;
- }
-
- public void setPasswordEncoder(PasswordEncoder passwordEncoder) {
- _passwordEncoder = passwordEncoder;
- }
+ public void setVersionId(String versionId) {
+ _versionId = versionId;
+ }
+
+ public void setPasswordEncoder(LegacyPasswordEncoder passwordEncoder) {
+ _passwordEncoder = passwordEncoder;
+ }
- @Override
public String encodePassword(String rawPass, Object salt)
throws DataAccessException {
return _versionId + _separatorCharacter
+ _passwordEncoder.encodePassword(rawPass, salt);
}
- @Override
- public boolean isPasswordValid(String encPass, String rawPass, Object salt)
- throws DataAccessException {
+ @Override
+ public String encode(CharSequence charSequence) {
+ throw new UnsupportedOperationException("Please use encodePassword");
+ }
+
+ @Override
+ public boolean matches(CharSequence rawPassword, String encodedPassword) {
+ int index = encodedPassword.indexOf(_separatorCharacter);
+ if (index == -1)
+ return false;
+ encodedPassword = encodedPassword.substring(index + 1);
+ return _passwordEncoder.matches(rawPassword, encodedPassword);
+ }
+
+ @Override
+ public boolean upgradeEncoding(String encodedPassword) {
+ return PasswordEncoder.super.upgradeEncoding(encodedPassword);
+ }
- int index = encPass.indexOf(_separatorCharacter);
- if (index == -1)
- return false;
- encPass = encPass.substring(index + 1);
- return _passwordEncoder.isPasswordValid(encPass, rawPass, salt);
- }
}
diff --git a/onebusaway-users/src/main/java/org/onebusaway/users/model/User.java b/onebusaway-users/src/main/java/org/onebusaway/users/model/User.java
index ca50eb9628..84f52e8ca3 100644
--- a/onebusaway-users/src/main/java/org/onebusaway/users/model/User.java
+++ b/onebusaway-users/src/main/java/org/onebusaway/users/model/User.java
@@ -20,6 +20,7 @@
import java.util.Set;
import javax.persistence.CascadeType;
+import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
@@ -102,6 +103,7 @@ public class User extends IdentityBean {
private Date lastAccessTime;
+ @Column(columnDefinition = "BIT", length = 1)
private boolean temporary;
@Lob
diff --git a/onebusaway-users/src/main/resources/org/onebusaway/users/application-context-security.xml b/onebusaway-users/src/main/resources/org/onebusaway/users/application-context-security.xml
index 379cb96296..8e97203d72 100644
--- a/onebusaway-users/src/main/resources/org/onebusaway/users/application-context-security.xml
+++ b/onebusaway-users/src/main/resources/org/onebusaway/users/application-context-security.xml
@@ -17,26 +17,28 @@
-->
+ xmlns:context="http://www.springframework.org/schema/context" xmlns:aop="http://www.springframework.org/schema/aop"
+ xmlns:tx="http://www.springframework.org/schema/tx" xmlns:sec="http://www.springframework.org/schema/security"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
+ http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
+ http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
+ http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security.xsd">
-
+
+
+
-
+
-
+
/everylastlogin_login
@@ -45,23 +47,10 @@
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/onebusaway-users/src/main/resources/org/onebusaway/users/application-context.xml b/onebusaway-users/src/main/resources/org/onebusaway/users/application-context.xml
index dc8baebac7..1865190003 100644
--- a/onebusaway-users/src/main/resources/org/onebusaway/users/application-context.xml
+++ b/onebusaway-users/src/main/resources/org/onebusaway/users/application-context.xml
@@ -23,7 +23,7 @@
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
- http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-4.2.xsd">
+ http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-5.3.xsd">
@@ -139,16 +139,25 @@
-
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/onebusaway-users/src/test/java/org/onebusaway/users/impl/UserDaoImplTest.java b/onebusaway-users/src/test/java/org/onebusaway/users/impl/UserDaoImplTest.java
index 35bdd3c4e0..14f94e7d8d 100644
--- a/onebusaway-users/src/test/java/org/onebusaway/users/impl/UserDaoImplTest.java
+++ b/onebusaway-users/src/test/java/org/onebusaway/users/impl/UserDaoImplTest.java
@@ -41,11 +41,9 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
-import org.springframework.test.context.transaction.TransactionConfiguration;
import org.springframework.transaction.annotation.Transactional;
@ContextConfiguration(locations = "classpath:org/onebusaway/users/application-context-test.xml")
-@TransactionConfiguration(transactionManager="transactionManager", defaultRollback=true)
@RunWith(SpringJUnit4ClassRunner.class)
public class UserDaoImplTest {
diff --git a/onebusaway-users/src/test/java/org/onebusaway/users/impl/authentication/LegacyPasswordEncoderTest.java b/onebusaway-users/src/test/java/org/onebusaway/users/impl/authentication/LegacyPasswordEncoderTest.java
new file mode 100644
index 0000000000..59d33f692a
--- /dev/null
+++ b/onebusaway-users/src/test/java/org/onebusaway/users/impl/authentication/LegacyPasswordEncoderTest.java
@@ -0,0 +1,44 @@
+/**
+ * Copyright (C) 2021 Cambridge Systematics, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onebusaway.users.impl.authentication;
+
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+/**
+ * Confirm that spring security migration remains backwards compatible to
+ * existing passwords
+ */
+public class LegacyPasswordEncoderTest {
+
+ @Test
+ public void encodePassword() {
+ LegacyPasswordEncoder lpe = new LegacyPasswordEncoder("SHA-256");
+ lpe.setEncodeHashAsBase64(true);
+
+ String expectedPassword = "pKiMCHK/ZSu57YA+zl/W6CNUg4qb9Zq0ursdqzIhVOE=";
+ assertEquals(expectedPassword, lpe.encodePassword("admin", "admin"));
+
+ String v1Password = "v1|pKiMCHK/ZSu57YA+zl/W6CNUg4qb9Zq0ursdqzIhVOE=";
+ VersionedPasswordEncoder vpe = new VersionedPasswordEncoder();
+ vpe.setVersionId("v1");
+ vpe.setPasswordEncoder(lpe);
+
+ assertEquals(v1Password, vpe.encodePassword("admin", "admin"));
+
+ }
+}
\ No newline at end of file
diff --git a/onebusaway-users/src/test/resources/org/onebusaway/users/application-context-hibernate-test.xml b/onebusaway-users/src/test/resources/org/onebusaway/users/application-context-hibernate-test.xml
index 1dc21dc563..ed8b01632a 100644
--- a/onebusaway-users/src/test/resources/org/onebusaway/users/application-context-hibernate-test.xml
+++ b/onebusaway-users/src/test/resources/org/onebusaway/users/application-context-hibernate-test.xml
@@ -83,7 +83,7 @@
-
@@ -98,7 +98,7 @@
-
+
diff --git a/onebusaway-util/pom.xml b/onebusaway-util/pom.xml
index 685f656842..4c54d3c164 100644
--- a/onebusaway-util/pom.xml
+++ b/onebusaway-util/pom.xml
@@ -4,7 +4,7 @@
org.onebusaway
onebusaway-application-modules
- 2.0.79-cs-SNAPSHOT
+ 2.1.12-cs-SNAPSHOT
onebusaway-util
@@ -41,9 +41,9 @@
- org.codehaus.jackson
- jackson-mapper-asl
- 1.9.2
+ com.fasterxml.jackson.core
+ jackson-databind
+ ${jackson-version}
org.onebusaway
diff --git a/onebusaway-util/src/main/java/org/onebusaway/util/impl/configuration/ConfigurationServiceClientFileImpl.java b/onebusaway-util/src/main/java/org/onebusaway/util/impl/configuration/ConfigurationServiceClientFileImpl.java
index 36457df313..540ad1e479 100644
--- a/onebusaway-util/src/main/java/org/onebusaway/util/impl/configuration/ConfigurationServiceClientFileImpl.java
+++ b/onebusaway-util/src/main/java/org/onebusaway/util/impl/configuration/ConfigurationServiceClientFileImpl.java
@@ -24,9 +24,9 @@
import javax.annotation.PostConstruct;
import org.apache.commons.io.FileUtils;
-import org.codehaus.jackson.JsonFactory;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jackson.type.TypeReference;
+import com.fasterxml.jackson.core.JsonFactory;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.core.type.TypeReference;
import org.onebusaway.util.services.configuration.ConfigurationServiceClient;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/onebusaway-util/src/main/resources/org/onebusaway/util/application-context.xml b/onebusaway-util/src/main/resources/org/onebusaway/util/application-context.xml
index 9c821801c7..a88cc22cdc 100644
--- a/onebusaway-util/src/main/resources/org/onebusaway/util/application-context.xml
+++ b/onebusaway-util/src/main/resources/org/onebusaway/util/application-context.xml
@@ -21,7 +21,7 @@
xmlns:sec="http://www.springframework.org/schema/security"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
- http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-4.2.xsd">
+ http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-5.3.xsd">
diff --git a/onebusaway-watchdog-webapp/pom.xml b/onebusaway-watchdog-webapp/pom.xml
index 28cfc60ad6..992745e524 100644
--- a/onebusaway-watchdog-webapp/pom.xml
+++ b/onebusaway-watchdog-webapp/pom.xml
@@ -3,7 +3,7 @@
org.onebusaway
onebusaway-application-modules
- 2.0.79-cs-SNAPSHOT
+ 2.1.12-cs-SNAPSHOT
onebusaway-watchdog-webapp
war
@@ -26,30 +26,49 @@
spring-webmvc
- com.sun.jersey
+ org.glassfish.jersey.containers
+ jersey-container-servlet
+ ${jersey-version}
+
+
+ org.glassfish.jersey.core
jersey-server
- 1.9.1
+ ${jersey-version}
- com.sun.jersey.contribs
- jersey-spring
- 1.9.1
+ org.glassfish.jersey.inject
+ jersey-hk2
+ ${jersey-version}
- com.sun.jersey
- jersey-bundle
- 1.10
+ org.glassfish.jersey.ext
+ jersey-spring5
+ 2.31
org.apache.wink
wink-common
1.4
+
+
+ xml-apis
+ xml-apis
+
+
+ org.apache.geronimo.specs
+ geronimo-jaxrs_1.1_spec
+
+
+ org.apache.geronimo.specs
+ geronimo-annotation_1.1_spec
+
+
-
- org.codehaus.jackson
- jackson-mapper-asl
- 1.9.2
-
+
+ com.fasterxml.jackson.core
+ jackson-databind
+ ${jackson-version}
+
javax.servlet
servlet-api
@@ -72,7 +91,6 @@
mysql
mysql-connector-java
- 5.1.17
junit
diff --git a/onebusaway-watchdog-webapp/src/main/java/org/onebusaway/watchdog/api/MetricResource.java b/onebusaway-watchdog-webapp/src/main/java/org/onebusaway/watchdog/api/MetricResource.java
index 717902ba67..08f4894a7b 100644
--- a/onebusaway-watchdog-webapp/src/main/java/org/onebusaway/watchdog/api/MetricResource.java
+++ b/onebusaway-watchdog-webapp/src/main/java/org/onebusaway/watchdog/api/MetricResource.java
@@ -22,7 +22,7 @@
import java.util.List;
import java.util.Set;
-import org.codehaus.jackson.map.ObjectMapper;
+import com.fasterxml.jackson.databind.ObjectMapper;
import org.onebusaway.geospatial.model.CoordinateBounds;
import org.onebusaway.geospatial.model.CoordinatePoint;
diff --git a/onebusaway-watchdog-webapp/src/main/resources/org/onebusaway/watchdog/application-context-webapp.xml b/onebusaway-watchdog-webapp/src/main/resources/org/onebusaway/watchdog/application-context-webapp.xml
index 83bee9ee12..26dc5c8fab 100644
--- a/onebusaway-watchdog-webapp/src/main/resources/org/onebusaway/watchdog/application-context-webapp.xml
+++ b/onebusaway-watchdog-webapp/src/main/resources/org/onebusaway/watchdog/application-context-webapp.xml
@@ -24,10 +24,11 @@
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
- http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-4.2.xsd
+ http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-5.3.xsd
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.0.xsd">
-
+
+
diff --git a/onebusaway-watchdog-webapp/src/main/webapp/WEB-INF/web.xml b/onebusaway-watchdog-webapp/src/main/webapp/WEB-INF/web.xml
index 8e9b809719..ce9eb8232e 100644
--- a/onebusaway-watchdog-webapp/src/main/webapp/WEB-INF/web.xml
+++ b/onebusaway-watchdog-webapp/src/main/webapp/WEB-INF/web.xml
@@ -39,8 +39,14 @@
Jersey Spring Web Application
- com.sun.jersey.spi.spring.container.servlet.SpringServlet
- 1
+ org.glassfish.jersey.servlet.ServletContainer
+
+ jersey.config.server.provider.packages
+
+ org.onebusaway.watchdog.api
+
+
+ 1
Jersey Spring Web Application
diff --git a/onebusaway-watchdog-webapp/src/main/webapp/js/lib/jquery.js b/onebusaway-watchdog-webapp/src/main/webapp/js/biblio/jquery.js
similarity index 100%
rename from onebusaway-watchdog-webapp/src/main/webapp/js/lib/jquery.js
rename to onebusaway-watchdog-webapp/src/main/webapp/js/biblio/jquery.js
diff --git a/onebusaway-webapp/src/main/webapp/WEB-INF/content/where/standard/schedule.jspx b/onebusaway-webapp/src/main/webapp/WEB-INF/content/where/standard/schedule.jspx
index 7caf2c1b75..b5238732fa 100644
--- a/onebusaway-webapp/src/main/webapp/WEB-INF/content/where/standard/schedule.jspx
+++ b/onebusaway-webapp/src/main/webapp/WEB-INF/content/where/standard/schedule.jspx
@@ -19,7 +19,7 @@
-
+
@@ -263,7 +263,7 @@
stopScheduleMinutes
-
+
diff --git a/pom.xml b/pom.xml
index 0f9fa0c9cf..3524062a82 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,11 +3,11 @@
onebusaway
org.onebusaway
- 1.2.6
+ 1.2.9
4.0.0
onebusaway-application-modules
- 2.0.79-cs-SNAPSHOT
+ 2.1.12-cs-SNAPSHOT
pom
onebusaway-application-modules
@@ -16,15 +16,19 @@
- 2.3.35
+ 8.0.1
+ 2.5.26
2.4.0
- 4.3.21.RELEASE
+ 5.2.6.RELEASE
1.1.6
- 1.3.96
- 1.2.2
+ 1.2.8
+ 1.3.108
+ 1.2.23
+ 2.12.0
+ 2.31
1.0.6
1.0.1
- 1.0.3
+ 1.0.5
1.0.0
1.7.5
16.0.1
@@ -32,11 +36,15 @@
9900
9901
9902
- 1.8
- 1.8
+ 11
+ 11
+
+ central
+ https://repo1.maven.org/maven2/
+
repo.camsys-apps.com
https://repo.camsys-apps.com/third-party/
@@ -71,6 +79,10 @@
+
+ repo.camsys-apps.com
+ https://repo.camsys-apps.com/third-party/
+
public.onebusaway.org
http://nexus.onebusaway.org/content/groups/public/
@@ -136,7 +148,7 @@
org.onebusaway
onebusaway-collections
- 1.2.1
+ ${collections-version}
@@ -175,7 +187,7 @@
commons-dbcp
commons-dbcp
- 1.2.2
+ 1.4
commons-lang
@@ -186,7 +198,13 @@
org.hibernate
hibernate-core
- 4.0.1.Final
+ 5.2.2.Final
+
+
+ xml-apis
+ xml-apis
+
+
@@ -252,11 +270,10 @@
- com.vividsolutions
- jts
- 1.13
+ org.locationtech.jts
+ jts-core
+ 1.16.1
-
javax.servlet
servlet-api
@@ -361,7 +378,7 @@
org.mockito
mockito-core
- 1.9.0-rc1
+ 3.3.3
test
@@ -373,7 +390,12 @@
org.apache.httpcomponents
httpclient
4.3.6
-
+
+
+ mysql
+ mysql-connector-java
+ 5.1.48
+
@@ -422,7 +444,7 @@
org.apache.maven.plugins
maven-surefire-plugin
- 2.5
+ 3.0.0-M3
@@ -452,6 +474,13 @@
+
+
+ org.ow2.asm
+ asm
+ ${asm-version}
+
+
@@ -474,9 +503,9 @@
maven-compiler-plugin
+ 3.8.1
-
- 1.8
+ 11
diff --git a/src/site/markdown/guides/database-configuration-guide.md b/src/site/markdown/guides/database-configuration-guide.md
index 5c8a0c2bf0..1d214c759a 100644
--- a/src/site/markdown/guides/database-configuration-guide.md
+++ b/src/site/markdown/guides/database-configuration-guide.md
@@ -118,7 +118,7 @@ that define common Hibernate configuration properties. These properties are eve
SessionFactory bean:
-
+