Skip to content

Commit 901df79

Browse files
author
dlsmith
committed
Code cleanup recommended by Eclipse. Mostly removed dead code and added generic arguments; touched many files.
git-svn-id: file:///tmp/test-svn/trunk@4691 fe72c1cf-3628-48e9-8b72-1c46755d3cff
1 parent fa92455 commit 901df79

File tree

263 files changed

+310
-1356
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

263 files changed

+310
-1356
lines changed

drjava/lib/readme.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ plt.jar: plt-20080709-1847
1818
buildlib/ant-contrib.jar: ANT Contrib 1.0b3
1919
buildlib/cenquatasks.jar: Distributed with Clover 1.3.9
2020
buildlib/findbugs-ant.jar: FindBugs 1.3.1
21-
buildlib/junit.jar: JUnit 4.4
21+
buildlib/junit.jar: JUnit 3.8.1
2222
buildlib/plt-ant.jar: plt-ant-20070212-2001

drjava/src/edu/rice/cs/drjava/CommandLineTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@
5050
import edu.rice.cs.util.StringOps;
5151
import edu.rice.cs.util.swing.Utilities;
5252

53-
import edu.rice.cs.plt.debug.DebugUtil;
5453
/**
5554
* Tests opening/creating files specified as command line arguments.
5655
* @version $Id$

drjava/src/edu/rice/cs/drjava/DrJava.java

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -40,32 +40,20 @@
4040

4141
import java.io.File;
4242
import java.io.IOException;
43-
import java.io.ByteArrayOutputStream;
44-
import java.net.MalformedURLException;
45-
import java.net.URL;
46-
import java.net.URLClassLoader;
4743
import java.util.ArrayList;
4844
import java.util.LinkedList;
4945
import java.util.List;
50-
import java.util.jar.JarFile;
51-
import java.util.jar.Manifest;
5246

53-
import javax.swing.JFileChooser;
5447
import javax.swing.JOptionPane;
55-
import javax.swing.SwingUtilities;
5648

5749
import edu.rice.cs.drjava.config.FileConfiguration;
58-
import edu.rice.cs.drjava.config.FileOption;
5950
import edu.rice.cs.drjava.platform.PlatformFactory;
6051
import edu.rice.cs.drjava.ui.DrJavaErrorHandler;
61-
import edu.rice.cs.drjava.ui.ClassPathFilter;
6252
import edu.rice.cs.drjava.ui.SplashScreen;
6353
import edu.rice.cs.util.ArgumentTokenizer;
64-
import edu.rice.cs.util.FileOps;
6554
import edu.rice.cs.util.Log;
6655
import edu.rice.cs.util.UnexpectedException;
6756
import edu.rice.cs.util.newjvm.ExecJVM;
68-
import edu.rice.cs.plt.debug.DebugUtil;
6957

7058
/** Startup class for DrJava consisting entirely of static members. The main method reads the .drjava file (creating
7159
* one if none exists) to get the critical information required to start the main JVM for DrJava:
@@ -156,7 +144,7 @@ public static void configureAndLoadDrJavaRoot(String[] args) {
156144
DrJava.getConfig().getSetting(edu.rice.cs.drjava.config.OptionConstants.REMOTE_CONTROL_ENABLED) &&
157145
(_filesToOpen.size()>0)) {
158146
try {
159-
boolean ret = RemoteControlClient.openFile(null);
147+
RemoteControlClient.openFile(null);
160148
if (RemoteControlClient.isServerRunning()) {
161149
// existing instance is running and responding
162150
for (int i=0; i<_filesToOpen.size(); ++i) {

drjava/src/edu/rice/cs/drjava/DrJavaRoot.java

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -39,37 +39,25 @@
3939
import java.awt.EventQueue;
4040
import java.awt.Window;
4141
import java.awt.dnd.*;
42-
import java.awt.datatransfer.*;
4342
import java.awt.event.WindowEvent;
4443
import java.io.*;
4544
import java.lang.reflect.InvocationTargetException;
4645

47-
import java.net.URL;
48-
import java.net.URLClassLoader;
49-
import java.net.MalformedURLException;
50-
import java.util.Arrays;
51-
import java.util.StringTokenizer;
52-
import java.util.jar.JarFile;
5346
import javax.swing.UIManager;
5447
import javax.swing.*;
5548

5649
import edu.rice.cs.plt.lambda.Runnable1;
5750
import edu.rice.cs.util.FileOpenSelector;
5851
import edu.rice.cs.util.UnexpectedException;
5952
import edu.rice.cs.util.OutputStreamRedirector;
60-
import edu.rice.cs.util.newjvm.ExecJVM;
6153
import edu.rice.cs.util.swing.Utilities;
6254

6355
import edu.rice.cs.drjava.ui.MainFrame;
64-
import edu.rice.cs.drjava.ui.SplashScreen;
65-
import edu.rice.cs.drjava.ui.ClassPathFilter;
6656
import edu.rice.cs.drjava.ui.DrJavaErrorWindow;
6757
import edu.rice.cs.drjava.ui.DrJavaErrorHandler;
6858
import edu.rice.cs.drjava.ui.SimpleInteractionsWindow;
6959
import edu.rice.cs.drjava.model.*;
70-
import edu.rice.cs.drjava.model.compiler.*;
7160
import edu.rice.cs.drjava.platform.PlatformFactory;
72-
import edu.rice.cs.drjava.config.FileConfiguration;
7361
import edu.rice.cs.drjava.config.*;
7462

7563
import com.jgoodies.looks.plastic.PlasticLookAndFeel;
@@ -100,7 +88,6 @@ public class DrJavaRoot {
10088

10189
// /** This field is only used in the instance of this class in the Interpreter JVM. */
10290

