From 379a591ba878ddcb59abf3c22fdbf546a9623834 Mon Sep 17 00:00:00 2001 From: Thomas Gran Date: Thu, 30 Nov 2023 14:47:03 +0100 Subject: [PATCH] spelling: Replace witch with which --- ARCHITECTURE.md | 2 +- CODE_CONVENTIONS.md | 2 +- .../framework/concurrent/OtpRequestThreadFactory.java | 2 +- .../org/opentripplanner/framework/text/MarkdownFormatter.java | 2 +- src/main/java/org/opentripplanner/framework/text/Table.java | 2 +- .../java/org/opentripplanner/framework/text/TableBuilder.java | 2 +- .../org/opentripplanner/framework/time/DurationUtils.java | 2 +- .../java/org/opentripplanner/framework/time/TimeUtils.java | 4 ++-- .../graph_builder/module/configure/GraphBuilderModules.java | 2 +- src/main/java/org/opentripplanner/model/plan/Itinerary.java | 2 +- .../org/opentripplanner/model/transfer/TransferPoint.java | 4 ++-- .../org/opentripplanner/model/transfer/TransferPointMap.java | 2 +- .../org/opentripplanner/openstreetmap/model/OSMWithTags.java | 2 +- .../raptor/rangeraptor/SystemErrDebugLogger.java | 2 +- .../multicriteria/configure/McRangeRaptorConfig.java | 2 +- .../rangeraptor/standard/heuristics/HeuristicsAdapter.java | 2 +- .../rangeraptor/standard/stoparrivals/view/StopsCursor.java | 4 ++-- .../raptor/rangeraptor/transit/EgressPaths.java | 4 ++-- src/main/java/org/opentripplanner/raptor/spi/Flyweight.java | 2 +- .../opentripplanner/raptor/spi/RaptorBoardOrAlightEvent.java | 2 +- .../routing/algorithm/raptoradapter/router/TransitRouter.java | 2 +- .../transit/constrainedtransfer/TransferIndexGenerator.java | 2 +- .../raptoradapter/transit/request/TripSearchTimetable.java | 2 +- .../api/request/preference/TimeSlopeSafetyTriangle.java | 2 +- .../standalone/api/OtpServerRequestContext.java | 4 ++-- .../standalone/config/framework/json/EnumMapper.java | 2 +- .../transit/model/framework/DataValidationException.java | 2 +- .../org/opentripplanner/transit/model/framework/Result.java | 4 ++-- .../transit/model/framework/TransitBuilder.java | 2 +- .../transit/model/network/RoutingTripPattern.java | 2 +- .../java/org/opentripplanner/_support/arch/ArchComponent.java | 2 +- .../moduletests/F05_OnBoardAccessEgressAndTransfersTest.java | 2 +- .../opentripplanner/transit/speed_test/SpeedTestRequest.java | 2 +- .../transit/speed_test/model/testcase/ExpectedResults.java | 2 +- 34 files changed, 40 insertions(+), 40 deletions(-) diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index dd0f986e518..acd90b787e6 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -24,7 +24,7 @@ examples. The Transit model is more complex than the VehiclePosition model. a use-case or set of features. It may have an api with request/response classes. These are usually stateless; Hence the `Use Case Service` does normally not have a model. The implementing class has the same name as the interface with prefix `Default`. - - `Domain Model` A model witch encapsulate a business area. In the drawing two examples are shown, + - `Domain Model` A model which encapsulate a business area. In the drawing two examples are shown, the `transit` and `vhicleposition` domain model. The transit model is more complex so the implementation have a separate `Service` and `Repository`. Almost all http endpoints are , read-only so the `Service` can focus on serving the http API endpoints, while the repository diff --git a/CODE_CONVENTIONS.md b/CODE_CONVENTIONS.md index a9fd73a0497..ce816c481cc 100644 --- a/CODE_CONVENTIONS.md +++ b/CODE_CONVENTIONS.md @@ -38,7 +38,7 @@ be `org.opentripplanner...`. | Package | Description | | ------------------------------- |----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `o.o.` | At the top level we should divide OTP into "domain"s like `apis`, `framework`, `transit`, `street`, `astar`, `raptor`, `feeds`, `updaters`, and `application`. | -| `component` and `sub-component` | A group of packages/classes witch naturally belong together, think aggregate as in Domain Driven Design. | +| `component` and `sub-component` | A group of packages/classes which naturally belong together, think aggregate as in Domain Driven Design. | | `component.api` | Used for components to define the programing interface for the component. If present, (see Raptor) all outside dependencies to the component should be through the `api`. | | `component.model` | Used to create a model of a Entites, ValueObjects, ++. If exposed outside the component you should include an entry point like `xyz.model.XyzModel` and/or a Service (in api or component root package). | | `component.service` | Implementation of the service like `DefaultTransitService`, may also contain use-case specific code. Note, the Service interface goes into the component root or `api`, not in the service package. | diff --git a/src/main/java/org/opentripplanner/framework/concurrent/OtpRequestThreadFactory.java b/src/main/java/org/opentripplanner/framework/concurrent/OtpRequestThreadFactory.java index 1ad44728c80..e88bbb420cd 100644 --- a/src/main/java/org/opentripplanner/framework/concurrent/OtpRequestThreadFactory.java +++ b/src/main/java/org/opentripplanner/framework/concurrent/OtpRequestThreadFactory.java @@ -7,7 +7,7 @@ /** * This thread pool factory should be used to create all threads handling "user" requests in OTP. - * It is used to instrument new threads witch enable log information propagation and error handling, + * It is used to instrument new threads which enable log information propagation and error handling, * like thread interruption. By "user" we mean users of the query APIs like GTFS GraphQL API, * Transmodel GraphQL API and other http endpoints. *

diff --git a/src/main/java/org/opentripplanner/framework/text/MarkdownFormatter.java b/src/main/java/org/opentripplanner/framework/text/MarkdownFormatter.java index d74a14a3315..6fdb495a0d5 100644 --- a/src/main/java/org/opentripplanner/framework/text/MarkdownFormatter.java +++ b/src/main/java/org/opentripplanner/framework/text/MarkdownFormatter.java @@ -73,7 +73,7 @@ public static String escapeInTable(String text) { return text.replace("|", "¦"); } - /** Return whitespace witch can be used to indent inside a table cell. */ + /** Return whitespace which can be used to indent inside a table cell. */ public static String indentInTable(int level) { return level <= 0 ? "" : NBSP.repeat(3 * level); } diff --git a/src/main/java/org/opentripplanner/framework/text/Table.java b/src/main/java/org/opentripplanner/framework/text/Table.java index 9db832c9410..940868b82e2 100644 --- a/src/main/java/org/opentripplanner/framework/text/Table.java +++ b/src/main/java/org/opentripplanner/framework/text/Table.java @@ -48,7 +48,7 @@ public static TableBuilder of() { } /** - * Static method witch format a given table as valid Markdown table like: + * Static method which format a given table as valid Markdown table like: *

    * | A | B |
    * |---|---|
diff --git a/src/main/java/org/opentripplanner/framework/text/TableBuilder.java b/src/main/java/org/opentripplanner/framework/text/TableBuilder.java
index cf6623c2d99..12e80fd62a8 100644
--- a/src/main/java/org/opentripplanner/framework/text/TableBuilder.java
+++ b/src/main/java/org/opentripplanner/framework/text/TableBuilder.java
@@ -50,7 +50,7 @@ public TableBuilder withAlights(Collection aligns) {
   }
 
   /**
-   * Return the width needed for each column. The witch is calculated by taking
+   * Return the width needed for each column. The which is calculated by taking
    * the maximum of the {@code minWidth}, header width and the maximum width for all
    * cells in the column.
    */
