Source:
<code>public static SAXTransformerFactory getTransformerFactory(final BrokerPool pool) { final String transformerFactoryClassName = (String) pool.getConfiguration().getProperty(PROPERTY_TRANSFORMER_CLASS); SAXTransformerFactory factory; if (transformerFactoryClassName == null) { factory = (SAXTransformerFactory) TransformerFactory.newInstance(); } else { try { factory = (SAXTransformerFactory) Class.forName(transformerFactoryClassName).newInstance(); if (LOG.isDebugEnabled()) { LOG.debug("Set transformer factory: " + transformerFactoryClassName); } final Hashtable<String, Object> attributes = (Hashtable<String, Object>) pool.getConfiguration().getProperty(PROPERTY_TRANSFORMER_ATTRIBUTES); <START> Iterator<String> iterator = attributes.keySet().iterator(); <END> while (iterator.hasNext()) { final String name = iterator.next(); final Object value = attributes.get(name); try { factory.setAttribute(name, value); if (LOG.isDebugEnabled()) { LOG.debug("Set transformer attribute: " + ", " + "name: " + name + ", value: " + value); } } catch (final IllegalArgumentException iae) { LOG.warn("Unable to set attribute for TransformerFactory: '" + transformerFactoryClassName + "', name: " + name + ", value: " + value + ", exception: " + iae.getMessage()); } } try { factory.setAttribute(PROPERTY_BROKER_POOL, pool); } catch (final Exception e) { } } catch (final ClassNotFoundException | InstantiationException | IllegalAccessException e) { if (LOG.isDebugEnabled()) { LOG.debug("Error found loading the requested TrAX Transformer Factory '" + transformerFactoryClassName + "'. Using default TrAX Transformer Factory instead: " + e); } factory = (SAXTransformerFactory) TransformerFactory.newInstance(); } } return factory; }</code><technical_language>final</technical_language>

Target:
public static SAXTransformerFactory getTransformerFactory(final BrokerPool pool) { final String transformerFactoryClassName = (String) pool.getConfiguration().getProperty(PROPERTY_TRANSFORMER_CLASS); SAXTransformerFactory factory; if (transformerFactoryClassName == null) { factory = (SAXTransformerFactory) TransformerFactory.newInstance(); } else { try { factory = (SAXTransformerFactory) Class.forName(transformerFactoryClassName).newInstance(); if (LOG.isDebugEnabled()) { LOG.debug("Set transformer factory: " + transformerFactoryClassName); } final Hashtable<String, Object> attributes = (Hashtable<String, Object>) pool.getConfiguration().getProperty(PROPERTY_TRANSFORMER_ATTRIBUTES); final Iterator<String> iterator = attributes.keySet().iterator(); while (iterator.hasNext()) { final String name = iterator.next(); final Object value = attributes.get(name); try { factory.setAttribute(name, value); if (LOG.isDebugEnabled()) { LOG.debug("Set transformer attribute: " + ", " + "name: " + name + ", value: " + value); } } catch (final IllegalArgumentException iae) { LOG.warn("Unable to set attribute for TransformerFactory: '" + transformerFactoryClassName + "', name: " + name + ", value: " + value + ", exception: " + iae.getMessage()); } } try { factory.setAttribute(PROPERTY_BROKER_POOL, pool); } catch (final Exception e) { } } catch (final ClassNotFoundException | InstantiationException | IllegalAccessException e) { if (LOG.isDebugEnabled()) { LOG.debug("Error found loading the requested TrAX Transformer Factory '" + transformerFactoryClassName + "'. Using default TrAX Transformer Factory instead: " + e); } factory = (SAXTransformerFactory) TransformerFactory.newInstance(); } } return factory; }