8170987: Module system implementation refresh (12/2016)

Co-authored-by: Jonathan Gibbons <jonathan.gibbons@oracle.com>
Co-authored-by: Jan Lahoda <jan.lahoda@oracle.com>
Co-authored-by: Srikanth Adayapalam <srikanth.adayapalam@oracle.com>
Co-authored-by: Mandy Chung <mandy.chung@oracle.com>
Reviewed-by: mcimadamore
This commit is contained in:
Alan Bateman 2016-12-16 05:47:58 +00:00
parent 353a59448d
commit 2381943e61
147 changed files with 2438 additions and 1528 deletions

View file

@ -93,10 +93,10 @@ public class ModuleTestBase {
tr.checkContains(actualRequires, moduleDescriptor.requires, "Lists of requires don't match");
}
private void testExports(ModuleDescriptor moduleDescriptor, Module_attribute module, ConstantPool constantPool) throws ConstantPool.InvalidIndex, ConstantPool.UnexpectedEntry {
private void testExports(ModuleDescriptor moduleDescriptor, Module_attribute module, ConstantPool constantPool) throws ConstantPoolException {
tr.checkEquals(module.exports_count, moduleDescriptor.exports.size(), "Wrong amount of exports.");
for (Module_attribute.ExportsEntry export : module.exports) {
String pkg = constantPool.getUTF8Value(export.exports_index);
String pkg = constantPool.getPackageInfo(export.exports_index).getName();
if (tr.checkTrue(moduleDescriptor.exports.containsKey(pkg), "Unexpected export " + pkg)) {
Export expectedExport = moduleDescriptor.exports.get(pkg);
tr.checkEquals(expectedExport.mask, export.exports_flags, "Wrong export flags");
@ -104,7 +104,7 @@ public class ModuleTestBase {
tr.checkEquals(export.exports_to_count, expectedTo.size(), "Wrong amount of exports to");
List<String> actualTo = new ArrayList<>();
for (int toIdx : export.exports_to_index) {
actualTo.add(constantPool.getUTF8Value(toIdx).replace('/', '.'));
actualTo.add(constantPool.getModuleInfo(toIdx).getName().replace('/', '.'));
}
tr.checkContains(actualTo, expectedTo, "Lists of \"exports to\" don't match.");
}