From 431de69549a34f2032b4e90c9eaaa06e68bb33a4 Mon Sep 17 00:00:00 2001 From: Stefan Kalscheuer Date: Mon, 4 Nov 2019 17:55:10 +0100 Subject: [PATCH] typo fixes in comments and test messages [skip ci] --- CHANGELOG.md | 2 +- README.md | 2 +- .../de/stklcode/pubtrans/ura/UraClient.java | 2 +- .../de/stklcode/pubtrans/ura/model/Trip.java | 2 +- .../ura/reader/AsyncUraTripReader.java | 4 ++-- .../stklcode/pubtrans/ura/model/StopTest.java | 16 ++++++------- .../stklcode/pubtrans/ura/model/TripTest.java | 24 +++++++++---------- .../ura/reader/AsyncUraTripReaderTest.java | 4 ++-- 8 files changed, 28 insertions(+), 28 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 951379d..c0319b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,7 @@ All notable changes to this project will be documented in this file. ### Fixed * Fixed issue with direction ID as `String` instead if `Integer` (#2) * Fixed issue with vehicle ID being `null` (#3) -* Fixed issue with spaces in search parametes (#4) +* Fixed issue with spaces in search parameters (#4) ## 1.1.3 - 2018-11-13 diff --git a/README.md b/README.md index d77dd89..73b6c63 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ local bus station or any other custom queries. API versions 1.x and 2.x are supp // Instantiate the client (e.g. using the TFL API) UraClient ura = new UraClient("http://countdown.api.tfl.gov.uk"); -// Initiailize the API with non-standard endpoints (e.g. ASEAG with API V2) +// Initialize the API with non-standard endpoints (e.g. ASEAG with API V2) UraClient ura = new UraClient("http://ivu.aseag.de", "interfaces/ura/instant_V2", "interfaces/ura/stream_V2"); diff --git a/src/main/java/de/stklcode/pubtrans/ura/UraClient.java b/src/main/java/de/stklcode/pubtrans/ura/UraClient.java index e85b539..f539dcc 100644 --- a/src/main/java/de/stklcode/pubtrans/ura/UraClient.java +++ b/src/main/java/de/stklcode/pubtrans/ura/UraClient.java @@ -367,7 +367,7 @@ public class UraClient implements Serializable { * * @param url The URL. * @return Input Stream of results. - * @throws IOException Error opening conneciton or reading data. + * @throws IOException Error opening connection or reading data. */ private InputStream request(String url) throws IOException { return new URL(url).openStream(); diff --git a/src/main/java/de/stklcode/pubtrans/ura/model/Trip.java b/src/main/java/de/stklcode/pubtrans/ura/model/Trip.java index 54d2347..80316e4 100644 --- a/src/main/java/de/stklcode/pubtrans/ura/model/Trip.java +++ b/src/main/java/de/stklcode/pubtrans/ura/model/Trip.java @@ -145,7 +145,7 @@ public final class Trip implements Model { } /** - * Construct Stop object from raw list of attributes parsed from JSON with explicitly specified version. + * Construct Trip object from raw list of attributes parsed from JSON with explicitly specified version. * * @param raw List of attributes from JSON line * @param version API version diff --git a/src/main/java/de/stklcode/pubtrans/ura/reader/AsyncUraTripReader.java b/src/main/java/de/stklcode/pubtrans/ura/reader/AsyncUraTripReader.java index 0c917fc..646a4d2 100644 --- a/src/main/java/de/stklcode/pubtrans/ura/reader/AsyncUraTripReader.java +++ b/src/main/java/de/stklcode/pubtrans/ura/reader/AsyncUraTripReader.java @@ -70,7 +70,7 @@ public class AsyncUraTripReader implements AutoCloseable { } public void open() { - // Throw exeption, if future is already present. + // Throw exception, if future is already present. if (future != null) { throw new IllegalStateException("Reader already opened"); } @@ -113,7 +113,7 @@ public class AsyncUraTripReader implements AutoCloseable { /** * Close the reader. - * This is done by signaliung cancel to the asyncronous task. If the task is not completed + * This is done by signaling cancel to the asynchronous task. If the task is not completed * within 1 second however it is cancelled hard. */ @Override diff --git a/src/test/java/de/stklcode/pubtrans/ura/model/StopTest.java b/src/test/java/de/stklcode/pubtrans/ura/model/StopTest.java index 43aa002..75efb77 100644 --- a/src/test/java/de/stklcode/pubtrans/ura/model/StopTest.java +++ b/src/test/java/de/stklcode/pubtrans/ura/model/StopTest.java @@ -29,7 +29,7 @@ import static org.hamcrest.core.Is.is; import static org.junit.jupiter.api.Assertions.fail; /** - * Unit test for the Stop metamodel. + * Unit test for the {@link Stop} meta model. * * @author Stefan Kalscheuer */ @@ -85,7 +85,7 @@ public class StopTest { invalid.add(1, 5); try { new Stop(invalid); - fail("Creation of Stop with invalid name field successfull"); + fail("Creation of Stop with invalid name field successful"); } catch (Exception e) { assertThat(e, is(instanceOf(IOException.class))); } @@ -95,7 +95,7 @@ public class StopTest { invalid.add(2, 0); try { new Stop(invalid); - fail("Creation of Stop with invalid id field successfull"); + fail("Creation of Stop with invalid id field successful"); } catch (Exception e) { assertThat(e, is(instanceOf(IOException.class))); } @@ -105,7 +105,7 @@ public class StopTest { invalid.add(3, -1.23); try { new Stop(invalid); - fail("Creation of Stop with invalid indicator field successfull"); + fail("Creation of Stop with invalid indicator field successful"); } catch (Exception e) { assertThat(e, is(instanceOf(IOException.class))); } @@ -115,7 +115,7 @@ public class StopTest { invalid.add(4, "foo"); try { new Stop(invalid); - fail("Creation of Stop with invalid state field successfull"); + fail("Creation of Stop with invalid state field successful"); } catch (Exception e) { assertThat(e, is(instanceOf(IOException.class))); } @@ -125,7 +125,7 @@ public class StopTest { invalid.add(5, "123"); try { new Stop(invalid); - fail("Creation of Stop with invalid latitude field successfull"); + fail("Creation of Stop with invalid latitude field successful"); } catch (Exception e) { assertThat(e, is(instanceOf(IOException.class))); } @@ -135,7 +135,7 @@ public class StopTest { invalid.add(6, 456); try { new Stop(invalid); - fail("Creation of Stop with invalid longitude field successfull"); + fail("Creation of Stop with invalid longitude field successful"); } catch (Exception e) { assertThat(e, is(instanceOf(IOException.class))); } @@ -144,7 +144,7 @@ public class StopTest { invalid.remove(6); try { new Stop(invalid); - fail("Creation of Stop with too short list successfull"); + fail("Creation of Stop with too short list successful"); } catch (Exception e) { assertThat(e, is(instanceOf(IOException.class))); } diff --git a/src/test/java/de/stklcode/pubtrans/ura/model/TripTest.java b/src/test/java/de/stklcode/pubtrans/ura/model/TripTest.java index 074f500..412d0fc 100644 --- a/src/test/java/de/stklcode/pubtrans/ura/model/TripTest.java +++ b/src/test/java/de/stklcode/pubtrans/ura/model/TripTest.java @@ -29,7 +29,7 @@ import static org.hamcrest.core.Is.is; import static org.junit.jupiter.api.Assertions.fail; /** - * Unit test for the Trip metamodel. + * Unit test for the {@link Trip} meta model. * * @author Stefan Kalscheuer */ @@ -156,7 +156,7 @@ public class TripTest { invalid.add(7, "123"); try { new Trip(invalid); - fail("Creation of Trip with invalid visitID field successfull"); + fail("Creation of Trip with invalid visitID field successful"); } catch (Exception e) { assertThat(e, is(instanceOf(IOException.class))); } @@ -166,7 +166,7 @@ public class TripTest { invalid.add(8, 25); try { new Trip(invalid); - fail("Creation of Trip with invalid lineID field successfull"); + fail("Creation of Trip with invalid lineID field successful"); } catch (Exception e) { assertThat(e, is(instanceOf(IOException.class))); } @@ -176,7 +176,7 @@ public class TripTest { invalid.add(9, 234L); try { new Trip(invalid); - fail("Creation of Trip with invalid line name field successfull"); + fail("Creation of Trip with invalid line name field successful"); } catch (Exception e) { assertThat(e, is(instanceOf(IOException.class))); } @@ -186,7 +186,7 @@ public class TripTest { invalid.add(10, "7"); // Strings are generally OK, but 7 is out of range (#2). try { new Trip(invalid); - fail("Creation of Trip with invalid directionID field successfull"); + fail("Creation of Trip with invalid directionID field successful"); } catch (Exception e) { assertThat(e, is(instanceOf(IOException.class))); } @@ -196,7 +196,7 @@ public class TripTest { invalid.add(11, 987); try { new Trip(invalid); - fail("Creation of Trip with invalid destinationName field successfull"); + fail("Creation of Trip with invalid destinationName field successful"); } catch (Exception e) { assertThat(e, is(instanceOf(IOException.class))); } @@ -206,7 +206,7 @@ public class TripTest { invalid.add(12, 456.78); try { new Trip(invalid); - fail("Creation of Trip with invalid destinationText field successfull"); + fail("Creation of Trip with invalid destinationText field successful"); } catch (Exception e) { assertThat(e, is(instanceOf(IOException.class))); } @@ -216,7 +216,7 @@ public class TripTest { invalid.add(13, 'x'); try { new Trip(invalid); - fail("Creation of Trip with invalid vehicleID field successfull"); + fail("Creation of Trip with invalid vehicleID field successful"); } catch (Exception e) { assertThat(e, is(instanceOf(IOException.class))); } @@ -226,7 +226,7 @@ public class TripTest { invalid.add(14, 1.2); try { new Trip(invalid); - fail("Creation of Trip with invalid id field successfull"); + fail("Creation of Trip with invalid id field successful"); } catch (Exception e) { assertThat(e, is(instanceOf(IOException.class))); } @@ -236,7 +236,7 @@ public class TripTest { invalid.add(15, 456); try { new Trip(invalid); - fail("Creation of Trip with invalid estimatedTime field successfull"); + fail("Creation of Trip with invalid estimatedTime field successful"); } catch (Exception e) { assertThat(e, is(instanceOf(IOException.class))); } @@ -245,7 +245,7 @@ public class TripTest { invalid.remove(15); try { new Trip(invalid); - fail("Creation of Trip with too short list successfull"); + fail("Creation of Trip with too short list successful"); } catch (Exception e) { assertThat(e, is(instanceOf(IOException.class))); } @@ -254,7 +254,7 @@ public class TripTest { invalid.set(10, 3); try { new Trip(invalid); - fail("Creation of Trip with direction ID 3 successfull"); + fail("Creation of Trip with direction ID 3 successful"); } catch (Exception e) { assertThat(e, is(instanceOf(IOException.class))); } diff --git a/src/test/java/de/stklcode/pubtrans/ura/reader/AsyncUraTripReaderTest.java b/src/test/java/de/stklcode/pubtrans/ura/reader/AsyncUraTripReaderTest.java index 3963153..b4faaa3 100644 --- a/src/test/java/de/stklcode/pubtrans/ura/reader/AsyncUraTripReaderTest.java +++ b/src/test/java/de/stklcode/pubtrans/ura/reader/AsyncUraTripReaderTest.java @@ -92,7 +92,7 @@ public class AsyncUraTripReaderTest { ) ); - // Open the rewader. + // Open the reader. tr.open(); // Read for 1 second. TimeUnit.SECONDS.sleep(1); @@ -253,7 +253,7 @@ public class AsyncUraTripReaderTest { * Write next line from the buffer to the mocked stream pipe. * * @return {@code true} if a line has been written. - * @throws IOException Errir writing the data. + * @throws IOException Error writing the data. */ private static boolean writeNextLine() throws IOException { String line = MOCK_LINES.poll();