Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8359127

Amend java/nio/channels/DatagramChannel/PromiscuousIPv6.java to use @requires for OS platform selection

XMLWordPrintable

    • b03

        java/nio/channels/DatagramChannel/PromiscuousIPv6.java currently has a programmatic check for the OS platform, and throws a Skipped exception for those OS platform which will not run the test.
        In line with some recent changes, change the test to use @requires for platform selection

            private static boolean supportedByPlatform() {
                return Platform.isOSX() || Platform.isLinux();
            }

           public static void main(String[] args) throws IOException {

                boolean hasIPV6MulticastAll;

                if (!supportedByPlatform()) {
                    throw new SkippedException("This test should not be run on this platform");
                } else {


        This can be changed to

        @requires (os.family == "linux") || (os.family == "mac")

              dboyle Dermot Boyle
              msheppar Mark Sheppard
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: