8284071: Collapse identical catch branches in jdk.console
Reviewed-by: cjplummer
This commit is contained in:
parent
61d06c2d28
commit
732f7ae0aa
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2004, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -483,9 +483,7 @@ public class JConsole extends JFrame
|
||||
public void run() {
|
||||
try {
|
||||
addProxyClient(ProxyClient.getProxyClient(lvm), tile);
|
||||
} catch (final SecurityException ex) {
|
||||
failed(ex, null, null, null);
|
||||
} catch (final IOException ex) {
|
||||
} catch (final SecurityException | IOException ex) {
|
||||
failed(ex, null, null, null);
|
||||
}
|
||||
}
|
||||
@ -502,11 +500,7 @@ public class JConsole extends JFrame
|
||||
try {
|
||||
addProxyClient(ProxyClient.getProxyClient(url, userName, password),
|
||||
tile);
|
||||
} catch (final MalformedURLException ex) {
|
||||
failed(ex, url, userName, password);
|
||||
} catch (final SecurityException ex) {
|
||||
failed(ex, url, userName, password);
|
||||
} catch (final IOException ex) {
|
||||
} catch (final IOException | SecurityException ex) {
|
||||
failed(ex, url, userName, password);
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2006, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2006, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -239,15 +239,7 @@ public class MaximizableInternalFrame extends JInternalFrame {
|
||||
UIManager.put(key,
|
||||
new MDIButtonIcon(UIManager.getIcon(key)));
|
||||
}
|
||||
} catch (ClassNotFoundException ex) {
|
||||
if (JConsole.debug) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
} catch (NoSuchFieldException ex) {
|
||||
if (JConsole.debug) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
} catch (IllegalAccessException ex) {
|
||||
} catch (ClassNotFoundException | IllegalAccessException | NoSuchFieldException ex) {
|
||||
if (JConsole.debug) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2004, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -608,11 +608,7 @@ public class ProxyClient implements JConsoleContext {
|
||||
try {
|
||||
MBeanInfo info = server.getMBeanInfo(o);
|
||||
result.put(o, info);
|
||||
} catch (IntrospectionException e) {
|
||||
// TODO: should log the error
|
||||
} catch (InstanceNotFoundException e) {
|
||||
// TODO: should log the error
|
||||
} catch (ReflectionException e) {
|
||||
} catch (IntrospectionException | ReflectionException | InstanceNotFoundException e) {
|
||||
// TODO: should log the error
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2004, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -302,13 +302,7 @@ class SummaryTab extends Tab {
|
||||
4);
|
||||
append(endTable);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
if (JConsole.isDebug()) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
proxyClient.markAsDead();
|
||||
return null;
|
||||
} catch (UndeclaredThrowableException e) {
|
||||
} catch (IOException | UndeclaredThrowableException e) {
|
||||
if (JConsole.isDebug()) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2004, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -216,9 +216,7 @@ class ThreadTab extends Tab implements ActionListener, DocumentListener, ListSel
|
||||
}
|
||||
timeStamp = System.currentTimeMillis();
|
||||
return true;
|
||||
} catch (IOException e) {
|
||||
return false;
|
||||
} catch (UndeclaredThrowableException e) {
|
||||
} catch (IOException | UndeclaredThrowableException e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -426,9 +424,7 @@ class ThreadTab extends Tab implements ActionListener, DocumentListener, ListSel
|
||||
}
|
||||
});
|
||||
sleep(30 * 1000);
|
||||
} catch (InterruptedException ex) {
|
||||
// Ignore
|
||||
} catch (InvocationTargetException ex) {
|
||||
} catch (InterruptedException | InvocationTargetException ex) {
|
||||
// Ignore
|
||||
}
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user