@@ -72,20 +72,20 @@ public class Manager extends Emitter {
7272 private long _reconnectionDelay ;
7373 private long _reconnectionDelayMax ;
7474 private double _randomizationFactor ;
75- private Backoff backoff ;
75+ private final Backoff backoff ;
7676 private long _timeout ;
77- private URI uri ;
78- private List <Packet > packetBuffer ;
79- private Queue <On .Handle > subs ;
80- private Options opts ;
77+ private final URI uri ;
78+ private final List <Packet > packetBuffer = new ArrayList <>() ;
79+ private final Queue <On .Handle > subs = new LinkedList <>(); ;
80+ private final Options opts ;
8181 /*package*/ io .socket .engineio .client .Socket engine ;
82- private Parser .Encoder encoder ;
83- private Parser .Decoder decoder ;
82+ private final Parser .Encoder encoder ;
83+ private final Parser .Decoder decoder ;
8484
8585 /**
8686 * This HashMap can be accessed from outside of EventThread.
8787 */
88- /*package*/ ConcurrentHashMap <String , Socket > nsps ;
88+ /*package*/ final Map <String , Socket > nsps = new ConcurrentHashMap <>() ;
8989
9090
9191 public Manager () {
@@ -114,8 +114,6 @@ public Manager(URI uri, Options opts) {
114114 opts .callFactory = defaultCallFactory ;
115115 }
116116 this .opts = opts ;
117- this .nsps = new ConcurrentHashMap <>();
118- this .subs = new LinkedList <>();
119117 this .reconnection (opts .reconnection );
120118 this .reconnectionAttempts (opts .reconnectionAttempts != 0 ? opts .reconnectionAttempts : Integer .MAX_VALUE );
121119 this .reconnectionDelay (opts .reconnectionDelay != 0 ? opts .reconnectionDelay : 1000 );
@@ -129,7 +127,6 @@ public Manager(URI uri, Options opts) {
129127 this .readyState = ReadyState .CLOSED ;
130128 this .uri = uri ;
131129 this .encoding = false ;
132- this .packetBuffer = new ArrayList <>();
133130 this .encoder = opts .encoder != null ? opts .encoder : new IOParser .Encoder ();
134131 this .decoder = opts .decoder != null ? opts .decoder : new IOParser .Decoder ();
135132 }
0 commit comments