Details
-
Type:
Feature Request
-
Status: Closed (View Workflow)
-
Priority:
Major
-
Resolution: Done
-
Affects Version/s: 0.1.0
-
Fix Version/s: 0.1.4
-
Component/s: api
-
Labels:None
-
Affects:Compatibility/Configuration
-
Estimated Difficulty:Low
Description
beans.xml is permitted to be empty, in which case it simply serves to mark an archive as a bean archive. The BeansDescriptor should not choke if it tries to load an empty file.
I've started looking at this, the JAXB unmarshaller fails on an empty stream when overall, the method should return an empty (newly created) descriptor.
My proposal is to add functionality to look for an empty stream and if it is empty, create a new descriptor suitable for the model and return that instead. Non-empty streams will be passed off to the XML unmarshaller as is the current behavior.
As it stands, this would be the behavior for all descriptor types, not just CDI beans.