< prev index next >
src/java.base/share/classes/jdk/internal/module/ServicesCatalog.java
Print this page
@@ -169,8 +169,15 @@
if (previous != null) catalog = previous;
}
return catalog;
}
+ static void setServicesCatalog(ClassLoader loader, ServicesCatalog catalog) {
+ ServicesCatalog previous = CLV.putIfAbsent(loader, catalog);
+ if (previous != null) {
+ throw new RuntimeException("unexpected: " + previous);
+ }
+ }
+
// the ServicesCatalog registered to a class loader
private static final ClassLoaderValue<ServicesCatalog> CLV = new ClassLoaderValue<>();
}
< prev index next >