Details
Description
See
NanoGroovyBuilderTestCase.groovy
testSoftInstantiateWithChildContainerWithDynamicClassPath()
This must be ficed before NanoContainer ships.
Activity
Paul Hammant
made changes -
Field | Original Value | New Value |
---|---|---|
Description |
See NanoGroovyBuilderTestCase.groovy testSoftInstantiateWithChildContainer() This must be ficed before NanoContainer ships. |
See NanoGroovyBuilderTestCase.groovy testSoftInstantiateWithChildContainerWithDynamicClassPath() This must be ficed before NanoContainer ships. |
Summary | testSoftInstantiateWithChildContainer fails for reasons of inaccessible Groovy attributes | testSoftInstantiateWithChildContainerWithDynamicClassPath() fails for reasons of inaccessible Groovy attributes |
Mauro Talevi
made changes -
Environment | ||
Component/s | groovy [ 11631 ] | |
Description |
See NanoGroovyBuilderTestCase.groovy testSoftInstantiateWithChildContainerWithDynamicClassPath() This must be ficed before NanoContainer ships. |
See NanoGroovyBuilderTestCase.groovy testSoftInstantiateWithChildContainerWithDynamicClassPath() This must be ficed before NanoContainer ships. |
Mauro Talevi
made changes -
Fix Version/s | 1.0-RC1 [ 11850 ] | |
Status | Open [ 1 ] | Closed [ 6 ] |
Fix Version/s | 1.0 [ 10148 ] | |
Resolution | Fixed [ 1 ] |
NullPointerException (attributes.remove("path") returns null) is resolved by createClassPathElementNode returns something non-null object. For example:
Index: src/java/org/nanocontainer/script/groovy/NanoGroovyBuilder.java
===================================================================
RCS file: /scm/picocontainer/java/nanocontainer/src/java/org/nanocontainer/script/groovy/NanoGroovyBuilder.java,v
retrieving revision 1.6
diff -u -r1.6 NanoGroovyBuilder.java
src/java/org/nanocontainer/script/groovy/NanoGroovyBuilder.java 25 Jun 2004 13:40:15 -0000 1.6
+++ src/java/org/nanocontainer/script/groovy/NanoGroovyBuilder.java 26 Jun 2004 08:25:54 -0000
@@ -102,7 +102,7 @@
throw new PicoBuilderException("classpath '" + path + "' malformed ", e);
}
reflectionContainerAdapter.addClassLoaderURL(pathURL);
+ return pathURL;
}
private Object createBeanNode(Map attributes, MutablePicoContainer pico) {
This is because when createNode returns null, BuilderSupport line 140-142 calls createNode once more.
But, there is another failure:
Testcase: testSoftInstantiateWithChildContainerWithDynamicClassPath(org.nanocontainer.script.groovy.NanoGroovyBuilderTestCase): Caused an ERROR
Must specify a class attribute for a component
org.nanocontainer.script.groovy.PicoBuilderException: Must specify a class attribute for a component
at org.nanocontainer.script.groovy.NanoGroovyBuilder.createComponentNode(NanoGroovyBuilder.java:126)
at org.nanocontainer.script.groovy.NanoGroovyBuilder.createChildOfContainerNode(NanoGroovyBuilder.java:72)
at org.nanocontainer.script.groovy.NanoGroovyBuilder.createNode(NanoGroovyBuilder.java:64)
at org.nanocontainer.script.groovy.NanoGroovyBuilder.createNode(NanoGroovyBuilder.java:47)
at org.nanocontainer.script.groovy.NanoGroovyBuilder.createNode(NanoGroovyBuilder.java:56)
at groovy.util.BuilderSupport.doInvokeMethod(BuilderSupport.java:107)
at groovy.util.BuilderSupport.invokeMethod(BuilderSupport.java:85)
at org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:128)
at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:106)
at groovy.lang.Closure.invokeMethod(Closure.java:135)
at org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:128)
at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:106)
at org.nanocontainer.script.groovy.NanoGroovyBuilderTestCase$_testSoftInstantiateWithChildContainerWithDynamicClassPath_closure5.doCall(/usr/home/ko-hey/cvswork/picocontainer/nanocontainer/target/test-classes/org/nanocontainer/script/groovy/NanoGroovyBuilderTestCase.groovy:142)
at groovy.lang.Closure.call(Closure.java:280)
at groovy.lang.Closure.call(Closure.java:212)
at groovy.util.BuilderSupport.doInvokeMethod(BuilderSupport.java:155)
at groovy.util.BuilderSupport.invokeMethod(BuilderSupport.java:85)
at org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:128)
at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:106)
at org.nanocontainer.script.groovy.NanoGroovyBuilderTestCase.testSoftInstantiateWithChildContainerWithDynamicClassPath(/usr/home/ko-hey/cvswork/picocontainer/nanocontainer/target/test-classes/org/nanocontainer/script/groovy/NanoGroovyBuilderTestCase.groovy:140)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)