package org.jboss.loom.tools.report.adapters;


import javax.xml.bind.annotation.adapters.XmlAdapter;
import org.jboss.loom.spi.IConfigFragment;
import org.jboss.loom.tools.report.beans.ConfigFragmentReportBean;

/**
 *
 *  @author Ondrej Zizka, ozizka at redhat.com
 */
public class IConfigFragmentAdapter extends XmlAdapter<ConfigFragmentReportBean, IConfigFragment> {

    @Override
    public ConfigFragmentReportBean marshal( IConfigFragment fragment ) throws Exception {
        return ConfigFragmentReportBean.from( fragment );
    }
    
    @Override
    public IConfigFragment unmarshal( ConfigFragmentReportBean v ) throws Exception {
        throw new UnsupportedOperationException( "Unmarshalling not supported." );
    }

}// class

@@ -462,32 +462,77 @@
 ows Exception %7B%0A
+        if( fragment == null )  return null;%0A
         return C

Fix NPE