Actions
bug #8482
closedjava.lang.IllegalArgumentException: Collection is empty in DescriptionType.includesType(DescriptionType.java:151)
Start date:
Due date:
% Done:
100%
Estimated time:
Severity:
normal
Found in Version:
Description
Can be reproduced by:
Caused by: net.sf.json.JSONException: java.lang.reflect.InvocationTargetException at net.sf.json.JSONObject.defaultBeanProcessing(JSONObject.java:818) at net.sf.json.JSONObject._fromBean(JSONObject.java:699) at net.sf.json.JSONObject.fromObject(JSONObject.java:172) at net.sf.json.AbstractJSON._processValue(AbstractJSON.java:274) at net.sf.json.JSONArray._processValue(JSONArray.java:2513) at net.sf.json.JSONArray.processValue(JSONArray.java:2538) at net.sf.json.JSONArray.addValue(JSONArray.java:2525) at net.sf.json.JSONArray._fromCollection(JSONArray.java:1056) at net.sf.json.JSONArray.fromObject(JSONArray.java:123) at net.sf.json.AbstractJSON._processValue(AbstractJSON.java:240) at net.sf.json.JSONObject._processValue(JSONObject.java:2655) at net.sf.json.JSONObject.processValue(JSONObject.java:2721) at net.sf.json.JSONObject.setInternal(JSONObject.java:2736) at net.sf.json.JSONObject.setValue(JSONObject.java:1424) at net.sf.json.JSONObject.defaultBeanProcessing(JSONObject.java:765) at net.sf.json.JSONObject._fromBean(JSONObject.java:699) at net.sf.json.JSONObject.fromObject(JSONObject.java:172) at eu.etaxonomy.cdm.remote.view.JsonView.render(JsonView.java:128) at eu.etaxonomy.cdm.remote.view.JsonView.render(JsonView.java:188) at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1243) at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1027) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:971) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:969) ... 61 more Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.commons.beanutils.PropertyUtilsBean.invokeMethod(PropertyUtilsBean.java:2116) at org.apache.commons.beanutils.PropertyUtilsBean.getSimpleProperty(PropertyUtilsBean.java:1267) at org.apache.commons.beanutils.PropertyUtilsBean.getNestedProperty(PropertyUtilsBean.java:808) at org.apache.commons.beanutils.PropertyUtilsBean.getProperty(PropertyUtilsBean.java:884) at org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:464) at net.sf.json.JSONObject.defaultBeanProcessing(JSONObject.java:749) ... 84 more Caused by: java.lang.IllegalArgumentException: Collection is empty at java.util.EnumSet.copyOf(EnumSet.java:174) at eu.etaxonomy.cdm.model.description.DescriptionType.includesType(DescriptionType.java:151) at eu.etaxonomy.cdm.model.description.DescriptionBase.isCloneForSource(DescriptionBase.java:361) ... 94 more
Related issues
Updated by Andreas Müller over 4 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 50
Applied in changeset cdmlib|244c62c6bee1863dfe79d71e0ecae7bdeb4d06b5.
Updated by Andreas Müller over 4 years ago
- Related to task #8483: Return EnumSets in EnumeratedTermVoc.getGeneralizationOf and similar methods added
Updated by Andreas Müller over 4 years ago
- Assignee changed from Andreas Müller to Andreas Kohlbecker
Updated by Andreas Kohlbecker over 4 years ago
- Status changed from Resolved to Feedback
- Assignee changed from Andreas Kohlbecker to Andreas Müller
- % Done changed from 50 to 90
The problems obviously is fixed and the implementation looks good. Why did you comment the commit with "workaround"? Is there a more sophisticated solution to be implemented, otherwise you can close this ticket.
Updated by Andreas Müller over 4 years ago
- Status changed from Feedback to Closed
The more sophisticated way is to adapt the underlying method to return an EnumSet, not an ordinary Set. With EnumSet an empty set copy should work. See related ticket #8483.
Actions