FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

suggested fixes by iCR, OpenRefactory, Inc. by openrefactory · Pull Request #16 · DrJavaAtRice/drjava · GitHub

Repository navigation

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

Filter by extension

Filter by extension .java  (4) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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 drjava/src/edu/rice/cs/util/LogTest.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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

Back | FazBrowse Home | New Git URL