langtools/test/tools/javac/file/MultiReleaseJar/MutliReleaseModuleInfoTest.java
changeset 45688 abb7c4afc7a8
parent 41155 93dad90c22c1
equal deleted inserted replaced
45687:07463ccee73b 45688:abb7c4afc7a8
     1 /*
     1 /*
     2  * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
   130             if (sm == null) {
   130             if (sm == null) {
   131                 throw new AssertionError("Cannot find the service module!");
   131                 throw new AssertionError("Cannot find the service module!");
   132             }
   132             }
   133             boolean foundjd = false;
   133             boolean foundjd = false;
   134             for (RequiresDirective rd : ElementFilter.requiresIn(sm.getDirectives())) {
   134             for (RequiresDirective rd : ElementFilter.requiresIn(sm.getDirectives())) {
   135                 foundjd |= rd.getDependency().getSimpleName().contentEquals("java.desktop");
   135                 foundjd |= rd.getDependency().getQualifiedName().contentEquals("java.desktop");
   136             }
   136             }
   137             if (!foundjd) {
   137             if (!foundjd) {
   138                 throw new AssertionError("Missing dependency on java desktop module!");
   138                 throw new AssertionError("Missing dependency on java desktop module!");
   139             }
   139             }
   140             return false;
   140             return false;