Skip to content

Commit cf4ed4b

Browse files
committed
Fix some checkstyle violations
1 parent 032228b commit cf4ed4b

File tree

15 files changed

+78
-32
lines changed

15 files changed

+78
-32
lines changed

application/src/ext/java/org/opentripplanner/ext/carpooling/model/CarpoolStop.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,12 @@ public ZonedDateTime getEstimatedTime() {
260260

261261
@Override
262262
public boolean equals(Object obj) {
263-
if (this == obj) return true;
264-
if (!(obj instanceof CarpoolStop other)) return false;
263+
if (this == obj) {
264+
return true;
265+
}
266+
if (!(obj instanceof CarpoolStop other)) {
267+
return false;
268+
}
265269

266270
return (
267271
areaStop.equals(other.areaStop) &&

application/src/main/java/org/opentripplanner/street/search/request/AccessibilityRequest.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,12 @@ public int inaccessibleCost() {
9797

9898
@Override
9999
public boolean equals(Object o) {
100-
if (this == o) return true;
101-
if (o == null || getClass() != o.getClass()) return false;
100+
if (this == o) {
101+
return true;
102+
}
103+
if (o == null || getClass() != o.getClass()) {
104+
return false;
105+
}
102106
AccessibilityRequest that = (AccessibilityRequest) o;
103107
return (
104108
onlyConsiderAccessible == that.onlyConsiderAccessible &&

application/src/main/java/org/opentripplanner/street/search/request/BikeRequest.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,12 @@ public VehicleWalkingRequest walking() {
111111

112112
@Override
113113
public boolean equals(Object o) {
114-
if (this == o) return true;
115-
if (o == null || getClass() != o.getClass()) return false;
114+
if (this == o) {
115+
return true;
116+
}
117+
if (o == null || getClass() != o.getClass()) {
118+
return false;
119+
}
116120
BikeRequest that = (BikeRequest) o;
117121
return (
118122
doubleEquals(that.speed, speed) &&

application/src/main/java/org/opentripplanner/street/search/request/CarRequest.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,12 @@ public double decelerationSpeed() {
113113

114114
@Override
115115
public boolean equals(Object o) {
116-
if (this == o) return true;
117-
if (o == null || getClass() != o.getClass()) return false;
116+
if (this == o) {
117+
return true;
118+
}
119+
if (o == null || getClass() != o.getClass()) {
120+
return false;
121+
}
118122
CarRequest that = (CarRequest) o;
119123
return (
120124
DoubleUtils.doubleEquals(that.reluctance, reluctance) &&

application/src/main/java/org/opentripplanner/street/search/request/ElevatorRequest.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,12 @@ public int hopTime() {
7272

7373
@Override
7474
public boolean equals(Object o) {
75-
if (this == o) return true;
76-
if (o == null || getClass() != o.getClass()) return false;
75+
if (this == o) {
76+
return true;
77+
}
78+
if (o == null || getClass() != o.getClass()) {
79+
return false;
80+
}
7781
ElevatorRequest that = (ElevatorRequest) o;
7882
return (
7983
boardCost.equals(that.boardCost) &&

application/src/main/java/org/opentripplanner/street/search/request/EscalatorRequest.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,12 @@ public double speed() {
4646

4747
@Override
4848
public boolean equals(Object o) {
49-
if (this == o) return true;
50-
if (o == null || getClass() != o.getClass()) return false;
49+
if (this == o) {
50+
return true;
51+
}
52+
if (o == null || getClass() != o.getClass()) {
53+
return false;
54+
}
5155
EscalatorRequest that = (EscalatorRequest) o;
5256
return (doubleEquals(that.reluctance, reluctance) && doubleEquals(that.speed, speed));
5357
}

application/src/main/java/org/opentripplanner/street/search/request/ParkingRequest.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,12 @@ public Cost cost() {
8686

8787
@Override
8888
public boolean equals(Object o) {
89-
if (this == o) return true;
90-
if (o == null || getClass() != o.getClass()) return false;
89+
if (this == o) {
90+
return true;
91+
}
92+
if (o == null || getClass() != o.getClass()) {
93+
return false;
94+
}
9195
ParkingRequest that = (ParkingRequest) o;
9296
return (
9397
Objects.equals(unpreferredVehicleParkingTagCost, that.unpreferredVehicleParkingTagCost) &&

application/src/main/java/org/opentripplanner/street/search/request/RentalRequest.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,12 @@ public Set<String> bannedNetworks() {
121121

122122
@Override
123123
public boolean equals(Object o) {
124-
if (this == o) return true;
125-
if (o == null || getClass() != o.getClass()) return false;
124+
if (this == o) {
125+
return true;
126+
}
127+
if (o == null || getClass() != o.getClass()) {
128+
return false;
129+
}
126130
RentalRequest that = (RentalRequest) o;
127131
return (
128132
Objects.equals(pickupTime, that.pickupTime) &&

application/src/main/java/org/opentripplanner/street/search/request/ScooterRequest.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,12 @@ public TimeSlopeSafetyTriangle optimizeTriangle() {
8484

8585
@Override
8686
public boolean equals(Object o) {
87-
if (this == o) return true;
88-
if (o == null || getClass() != o.getClass()) return false;
87+
if (this == o) {
88+
return true;
89+
}
90+
if (o == null || getClass() != o.getClass()) {
91+
return false;
92+
}
8993
ScooterRequest that = (ScooterRequest) o;
9094
return (
9195
doubleEquals(that.speed, speed) &&

application/src/main/java/org/opentripplanner/street/search/request/VehicleWalkingRequest.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,12 @@ public double stairsReluctance() {
8888

8989
@Override
9090
public boolean equals(Object o) {
91-
if (this == o) return true;
92-
if (o == null || getClass() != o.getClass()) return false;
91+
if (this == o) {
92+
return true;
93+
}
94+
if (o == null || getClass() != o.getClass()) {
95+
return false;
96+
}
9397
VehicleWalkingRequest that = (VehicleWalkingRequest) o;
9498
return (
9599
speed == that.speed &&

0 commit comments

Comments
 (0)