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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* 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() {
|
public void run() {
|
||||||
try {
|
try {
|
||||||
addProxyClient(ProxyClient.getProxyClient(lvm), tile);
|
addProxyClient(ProxyClient.getProxyClient(lvm), tile);
|
||||||
} catch (final SecurityException ex) {
|
} catch (final SecurityException | IOException ex) {
|
||||||
failed(ex, null, null, null);
|
|
||||||
} catch (final IOException ex) {
|
|
||||||
failed(ex, null, null, null);
|
failed(ex, null, null, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -502,11 +500,7 @@ public class JConsole extends JFrame
|
|||||||
try {
|
try {
|
||||||
addProxyClient(ProxyClient.getProxyClient(url, userName, password),
|
addProxyClient(ProxyClient.getProxyClient(url, userName, password),
|
||||||
tile);
|
tile);
|
||||||
} catch (final MalformedURLException ex) {
|
} catch (final IOException | SecurityException ex) {
|
||||||
failed(ex, url, userName, password);
|
|
||||||
} catch (final SecurityException ex) {
|
|
||||||
failed(ex, url, userName, password);
|
|
||||||
} catch (final IOException ex) {
|
|
||||||
failed(ex, url, userName, password);
|
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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* 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,
|
UIManager.put(key,
|
||||||
new MDIButtonIcon(UIManager.getIcon(key)));
|
new MDIButtonIcon(UIManager.getIcon(key)));
|
||||||
}
|
}
|
||||||
} catch (ClassNotFoundException ex) {
|
} catch (ClassNotFoundException | IllegalAccessException | NoSuchFieldException ex) {
|
||||||
if (JConsole.debug) {
|
|
||||||
ex.printStackTrace();
|
|
||||||
}
|
|
||||||
} catch (NoSuchFieldException ex) {
|
|
||||||
if (JConsole.debug) {
|
|
||||||
ex.printStackTrace();
|
|
||||||
}
|
|
||||||
} catch (IllegalAccessException ex) {
|
|
||||||
if (JConsole.debug) {
|
if (JConsole.debug) {
|
||||||
ex.printStackTrace();
|
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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -608,11 +608,7 @@ public class ProxyClient implements JConsoleContext {
|
|||||||
try {
|
try {
|
||||||
MBeanInfo info = server.getMBeanInfo(o);
|
MBeanInfo info = server.getMBeanInfo(o);
|
||||||
result.put(o, info);
|
result.put(o, info);
|
||||||
} catch (IntrospectionException e) {
|
} catch (IntrospectionException | ReflectionException | InstanceNotFoundException e) {
|
||||||
// TODO: should log the error
|
|
||||||
} catch (InstanceNotFoundException e) {
|
|
||||||
// TODO: should log the error
|
|
||||||
} catch (ReflectionException e) {
|
|
||||||
// TODO: should log the error
|
// 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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -302,13 +302,7 @@ class SummaryTab extends Tab {
|
|||||||
4);
|
4);
|
||||||
append(endTable);
|
append(endTable);
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException | UndeclaredThrowableException e) {
|
||||||
if (JConsole.isDebug()) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
proxyClient.markAsDead();
|
|
||||||
return null;
|
|
||||||
} catch (UndeclaredThrowableException e) {
|
|
||||||
if (JConsole.isDebug()) {
|
if (JConsole.isDebug()) {
|
||||||
e.printStackTrace();
|
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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* 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();
|
timeStamp = System.currentTimeMillis();
|
||||||
return true;
|
return true;
|
||||||
} catch (IOException e) {
|
} catch (IOException | UndeclaredThrowableException e) {
|
||||||
return false;
|
|
||||||
} catch (UndeclaredThrowableException e) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -426,9 +424,7 @@ class ThreadTab extends Tab implements ActionListener, DocumentListener, ListSel
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
sleep(30 * 1000);
|
sleep(30 * 1000);
|
||||||
} catch (InterruptedException ex) {
|
} catch (InterruptedException | InvocationTargetException ex) {
|
||||||
// Ignore
|
|
||||||
} catch (InvocationTargetException ex) {
|
|
||||||
// Ignore
|
// Ignore
|
||||||
}
|
}
|
||||||
SwingUtilities.invokeLater(new Runnable() {
|
SwingUtilities.invokeLater(new Runnable() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user