ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/tck/JSR166TestCase.java
(Generate patch)

Comparing jsr166/src/test/tck/JSR166TestCase.java (file contents):
Revision 1.134 by jsr166, Sun Jun 14 20:58:14 2015 UTC vs.
Revision 1.136 by jsr166, Fri Sep 4 18:16:28 2015 UTC

# Line 281 | Line 281 | public class JSR166TestCase extends Test
281      public static boolean atLeastJava6() { return JAVA_CLASS_VERSION >= 50.0; }
282      public static boolean atLeastJava7() { return JAVA_CLASS_VERSION >= 51.0; }
283      public static boolean atLeastJava8() { return JAVA_CLASS_VERSION >= 52.0; }
284 <    public static boolean atLeastJava9() { return JAVA_CLASS_VERSION >= 53.0; }
284 >    public static boolean atLeastJava9() {
285 >        // As of 2015-09, java9 still uses 52.0 class file version
286 >        return JAVA_SPECIFICATION_VERSION.matches("^(1\\.)?(9|[0-9][0-9])$");
287 >    }
288 >    // public static boolean atLeastJava9() { return JAVA_CLASS_VERSION >= 53.0; }
289 >    public static boolean atLeastJava10() {
290 >        return JAVA_SPECIFICATION_VERSION.matches("^(1\\.)?[0-9][0-9]$");
291 >    }
292  
293      /**
294       * Collects all JSR166 unit tests as one suite.
# Line 481 | Line 488 | public class JSR166TestCase extends Test
488      }
489  
490      /**
491 <     * Returns a new Date instance representing a time delayMillis
492 <     * milliseconds in the future.
491 >     * Returns a new Date instance representing a time at least
492 >     * delayMillis milliseconds in the future.
493       */
494      Date delayedDate(long delayMillis) {
495 <        return new Date(System.currentTimeMillis() + delayMillis);
495 >        // Add 1 because currentTimeMillis is known to round into the past.
496 >        return new Date(System.currentTimeMillis() + delayMillis + 1);
497      }
498  
499      /**

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines