зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
261f0d7e47
Коммит
04393fc2b7
|
@ -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();
|
||||
|
|
Загрузка…
Ссылка в новой задаче