diff --git a/src/main/java/org/opentripplanner/framework/time/DurationUtils.java b/src/main/java/org/opentripplanner/framework/time/DurationUtils.java
index fb30392cf9b..bf59964fbb2 100644
--- a/src/main/java/org/opentripplanner/framework/time/DurationUtils.java
+++ b/src/main/java/org/opentripplanner/framework/time/DurationUtils.java
@@ -124,7 +124,7 @@ public static Duration duration(String duration) {
   }
 
   /**
-   * This is used to parse a string witch may be a number {@code NNNN}(number of seconds) or a
+   * This is used to parse a string which may be a number {@code NNNN}(number of seconds) or a
    * duration with format {@code NhNmNs}, where {@code N} is a decimal number and
    * {@code h} is hours, {@code m} minutes and {@code s} seconds.
    * 

diff --git a/src/main/java/org/opentripplanner/framework/time/TimeUtils.java b/src/main/java/org/opentripplanner/framework/time/TimeUtils.java index afeeb77ff5d..61549eeced3 100644 --- a/src/main/java/org/opentripplanner/framework/time/TimeUtils.java +++ b/src/main/java/org/opentripplanner/framework/time/TimeUtils.java @@ -205,7 +205,7 @@ public static String msToString(long milliseconds) { * busy-wait again. *

* This method does a "busy" wait - it is not affected by a thread interrupt like - * {@link Thread#sleep(long)}; Hence do not interfere with timeout logic witch uses the interrupt + * {@link Thread#sleep(long)}; Hence do not interfere with timeout logic which uses the interrupt * flag. *

* THIS CODE IS NOT MEANT FOR PRODUCTION! @@ -226,7 +226,7 @@ public static long busyWaitOnce(int waitMs) { * number. *

* This method does a "busy" wait - it is not affected by a thread interrupt like - * {@link Thread#sleep(long)}; Hence do not interfere with timeout logic witch uses the interrupt + * {@link Thread#sleep(long)}; Hence do not interfere with timeout logic which uses the interrupt * flag. *

* THIS CODE IS NOT MEANT FOR PRODUCTION! diff --git a/src/main/java/org/opentripplanner/graph_builder/module/configure/GraphBuilderModules.java b/src/main/java/org/opentripplanner/graph_builder/module/configure/GraphBuilderModules.java index 82f183a0bc4..444adb5b727 100644 --- a/src/main/java/org/opentripplanner/graph_builder/module/configure/GraphBuilderModules.java +++ b/src/main/java/org/opentripplanner/graph_builder/module/configure/GraphBuilderModules.java @@ -46,7 +46,7 @@ import org.opentripplanner.transit.service.TransitModel; /** - * Configure all modules witch is not simple enough to be injected. + * Configure all modules which is not simple enough to be injected. */ @Module public class GraphBuilderModules { diff --git a/src/main/java/org/opentripplanner/model/plan/Itinerary.java b/src/main/java/org/opentripplanner/model/plan/Itinerary.java index 0c111999912..58320bf1652 100644 --- a/src/main/java/org/opentripplanner/model/plan/Itinerary.java +++ b/src/main/java/org/opentripplanner/model/plan/Itinerary.java @@ -428,7 +428,7 @@ public void setLegs(List legs) { * accessible the itinerary is as a whole. This is not a very scientific method but just a rough * guidance that expresses certainty or uncertainty about the accessibility. *

- * An alternative to this is to use the `generalized-cost` and use that to indicate witch itineraries is the + * An alternative to this is to use the `generalized-cost` and use that to indicate which itineraries is the * best/most friendly with respect to making the journey in a wheelchair. The `generalized-cost` include, not * only a penalty for unknown and inaccessible boardings, but also a penalty for undesired uphill and downhill * street traversal. diff --git a/src/main/java/org/opentripplanner/model/transfer/TransferPoint.java b/src/main/java/org/opentripplanner/model/transfer/TransferPoint.java index b10e96e6f1c..dcfc7d381ad 100644 --- a/src/main/java/org/opentripplanner/model/transfer/TransferPoint.java +++ b/src/main/java/org/opentripplanner/model/transfer/TransferPoint.java @@ -52,7 +52,7 @@ */ public interface TransferPoint { /** - * Utility method witch can be used in APIs to get the trip, if it exists, from a transfer point. + * Utility method which can be used in APIs to get the trip, if it exists, from a transfer point. */ @Nullable static Trip getTrip(TransferPoint point) { @@ -60,7 +60,7 @@ static Trip getTrip(TransferPoint point) { } /** - * Utility method witch can be used in APIs to get the route, if it exists, from a transfer + * Utility method which can be used in APIs to get the route, if it exists, from a transfer * point. */ @Nullable diff --git a/src/main/java/org/opentripplanner/model/transfer/TransferPointMap.java b/src/main/java/org/opentripplanner/model/transfer/TransferPointMap.java index 3592153f080..9f231d06aab 100644 --- a/src/main/java/org/opentripplanner/model/transfer/TransferPointMap.java +++ b/src/main/java/org/opentripplanner/model/transfer/TransferPointMap.java @@ -73,7 +73,7 @@ E computeIfAbsent(TransferPoint point, Supplier creator) { } /** - * List all elements witch matches any of the transfer points added to the map. + * List all elements which matches any of the transfer points added to the map. */ List get(Trip trip, StopLocation stop, int stopPointInPattern) { return Stream diff --git a/src/main/java/org/opentripplanner/openstreetmap/model/OSMWithTags.java b/src/main/java/org/opentripplanner/openstreetmap/model/OSMWithTags.java index 6e596e52076..37757823362 100644 --- a/src/main/java/org/opentripplanner/openstreetmap/model/OSMWithTags.java +++ b/src/main/java/org/opentripplanner/openstreetmap/model/OSMWithTags.java @@ -201,7 +201,7 @@ public Optional getTagOpt(String network) { /** * Get tag and convert it to an integer. If the tag exist, but can not be parsed into a number, - * then the error handler is called with the value witch failed to parse. + * then the error handler is called with the value which failed to parse. */ public OptionalInt getTagAsInt(String tag, Consumer errorHandler) { String value = getTag(tag); diff --git a/src/main/java/org/opentripplanner/raptor/rangeraptor/SystemErrDebugLogger.java b/src/main/java/org/opentripplanner/raptor/rangeraptor/SystemErrDebugLogger.java index b10783c830f..8c35f103106 100644 --- a/src/main/java/org/opentripplanner/raptor/rangeraptor/SystemErrDebugLogger.java +++ b/src/main/java/org/opentripplanner/raptor/rangeraptor/SystemErrDebugLogger.java @@ -28,7 +28,7 @@ import org.opentripplanner.raptor.rangeraptor.transit.TripTimesSearch; /** - * A debug logger witch can be plugged into Raptor to do debug logging to standard error. This is + * A debug logger which can be plugged into Raptor to do debug logging to standard error. This is * used by the REST API, SpeedTest and in module tests. *

* See the Raptor design doc for a general description of the logging functionality. diff --git a/src/main/java/org/opentripplanner/raptor/rangeraptor/multicriteria/configure/McRangeRaptorConfig.java b/src/main/java/org/opentripplanner/raptor/rangeraptor/multicriteria/configure/McRangeRaptorConfig.java index b05b0aeb5b0..649737bc42f 100644 --- a/src/main/java/org/opentripplanner/raptor/rangeraptor/multicriteria/configure/McRangeRaptorConfig.java +++ b/src/main/java/org/opentripplanner/raptor/rangeraptor/multicriteria/configure/McRangeRaptorConfig.java @@ -57,7 +57,7 @@ public McRangeRaptorConfig( /** * The PassThroughPointsService is injected into the transit-calculator, so it needs to be - * created before the context(witch create the calculator).So, to be able to do this, this + * created before the context(which create the calculator).So, to be able to do this, this * factory is static, and the service is passed back in when this config is instantiated. */ public static PassThroughPointsService passThroughPointsService( diff --git a/src/main/java/org/opentripplanner/raptor/rangeraptor/standard/heuristics/HeuristicsAdapter.java b/src/main/java/org/opentripplanner/raptor/rangeraptor/standard/heuristics/HeuristicsAdapter.java index 78aab07f21a..ff38fff6d40 100644 --- a/src/main/java/org/opentripplanner/raptor/rangeraptor/standard/heuristics/HeuristicsAdapter.java +++ b/src/main/java/org/opentripplanner/raptor/rangeraptor/standard/heuristics/HeuristicsAdapter.java @@ -185,7 +185,7 @@ private static AggregatedResults create( ); for (RaptorAccessEgress it : list) { - // Prevent transfer(walking) and the egress witch start with walking + // Prevent transfer(walking) and the egress which start with walking if (!(it.stopReachedOnBoard() || stopReachedByTransit)) { continue; } diff --git a/src/main/java/org/opentripplanner/raptor/rangeraptor/standard/stoparrivals/view/StopsCursor.java b/src/main/java/org/opentripplanner/raptor/rangeraptor/standard/stoparrivals/view/StopsCursor.java index d20f4ba5db8..f72047597a7 100644 --- a/src/main/java/org/opentripplanner/raptor/rangeraptor/standard/stoparrivals/view/StopsCursor.java +++ b/src/main/java/org/opentripplanner/raptor/rangeraptor/standard/stoparrivals/view/StopsCursor.java @@ -59,7 +59,7 @@ public Access fictiveAccess(int round, RaptorAccessEgress accessPath, int arr /** * Return a fictive Transfer stop arrival view. The arrival does not exist in the state, but is - * linked with the previous arrival witch is a "real" arrival present in the state. This enables + * linked with the previous arrival which is a "real" arrival present in the state. This enables * path generation. */ public Transfer fictiveTransfer( @@ -76,7 +76,7 @@ public Transfer fictiveTransfer( /** * Return a fictive Transit stop arrival view. The arrival does not exist in the state, but is - * linked with the previous arrival witch is a "real" arrival present in the state. This enables + * linked with the previous arrival which is a "real" arrival present in the state. This enables * path generation. */ public Transit fictiveTransit( diff --git a/src/main/java/org/opentripplanner/raptor/rangeraptor/transit/EgressPaths.java b/src/main/java/org/opentripplanner/raptor/rangeraptor/transit/EgressPaths.java index fa4fc57dc84..2038ab543df 100644 --- a/src/main/java/org/opentripplanner/raptor/rangeraptor/transit/EgressPaths.java +++ b/src/main/java/org/opentripplanner/raptor/rangeraptor/transit/EgressPaths.java @@ -54,7 +54,7 @@ public Collection listAll() { } /** - * List all stops with an egress path witch start by walking. These egress paths can only be used + * List all stops with an egress path which start by walking. These egress paths can only be used * if arriving at the stop by transit. */ public int[] egressesWitchStartByWalking() { @@ -62,7 +62,7 @@ public int[] egressesWitchStartByWalking() { } /** - * List all stops with an egress path witch start on-board a "transit" ride. These + * List all stops with an egress path which start on-board a "transit" ride. These * egress paths can be used when arriving at the stop with both transfer or transit. */ public int[] egressesWitchStartByARide() { diff --git a/src/main/java/org/opentripplanner/raptor/spi/Flyweight.java b/src/main/java/org/opentripplanner/raptor/spi/Flyweight.java index c2b0536c8ab..a3d9ee0db1c 100644 --- a/src/main/java/org/opentripplanner/raptor/spi/Flyweight.java +++ b/src/main/java/org/opentripplanner/raptor/spi/Flyweight.java @@ -6,7 +6,7 @@ import java.lang.annotation.Target; /** - * This interface is used to tag methods witch return flyweight objects. The implementation may + * This interface is used to tag methods which return flyweight objects. The implementation may * choose not to implement the return type as a flyweight object, but the Raptor implementation * is guaranteed to treat them as such - enabling the optimization. *

diff --git a/src/main/java/org/opentripplanner/raptor/spi/RaptorBoardOrAlightEvent.java b/src/main/java/org/opentripplanner/raptor/spi/RaptorBoardOrAlightEvent.java index da01e397c06..5913f950969 100644 --- a/src/main/java/org/opentripplanner/raptor/spi/RaptorBoardOrAlightEvent.java +++ b/src/main/java/org/opentripplanner/raptor/spi/RaptorBoardOrAlightEvent.java @@ -77,7 +77,7 @@ default int boardStopIndex() { /** * This is a helper method for the Raptor implementation to be able to board or execute * a alternativeBoardingFallback method depending on the event. This logic should ideally - * be put inside raptor, but due to performance(creating lambda instances, witch for some + * be put inside raptor, but due to performance(creating lambda instances, which for some * reason is not inlined) this need to be here. *

* @param boardCallback perform boarding if the event in none empty (or some other special diff --git a/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/router/TransitRouter.java b/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/router/TransitRouter.java index b9f9685341c..f18aa056504 100644 --- a/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/router/TransitRouter.java +++ b/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/router/TransitRouter.java @@ -177,7 +177,7 @@ private AccessEgresses fetchAccessEgresses() { if (OTPFeature.ParallelRouting.isOn()) { try { - // TODO: This is not using {@link OtpRequestThreadFactory} witch mean we do not get + // TODO: This is not using {@link OtpRequestThreadFactory} which mean we do not get // log-trace-parameters-propagation and graceful timeout handling here. CompletableFuture .allOf( diff --git a/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/constrainedtransfer/TransferIndexGenerator.java b/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/constrainedtransfer/TransferIndexGenerator.java index 9fc2dc69194..7acddd9cea5 100644 --- a/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/constrainedtransfer/TransferIndexGenerator.java +++ b/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/constrainedtransfer/TransferIndexGenerator.java @@ -57,7 +57,7 @@ public ConstrainedTransfersForPatterns generateTransfers() { for (ConstrainedTransfer tx : constrainedTransfers) { var c = tx.getTransferConstraint(); - // Only add transfers witch have an effect on the Raptor routing here. + // Only add transfers which have an effect on the Raptor routing here. // Some transfers only have the priority set, and that is used in optimized- // transfers, but not in Raptor. if (!c.includeInRaptorRouting()) { diff --git a/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/request/TripSearchTimetable.java b/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/request/TripSearchTimetable.java index 88e9d52e878..147eddfc605 100644 --- a/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/request/TripSearchTimetable.java +++ b/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/request/TripSearchTimetable.java @@ -9,7 +9,7 @@ * This interface add two methods the the {@link RaptorTimeTable} to optimize the terip search * inside the transit model. They were previously in Raptor, but the trip Search is moded outside * of Raptor; We have keep these methods in an interface to be able to reuse the complex TripSearch - * in tests, witch do not use the transit model {@link TripSchedule}; Hence also the generic type + * in tests, which do not use the transit model {@link TripSchedule}; Hence also the generic type * on this interface. */ public interface TripSearchTimetable extends RaptorTimeTable { diff --git a/src/main/java/org/opentripplanner/routing/api/request/preference/TimeSlopeSafetyTriangle.java b/src/main/java/org/opentripplanner/routing/api/request/preference/TimeSlopeSafetyTriangle.java index e93dd5f5a6c..b901d738213 100644 --- a/src/main/java/org/opentripplanner/routing/api/request/preference/TimeSlopeSafetyTriangle.java +++ b/src/main/java/org/opentripplanner/routing/api/request/preference/TimeSlopeSafetyTriangle.java @@ -52,7 +52,7 @@ public TimeSlopeSafetyTriangle(double time, double slope, double safety) { } /** - * Creates a special builder, witch used together with the + * Creates a special builder, which used together with the * {@link Builder#buildOrDefault(TimeSlopeSafetyTriangle)} can return a new instance or the * default value if no values are set. This is useful in the APIs where we want to fall back to * the default {@link TimeSlopeSafetyTriangle}, if no values are set. If only one or two values diff --git a/src/main/java/org/opentripplanner/standalone/api/OtpServerRequestContext.java b/src/main/java/org/opentripplanner/standalone/api/OtpServerRequestContext.java index 8fa8069ba70..fa6ead99c5e 100644 --- a/src/main/java/org/opentripplanner/standalone/api/OtpServerRequestContext.java +++ b/src/main/java/org/opentripplanner/standalone/api/OtpServerRequestContext.java @@ -47,7 +47,7 @@ * *

* This class is not THREAD-SAFE, each HTTP request gets its own copy, but if there are multiple - * threads witch accesses this context within the HTTP Request, then the caller is responsible + * threads which accesses this context within the HTTP Request, then the caller is responsible * for the synchronization. Only request scoped components need to be synchronized - they are * potentially lazy initialized. */ @@ -107,7 +107,7 @@ public interface OtpServerRequestContext { TileRendererManager tileRendererManager(); /** - * Callback witch is injected into the {@code DirectStreetRouter}, used to visualize the + * Callback which is injected into the {@code DirectStreetRouter}, used to visualize the * search. */ @HttpRequestScoped diff --git a/src/main/java/org/opentripplanner/standalone/config/framework/json/EnumMapper.java b/src/main/java/org/opentripplanner/standalone/config/framework/json/EnumMapper.java index 1bad7033104..ce880058005 100644 --- a/src/main/java/org/opentripplanner/standalone/config/framework/json/EnumMapper.java +++ b/src/main/java/org/opentripplanner/standalone/config/framework/json/EnumMapper.java @@ -31,7 +31,7 @@ public static String kebabCase(String input) { } /** - * Used to create a list of all values with description of each value witch can be included + * Used to create a list of all values with description of each value which can be included * in documentation. The list will look like this: * ``` * - `on` Turn on. diff --git a/src/main/java/org/opentripplanner/transit/model/framework/DataValidationException.java b/src/main/java/org/opentripplanner/transit/model/framework/DataValidationException.java index d1c985e6db0..20848ebecc1 100644 --- a/src/main/java/org/opentripplanner/transit/model/framework/DataValidationException.java +++ b/src/main/java/org/opentripplanner/transit/model/framework/DataValidationException.java @@ -3,7 +3,7 @@ import org.opentripplanner.framework.error.OtpError; /** - * This class is used to throw a data validation exception. It holds an error witch can be + * This class is used to throw a data validation exception. It holds an error which can be * inserted into build issue store, into the updater logs or returned to the APIs. The framework * to catch and handle this is NOT IN PLACE, see * Error code design #5070. diff --git a/src/main/java/org/opentripplanner/transit/model/framework/Result.java b/src/main/java/org/opentripplanner/transit/model/framework/Result.java index 621ce7569f2..9df1c41f190 100644 --- a/src/main/java/org/opentripplanner/transit/model/framework/Result.java +++ b/src/main/java/org/opentripplanner/transit/model/framework/Result.java @@ -10,7 +10,7 @@ *

* It's very similar to the Either or Validation type found in functional programming languages. * - * @deprecated This not possible to use inside a constructor - can only return one thing. Witch, + * @deprecated This not possible to use inside a constructor - can only return one thing. Which, * then makes encapsulation harder and leaves the door open to forget. Also, having to create * error codes, mapping and handling code for hundreds of different possible validation error * types make changes harder, and cleanup impossible. This is a nice way to design APIs, but @@ -18,7 +18,7 @@ * amount of code branches this breaks. *

* I will use the {@link DataValidationException} for now, but we need to make an error - * handling strategy witch take all use-cases and goals into account, also pragmatic goals + * handling strategy which take all use-cases and goals into account, also pragmatic goals * like maintainability. The {@link DataValidationException} is not a solution, but it * at least it allows me to omit returning all possible error on every method ... *

diff --git a/src/main/java/org/opentripplanner/transit/model/framework/TransitBuilder.java b/src/main/java/org/opentripplanner/transit/model/framework/TransitBuilder.java index bd18690d9a3..52fd68165bc 100644 --- a/src/main/java/org/opentripplanner/transit/model/framework/TransitBuilder.java +++ b/src/main/java/org/opentripplanner/transit/model/framework/TransitBuilder.java @@ -5,7 +5,7 @@ public interface TransitBuilder, B extends Transit * Build a new object based on the values set in the builder. This method is NOT context aware - * any context is not updated. Use the {@link TransitEntityBuilder#save()} method instead to * build an object and store it in the context. This method is useful if you need to build an - * object witch should be request scoped or used in a test. + * object which should be request scoped or used in a test. *

* For value objects are stored as "part of" an entity, but OTP tries to reuse objects using the * {@code Deduplicator}. This method may or may not be context aware, using a deduplicator to diff --git a/src/main/java/org/opentripplanner/transit/model/network/RoutingTripPattern.java b/src/main/java/org/opentripplanner/transit/model/network/RoutingTripPattern.java index 0d319af0529..00033b5f798 100644 --- a/src/main/java/org/opentripplanner/transit/model/network/RoutingTripPattern.java +++ b/src/main/java/org/opentripplanner/transit/model/network/RoutingTripPattern.java @@ -12,7 +12,7 @@ * - The RTP is accessed frequently during the Raptor search, and we want it to be as small as * possible to load/access it in the cache and CPU for performance reasons. * - Also, we deduplicate these so a RTP can be reused by more than one TP. - * - This also provide explicit documentation on witch fields are used during a search and which + * - This also provide explicit documentation on which fields are used during a search and which * are not. */ public class RoutingTripPattern implements DefaultTripPattern, Serializable { diff --git a/src/test/java/org/opentripplanner/_support/arch/ArchComponent.java b/src/test/java/org/opentripplanner/_support/arch/ArchComponent.java index a1261d09648..7273b3123e3 100644 --- a/src/test/java/org/opentripplanner/_support/arch/ArchComponent.java +++ b/src/test/java/org/opentripplanner/_support/arch/ArchComponent.java @@ -9,7 +9,7 @@ public interface ArchComponent { /** * ArchUnit cached set of classes in OTP. It takes a bit of time to build the set of * classes, so it is nice to avoid this for every test. ArchUnit also support JUnit5 - * with a @ArchTest annotation witch cache and inject the classes, but the test become + * with a @ArchTest annotation which cache and inject the classes, but the test become * slightly more complex by using it and chasing it here works fine. */ JavaClasses OTP_CLASSES = new ClassFileImporter() diff --git a/src/test/java/org/opentripplanner/raptor/moduletests/F05_OnBoardAccessEgressAndTransfersTest.java b/src/test/java/org/opentripplanner/raptor/moduletests/F05_OnBoardAccessEgressAndTransfersTest.java index 59d7dcd7d4e..72da3f71145 100644 --- a/src/test/java/org/opentripplanner/raptor/moduletests/F05_OnBoardAccessEgressAndTransfersTest.java +++ b/src/test/java/org/opentripplanner/raptor/moduletests/F05_OnBoardAccessEgressAndTransfersTest.java @@ -25,7 +25,7 @@ * FEATURE UNDER TEST *

* Raptor should be able to route Access arriving on-board and egress departing on-board connecting - * to transit by transfers. Access and egress witch arrive/depart at/from the same stops by + * to transit by transfers. Access and egress which arrive/depart at/from the same stops by * walking should not be possible. */ public class F05_OnBoardAccessEgressAndTransfersTest implements RaptorTestConstants { diff --git a/src/test/java/org/opentripplanner/transit/speed_test/SpeedTestRequest.java b/src/test/java/org/opentripplanner/transit/speed_test/SpeedTestRequest.java index 1bfe202f92f..2dfaad077c6 100644 --- a/src/test/java/org/opentripplanner/transit/speed_test/SpeedTestRequest.java +++ b/src/test/java/org/opentripplanner/transit/speed_test/SpeedTestRequest.java @@ -63,7 +63,7 @@ RouteRequest toRouteRequest() { request.setTo(input.toPlace()); // Filter the results inside the SpeedTest, not in the itineraries filter, - // when ignoring street results. This will use the default witch is 50. + // when ignoring street results. This will use the default which is 50. if (!config.ignoreStreetResults) { request.setNumItineraries(opts.numOfItineraries()); } diff --git a/src/test/java/org/opentripplanner/transit/speed_test/model/testcase/ExpectedResults.java b/src/test/java/org/opentripplanner/transit/speed_test/model/testcase/ExpectedResults.java index 1b14bc8fc12..eb66b3671e4 100644 --- a/src/test/java/org/opentripplanner/transit/speed_test/model/testcase/ExpectedResults.java +++ b/src/test/java/org/opentripplanner/transit/speed_test/model/testcase/ExpectedResults.java @@ -10,7 +10,7 @@ /** * This class contains the results for a given test case. A set of results * for each {@link SpeedTestProfile} is kept. A default set is also available, - * witch can be used if there is not set for a given profile. + * which can be used if there is not set for a given profile. */ public class ExpectedResults {