[Design the new POJO MicroContainer] - NPE with new parsing in aop-mc-int tests
by alesj
I get a bunch of NPEs while testing aop-mc-int.
The exception comes from
| java.lang.NullPointerException
| at org.jboss.kernel.plugins.deployment.AbstractKernelDeployment.getBeans(AbstractKernelDeployment.java:227)
| at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBeans(AbstractKernelDeployer.java:304)
| at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deploy(AbstractKernelDeployer.java:133)
| at org.jboss.kernel.plugins.deployment.BasicKernelDeployer.deploy(BasicKernelDeployer.java:76)
| at org.jboss.kernel.plugins.deployment.xml.BasicXMLDeployer.deploy(BasicXMLDeployer.java:88)
| at org.jboss.kernel.plugins.deployment.xml.BasicXMLDeployer.deploy(BasicXMLDeployer.java:158)
| at org.jboss.test.kernel.junit.MicrocontainerTestDelegate.deploy(MicrocontainerTestDelegate.java:294)
| at org.jboss.test.kernel.junit.MicrocontainerTest.deploy(MicrocontainerTest.java:325)
|
which is this line
| for (BeanMetaDataFactory factory : factories)
| {
| XXX List<BeanMetaData> beans = factory.getBeans();
|
Debuging the thing showed that normal mc beans are there as factories, it's the aop specfic stuff that is put there as a null.
Who matches/produces this null?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4140447#4140447
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4140447
16 years, 9 months
[Design the new POJO MicroContainer] - Re: AOPConstructorJoinpoint::methodHasAnnotations is wrong
by alesj
"alesj" wrote : "alesj" wrote :
| | How do we know level hierarchy?
| OK, ScopeLevel implements Comparable. :-)
I've added simple util class, to get sub levels:
| package org.jboss.metadata.spi.scope;
|
| public class CommonLevelsUtil
| {
| ...
|
| /**
| * Get the levels (including level param) that
| * are below level param.
| *
| * @param level the flag level
| * @return sub list of levels
| */
| public static List<ScopeLevel> getSubLevels(ScopeLevel level)
| {
| int index = levels.indexOf(level);
| if (index < 0)
| throw new IllegalArgumentException("No such scope level in levels: " + level);
| return levels.subList(index, size);
| }
|
| /**
| * Get the levels that are exclusively below level param.
| *
| * @param level the flag level
| * @return sub list of levels
| */
| public static List<ScopeLevel> getExclusiveSubLevels(ScopeLevel level)
| {
| int index = levels.indexOf(level);
| if (index < 0)
| throw new IllegalArgumentException("No such scope level in levels: " + level);
|
| if (index + 1 == size)
| return Collections.emptyList();
|
| return levels.subList(index + 1, size);
| }
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4140440#4140440
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4140440
16 years, 9 months