Fixes to allow to use jikes to compile and produce less warnings:

1. Replace catch(Exception) by catch(RuntimeException) when only RuntimeException can be throws

2. Make sure that inner classes does not use the same name for parameters as parent scope, see  http://domino.watson.ibm.com/syssftpr/JavaTech/Jikes.nsf/Named/SunQuery8
This commit is contained in:
igor%mir2.org 2001-12-20 21:15:02 +00:00
Родитель f84057c29e
Коммит d6078a18da
2 изменённых файлов: 9 добавлений и 9 удалений

Просмотреть файл

@ -589,10 +589,10 @@ class MoreWindows extends JDialog implements ActionListener {
contentPane.add(buttonPane, BorderLayout.SOUTH);
pack();
addKeyListener(new KeyAdapter() {
public void keyPressed(KeyEvent e) {
int code = e.getKeyCode();
public void keyPressed(KeyEvent ke) {
int code = ke.getKeyCode();
if(code == KeyEvent.VK_ESCAPE) {
e.consume();
ke.consume();
value = null;
setVisible(false);
}
@ -746,10 +746,10 @@ class FindFunction extends JDialog implements ActionListener {
contentPane.add(buttonPane, BorderLayout.SOUTH);
pack();
addKeyListener(new KeyAdapter() {
public void keyPressed(KeyEvent e) {
int code = e.getKeyCode();
public void keyPressed(KeyEvent ke) {
int code = ke.getKeyCode();
if(code == KeyEvent.VK_ESCAPE) {
e.consume();
ke.consume();
value = null;
setVisible(false);
}
@ -2407,7 +2407,7 @@ public class Main extends JFrame implements Debugger, ContextListener {
static void swingInvokeLater(Runnable f) {
try {
SwingUtilities.invokeLater(f);
} catch(Exception exc) {
} catch(RuntimeException exc) {
exc.printStackTrace();
}
}
@ -3041,7 +3041,7 @@ public class Main extends JFrame implements Debugger, ContextListener {
}
try {
resultString = ScriptRuntime.toString(result);
} catch(Exception exc) {
} catch(RuntimeException exc) {
resultString = result.toString();
}
} catch(Exception exc) {

Просмотреть файл

@ -141,7 +141,7 @@ public class VariableModel extends AbstractTreeTableModel
String result;
try {
result = Context.toString(value);
} catch(Exception exc) {
} catch(RuntimeException exc) {
result = value.toString();
}
StringBuffer buf = new StringBuffer();