Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion 5 drjava/src/edu/rice/cs/drjava/RemoteControlServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,10 @@ public void run() {
}
}

protected void finalize() { if (socket != null) socket.close(); }
protected void finalize() {
if (socket != null) socket.close();
super.finalize();
}
}

/** Main method for test purposes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1446,6 +1446,7 @@ protected void finalize() {
fl.finalized(fe);
}
}
super.finalize();
}

public String toString() { return "ddoc for " + _odd; }
Expand Down
4 changes: 2 additions & 2 deletions 4 drjava/src/edu/rice/cs/util/LogTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import java.io.IOException;
import java.io.File;
import java.util.Date;
import java.util.Random;
import java.security.SecureRandom;

import edu.rice.cs.drjava.model.MultiThreadedTestCase;
import edu.rice.cs.plt.io.IOUtil;
Expand Down Expand Up @@ -228,7 +228,7 @@ public void testConcurrentWrites() throws IOException, InterruptedException {
Date earlier = new Date();

Log log3 = new Log(file3, true);
Random r = new Random();
SecureRandom r = new SecureRandom();
Thread[] threads = new Thread[NUM_THREADS];
for (int i = 0; i < NUM_THREADS; i++) threads[i] = new LogTestThread(log3, r.nextInt(DELAY));
for (int i = 0; i < NUM_THREADS; i++) threads[i].start();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -744,17 +744,17 @@ public Object value(Object left, Object right) {
};

public static final Lambda2<Object, Object, Object> DIVIDE = new MatchingPrimitiveBinaryOperation() {
@Override public Object value(int l, int r) { return l / r; }
@Override public Object value(long l, long r) { return l / r; }
@Override public Object value(float l, float r) { return l / r; }
@Override public Object value(double l, double r) { return l / r; }
@Override public Object value(int l, int r) { return ((r != 0) ? (l / r) : 0); }
@Override public Object value(long l, long r) { return ((r != 0) ? (l / r) : 0); }
@Override public Object value(float l, float r) { return ((r != 0) ? (l / r) : 0); }
@Override public Object value(double l, double r) { return ((r != 0) ? (l / r) : 0); }
};

public static final Lambda2<Object, Object, Object> REMAINDER = new MatchingPrimitiveBinaryOperation() {
@Override public Object value(int l, int r) { return l % r; }
@Override public Object value(long l, long r) { return l % r; }
@Override public Object value(float l, float r) { return l % r; }
@Override public Object value(double l, double r) { return l % r; }
@Override public Object value(int l, int r) { return ((r != 0) ? (l % r) : 0); }
@Override public Object value(long l, long r) { return ((r != 0) ? (l % r) : 0); }
@Override public Object value(float l, float r) { return ((r != 0) ? (l % r) : 0); }
@Override public Object value(double l, double r) { return ((r != 0) ? (l % r) : 0); }
};

public static final Lambda2<Object, Object, Object> LESS = new MatchingPrimitiveBinaryOperation() {
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.