]> source.dussan.org Git - tigervnc.git/commitdiff
Cleanup linter warnings wherever possible and suppress all linter warnings from Jsch...
authorBrian Hinz <bphinz@users.sourceforge.net>
Fri, 14 Dec 2012 22:40:02 +0000 (22:40 +0000)
committerBrian Hinz <bphinz@users.sourceforge.net>
Fri, 14 Dec 2012 22:40:02 +0000 (22:40 +0000)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@5020 3789f03b-4d11-0410-bbf8-ca57d06f2519

36 files changed:
java/CMakeLists.txt
java/com/jcraft/jsch/Channel.java
java/com/jcraft/jsch/ChannelAgentForwarding.java
java/com/jcraft/jsch/ChannelForwardedTCPIP.java
java/com/jcraft/jsch/ChannelSession.java
java/com/jcraft/jsch/ChannelSftp.java
java/com/jcraft/jsch/ChannelX11.java
java/com/jcraft/jsch/DHG1.java
java/com/jcraft/jsch/DHG14.java
java/com/jcraft/jsch/DHGEX.java
java/com/jcraft/jsch/HostKey.java
java/com/jcraft/jsch/IdentityFile.java
java/com/jcraft/jsch/IdentityRepository.java
java/com/jcraft/jsch/JSch.java
java/com/jcraft/jsch/KeyExchange.java
java/com/jcraft/jsch/KnownHosts.java
java/com/jcraft/jsch/LocalIdentityRepository.java
java/com/jcraft/jsch/PortWatcher.java
java/com/jcraft/jsch/Session.java
java/com/jcraft/jsch/UserAuthPublicKey.java
java/com/jcraft/jsch/Util.java
java/com/jcraft/jsch/jcraft/Compression.java
java/com/tigervnc/network/TcpListener.java
java/com/tigervnc/rfb/CConnection.java
java/com/tigervnc/rfb/CMsgWriterV3.java
java/com/tigervnc/rfb/CSecurityVeNCrypt.java
java/com/tigervnc/rfb/Configuration.java
java/com/tigervnc/rfb/ScreenSet.java
java/com/tigervnc/rfb/Security.java
java/com/tigervnc/vncviewer/CConn.java
java/com/tigervnc/vncviewer/MenuKey.java
java/com/tigervnc/vncviewer/OptionsDialog.java
java/com/tigervnc/vncviewer/ServerDialog.java
java/com/tigervnc/vncviewer/Viewport.java
java/com/tigervnc/vncviewer/VncViewer.java
java/com/tigervnc/vncviewer/tunnel.java

index 86b96274a555c9ab9eaf64f0d588fde7c4dbe916..cf15c80d153e38b0933fd308d19e8a173b8747bf 100644 (file)
@@ -7,7 +7,7 @@ endif()
 
 find_package(Java)
 
-set(DEFAULT_JAVACFLAGS "-source 1.5 -target 1.5 -Xlint:all,-serial,-cast,-unchecked,-fallthrough,-dep-ann,-deprecation")
+set(DEFAULT_JAVACFLAGS "-source 1.5 -target 1.5 -Xlint:all,-serial,-cast,-fallthrough,-dep-ann,-deprecation")
 set(JAVACFLAGS ${DEFAULT_JAVACFLAGS} CACHE STRING
   "Java compiler flags (Default: ${DEFAULT_JAVACFLAGS})")
 message(STATUS "Java compiler flags = ${JAVACFLAGS}")
index 669b575de9568f29d410914b5af11d8ef717fd45..73cc4dbf8da887e83541703b3ac05b1ddf6833b4 100644 (file)
@@ -35,7 +35,7 @@ import java.io.InputStream;
 import java.io.OutputStream;
 import java.io.IOException;
 
-
+@SuppressWarnings({"rawtypes","unchecked"})
 public abstract class Channel implements Runnable{
 
   static final int SSH_MSG_CHANNEL_OPEN_CONFIRMATION=      91;
index 9788d901921addc74c8708f63fe4ca98c15ac972..52e2db19781eb86d17fbcc560ca0d94bdded0731 100644 (file)
@@ -32,6 +32,7 @@ package com.jcraft.jsch;
 import java.net.*;
 import java.util.Vector;
 
+@SuppressWarnings({"rawtypes"})
 class ChannelAgentForwarding extends Channel{
 
   static private final int LOCAL_WINDOW_SIZE_MAX=0x20000;
index 912f1d80eecd420f0cc8be79cf17f188e76fe083..39972e1988204a7ba32b19b38f97814c9e120da6 100644 (file)
@@ -32,6 +32,7 @@ package com.jcraft.jsch;
 import java.net.*;
 import java.io.*;
 
+@SuppressWarnings({"rawtypes","unchecked"})
 public class ChannelForwardedTCPIP extends Channel{
 
   static java.util.Vector pool=new java.util.Vector();
index ffe217ab0d384b0b8d802378c6178c53e62318aa..70dea2d2ff8bd485ca7fbfca77acdd795d2713c0 100644 (file)
@@ -31,6 +31,7 @@ package com.jcraft.jsch;
 
 import java.util.*;
 
+@SuppressWarnings({"rawtypes","unchecked"})
 class ChannelSession extends Channel{
   private static byte[] _session=Util.str2byte("session");
 
index 66aec5507107b358cc2d8d84b036ae830b334f11..a278ed61bd977fd5c91fac462403476d58c2d074 100644 (file)
@@ -33,6 +33,7 @@ import java.io.*;
 
 import java.util.Vector;
 
+@SuppressWarnings({"rawtypes","unchecked"})
 public class ChannelSftp extends ChannelSession{
 
   static private final int LOCAL_MAXIMUM_PACKET_SIZE=32*1024;
index 393728c0696bcb38d6fa873725cb144f08ef256d..eb66bb66ae164607b839f2e2a292be8da0f7e454 100644 (file)
@@ -31,6 +31,7 @@ package com.jcraft.jsch;
 
 import java.net.*;
 
+@SuppressWarnings({"rawtypes","unchecked"})
 class ChannelX11 extends Channel{
 
   static private final int LOCAL_WINDOW_SIZE_MAX=0x20000;
index 9b9a860e2270f86f4e3c39757362ff2c2b60a2d6..655c196c61716dada02f8a0a7a754f0496deb7d4 100644 (file)
@@ -29,6 +29,7 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 package com.jcraft.jsch;
 
+@SuppressWarnings({"rawtypes"})
 public class DHG1 extends KeyExchange{
 
   static final byte[] g={ 2 };
index 8ef5fb79e227a8f7e273446f7369ac8507b05133..e46fb6fddee9ca77c00006cbaf13a77f256d8425 100644 (file)
@@ -29,6 +29,7 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 package com.jcraft.jsch;
 
+@SuppressWarnings({"rawtypes"})
 public class DHG14 extends KeyExchange{
 
   static final byte[] g={ 2 };
index 23fa9ebfb5fcc128beb7e2f6fb9ec3b2e6d41416..0f0da10424fafa85ceaafcae85c71997c13643d9 100644 (file)
@@ -29,6 +29,7 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 package com.jcraft.jsch;
 
+@SuppressWarnings({"rawtypes"})
 public class DHGEX extends KeyExchange{
 
   private static final int SSH_MSG_KEX_DH_GEX_GROUP=               31;
index 6401ad262bd6313b7cdb15be4d02118c9cdebb8c..6ed420ad1f09d9f577f0992215d52d3c8cb8a4e4 100644 (file)
@@ -29,6 +29,7 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 package com.jcraft.jsch;
 
+@SuppressWarnings({"rawtypes","static"})
 public class HostKey{
   private static final byte[] sshdss=Util.str2byte("ssh-dss");
   private static final byte[] sshrsa=Util.str2byte("ssh-rsa");
index 0427dab41cbcdd03b88d161f83ad659a0f5fbde0..cc66dfe2b97b3876b85cd4b608e3a03083673f3e 100644 (file)
@@ -31,6 +31,7 @@ package com.jcraft.jsch;
 
 import java.io.*;
 
+@SuppressWarnings({"rawtypes","static"})
 class IdentityFile implements Identity{
   String identity;
   byte[] key;
index 1f75a014f49b7020efd284ff3e0a31cf95371bc8..c6b60d1cf1d86315e557c480704de0bcf5942b22 100644 (file)
@@ -31,6 +31,7 @@ package com.jcraft.jsch;
 
 import java.util.Vector;
 
+@SuppressWarnings({"rawtypes"})
 public interface IdentityRepository {
   public Vector getIdentities();
   public boolean add(byte[] identity);
index 20c39e5c0322c771e7a54a43a9bfc324348168bc..47fa29ae703eee348e37e85e41216bafbfe0332b 100644 (file)
@@ -32,6 +32,7 @@ package com.jcraft.jsch;
 import java.io.InputStream;
 import java.util.Vector;
 
+@SuppressWarnings({"rawtypes","unchecked"})
 public class JSch{
   public static final String VERSION  = "0.1.46";
 
index ef089ba3522b81bda657e73213c495d3e55b9916..77e7b83ba95c5867e6e8f52f5d135dff5402dd99 100644 (file)
@@ -29,6 +29,7 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 package com.jcraft.jsch;
 
+@SuppressWarnings({"rawtypes"})
 public abstract class KeyExchange{
 
   static final int PROPOSAL_KEX_ALGS=0;
index ac76477ea0b317b358495506876d75d0fc9c11d9..342d774354147ae65d7115b2736de156a9aeec05 100644 (file)
@@ -31,6 +31,7 @@ package com.jcraft.jsch;
 
 import java.io.*;
 
+@SuppressWarnings({"rawtypes","unchecked","static"})
 public
 class KnownHosts implements HostKeyRepository{
   private static final String _known_hosts="known_hosts";
index be814152987a21b87165ca4e3b858d123b019e61..7dde42e78b39f7d3dc6f98d195af7c641e133570 100644 (file)
@@ -31,6 +31,7 @@ package com.jcraft.jsch;
 
 import java.util.Vector;
 
+@SuppressWarnings({"rawtypes","unchecked"})
 class LocalIdentityRepository implements IdentityRepository {
 
   private Vector identities = new Vector();
index 508e16bd865c1a03edc479d16ff491623cccaa27..b5fc37bbcf19dded4345fc0db0ada42dc9e61a07 100644 (file)
@@ -32,6 +32,7 @@ package com.jcraft.jsch;
 import java.net.*;
 import java.io.*;
 
+@SuppressWarnings({"rawtypes","unchecked"})
 class PortWatcher implements Runnable{
   private static java.util.Vector pool=new java.util.Vector();
   private static InetAddress anyLocalAddress=null;
index 962f52faddb123e56bd847e7ac9b3cb7acf66181..900d96d6043b69a96efffbd8e70076f299cef56c 100644 (file)
@@ -32,6 +32,7 @@ package com.jcraft.jsch;
 import java.io.*;
 import java.net.*;
 
+@SuppressWarnings({"rawtypes","static","unchecked"})
 public class Session implements Runnable{
 
   // http://ietf.org/internet-drafts/draft-ietf-secsh-assignednumbers-01.txt
index 64e8e72052f6dda176af02acffec19f3d6815f86..234ad0ac22b54a365a40fabb870e2feaccdac3ed 100644 (file)
@@ -31,6 +31,7 @@ package com.jcraft.jsch;
 
 import java.util.Vector;
 
+@SuppressWarnings({"rawtypes"})
 class UserAuthPublicKey extends UserAuth{
 
   public boolean start(Session session) throws Exception{
index df51b2daaa52862aa1189e4641e5cfb2cf65dbe2..8d51fc61918c9ae8bd9d1a48a3ed3097f3fa8a64 100644 (file)
@@ -30,6 +30,7 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 package com.jcraft.jsch;
 import java.net.Socket;
 
+@SuppressWarnings({"rawtypes","unchecked"})
 class Util{
 
   private static final byte[] b64 =Util.str2byte("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=");
index dddcaed4e6144e51211687ab939ef1c99642d27e..cb1f317025060f92b19cd38efb92325650f7a19a 100644 (file)
@@ -31,6 +31,7 @@ package com.jcraft.jsch.jcraft;
 import com.jcraft.jzlib.*;
 import com.jcraft.jsch.*;
 
+@SuppressWarnings({"deprecation"})
 public class Compression implements com.jcraft.jsch.Compression {
   static private final int BUF_SIZE=4096;
   private final int buffer_margin=32+20; // AES256 + HMACSHA1
index b7dc4384af4ecf5be6892e6661cbab43bb89dfc9..d56cd065b6ad11df34d2c5e2a7a820b74ccaa7e3 100644 (file)
@@ -98,8 +98,8 @@ public class TcpListener extends SocketListener  {
     // Accept an incoming connection
     try {
       if (selector.select(0) > 0) {
-        Set keys = selector.selectedKeys();
-        Iterator iter = keys.iterator();
+        Set<SelectionKey> keys = selector.selectedKeys();
+        Iterator<SelectionKey> iter = keys.iterator();
         while (iter.hasNext()) {
           SelectionKey key = (SelectionKey)iter.next();
           iter.remove();
index 959f813835e9a4c5cf121b42807828dd219634a5..a923028513ec387847132b156b06035bfee9e573 100644 (file)
@@ -122,7 +122,7 @@ abstract public class CConnection extends CMsgHandler {
         throwConnFailedException();
 
       } else if (secType == Security.secTypeNone || secType == Security.secTypeVncAuth) {
-        Iterator i;
+        Iterator<Integer> i;
         for (i = secTypes.iterator(); i.hasNext(); ) {
           int refType = (Integer)i.next();
           if (refType == secType) {
@@ -146,7 +146,7 @@ abstract public class CConnection extends CMsgHandler {
       if (nServerSecTypes == 0)
         throwConnFailedException();
 
-      Iterator j;
+      Iterator<Integer> j;
 
       for (int i = 0; i < nServerSecTypes; i++) {
         int serverSecType = is.readU8();
index 1ac583b39ebf8d0490f3dcf067094ac41a4e50cc..a730698d167c617f13db7a7e48b98dae03894ef3 100644 (file)
@@ -55,7 +55,7 @@ public class CMsgWriterV3 extends CMsgWriter {
          os.writeU8(layout.num_screens());
          os.pad(1);
        
-    for (Iterator iter = layout.screens.iterator(); iter.hasNext(); ) {
+    for (Iterator<Screen> iter = layout.screens.iterator(); iter.hasNext(); ) {
       Screen refScreen = (Screen)iter.next();
            os.writeU32(refScreen.id);
            os.writeU16(refScreen.dimensions.tl.x);
index a1f22314ee93fc834e29ac66159d698371d53e7a..528158c377e60fbb6e2a452ecd7ff8ff6eb44e6b 100644 (file)
@@ -131,7 +131,7 @@ public class CSecurityVeNCrypt extends CSecurity {
         if (!haveChosenType) {
           chosenType = Security.secTypeInvalid;
           int i;
-          Iterator j;
+          Iterator<Integer> j;
           List<Integer> secTypes = new ArrayList<Integer>();
 
           secTypes = Security.GetEnabledExtSecTypes();
index aca8b536d45e17b159c668f21bd6bbb294a9ddf7..fb635c7b918db5557abdcfde2c1600a27ac5c602 100644 (file)
@@ -285,7 +285,7 @@ public class Configuration {
       return;
     }
 
-    for (Iterator i = props.stringPropertyNames().iterator(); i.hasNext();) {
+    for (Iterator<String> i = props.stringPropertyNames().iterator(); i.hasNext();) {
       String name = (String)i.next();
       if (name.startsWith("[")) {
         // skip the section delimiters
index b848b1329a1fad4eb2c14c085d9490dcbe77d6e4..d20374f62d89f931eb7c788a60aaec9805d46443 100644 (file)
@@ -35,7 +35,7 @@ public class ScreenSet {
 
   public final void add_screen(Screen screen) { screens.add(screen); }
   public final void remove_screen(int id) { 
-    for (Iterator iter = screens.iterator(); iter.hasNext(); ) {
+    for (Iterator<Screen> iter = screens.iterator(); iter.hasNext(); ) {
       Screen refScreen = (Screen)iter.next();
       if (refScreen.id == id)
         iter.remove();
@@ -53,7 +53,7 @@ public class ScreenSet {
 
       fb_rect.setXYWH(0, 0, fb_width, fb_height);
 
-      for (Iterator iter = screens.iterator(); iter.hasNext(); ) {
+      for (Iterator<Screen> iter = screens.iterator(); iter.hasNext(); ) {
         Screen refScreen = (Screen)iter.next();
         if (refScreen.dimensions.is_empty())
           return false;
@@ -68,7 +68,7 @@ public class ScreenSet {
   }
 
   public final void debug_print() {
-    for (Iterator iter = screens.iterator(); iter.hasNext(); ) {
+    for (Iterator<Screen> iter = screens.iterator(); iter.hasNext(); ) {
       Screen refScreen = (Screen)iter.next();
       vlog.error("    "+refScreen.id+" (0x"+refScreen.id+"): "+
                 refScreen.dimensions.width()+"x"+refScreen.dimensions.height()+
index 6d52ede771177f2fc8f5a361b1d0052c3ba7dd98..9df499517a0f6a774a8ca162e494eea56012a811 100644 (file)
@@ -77,7 +77,7 @@ public class Security {
     List<Integer> result = new ArrayList<Integer>();
 
     result.add(secTypeVeNCrypt);
-    for (Iterator i = enabledSecTypes.iterator(); i.hasNext(); ) {
+    for (Iterator<Integer> i = enabledSecTypes.iterator(); i.hasNext(); ) {
       int refType = (Integer)i.next();
       if (refType < 0x100)
         result.add(refType);
@@ -90,7 +90,7 @@ public class Security {
   {
     List<Integer> result = new ArrayList<Integer>();
 
-    for (Iterator i = enabledSecTypes.iterator(); i.hasNext(); ) {
+    for (Iterator<Integer> i = enabledSecTypes.iterator(); i.hasNext(); ) {
       int refType = (Integer)i.next();
       if (refType != secTypeVeNCrypt) /* Do not include VeNCrypt to avoid loops */
         result.add(refType);
@@ -102,7 +102,7 @@ public class Security {
   public static final void EnableSecType(int secType)
   {
 
-    for (Iterator i = enabledSecTypes.iterator(); i.hasNext(); )
+    for (Iterator<Integer> i = enabledSecTypes.iterator(); i.hasNext(); )
       if ((Integer)i.next() == secType)
         return;
 
@@ -111,7 +111,7 @@ public class Security {
 
   public boolean IsSupported(int secType)
   {
-    Iterator i;
+    Iterator<Integer> i;
   
     for (i = enabledSecTypes.iterator(); i.hasNext(); )
      if ((Integer)i.next() == secType)
index 9adb967582e07043da98ebf60476f5b109e91ba2..e51cb444afe0bcab44e83a5c03ba4daff6c30c90 100644 (file)
@@ -297,7 +297,7 @@ public class CConn extends CConnection
       setServerPort(port);
       sock = new TcpSocket(host, port);
       vlog.info("Redirected to "+host+":"+port);
-      viewer.newViewer(viewer, sock, true);
+      VncViewer.newViewer(viewer, sock, true);
     } catch (java.lang.Exception e) {
       throw new Exception(e.toString());
     }
@@ -355,7 +355,7 @@ public class CConn extends CConnection
         else if (layout.num_screens() != 1) {
 
           while (true) {
-            Iterator iter = layout.screens.iterator(); 
+            Iterator<Screen> iter = layout.screens.iterator(); 
             Screen screen = (Screen)iter.next();
         
             if (!iter.hasNext())
@@ -831,7 +831,7 @@ public class CConn extends CConnection
       /* Process non-VeNCrypt sectypes */
       java.util.List<Integer> secTypes = new ArrayList<Integer>();
       secTypes = Security.GetEnabledSecTypes();
-      for (Iterator i = secTypes.iterator(); i.hasNext();) {
+      for (Iterator<Integer> i = secTypes.iterator(); i.hasNext();) {
         switch ((Integer)i.next()) {
         case Security.secTypeVeNCrypt:
           options.secVeNCrypt.setSelected(UserPreferences.getBool("viewer", "secVeNCrypt", true));
@@ -851,7 +851,7 @@ public class CConn extends CConnection
       if (options.secVeNCrypt.isSelected()) {
         java.util.List<Integer> secTypesExt = new ArrayList<Integer>();
         secTypesExt = Security.GetEnabledExtSecTypes();
-        for (Iterator iext = secTypesExt.iterator(); iext.hasNext();) {
+        for (Iterator<Integer> iext = secTypesExt.iterator(); iext.hasNext();) {
           switch ((Integer)iext.next()) {
           case Security.secTypePlain:
             options.encNone.setSelected(UserPreferences.getBool("viewer", "encNone", true));
index 0a2401494cf1e93f51c5c1175cf25f4ba8d115a3..49677087b21d7ec99c9be04a4c3443be000b3793 100644 (file)
@@ -78,10 +78,10 @@ public class MenuKey
   }
   
   static int getMenuKeyCode() {
-    String menuKeyStr;
     int menuKeyCode = KeyEvent.VK_F8;
   
-    menuKeyStr = 
+    @SuppressWarnings({"static"})
+    String menuKeyStr = 
       Configuration.global().getParam("menuKey").getValueStr();
     for(int i = 0; i < getMenuKeySymbolCount(); i++)
       if (menuSymbols[i].name.equals(menuKeyStr))
index 80d9f40d388681299c30359a434e2d6f2be46719..cd2134103fe6583e9b8ff78d5fc4eba3ca867b37 100644 (file)
@@ -39,6 +39,7 @@ class OptionsDialog extends Dialog implements
   OptionsDialogCallback cb;
   JPanel FormatPanel, InputsPanel, MiscPanel, DefaultsPanel, SecPanel;
   JCheckBox autoSelect, customCompressLevel, noJpeg;
+  @SuppressWarnings({"rawtypes"})
   JComboBox menuKey, compressLevel, qualityLevel, scalingFactor;
   ButtonGroup encodingGroup, colourGroup;
   JRadioButton zrle, hextile, tight, raw;
@@ -51,6 +52,7 @@ class OptionsDialog extends Dialog implements
   JButton ca, crl;
   JButton cfLoadButton, cfSaveAsButton, defSaveButton, defReloadButton, defClearButton;
 
+  @SuppressWarnings({"rawtypes","unchecked"})
   public OptionsDialog(OptionsDialogCallback cb_) { 
     super(true);
     cb = cb_;
index 976dc7f21007c899499d26f394fff553fb47015f..a13458501886508885f9b665a1a8e957a92d5d9a 100644 (file)
@@ -33,6 +33,7 @@ class ServerDialog extends Dialog implements
                            ItemListener
 {
 
+  @SuppressWarnings({"unchecked","rawtypes"})
   public ServerDialog(OptionsDialog options_,
                       String defaultServerName, CConn cc_) {
     
@@ -41,10 +42,10 @@ class ServerDialog extends Dialog implements
     setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
     setResizable(false);
     setSize(new Dimension(340, 135));
-    setTitle("VNC Viewer : Connection Details");
+    setTitle("VNC Viewer: Connection Details");
     addWindowListener(new WindowAdapter() {
       public void windowClosing(WindowEvent e) {
-        if (cc.viewer.nViewers == 1) {
+        if (VncViewer.nViewers == 1) {
           cc.viewer.exit(1);
         } else {
           ret = false;
@@ -120,13 +121,14 @@ class ServerDialog extends Dialog implements
     return;
   }
 
+  @SuppressWarnings({"unchecked","rawtypes"})
   public void actionPerformed(ActionEvent e) {
     Object s = e.getSource();
     if (s instanceof JButton && (JButton)s == okButton) {
       commit();
       endDialog();
     } else if (s instanceof JButton && (JButton)s == cancelButton) {
-      if (cc.viewer.nViewers == 1)
+      if (VncViewer.nViewers == 1)
         cc.viewer.exit(1);
       ret = false;
       endDialog();
@@ -148,7 +150,7 @@ class ServerDialog extends Dialog implements
     String serverName = (String)server.getSelectedItem();
     if (serverName == null || serverName.equals("")) {
       vlog.error("Invalid servername specified");
-      if (cc.viewer.nViewers == 1)
+      if (VncViewer.nViewers == 1)
         cc.viewer.exit(1);
       ret = false;
       endDialog();
@@ -177,6 +179,7 @@ class ServerDialog extends Dialog implements
   }
 
   CConn cc;
+  @SuppressWarnings("rawtypes")
   JComboBox server;
   ComboBoxEditor editor;
   JButton aboutButton, optionsButton, okButton, cancelButton;
index c148416b55b98c070e4d1a341afbeeb1ec5de8c9..95489fac157beb35c5e656c044e4206c5d97f7fd 100644 (file)
@@ -53,7 +53,7 @@ public class Viewport extends JFrame
     });
     addWindowListener(new WindowAdapter() {
       public void windowClosing(WindowEvent e) {
-        if (cc.viewer.nViewers == 1) {
+        if (VncViewer.nViewers == 1) {
           cc.viewer.exit(1);
         } else {
           cc.close();
index 8cc9fc637dd62418d984f51538cb1ec7a0aaf82f..cf38760f9da27af00a7f3bfa4fc1cbf448da939a 100644 (file)
@@ -40,8 +40,7 @@ import java.io.File;
 import java.lang.Character;
 import java.util.jar.Attributes;
 import java.util.jar.Manifest;
-import java.util.ArrayList;
-import java.util.Iterator;
+import java.util.*;
 import javax.swing.*;
 import javax.swing.plaf.FontUIResource;
 import javax.swing.UIManager.*;
@@ -80,7 +79,7 @@ public class VncViewer extends java.applet.Applet implements Runnable
       UIManager.put("TitledBorder.titleColor",Color.blue);
       if (UIManager.getLookAndFeel().getName().equals("Metal")) {
         UIManager.put("swing.boldMetal", Boolean.FALSE);
-        java.util.Enumeration keys = UIManager.getDefaults().keys();
+        Enumeration<Object> keys = UIManager.getDefaults().keys();
         while (keys.hasMoreElements()) {
           Object key = keys.nextElement();
           Object value = UIManager.get(key);
index 23da0a9952765b502a05f3249294fa078a93c8d6..a66d83ae7d0a302bd4e1cb95c5f0231b19d9ee25 100644 (file)
@@ -287,7 +287,7 @@ public class tunnel
       ArrayList<File> privateKeys = new ArrayList<File>();
       privateKeys.add(new File(homeDir+"/.ssh/id_rsa"));
       privateKeys.add(new File(homeDir+"/.ssh/id_dsa"));
-      for (Iterator i = privateKeys.iterator(); i.hasNext();) {
+      for (Iterator<File> i = privateKeys.iterator(); i.hasNext();) {
         File privateKey = (File)i.next();
         if (privateKey.exists() && privateKey.canRead())
                jsch.addIdentity(privateKey.getAbsolutePath());