< prev index next >

test/jdk/java/lang/module/ModuleNamesTest.java

Print this page

 10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 12  * version 2 for more details (a copy is included in the LICENSE file that
 13  * accompanied this code).
 14  *
 15  * You should have received a copy of the GNU General Public License version
 16  * 2 along with this work; if not, write to the Free Software Foundation,
 17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 18  *
 19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 20  * or visit www.oracle.com if you need additional information or have any
 21  * questions.
 22  */
 23 
 24 /**
 25  * @test
 26  * @enablePreview
 27  * @modules java.base/jdk.internal.access
 28  *          java.base/jdk.internal.module
 29  * @library /test/lib
 30  * @build jdk.test.lib.util.ModuleInfoWriter
 31  * @run testng ModuleNamesTest
 32  * @summary Basic test of reading a module-info.class with module names that
 33  *          are legal in class files but not legal in the Java Language
 34  */
 35 
 36 import java.io.ByteArrayOutputStream;
 37 import java.lang.module.InvalidModuleDescriptorException;
 38 import java.lang.module.ModuleDescriptor;
 39 import java.lang.module.ModuleDescriptor.Builder;
 40 import java.lang.module.ModuleDescriptor.Exports;
 41 import java.lang.module.ModuleDescriptor.Opens;
 42 import java.lang.module.ModuleDescriptor.Requires;
 43 import java.nio.ByteBuffer;
 44 import java.util.Optional;
 45 import java.util.Set;
 46 
 47 import jdk.internal.access.SharedSecrets;
 48 
 49 import jdk.test.lib.util.ModuleInfoWriter;
 50 

 10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 12  * version 2 for more details (a copy is included in the LICENSE file that
 13  * accompanied this code).
 14  *
 15  * You should have received a copy of the GNU General Public License version
 16  * 2 along with this work; if not, write to the Free Software Foundation,
 17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 18  *
 19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 20  * or visit www.oracle.com if you need additional information or have any
 21  * questions.
 22  */
 23 
 24 /**
 25  * @test
 26  * @enablePreview
 27  * @modules java.base/jdk.internal.access
 28  *          java.base/jdk.internal.module
 29  * @library /test/lib

 30  * @run testng ModuleNamesTest
 31  * @summary Basic test of reading a module-info.class with module names that
 32  *          are legal in class files but not legal in the Java Language
 33  */
 34 
 35 import java.io.ByteArrayOutputStream;
 36 import java.lang.module.InvalidModuleDescriptorException;
 37 import java.lang.module.ModuleDescriptor;
 38 import java.lang.module.ModuleDescriptor.Builder;
 39 import java.lang.module.ModuleDescriptor.Exports;
 40 import java.lang.module.ModuleDescriptor.Opens;
 41 import java.lang.module.ModuleDescriptor.Requires;
 42 import java.nio.ByteBuffer;
 43 import java.util.Optional;
 44 import java.util.Set;
 45 
 46 import jdk.internal.access.SharedSecrets;
 47 
 48 import jdk.test.lib.util.ModuleInfoWriter;
 49 
< prev index next >