changeset 1705:123ea875cb1a

Added final modifiers to fields, and fixed one misspelling in JavaDoc.
author rbair
date Fri, 17 Aug 2012 23:05:06 -0700
parents e2b8f5cca57b
children ecbafaa7e528
files javafx-concurrent/src/javafx/concurrent/Service.java javafx-concurrent/src/javafx/concurrent/Task.java javafx-concurrent/src/javafx/concurrent/Worker.java
diffstat 3 files changed, 21 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-concurrent/src/javafx/concurrent/Service.java	Fri Aug 17 11:55:07 2012 +1200
+++ b/javafx-concurrent/src/javafx/concurrent/Service.java	Fri Aug 17 23:05:06 2012 -0700
@@ -158,39 +158,39 @@
         EXECUTOR.allowCoreThreadTimeOut(true);
     }
 
-    private ObjectProperty<State> state = new SimpleObjectProperty<State>(this, "state", State.READY);
+    private final ObjectProperty<State> state = new SimpleObjectProperty<State>(this, "state", State.READY);
     @Override public final State getState() { checkThread(); return state.get(); }
     @Override public final ReadOnlyObjectProperty<State> stateProperty() { checkThread(); return state; }
 
-    private ObjectProperty<V> value = new SimpleObjectProperty<V>(this, "value");
+    private final ObjectProperty<V> value = new SimpleObjectProperty<V>(this, "value");
     @Override public final V getValue() { checkThread(); return value.get(); }
     @Override public final ReadOnlyObjectProperty<V> valueProperty() { checkThread(); return value; }
 
-    private ObjectProperty<Throwable> exception = new SimpleObjectProperty<Throwable>(this, "exception");
+    private final ObjectProperty<Throwable> exception = new SimpleObjectProperty<Throwable>(this, "exception");
     @Override public final Throwable getException() { checkThread(); return exception.get(); }
     @Override public final ReadOnlyObjectProperty<Throwable> exceptionProperty() { checkThread(); return exception; }
 
-    private DoubleProperty workDone = new SimpleDoubleProperty(this, "workDone", -1);
+    private final DoubleProperty workDone = new SimpleDoubleProperty(this, "workDone", -1);
     @Override public final double getWorkDone() { checkThread(); return workDone.get(); }
     @Override public final ReadOnlyDoubleProperty workDoneProperty() { checkThread(); return workDone; }
 
-    private DoubleProperty totalWorkToBeDone = new SimpleDoubleProperty(this, "totalWork", -1);
+    private final DoubleProperty totalWorkToBeDone = new SimpleDoubleProperty(this, "totalWork", -1);
     @Override public final double getTotalWork() { checkThread(); return totalWorkToBeDone.get(); }
     @Override public final ReadOnlyDoubleProperty totalWorkProperty() { checkThread(); return totalWorkToBeDone; }
 
-    private DoubleProperty progress = new SimpleDoubleProperty(this, "progress", -1);
+    private final DoubleProperty progress = new SimpleDoubleProperty(this, "progress", -1);
     @Override public final double getProgress() { checkThread(); return progress.get(); }
     @Override public final ReadOnlyDoubleProperty progressProperty() { checkThread(); return progress; }
 
-    private BooleanProperty running = new SimpleBooleanProperty(this, "running", false);
+    private final BooleanProperty running = new SimpleBooleanProperty(this, "running", false);
     @Override public final boolean isRunning() { checkThread(); return running.get(); }
     @Override public final ReadOnlyBooleanProperty runningProperty() { checkThread(); return running; }
 
-    private StringProperty message = new SimpleStringProperty(this, "message", "");
+    private final StringProperty message = new SimpleStringProperty(this, "message", "");
     @Override public final String getMessage() { return message.get(); }
     @Override public final ReadOnlyStringProperty messageProperty() { return message; }
 
-    private StringProperty title = new SimpleStringProperty(this, "title", "");
+    private final StringProperty title = new SimpleStringProperty(this, "title", "");
     @Override public final String getTitle() { return title.get(); }
     @Override public final ReadOnlyStringProperty titleProperty() { return title; }
 
@@ -199,7 +199,7 @@
      * a new daemon thread will be created and used for running the Service using some
      * default executor.
      */
-    private ObjectProperty<Executor> executor = new SimpleObjectProperty<Executor>(this, "executor");
+    private final ObjectProperty<Executor> executor = new SimpleObjectProperty<Executor>(this, "executor");
     public final void setExecutor(Executor value) { checkThread(); executor.set(value); }
     public final Executor getExecutor() { checkThread(); return executor.get(); }
     public final ObjectProperty<Executor> executorProperty() { return executor; }
