--- old/modules/graphics/src/main/java/javafx/concurrent/Task.java 2016-05-26 13:01:09.756108253 +0300 +++ new/modules/graphics/src/main/java/javafx/concurrent/Task.java 2016-05-26 13:01:07.707084253 +0300 @@ -77,11 +77,13 @@ * a new Thread constructed and executed manually. Finally, since you can * manually create a new Thread, passing it a Runnable, it is possible to use * the following idiom: + *

*

  *         Thread th = new Thread(task);
  *         th.setDaemon(true);
  *         th.start();
  *     
+ *

* Note that this code sets the daemon flag of the Thread to true. If you * want a background thread to prevent the VM from existing after the last * stage is closed, then you would want daemon to be false. However, if @@ -443,7 +445,7 @@ * @Override protected ObservableList<Rectangle> call() throws Exception { * updateMessage("Creating Rectangles"); * ObservableList<Rectangle> results = FXCollections.observableArrayList(); - * for (int i=0; i<100; i++) { + * for (int i=0; i<100; i++) { * if (isCancelled()) break; * Rectangle r = new Rectangle(10, 10); * r.setX(10 * i); @@ -523,18 +525,18 @@ *


  *     public class PartialResultsTask extends Task<ObservableList<Rectangle>> {
  *         // Uses Java 7 diamond operator
- *         private ReadOnlyObjectWrapper> partialResults =
- *                 new ReadOnlyObjectWrapper<>(this, "partialResults",
- *                         FXCollections.observableArrayList(new ArrayList()));
+ *         private ReadOnlyObjectWrapper<ObservableList<Rectangle>> partialResults =
+ *                 new ReadOnlyObjectWrapper<>(this, "partialResults",
+ *                         FXCollections.observableArrayList(new ArrayList<Rectangle>()));
  *
- *         public final ObservableList getPartialResults() { return partialResults.get(); }
- *         public final ReadOnlyObjectProperty> partialResultsProperty() {
+ *         public final ObservableList<Rectangle> getPartialResults() { return partialResults.get(); }
+ *         public final ReadOnlyObjectProperty<ObservableList<Rectangle>> partialResultsProperty() {
  *             return partialResults.getReadOnlyProperty();
  *         }
  *
- *         @Override protected ObservableList call() throws Exception {
+ *         @Override protected ObservableList<Rectangle> call() throws Exception {
  *             updateMessage("Creating Rectangles...");
- *             for (int i=0; i<100; i++) {
+ *             for (int i=0; i<100; i++) {
  *                 if (isCancelled()) break;
  *                 final Rectangle r = new Rectangle(10, 10);
  *                 r.setX(10 * i);
@@ -563,7 +565,7 @@
  *     final Group group = new Group();
  *     Task<Void> task = new Task<Void>() {
  *         @Override protected Void call() throws Exception {
- *             for (int i=0; i<100; i++) {
+ *             for (int i=0; i<100; i++) {
  *                 if (isCancelled()) break;
  *                 final Rectangle r = new Rectangle(10, 10);
  *                 r.setX(10 * i);