/** * Last resort when something goes terribly wrong within the unmarshaller. */ protected static void handleGenericException(Exception e) throws SAXException { handleGenericException(e,false); }
public void receive(UnmarshallingContext.State state, Object o) throws SAXException { try { set((BeanT) state.getTarget(), (ValueT) o); } catch (AccessorException e) { Loader.handleGenericException(e, true); } catch (IllegalAccessError iae) { // throw UnmarshalException instead IllegalAccesssError | Issue 475 Loader.handleGenericError(iae); } }
/** * Starts the packing scope, without adding any item. * * This allows us to return an empty pack, thereby allowing the user * to distinguish empty array vs null array. */ public void start( Accessor<BeanT,PropT> acc, Lister<BeanT,PropT,ItemT,PackT> lister) throws SAXException{ try { if(!hasStarted()) { this.bean = (BeanT)context.getCurrentState().getTarget(); this.acc = acc; this.lister = lister; this.pack = lister.startPacking(bean,acc); } } catch (AccessorException e) { Loader.handleGenericException(e,true); // recover from this error by ignoring future items. this.lister = Lister.getErrorInstance(); this.acc = Accessor.getErrorInstance(); } } }
/** * Adds a new item to this packing scope. */ public void add( Accessor<BeanT,PropT> acc, Lister<BeanT,PropT,ItemT,PackT> lister, ItemT value) throws SAXException{ try { if(!hasStarted()) { this.bean = (BeanT)context.getCurrentState().getTarget(); this.acc = acc; this.lister = lister; this.pack = lister.startPacking(bean,acc); } lister.addToPack(pack,value); } catch (AccessorException e) { Loader.handleGenericException(e,true); // recover from this error by ignoring future items. this.lister = Lister.getErrorInstance(); this.acc = Accessor.getErrorInstance(); } }
/** * Last resort when something goes terribly wrong within the unmarshaller. */ protected static void handleGenericException(Exception e) throws SAXException { handleGenericException(e,false); }
public void receive(UnmarshallingContext.State state, Object o) throws SAXException { try { set((BeanT) state.getTarget(), (ValueT) o); } catch (AccessorException e) { Loader.handleGenericException(e, true); } catch (IllegalAccessError iae) { // throw UnmarshalException instead IllegalAccesssError | Issue 475 Loader.handleGenericError(iae); } }
/** * Starts the packing scope, without adding any item. * * This allows us to return an empty pack, thereby allowing the user * to distinguish empty array vs null array. */ public void start( Accessor<BeanT,PropT> acc, Lister<BeanT,PropT,ItemT,PackT> lister) throws SAXException{ try { if(!hasStarted()) { this.bean = (BeanT)context.getCurrentState().getTarget(); this.acc = acc; this.lister = lister; this.pack = lister.startPacking(bean,acc); } } catch (AccessorException e) { Loader.handleGenericException(e,true); // recover from this error by ignoring future items. this.lister = Lister.getErrorInstance(); this.acc = Accessor.getErrorInstance(); } } }
/** * Adds a new item to this packing scope. */ public void add( Accessor<BeanT,PropT> acc, Lister<BeanT,PropT,ItemT,PackT> lister, ItemT value) throws SAXException{ try { if(!hasStarted()) { this.bean = (BeanT)context.getCurrentState().getTarget(); this.acc = acc; this.lister = lister; this.pack = lister.startPacking(bean,acc); } lister.addToPack(pack,value); } catch (AccessorException e) { Loader.handleGenericException(e,true); // recover from this error by ignoring future items. this.lister = Lister.getErrorInstance(); this.acc = Accessor.getErrorInstance(); } }
/** * Last resort when something goes terribly wrong within the unmarshaller. */ protected static void handleGenericException(Exception e) throws SAXException { handleGenericException(e,false); }
/** * Last resort when something goes terribly wrong within the unmarshaller. */ protected static void handleGenericException(Exception e) throws SAXException { handleGenericException(e,false); }
public void receive(UnmarshallingContext.State state, Object o) throws SAXException { try { set((BeanT) state.getTarget(), (ValueT) o); } catch (AccessorException e) { Loader.handleGenericException(e, true); } catch (IllegalAccessError iae) { // throw UnmarshalException instead IllegalAccesssError | Issue 475 Loader.handleGenericError(iae); } }
public void receive(UnmarshallingContext.State state, Object o) throws SAXException { try { set((BeanT) state.getTarget(), (ValueT) o); } catch (AccessorException e) { Loader.handleGenericException(e, true); } catch (IllegalAccessError iae) { // throw UnmarshalException instead IllegalAccesssError | Issue 475 Loader.handleGenericError(iae); } }
/** * Starts the packing scope, without adding any item. * * This allows us to return an empty pack, thereby allowing the user * to distinguish empty array vs null array. */ public void start( Accessor<BeanT,PropT> acc, Lister<BeanT,PropT,ItemT,PackT> lister) throws SAXException{ try { if(!hasStarted()) { this.bean = (BeanT)context.getCurrentState().getTarget(); this.acc = acc; this.lister = lister; this.pack = lister.startPacking(bean,acc); } } catch (AccessorException e) { Loader.handleGenericException(e,true); // recover from this error by ignoring future items. this.lister = Lister.getErrorInstance(); this.acc = Accessor.getErrorInstance(); } } }
/** * Starts the packing scope, without adding any item. * * This allows us to return an empty pack, thereby allowing the user * to distinguish empty array vs null array. */ public void start( Accessor<BeanT,PropT> acc, Lister<BeanT,PropT,ItemT,PackT> lister) throws SAXException{ try { if(!hasStarted()) { this.bean = (BeanT)context.getCurrentState().getTarget(); this.acc = acc; this.lister = lister; this.pack = lister.startPacking(bean,acc); } } catch (AccessorException e) { Loader.handleGenericException(e,true); // recover from this error by ignoring future items. this.lister = Lister.getErrorInstance(); this.acc = Accessor.getErrorInstance(); } } }
/** * Adds a new item to this packing scope. */ public void add( Accessor<BeanT,PropT> acc, Lister<BeanT,PropT,ItemT,PackT> lister, ItemT value) throws SAXException{ try { if(!hasStarted()) { this.bean = (BeanT)context.getCurrentState().getTarget(); this.acc = acc; this.lister = lister; this.pack = lister.startPacking(bean,acc); } lister.addToPack(pack,value); } catch (AccessorException e) { Loader.handleGenericException(e,true); // recover from this error by ignoring future items. this.lister = Lister.getErrorInstance(); this.acc = Accessor.getErrorInstance(); } }
/** * Adds a new item to this packing scope. */ public void add( Accessor<BeanT,PropT> acc, Lister<BeanT,PropT,ItemT,PackT> lister, ItemT value) throws SAXException{ try { if(!hasStarted()) { this.bean = (BeanT)context.getCurrentState().getTarget(); this.acc = acc; this.lister = lister; this.pack = lister.startPacking(bean,acc); } lister.addToPack(pack,value); } catch (AccessorException e) { Loader.handleGenericException(e,true); // recover from this error by ignoring future items. this.lister = Lister.getErrorInstance(); this.acc = Accessor.getErrorInstance(); } }