--- a/javafx-concurrent/src/javafx/concurrent/Task.java	Fri Aug 17 11:55:07 2012 +1200
+++ b/javafx-concurrent/src/javafx/concurrent/Task.java	Fri Aug 17 23:05:06 2012 -0700
@@ -840,41 +840,41 @@
      */
     protected void failed() { }
 
-    private ObjectProperty<V> value = new SimpleObjectProperty<V>(this, "value");
+    private final ObjectProperty<V> value = new SimpleObjectProperty<V>(this, "value");
     private void setValue(V v) { checkThread(); value.set(v); }
     @Override public final V getValue() { checkThread(); return value.get(); }
     @Override public final ReadOnlyObjectProperty<V> valueProperty() { checkThread(); return value; }
 
-    private ObjectProperty<Throwable> exception = new SimpleObjectProperty<Throwable>(this, "exception");
+    private final ObjectProperty<Throwable> exception = new SimpleObjectProperty<Throwable>(this, "exception");
     private void _setException(Throwable value) { checkThread(); exception.set(value); }
     @Override public final Throwable getException() { checkThread(); return exception.get(); }
     @Override public final ReadOnlyObjectProperty<Throwable> exceptionProperty() { checkThread(); return exception; }
 
-    private DoubleProperty workDone = new SimpleDoubleProperty(this, "workDone", -1);
+    private final DoubleProperty workDone = new SimpleDoubleProperty(this, "workDone", -1);
     private void setWorkDone(double value) { checkThread(); workDone.set(value); }
     @Override public final double getWorkDone() { checkThread(); return workDone.get(); }
     @Override public final ReadOnlyDoubleProperty workDoneProperty() { checkThread(); return workDone; }
 
-    private DoubleProperty totalWork = new SimpleDoubleProperty(this, "totalWork", -1);
+    private final DoubleProperty totalWork = new SimpleDoubleProperty(this, "totalWork", -1);
     private void setTotalWork(double value) { checkThread(); totalWork.set(value); }
     @Override public final double getTotalWork() { checkThread(); return totalWork.get(); }
     @Override public final ReadOnlyDoubleProperty totalWorkProperty() { checkThread(); return totalWork; }
 
-    private DoubleProperty progress = new SimpleDoubleProperty(this, "progress", -1);
+    private final DoubleProperty progress = new SimpleDoubleProperty(this, "progress", -1);
     private void setProgress(double value) { checkThread(); progress.set(value); }
     @Override public final double getProgress() { checkThread(); return progress.get(); }
     @Override public final ReadOnlyDoubleProperty progressProperty() { checkThread(); return progress; }
 
-    private BooleanProperty running = new SimpleBooleanProperty(this, "running", false);
+    private final BooleanProperty running = new SimpleBooleanProperty(this, "running", false);
     private void setRunning(boolean value) { checkThread(); running.set(value); }
     @Override public final boolean isRunning() { checkThread(); return running.get(); }
     @Override public final ReadOnlyBooleanProperty runningProperty() { checkThread(); return running; }
 
-    private StringProperty message = new SimpleStringProperty(this, "message", "");
+    private final StringProperty message = new SimpleStringProperty(this, "message", "");
     @Override public final String getMessage() { return message.get(); }
     @Override public final ReadOnlyStringProperty messageProperty() { return message; }
 
-    private StringProperty title = new SimpleStringProperty(this, "title", "");
+    private final StringProperty title = new SimpleStringProperty(this, "title", "");
     @Override public final String getTitle() { return title.get(); }
     @Override public final ReadOnlyStringProperty titleProperty() { return title; }
 
@@ -1205,8 +1205,8 @@
      * atomically. If it was not null, then we simply update it.
      */
     private static final class ProgressUpdate {
-        private double workDone;
-        private double totalWork;
+        private final double workDone;
+        private final double totalWork;
 
         private ProgressUpdate(double p, double m) {
             this.workDone = p;
--- a/javafx-concurrent/src/javafx/concurrent/Worker.java	Fri Aug 17 11:55:07 2012 +1200
+++ b/javafx-concurrent/src/javafx/concurrent/Worker.java	Fri Aug 17 23:05:06 2012 -0700
@@ -210,7 +210,7 @@
 
     /**
      * Indicates the current amount of work that has been completed. Zero or a
-     * positive value indicate progress toward completion. This variable's value
+     * positive value indicate progress toward completion. This variables value
      * may or may not change from its default value depending on the specific
      * Worker implementation. A value of -1 means that the current amount of work
      * done cannot be determined (ie: it is indeterminate). The value of