< prev index next >
src/java.base/share/classes/java/lang/module/Resolver.java
Print this page
rev 14279 : [mq]: 8140281-deprecation-optional.get
*** 96,106 ****
}
if (TRACE) {
trace("Root module %s located", root);
if (mref.location().isPresent())
! trace(" (%s)", mref.location().get());
}
assert mref.descriptor().name().equals(root);
nameToReference.put(root, mref);
q.push(mref.descriptor());
--- 96,106 ----
}
if (TRACE) {
trace("Root module %s located", root);
if (mref.location().isPresent())
! trace(" (%s)", mref.location().getWhenPresent());
}
assert mref.descriptor().name().equals(root);
nameToReference.put(root, mref);
q.push(mref.descriptor());
*** 155,165 ****
if (TRACE) {
trace("Module %s located, required by %s",
dn, descriptor.name());
if (mref.location().isPresent())
! trace(" (%s)", mref.location().get());
}
}
}
--- 155,165 ----
if (TRACE) {
trace("Module %s located, required by %s",
dn, descriptor.name());
if (mref.location().isPresent())
! trace(" (%s)", mref.location().getWhenPresent());
}
}
}
*** 230,240 ****
String pn = provider.name();
if (!nameToReference.containsKey(pn)) {
if (TRACE && mref.location().isPresent())
! trace(" (%s)", mref.location().get());
nameToReference.put(pn, mref);
q.push(provider);
}
}
--- 230,240 ----
String pn = provider.name();
if (!nameToReference.containsKey(pn)) {
if (TRACE && mref.location().isPresent())
! trace(" (%s)", mref.location().getWhenPresent());
nameToReference.put(pn, mref);
q.push(provider);
}
}
*** 432,442 ****
// get map of module names to hash
Optional<Hasher.DependencyHashes> ohashes = descriptor.hashes();
if (!ohashes.isPresent())
continue;
! Hasher.DependencyHashes hashes = ohashes.get();
// check dependences
for (ModuleDescriptor.Requires d : descriptor.requires()) {
String dn = d.name();
String recordedHash = hashes.hashFor(dn);
--- 432,442 ----
// get map of module names to hash
Optional<Hasher.DependencyHashes> ohashes = descriptor.hashes();
if (!ohashes.isPresent())
continue;
! Hasher.DependencyHashes hashes = ohashes.getWhenPresent();
// check dependences
for (ModuleDescriptor.Requires d : descriptor.requires()) {
String dn = d.name();
String recordedHash = hashes.hashFor(dn);
< prev index next >