make private fields final (#34)
diff --git a/lib/ports.dart b/lib/ports.dart
index ec3c55e..3fcdcb3 100644
--- a/lib/ports.dart
+++ b/lib/ports.dart
@@ -267,7 +267,7 @@
/// The first value sent to [port] is used to complete the [result].
/// All following values sent to `port` are ignored.
class SingleResponseChannel<R> {
- Zone _zone;
+ final Zone _zone;
final RawReceivePort _receivePort;
final Completer<R> _completer;
final Function _callback;
diff --git a/lib/registry.dart b/lib/registry.dart
index 5b681dd..9fbfbc2 100644
--- a/lib/registry.dart
+++ b/lib/registry.dart
@@ -101,7 +101,7 @@
static final Expando _caches = Expando();
/// Port for sending command to the central registry manager.
- SendPort _commandPort;
+ final SendPort _commandPort;
/// Create a registry linked to a [RegistryManager] through [commandPort].
///
@@ -329,8 +329,8 @@
/// The central repository used by distributed [Registry] instances.
class RegistryManager {
final Duration _timeout;
+ final RawReceivePort _commandPort;
int _nextId = 0;
- RawReceivePort _commandPort;
/// Maps id to entry. Each entry contains the id, the element, its tags,
/// and a capability required to remove it again.