< prev index next >

test/java/util/ResourceBundle/modules/security/src/test/jdk/test/Main.java

Print this page

        

*** 37,49 **** // local resource ResourceBundle.getBundle(TEST_RESOURCE_BUNDLE_NAME, Main.class.getModule()); // resource in another module Module m1 = p1.Bundle.class.getModule(); ResourceBundle rb1 = Bundle.getBundle(M1_RESOURCE_BUNDLE_NAME); ResourceBundle rb2 = ResourceBundle.getBundle(M1_RESOURCE_BUNDLE_NAME, m1); ! if (rb1 != rb2) { throw new RuntimeException("unexpected resource bundle"); } System.setSecurityManager(new SecurityManager()); --- 37,51 ---- // local resource ResourceBundle.getBundle(TEST_RESOURCE_BUNDLE_NAME, Main.class.getModule()); // resource in another module Module m1 = p1.Bundle.class.getModule(); + + // bundles loaded with different cache key ResourceBundle rb1 = Bundle.getBundle(M1_RESOURCE_BUNDLE_NAME); ResourceBundle rb2 = ResourceBundle.getBundle(M1_RESOURCE_BUNDLE_NAME, m1); ! if (rb1 == rb2) { throw new RuntimeException("unexpected resource bundle"); } System.setSecurityManager(new SecurityManager());
< prev index next >