Skip to content
This repository was archived by the owner on May 27, 2024. It is now read-only.

Commit 7aa42c8

Browse files
committed
replace String::strip by String::trim
to maintain java8 compatibility
1 parent 6547fba commit 7aa42c8

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

GO_Sync/src/main/java/edu/usf/cutr/go_sync/gui/MainForm.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,7 @@ private void compareButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN
821821
if (!citiesWithoutTownPrefixField.getText().isEmpty()) {
822822
String[] citiesArray = citiesWithoutTownPrefixField.getText().split(";");
823823
ArrayList<String> cities = new ArrayList<>(Arrays.asList(citiesArray));
824-
cities.replaceAll(String::strip);
824+
cities.replaceAll(String::trim);
825825
processingParams.setStopCities(cities);
826826
}
827827
if (!LatGTField.getText().isEmpty()) {

GO_Sync/src/main/java/edu/usf/cutr/go_sync/gui/ReportViewer.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1349,7 +1349,7 @@ private void updateMemberList(Route selectedNewRoute, Route selectedOsmRoute, St
13491349
if (v != null && !v.equals("none") && !v.equals("")) {
13501350
hashGtfs.put(t, v + suffix);
13511351
} else {
1352-
hashGtfs.put(t, suffix.strip());
1352+
hashGtfs.put(t, suffix.trim());
13531353
}
13541354
}
13551355

@@ -1360,7 +1360,7 @@ private void updateMemberList(Route selectedNewRoute, Route selectedOsmRoute, St
13601360
if (v != null && !v.equals("none") && !v.equals("")) {
13611361
hashOsm.put(t, v + suffix);
13621362
} else {
1363-
hashOsm.put(t, suffix.strip());
1363+
hashOsm.put(t, suffix.trim());
13641364
}
13651365
}
13661366

@@ -1373,7 +1373,7 @@ private void updateMemberList(Route selectedNewRoute, Route selectedOsmRoute, St
13731373
String v = t.getGtfsId();
13741374
String suffix = " (" + t.getType() + "/" + t.getRoleForFinalOutput() + "/" + t.getRef() + ")";
13751375
if (v == null || v.equals("none") || v.equals("")) {
1376-
v = suffix.strip();
1376+
v = suffix.trim();
13771377
} else {
13781378
v = v + suffix;
13791379
}

GO_Sync/src/main/java/edu/usf/cutr/go_sync/gui/object/BooleanMouseListener.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,8 @@ public void mouseReleased(MouseEvent e) {
168168
private String addToOSMMultiValue(String dataValue, String otherData) {
169169
ArrayList<String> dataValueList = new ArrayList<>(Arrays.asList(dataValue.split(";")));
170170
ArrayList<String> otherDataList = new ArrayList<>(Arrays.asList(otherData.split(";")));
171-
dataValueList.replaceAll(String::strip);
172-
otherDataList.replaceAll(String::strip);
171+
dataValueList.replaceAll(String::trim);
172+
otherDataList.replaceAll(String::trim);
173173
for (String data : otherDataList) {
174174
if (!dataValueList.contains(data)) {
175175
dataValueList.add(data);

GO_Sync/src/main/java/edu/usf/cutr/go_sync/io/GTFSReadIn.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ public List<Stop> readBusStop(String fName, String agencyName, String routes_fNa
209209
s.addTag(k, v);
210210
}
211211
} else
212-
s.addTag(k, v.replace(" ", " ").strip());
212+
s.addTag(k, v.replace(" ", " ").trim());
213213
}
214214
//System.out.print(k+":" + v +" ");
215215
}
@@ -363,7 +363,7 @@ public Hashtable<String, Route> readRoutes(String routes_fName){
363363
continue;
364364
}
365365
}
366-
r.addTag(k, v.replace(" ", " ").strip());
366+
r.addTag(k, v.replace(" ", " ").trim());
367367
}
368368
}
369369
} catch(Exception e){

GO_Sync/src/main/java/edu/usf/cutr/go_sync/object/NetexStopElement.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,6 @@ static String removeAccents(String input) {
241241
}
242242

243243
private static String nameCleanup(String label) {
244-
return label.replace(" ", " ").strip();
244+
return label.replace(" ", " ").trim();
245245
}
246246
}

0 commit comments

Comments
 (0)