Skip to content

Commit b1544b4

Browse files
committed
Use 4.0.1 version of the swim backend
Update Copyright
1 parent dd8de72 commit b1544b4

34 files changed

Lines changed: 55 additions & 55 deletions

server/build.gradle

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ ext.compilerArgs = ['-Xlint:all']
2222

2323
// Build with `gradle -Pno-modules` to force compatibility with legacy JVMs.
2424
def javaVersion = System.getProperty('java.version').split('\\.')
25-
ext.jvmVersion = 9//(javaVersion[0] as Integer) > 1 ? javaVersion[0] as Integer : javaVersion[1] as Integer
26-
ext.useModules = jvmVersion >= 9 && !hasProperty('no-modules')
25+
ext.jvmVersion = 11
26+
ext.useModules = !hasProperty('no-modules')
2727
ext.moduleArgs = []
2828

2929
repositories {
@@ -40,8 +40,8 @@ dependencies {
4040
afterEvaluate {
4141
configurations {
4242
apiElements {
43-
sourceCompatibility = JavaVersion.VERSION_1_9
44-
targetCompatibility = JavaVersion.VERSION_1_9
43+
sourceCompatibility = JavaVersion.VERSION_11
44+
targetCompatibility = JavaVersion.VERSION_11
4545
}
4646
}
4747

@@ -59,9 +59,9 @@ afterEvaluate {
5959
options.encoding = 'UTF-8'
6060
classpath = files()
6161
source = sourceSets.main.allJava
62-
sourceCompatibility = JavaVersion.VERSION_1_9
63-
targetCompatibility = JavaVersion.VERSION_1_9
64-
destinationDir = compileJava.destinationDir
62+
sourceCompatibility = JavaVersion.VERSION_11
63+
targetCompatibility = JavaVersion.VERSION_11
64+
destinationDirectory = compileJava.destinationDirectory
6565
include '*module-info*'
6666
}
6767
classes.dependsOn compileModuleInfoJava
@@ -79,8 +79,8 @@ afterEvaluate {
7979
compileJava {
8080
options.compilerArgs += compilerArgs
8181
options.encoding = 'UTF-8'
82-
sourceCompatibility = JavaVersion.VERSION_1_9
83-
targetCompatibility = JavaVersion.VERSION_1_9
82+
sourceCompatibility = JavaVersion.VERSION_11
83+
targetCompatibility = JavaVersion.VERSION_11
8484
exclude '*module-info*'
8585
}
8686

@@ -89,7 +89,7 @@ afterEvaluate {
8989
manifest {
9090
attributes(
9191
'Implementation-Title': moduleName,
92-
'Implementation-Version': version,
92+
'Implementation-Version': archiveVersion,
9393
'Main-Class': mainClassName)
9494
}
9595
}

server/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
application.version=3.11.0
1+
application.version=4.0.1

server/src/main/java/module-info.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2015-2019 SWIM.AI inc.
1+
// Copyright 2015-2022 Swim.inc
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

server/src/main/java/swim/transit/NextBusHttpAPI.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2015-2019 SWIM.AI inc.
1+
// Copyright 2015-2022 Swim.inc
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -21,7 +21,7 @@
2121
import java.util.Iterator;
2222
import java.util.List;
2323
import java.util.zip.GZIPInputStream;
24-
import swim.api.ref.SwimRef;
24+
import swim.api.ref.WarpRef;
2525
import swim.codec.Utf8;
2626
import swim.structure.Form;
2727
import swim.structure.Item;
@@ -37,25 +37,25 @@ public class NextBusHttpAPI {
3737

3838
private NextBusHttpAPI() { }
3939

40-
public static void sendRoutes(List<Agency> agencies, SwimRef swim) {
40+
public static void sendRoutes(List<Agency> agencies, WarpRef warp) {
4141
for (Agency agency: agencies) {
42-
sendRoutes(agency, swim);
42+
sendRoutes(agency, warp);
4343
}
4444
}
4545

46-
public static void sendVehicleInfo(String pollUrl, Agency ag, SwimRef swim) {
46+
public static void sendVehicleInfo(String pollUrl, Agency ag, WarpRef warp) {
4747
final Vehicles vehicles = getVehicleLocations(pollUrl, ag);
4848
if (vehicles != null && vehicles.getVehicles().size() > 0) {
4949
final Value value = Form.forClass(Vehicles.class).mold(vehicles).toValue();
50-
swim.command(ag.getUri(), "addVehicles", value);
50+
warp.command(ag.getUri(), "addVehicles", value);
5151
}
5252
}
5353

54-
private static void sendRoutes(Agency agency, SwimRef swim) {
54+
private static void sendRoutes(Agency agency, WarpRef warp) {
5555
final Routes routes = getRoutes(agency);
5656
if (routes != null && !routes.getRoutes().isEmpty()) {
5757
final Value value = Form.forClass(Routes.class).mold(routes).toValue();
58-
swim.command(agency.getUri(), "addRoutes", value);
58+
warp.command(agency.getUri(), "addRoutes", value);
5959
}
6060
}
6161

@@ -157,7 +157,7 @@ private static Value parse(URL url) {
157157
urlConnection = (HttpURLConnection) url.openConnection();
158158
urlConnection.setRequestProperty("Accept-Encoding", "gzip, deflate");
159159
final InputStream stream = new GZIPInputStream(urlConnection.getInputStream());
160-
final Value configValue = Utf8.read(Xml.structureParser().documentParser(), stream);
160+
final Value configValue = Utf8.read(stream, Xml.structureParser().documentParser());
161161
return configValue;
162162
} catch (Throwable e) {
163163
e.printStackTrace();

server/src/main/java/swim/transit/TransitPlane.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2015-2019 SWIM.AI inc.
1+
// Copyright 2015-2022 Swim.inc
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -23,7 +23,7 @@
2323
import swim.api.SwimRoute;
2424
import swim.api.agent.AgentRoute;
2525
import swim.api.plane.AbstractPlane;
26-
import swim.api.ref.SwimRef;
26+
import swim.api.ref.WarpRef;
2727
import swim.api.space.Space;
2828
import swim.kernel.Kernel;
2929
import swim.server.ServerLoader;
@@ -62,17 +62,17 @@ public static void main(String[] args) {
6262
kernel.run(); // blocks until termination
6363
}
6464

65-
private static void startAgencies(SwimRef swim) {
65+
private static void startAgencies(WarpRef warp) {
6666
final List<Agency> agencies = loadAgencies();
6767
for (Agency agency : agencies) {
68-
swim.command(agency.getUri(), "addInfo", agency.toValue());
68+
warp.command(agency.getUri(), "addInfo", agency.toValue());
6969
}
7070
try {
7171
Thread.sleep(3000);
7272
} catch (InterruptedException e) {
7373

7474
}
75-
NextBusHttpAPI.sendRoutes(agencies, swim);
75+
NextBusHttpAPI.sendRoutes(agencies, warp);
7676
}
7777

7878
private static List<Agency> loadAgencies() {

server/src/main/java/swim/transit/agent/AgencyAgent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2015-2019 SWIM.AI inc.
1+
// Copyright 2015-2022 Swim.inc
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

server/src/main/java/swim/transit/agent/CountryAgent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2015-2019 SWIM.AI inc.
1+
// Copyright 2015-2022 Swim.inc
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

server/src/main/java/swim/transit/agent/StateAgent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2015-2019 SWIM.AI inc.
1+
// Copyright 2015-2022 Swim.inc
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

server/src/main/java/swim/transit/agent/VehicleAgent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2015-2019 SWIM.AI inc.
1+
// Copyright 2015-2022 Swim.inc
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

server/src/main/java/swim/transit/model/Agency.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2015-2019 SWIM.AI inc.
1+
// Copyright 2015-2022 Swim.inc
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)