Skip to content

Commit 5fc1b5f

Browse files
Remove dead Arrival Measurer feature and tracker JSPs
Both pieces of code were added January 2016 and have been untouched since except for mechanical sweeps (package rename, Jakarta migration, JSP layout conversion). Neither was ever linked from the webapp UI, and the Arrival Measurer's MeasuredArrivalTimes table was write-only — nothing in the codebase ever read it back. Removed: - testing/index.jsp ("Arrival Measurer") and its REST endpoint pushMeasuredArrivalTime in CommandsApi - MeasuredArrivalTime entity, its unit test, and the round-trip case in EntityRoundTripTest - MeasuredArrivalTime registration in AnnotatedClassesList - tracker/{index,store}.jsp — an unrelated experimental smartphone-as-tracker page from the same era; store.jsp was particularly sketchy (unauthenticated endpoint that wrote attacker-controlled bytes to a hardcoded path) - GenericQuery#doUpdate and its now-unused java.sql.Statement import — the only caller was the deleted endpoint - A dangling "// WORK IN PROGRESS" comment that was sitting between the deleted method and cancelTrip Existing deployments will have an orphaned MeasuredArrivalTimes table that's no longer touched; operators should drop it with "DROP TABLE MeasuredArrivalTimes;".
1 parent 0206e9f commit 5fc1b5f

9 files changed

Lines changed: 2 additions & 640 deletions

File tree

transitclock/src/main/java/org/transitclock/db/GenericQuery.java

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import java.sql.ResultSet;
2424
import java.sql.ResultSetMetaData;
2525
import java.sql.SQLException;
26-
import java.sql.Statement;
2726
import java.sql.Timestamp;
2827
import java.util.ArrayList;
2928
import java.util.List;
@@ -190,27 +189,6 @@ protected void doQuery(String sql, Object...parameters) throws SQLException {
190189

191190
}
192191

193-
/**
194-
* Executes an INSERT, UPDATE, or DELETE statement.
195-
*
196-
* @param sql The SQL to be executed
197-
* @throws SQLException
198-
*/
199-
public void doUpdate(String sql) throws SQLException {
200-
Statement statement = null;
201-
202-
try {
203-
statement = connection.createStatement();
204-
statement.executeUpdate(sql);
205-
} catch (SQLException e) {
206-
throw e;
207-
} finally {
208-
if (statement != null)
209-
statement.close();
210-
}
211-
212-
}
213-
214192
/**
215193
* Returns number of rows read in.
216194
*

transitclock/src/main/java/org/transitclock/db/hibernate/AnnotatedClassesList.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
import org.transitclock.db.structs.Headway;
3434
import org.transitclock.db.structs.HoldingTime;
3535
import org.transitclock.db.structs.Match;
36-
import org.transitclock.db.structs.MeasuredArrivalTime;
3736
import org.transitclock.db.structs.MonitoringEvent;
3837
import org.transitclock.db.structs.Prediction;
3938
import org.transitclock.db.structs.PredictionAccuracy;
@@ -89,7 +88,6 @@ public class AnnotatedClassesList {
8988
FareRule.class,
9089
Frequency.class,
9190
Match.class,
92-
MeasuredArrivalTime.class,
9391
MonitoringEvent.class,
9492
PredictionAccuracy.class,
9593
Route.class,

transitclock/src/main/java/org/transitclock/db/structs/MeasuredArrivalTime.java

Lines changed: 0 additions & 204 deletions
This file was deleted.

transitclock/src/test/java/org/transitclock/db/structs/MeasuredArrivalTimeTest.java

Lines changed: 0 additions & 85 deletions
This file was deleted.

0 commit comments

Comments
 (0)