103-
private static boolean _attemptingAugmentedClassPath = false;
10491
private static SimpleInteractionsWindow _debugConsole = null;
10592

10693
private static boolean anyLineNumbersSpecified = false;
@@ -362,7 +349,7 @@ public static void drop(DropTargetDropEvent dropTargetDropEvent) {
362349
* @param w window trying to get the modal window listener
363350
* @param toFrontAction action to be performed after the window has been moved to the front again
364351
* @param closeAction action to be performed when the window is closing
365-
* @return window listener */
352+
*/
366353
public static void installModalWindowAdapter(final Window w,
367354
final Runnable1<? super WindowEvent> toFrontAction,
368355
final Runnable1<? super WindowEvent> closeAction) {

drjava/src/edu/rice/cs/drjava/DrJavaTestCase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public class DrJavaTestCase extends TestCase {
6262
public DrJavaTestCase(String name) { super(name); }
6363

6464
/** Set up for every test.
65-
* @throws Exception. This convention is mandated by JUnit.TestCase, the superclass of this class.
65+
* @throws Exception This convention is mandated by JUnit.TestCase, the superclass of this class.
6666
*/
6767
protected void setUp() throws Exception {
6868
super.setUp(); // declared to throw Exception, forcing throws clause on preceding line

drjava/src/edu/rice/cs/drjava/RemoteControlServer.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343

4444
import java.io.*;
4545
import java.net.*;
46-
import java.util.*;
4746

4847
/** This class contains a server that monitors incoming datagrams on port 4444
4948
* (default; can be changed in OptionConstants.REMOTE_CONTROL_PORT).

drjava/src/edu/rice/cs/drjava/config/BinaryOpProperty.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,9 @@
3636

3737
package edu.rice.cs.drjava.config;
3838

39-
import edu.rice.cs.drjava.DrJava;
4039
import edu.rice.cs.plt.lambda.Lambda;
4140
import edu.rice.cs.plt.lambda.Lambda2;
4241

43-
import java.util.HashSet;
44-
import java.util.Iterator;
45-
4642
/** Class representing binary operations that can be inserted as variables in external processes.
4743
* @version $Id$
4844
*/

drjava/src/edu/rice/cs/drjava/config/ConfigOptionListeners.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,6 @@ public static void sanitizeMasterJVMXMX(JFrame parent, String value) {
356356
if ((!value.equals("")) &&
357357
(!value.equals(OptionConstants.heapSizeChoices.get(0)))) {
358358
String size = value.trim();
359-
long factor = 1;
360359
long heapSize;
361360
try {
362361
heapSize = new Long(size);

drjava/src/edu/rice/cs/drjava/config/ConfigProperty.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
import edu.rice.cs.drjava.DrJava;
4040

4141
import java.util.Vector;
42-
import java.util.Iterator;
4342

4443
/** Class representing values from the DrJava configuration file that can be inserted as variables in external processes.
4544
* @version $Id$
@@ -58,9 +57,7 @@ public ConfigProperty(String name) {
5857
* @param pm PropertyMaps used for substitution when replacing variables */
5958
public void update(PropertyMaps pm) {
6059
OptionMap om = DrJava.getConfig().getOptionMap();
61-
Iterator<OptionParser<?>> it = om.keys();
62-
while(it.hasNext()) {
63-
OptionParser<?> op = it.next();
60+
for (OptionParser<?> op : om.keys()) {
6461
String key = op.getName();
6562
String value = om.getString(op);
6663
if (_name.equals("config."+key)) {
@@ -102,9 +99,7 @@ else if (_name.equals("config.debug.step.exclude")) {
10299
public void resetAttributes() {
103100
_attributes.clear();
104101
OptionMap om = DrJava.getConfig().getOptionMap();
105-
Iterator<OptionParser<?>> it = om.keys();
106-
while(it.hasNext()) {
107-
OptionParser<?> op = it.next();
102+
for (OptionParser<?> op : om.keys()) {
108103
String key = op.getName();
109104
if (_name.equals("config."+key)) {
110105
if (op instanceof VectorOption) {

drjava/src/edu/rice/cs/drjava/config/ConstantProperty.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@
3636

3737
package edu.rice.cs.drjava.config;
3838

39-
import edu.rice.cs.drjava.DrJava;
4039
import java.util.HashSet;
41-
import java.util.Iterator;
4240

4341
/** Class representing values that are constant and that can be inserted as variables in external processes.
4442
* @version $Id$

0 commit comments

Comments
 (0)