Author: tchemit Date: 2010-06-05 09:50:34 +0200 (Sat, 05 Jun 2010) New Revision: 1948 Url: http://nuiton.org/repositories/revision/jaxx/1948 Log: fix bug in JAXXInitialContext when usgin method add with an entry Modified: trunk/jaxx-runtime/src/main/java/jaxx/runtime/context/JAXXInitialContext.java Modified: trunk/jaxx-runtime/src/main/java/jaxx/runtime/context/JAXXInitialContext.java =================================================================== --- trunk/jaxx-runtime/src/main/java/jaxx/runtime/context/JAXXInitialContext.java 2010-06-05 07:50:06 UTC (rev 1947) +++ trunk/jaxx-runtime/src/main/java/jaxx/runtime/context/JAXXInitialContext.java 2010-06-05 07:50:34 UTC (rev 1948) @@ -26,6 +26,7 @@ import jaxx.runtime.JAXXContext; import jaxx.runtime.JAXXObject; +import org.apache.commons.lang.NotImplementedException; import java.util.Map.Entry; @@ -81,7 +82,7 @@ * @return the instance of the context */ public <O> JAXXInitialContext add(JAXXContextEntryDef<O> def, O value) { - def.setContextValue(this, value); + super.setContextValue(value, def.getName()); return this; } @@ -101,31 +102,21 @@ @Override public void setContextValue(Object o) { - throw new RuntimeException("not implemented"); + throw new NotImplementedException(); } @Override public void setContextValue(Object o, String name) { - throw new RuntimeException("not implemented"); + throw new NotImplementedException(); } @Override public <T> void removeContextValue(Class<T> klazz) { - throw new RuntimeException("not implemented"); + throw new NotImplementedException(); } @Override public <T> void removeContextValue(Class<T> klazz, String name) { - throw new RuntimeException("not implemented"); + throw new NotImplementedException(); } - -// @Override -// public <O extends Container> O getParentContainer(Class<O> clazz) { -// throw new RuntimeException("not implemented"); -// } -// -// @Override -// public <O extends Container> O getParentContainer(Object top, Class<O> clazz) { -// throw new RuntimeException("not implemented"); -// } }