@@ -95,7 +95,7 @@ public void run()
95
95
{
96
96
while (true )
97
97
{
98
- AsynchronousEntry item = null ;
98
+ AsynchronousEntry item ;
99
99
100
100
synchronized (asynchronousQueue )
101
101
{
@@ -463,7 +463,7 @@ private static Socket establishConnection(String hostname, int port, ProxyData p
463
463
throw new IOException ("The proxy did not send back a valid HTTP response." );
464
464
}
465
465
466
- int errorCode = 0 ;
466
+ int errorCode ;
467
467
468
468
try
469
469
{
@@ -510,7 +510,7 @@ public void run()
510
510
{
511
511
receiveLoop ();
512
512
}
513
- catch (Exception e )
513
+ catch (IOException e )
514
514
{
515
515
close (e , false );
516
516
@@ -541,7 +541,7 @@ public void run()
541
541
{
542
542
he .mh .handleMessage (null , 0 );
543
543
}
544
- catch (Exception ignore )
544
+ catch (IOException ignored )
545
545
{
546
546
}
547
547
}
@@ -759,6 +759,7 @@ public void sendMessage(byte[] msg) throws IOException
759
759
}
760
760
catch (InterruptedException e )
761
761
{
762
+ throw new InterruptedIOException (e .getMessage ());
762
763
}
763
764
}
764
765
}
@@ -933,15 +934,12 @@ public void receiveLoop() throws IOException
933
934
934
935
MessageHandler mh = null ;
935
936
936
- for (int i = 0 ; i < messageHandlers .size (); i ++)
937
- {
938
- HandlerEntry he = messageHandlers .get (i );
939
- if ((he .low <= type ) && (type <= he .high ))
940
- {
941
- mh = he .mh ;
942
- break ;
943
- }
944
- }
937
+ for (HandlerEntry he : messageHandlers ) {
938
+ if ((he .low <= type ) && (type <= he .high )) {
939
+ mh = he .mh ;
940
+ break ;
941
+ }
942
+ }
945
943
946
944
if (mh == null )
947
945
{
0 commit comments