< prev index next >

test/jdk/javax/naming/spi/DirectoryManager/GetContDirCtx.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 1999, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 37,47 **** public class GetContDirCtx { public static void main(String[] args) throws Exception { CannotProceedException cpe = new CannotProceedException(); ! Hashtable env = new Hashtable(1); cpe.setEnvironment(env); Reference ref = new Reference("java.lang.Object", "DummyObjectFactory", null); --- 37,47 ---- public class GetContDirCtx { public static void main(String[] args) throws Exception { CannotProceedException cpe = new CannotProceedException(); ! Hashtable<?,?> env = new Hashtable<>(1); cpe.setEnvironment(env); Reference ref = new Reference("java.lang.Object", "DummyObjectFactory", null);
*** 50,60 **** try { contCtx = DirectoryManager.getContinuationDirContext(cpe); } catch (CannotProceedException e) { } ! Hashtable contEnv = contCtx.getEnvironment(); if (contEnv.get(NamingManager.CPE) != cpe) { throw new Exception("Test failed: CPE property not set" + " in the continuation context"); } } --- 50,60 ---- try { contCtx = DirectoryManager.getContinuationDirContext(cpe); } catch (CannotProceedException e) { } ! Hashtable<?,?> contEnv = contCtx.getEnvironment(); if (contEnv.get(NamingManager.CPE) != cpe) { throw new Exception("Test failed: CPE property not set" + " in the continuation context"); } }
< prev index next >