From 14bbc041d7d466befd83be58bcd78ffea467795b Mon Sep 17 00:00:00 2001 From: Robbie Gemmell Date: Tue, 30 Jan 2024 15:32:55 +0000 Subject: [PATCH] NO-JIRA: remove a bunch of commented out code in util test class --- .../unit/util/NonSerializableFactory.java | 42 ------------------- 1 file changed, 42 deletions(-) diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/util/NonSerializableFactory.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/util/NonSerializableFactory.java index 3b621aedd2..94d955322c 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/util/NonSerializableFactory.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/util/NonSerializableFactory.java @@ -35,48 +35,6 @@ public class NonSerializableFactory implements ObjectFactory { public NonSerializableFactory() { } - // public static void unbind(final Context ctx, final String strName) throws NamingException - // { - // Name name = ctx.getNameParser("").parse(strName); - // int size = name.size(); - // String atom = name.get(size - 1); - // Context parentCtx = Util.createSubcontext(ctx, name.getPrefix(size - 1)); - // String key = new StringBuilder().append(parentCtx.getNameInNamespace()).append("/").append(atom).toString(); - // NonSerializableFactory.getWrapperMap().remove(key); - // Util.unbind(ctx, strName); - // } - - // public static void rebind(final Context ctx, final String strName, final Object value) throws NamingException - // { - // Name name = ctx.getNameParser("").parse(strName); - // int size = name.size(); - // String atom = name.get(size - 1); - // Context parentCtx = Util.createSubcontext(ctx, name.getPrefix(size - 1)); - // String key = new StringBuilder().append(parentCtx.getNameInNamespace()).append("/").append(atom).toString(); - // NonSerializableFactory.getWrapperMap().put(key, value); - // String className = value.getClass().getName(); - // String factory = NonSerializableFactory.class.getName(); - // StringRefAddr addr = new StringRefAddr("nns", key); - // Reference memoryRef = new Reference(className, addr, factory, null); - // parentCtx.rebind(atom, memoryRef); - // } - - // public static void bind(final Context ctx, final String strName, final Object value) throws NamingException - // { - // Name name = ctx.getNameParser("").parse(strName); - // int size = name.size(); - // String atom = name.get(size - 1); - // Context parentCtx = Util.createSubcontext(ctx, name.getPrefix(size - 1)); - // String key = new StringBuilder().append(parentCtx.getNameInNamespace()).append("/").append(atom).toString(); - // NonSerializableFactory.getWrapperMap().put(key, value); - // String className = value.getClass().getName(); - // String factory = NonSerializableFactory.class.getName(); - // StringRefAddr addr = new StringRefAddr("nns", key); - // Reference memoryRef = new Reference(className, addr, factory, null); - // - // parentCtx.bind(atom, memoryRef); - // } - public static Object lookup(final String name) throws NamingException { if (NonSerializableFactory.getWrapperMap().get(name) == null) { throw new NamingException(name + " not found");