[MAGNOLIA-2176] NPE in Content2Bean in case of indexed properties Created: 07/Jun/08  Updated: 23/Jan/13  Resolved: 07/Jun/08

Status: Closed
Project: Magnolia
Component/s: core
Affects Version/s: 3.5.8
Fix Version/s: 3.6

Type: Bug Priority: Major
Reporter: Fabrizio Giustina Assignee: Fabrizio Giustina
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled

 Description   

Trying to use Content2Bean on any class that declares an indexed property causes the following:

java.lang.NullPointerException
at info.magnolia.cms.util.ClassUtil.isSubClass(ClassUtil.java:100)
at info.magnolia.content2bean.impl.TypeMappingImpl.getTypeDescriptor(TypeMappingImpl.java:170)
at info.magnolia.content2bean.impl.TypeMappingImpl.getPropertyTypeDescriptor(TypeMappingImpl.java:127)
at info.magnolia.content2bean.TypeDescriptor.getPropertyDescriptors(TypeDescriptor.java:117)
at info.magnolia.content2bean.TypeDescriptor.getPropertyTypeDescriptor(TypeDescriptor.java:100)
at info.magnolia.content2bean.impl.Content2BeanTransformerImpl.resolveType(Content2BeanTransformerImpl.java:115)
at info.magnolia.content2bean.impl.Content2BeanProcessorImpl.toBean(Content2BeanProcessorImpl.java:84)
at info.magnolia.content2bean.impl.Content2BeanProcessorImpl.toMap(Content2BeanProcessorImpl.java:167)
at info.magnolia.content2bean.impl.Content2BeanProcessorImpl.toBean(Content2BeanProcessorImpl.java:99)
at info.magnolia.content2bean.impl.Content2BeanProcessorImpl.toBean(Content2BeanProcessorImpl.java:75)
at info.magnolia.content2bean.Content2BeanUtil.toBean(Content2BeanUtil.java:152)
at info.magnolia.content2bean.Content2BeanUtil.toBean(Content2BeanUtil.java:145)



 Comments   
Comment by Fabrizio Giustina [ 07/Jun/08 ]

fixed, unit test added

Generated at Mon Feb 12 03:34:10 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.