Skip to content

Commit 6f773ee

Browse files
committed
Cleanup
1 parent 0beac7c commit 6f773ee

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

.travis.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1-
sudo: false
1+
sudo: required
2+
dist: trusty
3+
24
language: java
35
jdk:
46
- oraclejdk8
57
- oraclejdk7
68
- openjdk7
79

10+
env:
11+
- ANT_OPTS="-XX:MaxPermSize=1024m -XX:+CMSClassUnloadingEnabled -XX:+HeapDumpOnOutOfMemoryError -Xmx2048m"
812
cache:
913
directories:
1014
- $HOME/.m2
@@ -20,7 +24,7 @@ before_script:
2024
- cd maven-wrapper/ && mvn -q install && cd ..
2125

2226
script:
23-
- ant -Dcontinue.after.failing.tests=true -Dnbplatform.nb81.netbeans.dest.dir=$PWD/netbeans -Dnbplatform.nb81.harness.dir=$PWD/netbeans/harness test
27+
- ant -Dcontinue.after.failing.tests=true -Dnbplatform.nb81.netbeans.dest.dir=$PWD/netbeans -Dnbplatform.nb81.harness.dir=$PWD/netbeans/harness -Dfork=on test
2428

2529
notifications:
2630
slack:

tmc-plugin/src/fi/helsinki/cs/tmc/spyware/HostInformationGenerator.java

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public String updateHostInformation(EventReceiver receiver) {
3131
LoggableEvent event
3232
= new LoggableEvent(
3333
"host_information_update",
34-
data.toString().getBytes(Charset.forName("UTF-8")));
34+
data.toString().getBytes(UTF8));
3535
receiver.receiveEvent(event);
3636

3737
return hostId;
@@ -40,14 +40,6 @@ public String updateHostInformation(EventReceiver receiver) {
4040
private static JsonMaker getStaticHostInformation() {
4141
JsonMaker builder = JsonMaker.create();
4242

43-
try {
44-
InetAddress localMachine = java.net.InetAddress.getLocalHost();
45-
builder.add("hostAddress", localMachine.getHostAddress());
46-
builder.add("hostName", localMachine.getHostName());
47-
} catch (Exception ex) {
48-
log.log(Level.WARNING, "Exception while getting host name information: {0}", ex);
49-
}
50-
5143
try {
5244
Enumeration<NetworkInterface> iterator = NetworkInterface.getNetworkInterfaces();
5345
List<String> macs = new ArrayList<String>(2);
@@ -124,5 +116,5 @@ private static String byteToHex(byte[] bytes) {
124116
}
125117
return sb.toString();
126118
}
127-
128119
}
120+

0 commit comments

Comments
 (0)