Java Code Examples for com.sun.tools.internal.xjc.util.ErrorReceiverFilter#hadError()
The following examples show how to use
com.sun.tools.internal.xjc.util.ErrorReceiverFilter#hadError() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DOMForest.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** * Checks the correctness of the XML Schema documents and return true * if it's OK. * * <p> * This method performs a weaker version of the tests where error messages * are provided without line number information. So whenever possible * use {@link SchemaConstraintChecker}. * * @see SchemaConstraintChecker */ public boolean checkSchemaCorrectness(ErrorReceiver errorHandler) { try { boolean disableXmlSecurity = false; if (options != null) { disableXmlSecurity = options.disableXmlSecurity; } SchemaFactory sf = XmlFactory.createSchemaFactory(W3C_XML_SCHEMA_NS_URI, disableXmlSecurity); ErrorReceiverFilter filter = new ErrorReceiverFilter(errorHandler); sf.setErrorHandler(filter); Set<String> roots = getRootDocuments(); Source[] sources = new Source[roots.size()]; int i=0; for (String root : roots) { sources[i++] = new DOMSource(get(root),root); } sf.newSchema(sources); return !filter.hadError(); } catch (SAXException e) { // the errors should have been reported return false; } }
Example 2
Source File: DOMForest.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
/** * Checks the correctness of the XML Schema documents and return true * if it's OK. * * <p> * This method performs a weaker version of the tests where error messages * are provided without line number information. So whenever possible * use {@link SchemaConstraintChecker}. * * @see SchemaConstraintChecker */ public boolean checkSchemaCorrectness(ErrorReceiver errorHandler) { try { boolean disableXmlSecurity = false; if (options != null) { disableXmlSecurity = options.disableXmlSecurity; } SchemaFactory sf = XmlFactory.createSchemaFactory(W3C_XML_SCHEMA_NS_URI, disableXmlSecurity); ErrorReceiverFilter filter = new ErrorReceiverFilter(errorHandler); sf.setErrorHandler(filter); Set<String> roots = getRootDocuments(); Source[] sources = new Source[roots.size()]; int i=0; for (String root : roots) { sources[i++] = new DOMSource(get(root),root); } sf.newSchema(sources); return !filter.hadError(); } catch (SAXException e) { // the errors should have been reported return false; } }
Example 3
Source File: BGMBuilder.java From hottub with GNU General Public License v2.0 | 6 votes |
/** * Entry point. */ public static Model build( XSSchemaSet _schemas, JCodeModel codeModel, ErrorReceiver _errorReceiver, Options opts ) { // set up a ring final Ring old = Ring.begin(); try { ErrorReceiverFilter ef = new ErrorReceiverFilter(_errorReceiver); Ring.add(XSSchemaSet.class,_schemas); Ring.add(codeModel); Model model = new Model(opts, codeModel, null/*set later*/, opts.classNameAllocator, _schemas); Ring.add(model); Ring.add(ErrorReceiver.class,ef); Ring.add(CodeModelClassFactory.class,new CodeModelClassFactory(ef)); BGMBuilder builder = new BGMBuilder(opts.defaultPackage,opts.defaultPackage2, opts.isExtensionMode(),opts.getFieldRendererFactory(), opts.activePlugins); builder._build(); if(ef.hadError()) return null; else return model; } finally { Ring.end(old); } }
Example 4
Source File: DOMForest.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
/** * Checks the correctness of the XML Schema documents and return true * if it's OK. * * <p> * This method performs a weaker version of the tests where error messages * are provided without line number information. So whenever possible * use {@link SchemaConstraintChecker}. * * @see SchemaConstraintChecker */ public boolean checkSchemaCorrectness(ErrorReceiver errorHandler) { try { boolean disableXmlSecurity = false; if (options != null) { disableXmlSecurity = options.disableXmlSecurity; } SchemaFactory sf = XmlFactory.createSchemaFactory(W3C_XML_SCHEMA_NS_URI, disableXmlSecurity); ErrorReceiverFilter filter = new ErrorReceiverFilter(errorHandler); sf.setErrorHandler(filter); Set<String> roots = getRootDocuments(); Source[] sources = new Source[roots.size()]; int i=0; for (String root : roots) { sources[i++] = new DOMSource(get(root),root); } sf.newSchema(sources); return !filter.hadError(); } catch (SAXException e) { // the errors should have been reported return false; } }
Example 5
Source File: BGMBuilder.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
/** * Entry point. */ public static Model build( XSSchemaSet _schemas, JCodeModel codeModel, ErrorReceiver _errorReceiver, Options opts ) { // set up a ring final Ring old = Ring.begin(); try { ErrorReceiverFilter ef = new ErrorReceiverFilter(_errorReceiver); Ring.add(XSSchemaSet.class,_schemas); Ring.add(codeModel); Model model = new Model(opts, codeModel, null/*set later*/, opts.classNameAllocator, _schemas); Ring.add(model); Ring.add(ErrorReceiver.class,ef); Ring.add(CodeModelClassFactory.class,new CodeModelClassFactory(ef)); BGMBuilder builder = new BGMBuilder(opts.defaultPackage,opts.defaultPackage2, opts.isExtensionMode(),opts.getFieldRendererFactory(), opts.activePlugins); builder._build(); if(ef.hadError()) return null; else return model; } finally { Ring.end(old); } }
Example 6
Source File: DOMForest.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
/** * Checks the correctness of the XML Schema documents and return true * if it's OK. * * <p> * This method performs a weaker version of the tests where error messages * are provided without line number information. So whenever possible * use {@link SchemaConstraintChecker}. * * @see SchemaConstraintChecker */ public boolean checkSchemaCorrectness(ErrorReceiver errorHandler) { try { boolean disableXmlSecurity = false; if (options != null) { disableXmlSecurity = options.disableXmlSecurity; } SchemaFactory sf = XmlFactory.createSchemaFactory(W3C_XML_SCHEMA_NS_URI, disableXmlSecurity); ErrorReceiverFilter filter = new ErrorReceiverFilter(errorHandler); sf.setErrorHandler(filter); Set<String> roots = getRootDocuments(); Source[] sources = new Source[roots.size()]; int i=0; for (String root : roots) { sources[i++] = new DOMSource(get(root),root); } sf.newSchema(sources); return !filter.hadError(); } catch (SAXException e) { // the errors should have been reported return false; } }
Example 7
Source File: BGMBuilder.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
/** * Entry point. */ public static Model build( XSSchemaSet _schemas, JCodeModel codeModel, ErrorReceiver _errorReceiver, Options opts ) { // set up a ring final Ring old = Ring.begin(); try { ErrorReceiverFilter ef = new ErrorReceiverFilter(_errorReceiver); Ring.add(XSSchemaSet.class,_schemas); Ring.add(codeModel); Model model = new Model(opts, codeModel, null/*set later*/, opts.classNameAllocator, _schemas); Ring.add(model); Ring.add(ErrorReceiver.class,ef); Ring.add(CodeModelClassFactory.class,new CodeModelClassFactory(ef)); BGMBuilder builder = new BGMBuilder(opts.defaultPackage,opts.defaultPackage2, opts.isExtensionMode(),opts.getFieldRendererFactory(), opts.activePlugins); builder._build(); if(ef.hadError()) return null; else return model; } finally { Ring.end(old); } }
Example 8
Source File: BGMBuilder.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** * Entry point. */ public static Model build( XSSchemaSet _schemas, JCodeModel codeModel, ErrorReceiver _errorReceiver, Options opts ) { // set up a ring final Ring old = Ring.begin(); try { ErrorReceiverFilter ef = new ErrorReceiverFilter(_errorReceiver); Ring.add(XSSchemaSet.class,_schemas); Ring.add(codeModel); Model model = new Model(opts, codeModel, null/*set later*/, opts.classNameAllocator, _schemas); Ring.add(model); Ring.add(ErrorReceiver.class,ef); Ring.add(CodeModelClassFactory.class,new CodeModelClassFactory(ef)); BGMBuilder builder = new BGMBuilder(opts.defaultPackage,opts.defaultPackage2, opts.isExtensionMode(),opts.getFieldRendererFactory(), opts.activePlugins); builder._build(); if(ef.hadError()) return null; else return model; } finally { Ring.end(old); } }
Example 9
Source File: DOMForest.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * Checks the correctness of the XML Schema documents and return true * if it's OK. * * <p> * This method performs a weaker version of the tests where error messages * are provided without line number information. So whenever possible * use {@link SchemaConstraintChecker}. * * @see SchemaConstraintChecker */ public boolean checkSchemaCorrectness(ErrorReceiver errorHandler) { try { boolean disableXmlSecurity = false; if (options != null) { disableXmlSecurity = options.disableXmlSecurity; } SchemaFactory sf = XmlFactory.createSchemaFactory(W3C_XML_SCHEMA_NS_URI, disableXmlSecurity); ErrorReceiverFilter filter = new ErrorReceiverFilter(errorHandler); sf.setErrorHandler(filter); Set<String> roots = getRootDocuments(); Source[] sources = new Source[roots.size()]; int i=0; for (String root : roots) { sources[i++] = new DOMSource(get(root),root); } sf.newSchema(sources); return !filter.hadError(); } catch (SAXException e) { // the errors should have been reported return false; } }
Example 10
Source File: BGMBuilder.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * Entry point. */ public static Model build( XSSchemaSet _schemas, JCodeModel codeModel, ErrorReceiver _errorReceiver, Options opts ) { // set up a ring final Ring old = Ring.begin(); try { ErrorReceiverFilter ef = new ErrorReceiverFilter(_errorReceiver); Ring.add(XSSchemaSet.class,_schemas); Ring.add(codeModel); Model model = new Model(opts, codeModel, null/*set later*/, opts.classNameAllocator, _schemas); Ring.add(model); Ring.add(ErrorReceiver.class,ef); Ring.add(CodeModelClassFactory.class,new CodeModelClassFactory(ef)); BGMBuilder builder = new BGMBuilder(opts.defaultPackage,opts.defaultPackage2, opts.isExtensionMode(),opts.getFieldRendererFactory(), opts.activePlugins); builder._build(); if(ef.hadError()) return null; else return model; } finally { Ring.end(old); } }
Example 11
Source File: DOMForest.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** * Checks the correctness of the XML Schema documents and return true * if it's OK. * * <p> * This method performs a weaker version of the tests where error messages * are provided without line number information. So whenever possible * use {@link SchemaConstraintChecker}. * * @see SchemaConstraintChecker */ public boolean checkSchemaCorrectness(ErrorReceiver errorHandler) { try { boolean disableXmlSecurity = false; if (options != null) { disableXmlSecurity = options.disableXmlSecurity; } SchemaFactory sf = XmlFactory.createSchemaFactory(W3C_XML_SCHEMA_NS_URI, disableXmlSecurity); ErrorReceiverFilter filter = new ErrorReceiverFilter(errorHandler); sf.setErrorHandler(filter); Set<String> roots = getRootDocuments(); Source[] sources = new Source[roots.size()]; int i=0; for (String root : roots) { sources[i++] = new DOMSource(get(root),root); } sf.newSchema(sources); return !filter.hadError(); } catch (SAXException e) { // the errors should have been reported return false; } }
Example 12
Source File: BGMBuilder.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** * Entry point. */ public static Model build( XSSchemaSet _schemas, JCodeModel codeModel, ErrorReceiver _errorReceiver, Options opts ) { // set up a ring final Ring old = Ring.begin(); try { ErrorReceiverFilter ef = new ErrorReceiverFilter(_errorReceiver); Ring.add(XSSchemaSet.class,_schemas); Ring.add(codeModel); Model model = new Model(opts, codeModel, null/*set later*/, opts.classNameAllocator, _schemas); Ring.add(model); Ring.add(ErrorReceiver.class,ef); Ring.add(CodeModelClassFactory.class,new CodeModelClassFactory(ef)); BGMBuilder builder = new BGMBuilder(opts.defaultPackage,opts.defaultPackage2, opts.isExtensionMode(),opts.getFieldRendererFactory(), opts.activePlugins); builder._build(); if(ef.hadError()) return null; else return model; } finally { Ring.end(old); } }
Example 13
Source File: DOMForest.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
/** * Checks the correctness of the XML Schema documents and return true * if it's OK. * * <p> * This method performs a weaker version of the tests where error messages * are provided without line number information. So whenever possible * use {@link SchemaConstraintChecker}. * * @see SchemaConstraintChecker */ public boolean checkSchemaCorrectness(ErrorReceiver errorHandler) { try { boolean disableXmlSecurity = false; if (options != null) { disableXmlSecurity = options.disableXmlSecurity; } SchemaFactory sf = XmlFactory.createSchemaFactory(W3C_XML_SCHEMA_NS_URI, disableXmlSecurity); ErrorReceiverFilter filter = new ErrorReceiverFilter(errorHandler); sf.setErrorHandler(filter); Set<String> roots = getRootDocuments(); Source[] sources = new Source[roots.size()]; int i=0; for (String root : roots) { sources[i++] = new DOMSource(get(root),root); } sf.newSchema(sources); return !filter.hadError(); } catch (SAXException e) { // the errors should have been reported return false; } }
Example 14
Source File: Model.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
/** * Fully-generate the source code into the given model. * * @return * null if there was any errors. Otherwise it returns a valid * {@link Outline} object, which captures how the model objects * are mapped to the generated source code. * <p> * Add-ons can use those information to further augment the generated * source code. */ public Outline generateCode(Options opt,ErrorReceiver receiver) { ErrorReceiverFilter ehf = new ErrorReceiverFilter(receiver); // run extensions // moved to BGMBuilder._build() - issue with hyperjaxb3 // for( Plugin ma : opt.activePlugins ) // ma.postProcessModel(this,ehf); Outline o = BeanGenerator.generate(this, ehf); try {// run extensions for( Plugin ma : opt.activePlugins ) ma.run(o,opt,ehf); } catch (SAXException e) { // fatal error. error should have been reported return null; } // check for unused plug-in customizations. // these can be only checked after the plug-ins run, so it's here. // the JAXB bindings are checked by XMLSchema's builder. Set<CCustomizations> check = new HashSet<CCustomizations>(); for( CCustomizations c=customizations; c!=null; c=c.next ) { if(!check.add(c)) { throw new AssertionError(); // detect a loop } for (CPluginCustomization p : c) { if(!p.isAcknowledged()) { ehf.error( p.locator, Messages.format( Messages.ERR_UNACKNOWLEDGED_CUSTOMIZATION, p.element.getNodeName() )); ehf.error( c.getOwner().getLocator(), Messages.format( Messages.ERR_UNACKNOWLEDGED_CUSTOMIZATION_LOCATION)); } } } if(ehf.hadError()) o = null; return o; }
Example 15
Source File: Model.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
/** * Fully-generate the source code into the given model. * * @return * null if there was any errors. Otherwise it returns a valid * {@link Outline} object, which captures how the model objects * are mapped to the generated source code. * <p> * Add-ons can use those information to further augment the generated * source code. */ public Outline generateCode(Options opt,ErrorReceiver receiver) { ErrorReceiverFilter ehf = new ErrorReceiverFilter(receiver); // run extensions // moved to BGMBuilder._build() - issue with hyperjaxb3 // for( Plugin ma : opt.activePlugins ) // ma.postProcessModel(this,ehf); Outline o = BeanGenerator.generate(this, ehf); try {// run extensions for( Plugin ma : opt.activePlugins ) ma.run(o,opt,ehf); } catch (SAXException e) { // fatal error. error should have been reported return null; } // check for unused plug-in customizations. // these can be only checked after the plug-ins run, so it's here. // the JAXB bindings are checked by XMLSchema's builder. Set<CCustomizations> check = new HashSet<CCustomizations>(); for( CCustomizations c=customizations; c!=null; c=c.next ) { if(!check.add(c)) { throw new AssertionError(); // detect a loop } for (CPluginCustomization p : c) { if(!p.isAcknowledged()) { ehf.error( p.locator, Messages.format( Messages.ERR_UNACKNOWLEDGED_CUSTOMIZATION, p.element.getNodeName() )); ehf.error( c.getOwner().getLocator(), Messages.format( Messages.ERR_UNACKNOWLEDGED_CUSTOMIZATION_LOCATION)); } } } if(ehf.hadError()) o = null; return o; }
Example 16
Source File: Model.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
/** * Fully-generate the source code into the given model. * * @return * null if there was any errors. Otherwise it returns a valid * {@link Outline} object, which captures how the model objects * are mapped to the generated source code. * <p> * Add-ons can use those information to further augment the generated * source code. */ public Outline generateCode(Options opt,ErrorReceiver receiver) { ErrorReceiverFilter ehf = new ErrorReceiverFilter(receiver); // run extensions // moved to BGMBuilder._build() - issue with hyperjaxb3 // for( Plugin ma : opt.activePlugins ) // ma.postProcessModel(this,ehf); Outline o = BeanGenerator.generate(this, ehf); try {// run extensions for( Plugin ma : opt.activePlugins ) ma.run(o,opt,ehf); } catch (SAXException e) { // fatal error. error should have been reported return null; } // check for unused plug-in customizations. // these can be only checked after the plug-ins run, so it's here. // the JAXB bindings are checked by XMLSchema's builder. Set<CCustomizations> check = new HashSet<CCustomizations>(); for( CCustomizations c=customizations; c!=null; c=c.next ) { if(!check.add(c)) { throw new AssertionError(); // detect a loop } for (CPluginCustomization p : c) { if(!p.isAcknowledged()) { ehf.error( p.locator, Messages.format( Messages.ERR_UNACKNOWLEDGED_CUSTOMIZATION, p.element.getNodeName() )); ehf.error( c.getOwner().getLocator(), Messages.format( Messages.ERR_UNACKNOWLEDGED_CUSTOMIZATION_LOCATION)); } } } if(ehf.hadError()) o = null; return o; }
Example 17
Source File: Model.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
/** * Fully-generate the source code into the given model. * * @return * null if there was any errors. Otherwise it returns a valid * {@link Outline} object, which captures how the model objects * are mapped to the generated source code. * <p> * Add-ons can use those information to further augment the generated * source code. */ public Outline generateCode(Options opt,ErrorReceiver receiver) { ErrorReceiverFilter ehf = new ErrorReceiverFilter(receiver); // run extensions // moved to BGMBuilder._build() - issue with hyperjaxb3 // for( Plugin ma : opt.activePlugins ) // ma.postProcessModel(this,ehf); Outline o = BeanGenerator.generate(this, ehf); try {// run extensions for( Plugin ma : opt.activePlugins ) ma.run(o,opt,ehf); } catch (SAXException e) { // fatal error. error should have been reported return null; } // check for unused plug-in customizations. // these can be only checked after the plug-ins run, so it's here. // the JAXB bindings are checked by XMLSchema's builder. Set<CCustomizations> check = new HashSet<CCustomizations>(); for( CCustomizations c=customizations; c!=null; c=c.next ) { if(!check.add(c)) { throw new AssertionError(); // detect a loop } for (CPluginCustomization p : c) { if(!p.isAcknowledged()) { ehf.error( p.locator, Messages.format( Messages.ERR_UNACKNOWLEDGED_CUSTOMIZATION, p.element.getNodeName() )); ehf.error( c.getOwner().getLocator(), Messages.format( Messages.ERR_UNACKNOWLEDGED_CUSTOMIZATION_LOCATION)); } } } if(ehf.hadError()) o = null; return o; }
Example 18
Source File: Model.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
/** * Fully-generate the source code into the given model. * * @return * null if there was any errors. Otherwise it returns a valid * {@link Outline} object, which captures how the model objects * are mapped to the generated source code. * <p> * Add-ons can use those information to further augment the generated * source code. */ public Outline generateCode(Options opt,ErrorReceiver receiver) { ErrorReceiverFilter ehf = new ErrorReceiverFilter(receiver); // run extensions // moved to BGMBuilder._build() - issue with hyperjaxb3 // for( Plugin ma : opt.activePlugins ) // ma.postProcessModel(this,ehf); Outline o = BeanGenerator.generate(this, ehf); try {// run extensions for( Plugin ma : opt.activePlugins ) ma.run(o,opt,ehf); } catch (SAXException e) { // fatal error. error should have been reported return null; } // check for unused plug-in customizations. // these can be only checked after the plug-ins run, so it's here. // the JAXB bindings are checked by XMLSchema's builder. Set<CCustomizations> check = new HashSet<CCustomizations>(); for( CCustomizations c=customizations; c!=null; c=c.next ) { if(!check.add(c)) { throw new AssertionError(); // detect a loop } for (CPluginCustomization p : c) { if(!p.isAcknowledged()) { ehf.error( p.locator, Messages.format( Messages.ERR_UNACKNOWLEDGED_CUSTOMIZATION, p.element.getNodeName() )); ehf.error( c.getOwner().getLocator(), Messages.format( Messages.ERR_UNACKNOWLEDGED_CUSTOMIZATION_LOCATION)); } } } if(ehf.hadError()) o = null; return o; }
Example 19
Source File: Model.java From hottub with GNU General Public License v2.0 | 4 votes |
/** * Fully-generate the source code into the given model. * * @return * null if there was any errors. Otherwise it returns a valid * {@link Outline} object, which captures how the model objects * are mapped to the generated source code. * <p> * Add-ons can use those information to further augment the generated * source code. */ public Outline generateCode(Options opt,ErrorReceiver receiver) { ErrorReceiverFilter ehf = new ErrorReceiverFilter(receiver); // run extensions // moved to BGMBuilder._build() - issue with hyperjaxb3 // for( Plugin ma : opt.activePlugins ) // ma.postProcessModel(this,ehf); Outline o = BeanGenerator.generate(this, ehf); try {// run extensions for( Plugin ma : opt.activePlugins ) ma.run(o,opt,ehf); } catch (SAXException e) { // fatal error. error should have been reported return null; } // check for unused plug-in customizations. // these can be only checked after the plug-ins run, so it's here. // the JAXB bindings are checked by XMLSchema's builder. Set<CCustomizations> check = new HashSet<CCustomizations>(); for( CCustomizations c=customizations; c!=null; c=c.next ) { if(!check.add(c)) { throw new AssertionError(); // detect a loop } for (CPluginCustomization p : c) { if(!p.isAcknowledged()) { ehf.error( p.locator, Messages.format( Messages.ERR_UNACKNOWLEDGED_CUSTOMIZATION, p.element.getNodeName() )); ehf.error( c.getOwner().getLocator(), Messages.format( Messages.ERR_UNACKNOWLEDGED_CUSTOMIZATION_LOCATION)); } } } if(ehf.hadError()) o = null; return o; }
Example 20
Source File: Model.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
/** * Fully-generate the source code into the given model. * * @return * null if there was any errors. Otherwise it returns a valid * {@link Outline} object, which captures how the model objects * are mapped to the generated source code. * <p> * Add-ons can use those information to further augment the generated * source code. */ public Outline generateCode(Options opt,ErrorReceiver receiver) { ErrorReceiverFilter ehf = new ErrorReceiverFilter(receiver); // run extensions // moved to BGMBuilder._build() - issue with hyperjaxb3 // for( Plugin ma : opt.activePlugins ) // ma.postProcessModel(this,ehf); Outline o = BeanGenerator.generate(this, ehf); try {// run extensions for( Plugin ma : opt.activePlugins ) ma.run(o,opt,ehf); } catch (SAXException e) { // fatal error. error should have been reported return null; } // check for unused plug-in customizations. // these can be only checked after the plug-ins run, so it's here. // the JAXB bindings are checked by XMLSchema's builder. Set<CCustomizations> check = new HashSet<CCustomizations>(); for( CCustomizations c=customizations; c!=null; c=c.next ) { if(!check.add(c)) { throw new AssertionError(); // detect a loop } for (CPluginCustomization p : c) { if(!p.isAcknowledged()) { ehf.error( p.locator, Messages.format( Messages.ERR_UNACKNOWLEDGED_CUSTOMIZATION, p.element.getNodeName() )); ehf.error( c.getOwner().getLocator(), Messages.format( Messages.ERR_UNACKNOWLEDGED_CUSTOMIZATION_LOCATION)); } } } if(ehf.hadError()) o = null; return o; }