aboutsummaryrefslogtreecommitdiffstats
path: root/netx/net/sourceforge/jnlp/security/CertsInfoPane.java
diff options
context:
space:
mode:
authorJiri Vanek <[email protected]>2013-12-13 10:47:07 +0100
committerJiri Vanek <[email protected]>2013-12-13 10:47:07 +0100
commit25f307d98cb0ba4698318c6a1a4e738ee81f6e55 (patch)
treee869f4d7ea537ba2d4508f71edbafdccecd0f375 /netx/net/sourceforge/jnlp/security/CertsInfoPane.java
parent6256aac59275df0edd0feb4950272aa33573be9f (diff)
itw itself warning cleanup: fixed rawtypes and unchecks, added braces and Override
After this clean up only "internal proprietary API and may be removed in a future release" warnings remain fro make check. Please keep itw in this way :) remaining issues: icedtea-web/netx/net/sourceforge/jnlp/cache/ResourceTracker.java:357: warning: [deprecation] toURL() in File has been deprecated icedtea-web/netx/net/sourceforge/jnlp/cache/CacheUtil.java:128: warning: [deprecation] toURL() in File has been deprecated icedtea-web/netx/net/sourceforge/jnlp/runtime/Boot.java:261: warning: [deprecation] toURL() in File has been deprecated There have been a lot of work around cach x file x url escaping, and as main difference between file.tourl and file.touri.tourl is escapin, I rather left it. icedtea-web/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java:804: warning: [deprecation] Ref in sun.misc has been deprecated icedtea-web/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java:121: warning: [deprecation] Ref in sun.misc has been deprecated What can be done? icedtea-web/netx/net/sourceforge/jnlp/browser/BrowserAwareProxySelector.java:205: warning: [fallthrough] possible fall-through into case icedtea-web/netx/net/sourceforge/jnlp/browser/BrowserAwareProxySelector.java:211: warning: [fallthrough] possible fall-through into case This have to be fixed
Diffstat (limited to 'netx/net/sourceforge/jnlp/security/CertsInfoPane.java')
-rw-r--r--netx/net/sourceforge/jnlp/security/CertsInfoPane.java22
1 files changed, 15 insertions, 7 deletions
diff --git a/netx/net/sourceforge/jnlp/security/CertsInfoPane.java b/netx/net/sourceforge/jnlp/security/CertsInfoPane.java
index d22a590..a6d189f 100644
--- a/netx/net/sourceforge/jnlp/security/CertsInfoPane.java
+++ b/netx/net/sourceforge/jnlp/security/CertsInfoPane.java
@@ -65,7 +65,6 @@ import javax.swing.tree.TreeSelectionModel;
public class CertsInfoPane extends SecurityDialogPanel {
private CertPath certPath;
- private JList list;
protected JTree tree;
private JTable table;
private JTextArea output;
@@ -175,7 +174,7 @@ public class CertsInfoPane extends SecurityDialogPanel {
/**
* Constructs the GUI components of this panel
*/
- protected void addComponents() {
+ private void addComponents() {
buildTree();
populateTable();
/**
@@ -235,17 +234,21 @@ public class CertsInfoPane extends SecurityDialogPanel {
* Copies the currently selected certificate to the system Clipboard.
*/
private class CopyToClipboardHandler implements ActionListener {
+ @Override
public void actionPerformed(ActionEvent e) {
Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
int certIndex = 0;
DefaultMutableTreeNode node = (DefaultMutableTreeNode)
tree.getLastSelectedPathComponent();
- if (node == null)
+ if (node == null) {
return;
- if (node.isRoot())
+ }
+ if (node.isRoot()) {
certIndex = 0;
- else if (node.isLeaf())
+ }
+ else if (node.isLeaf()) {
certIndex = 1;
+ }
String[][] cert = certsData.get(certIndex);
int rows = cert.length;
@@ -268,12 +271,14 @@ public class CertsInfoPane extends SecurityDialogPanel {
* Updates the JTable when the JTree selection has changed.
*/
protected class TreeSelectionHandler implements TreeSelectionListener {
+ @Override
public void valueChanged(TreeSelectionEvent e) {
DefaultMutableTreeNode node = (DefaultMutableTreeNode)
tree.getLastSelectedPathComponent();
- if (node == null)
+ if (node == null) {
return;
+ }
if (node.isRoot()) {
table.setModel(new DefaultTableModel(certsData.get(0),
columnNames));
@@ -288,6 +293,7 @@ public class CertsInfoPane extends SecurityDialogPanel {
* Updates the JTable when the selection on the list has changed.
*/
private class ListSelectionHandler implements ListSelectionListener {
+ @Override
public void valueChanged(ListSelectionEvent e) {
ListSelectionModel lsm = (ListSelectionModel) e.getSource();
@@ -308,6 +314,7 @@ public class CertsInfoPane extends SecurityDialogPanel {
* has changed.
*/
private class TableSelectionHandler implements ListSelectionListener {
+ @Override
public void valueChanged(ListSelectionEvent e) {
ListSelectionModel lsm = (ListSelectionModel) e.getSource();
@@ -329,8 +336,9 @@ public class CertsInfoPane extends SecurityDialogPanel {
private String makeFingerprint(byte[] hash) {
String fingerprint = "";
for (int i = 0; i < hash.length; i++) {
- if (!fingerprint.equals(""))
+ if (!fingerprint.equals("")) {
fingerprint += ":";
+ }
fingerprint += Integer.toHexString(
((hash[i] & 0xFF) | 0x100)).substring(1, 3);
}