< prev index next >

src/java.base/share/classes/jdk/internal/module/ServicesCatalog.java

Print this page

*** 169,182 **** 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<>(); --- 169,185 ---- if (previous != null) catalog = previous; } return catalog; } ! /** ! * Associates the given ServicesCatalog with the given class loader. ! */ ! public static void putServicesCatalog(ClassLoader loader, ServicesCatalog catalog) { ServicesCatalog previous = CLV.putIfAbsent(loader, catalog); if (previous != null) { ! throw new InternalError(); } } // the ServicesCatalog registered to a class loader private static final ClassLoaderValue<ServicesCatalog> CLV = new ClassLoaderValue<>();
< prev index next >