NO-JIRA: remove a bunch of commented out code in util test class
This commit is contained in:
parent
b08602b8d6
commit
14bbc041d7
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue