Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/source/EntityReferenceSaxHandler.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/source/EntityReferenceSaxHandler.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/source/EntityReferenceSaxHandler.java (original) +++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/source/EntityReferenceSaxHandler.java Mon Aug 27 09:48:33 2018 @@ -77,8 +77,8 @@ public class EntityReferenceSaxHandler e */ @Override public void startElement(String uri, String localName, String rawName, - Attributes attributes) - throws SAXException + Attributes attributes) + throws SAXException { if (rawName.equals(ENTITY_REFERENCE)) { @@ -142,10 +142,10 @@ public class EntityReferenceSaxHandler e * while reading the resource. */ public byte[] readResource() - throws ConfigurationException + throws ConfigurationException { InputStream inputStream - = configurationProvider.getResourceInputStream(resource); + = configurationProvider.getResourceInputStream(resource); byte[] content; try {
Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/source/EntityReferences.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/source/EntityReferences.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/source/EntityReferences.java (original) +++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/source/EntityReferences.java Mon Aug 27 09:48:33 2018 @@ -35,7 +35,7 @@ public class EntityReferences implements { /** All known entity references. */ private Map<String, byte[]> entityReferences - = new HashMap<String, byte[]>(); + = new HashMap<>(); /** * Adds a new entity reference. @@ -82,7 +82,7 @@ public class EntityReferences implements */ public Map<String, byte[]> getEntityReferences() { - return new HashMap<String, byte[]>(entityReferences); + return new HashMap<>(entityReferences); } /** @@ -97,6 +97,7 @@ public class EntityReferences implements * @return An <code>InputSource</code> for the entity if the * systemId is known, or null otherwise. */ + @Override public InputSource resolveEntity(String publicId, String systemId) throws IOException, SAXException { Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/source/FileSourceSaxHandler.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/source/FileSourceSaxHandler.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/source/FileSourceSaxHandler.java (original) +++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/source/FileSourceSaxHandler.java Mon Aug 27 09:48:33 2018 @@ -49,10 +49,10 @@ public class FileSourceSaxHandler extend private String format; /** The source file names which should be included in generation. */ - private Set<String> includes = new HashSet<String>(); + private Set<String> includes = new HashSet<>(); /** The source file names which should be excluded from generation. */ - private Set<String> excludes = new HashSet<String>(); + private Set<String> excludes = new HashSet<>(); /** Whether to combine all source files. */ private Boolean combineFiles; @@ -97,8 +97,8 @@ public class FileSourceSaxHandler extend */ @Override public void startElement(String uri, String localName, String rawName, - Attributes attributes) - throws SAXException + Attributes attributes) + throws SAXException { if (rawName.equals(INCLUDE_TAG)) { @@ -131,7 +131,7 @@ public class FileSourceSaxHandler extend */ @Override public void endElement(String uri, String localName, String rawName) - throws SAXException + throws SAXException { if (rawName.equals(INCLUDE_TAG)) { @@ -151,7 +151,7 @@ public class FileSourceSaxHandler extend if (format != null) { Set<StreamSourceFormat> sourceFormats - = getConfigurationHandlers().getStreamSourceFormats(); + = getConfigurationHandlers().getStreamSourceFormats(); for (StreamSourceFormat candidate : sourceFormats) { if (format.equals(candidate.getKey())) @@ -169,7 +169,7 @@ public class FileSourceSaxHandler extend } Fileset sourceFileset = new Fileset( getUnitDescriptor().getProjectPaths() - .getDefaultSourcePath(), + .getDefaultSourcePath(), includes, excludes); @@ -181,7 +181,7 @@ public class FileSourceSaxHandler extend catch (ConfigurationException e) { throw new SAXException("Could not create source: " - + e.getMessage(), + + e.getMessage(), e); } super.endElement(uri, localName, rawName); @@ -226,6 +226,7 @@ public class FileSourceSaxHandler extend * @return the source Provider, not null if the * source snippet was processed. */ + @Override public SourceProvider getSourceProvider() { return sourceProvider; Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/source/FileSourceSaxHandlerFactory.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/source/FileSourceSaxHandlerFactory.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/source/FileSourceSaxHandlerFactory.java (original) +++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/source/FileSourceSaxHandlerFactory.java Mon Aug 27 09:48:33 2018 @@ -29,7 +29,7 @@ import org.apache.torque.generator.confi * @version $Id$ */ public class FileSourceSaxHandlerFactory - implements SourceSaxHandlerFactory +implements SourceSaxHandlerFactory { /** The type of the source. */ private static final String TYPE = "fileSource"; @@ -41,6 +41,7 @@ public class FileSourceSaxHandlerFactory * * @return "fileSource". */ + @Override public String getType() { return TYPE; @@ -57,6 +58,7 @@ public class FileSourceSaxHandlerFactory * * @return a new FileSourcesSaxHandlers. */ + @Override public final SourceSaxHandler getSourceSaxHandler( ConfigurationProvider configurationProvider, UnitDescriptor unitDescriptor, Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/source/JdbcMetadataSourceSaxHandler.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/source/JdbcMetadataSourceSaxHandler.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/source/JdbcMetadataSourceSaxHandler.java (original) +++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/source/JdbcMetadataSourceSaxHandler.java Mon Aug 27 09:48:33 2018 @@ -69,21 +69,21 @@ public class JdbcMetadataSourceSaxHandle */ @Override public void startElement(String uri, String localName, String rawName, - Attributes attributes) - throws SAXException + Attributes attributes) + throws SAXException { if (rawName.equals(SOURCE_TAG)) { String urlOption - = attributes.getValue(URL_OPTION_ATTRIBUTE); + = attributes.getValue(URL_OPTION_ATTRIBUTE); String driverOption - = attributes.getValue(DRIVER_OPTION_ATTRIBUTE); + = attributes.getValue(DRIVER_OPTION_ATTRIBUTE); String usernameOption - = attributes.getValue(USERNAME_OPTION_ATTRIBUTE); + = attributes.getValue(USERNAME_OPTION_ATTRIBUTE); String passwordOption - = attributes.getValue(PASSWORD_OPTION_ATTRIBUTE); + = attributes.getValue(PASSWORD_OPTION_ATTRIBUTE); String schemaOption - = attributes.getValue(SCHEMA_OPTION_ATTRIBUTE); + = attributes.getValue(SCHEMA_OPTION_ATTRIBUTE); try { sourceProvider = new JdbcMetadataSourceProvider( @@ -108,7 +108,7 @@ public class JdbcMetadataSourceSaxHandle */ @Override public void endElement(String uri, String localName, String rawName) - throws SAXException + throws SAXException { super.endElement(uri, localName, rawName); if (rawName.equals(SOURCE_TAG)) @@ -123,6 +123,7 @@ public class JdbcMetadataSourceSaxHandle * @return the configuration which was filled, not null if a * matching snippet was processed. */ + @Override public SourceProvider getSourceProvider() { return sourceProvider; Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/source/JdbcMetadataSourceSaxHandlerFactory.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/source/JdbcMetadataSourceSaxHandlerFactory.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/source/JdbcMetadataSourceSaxHandlerFactory.java (original) +++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/source/JdbcMetadataSourceSaxHandlerFactory.java Mon Aug 27 09:48:33 2018 @@ -29,7 +29,7 @@ import org.apache.torque.generator.confi * @version $Id$ */ public class JdbcMetadataSourceSaxHandlerFactory - implements SourceSaxHandlerFactory +implements SourceSaxHandlerFactory { /** The type of the source. */ private static final String TYPE = "jdbcMetadataSource"; @@ -41,6 +41,7 @@ public class JdbcMetadataSourceSaxHandle * * @return "jdbcMetadataSource". */ + @Override public String getType() { return TYPE; @@ -57,6 +58,7 @@ public class JdbcMetadataSourceSaxHandle * * @return a new FileSourcesSaxHandlers. */ + @Override public final SourceSaxHandler getSourceSaxHandler( ConfigurationProvider configurationProvider, UnitDescriptor unitDescriptor, Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/source/SourceSaxHandler.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/source/SourceSaxHandler.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/source/SourceSaxHandler.java (original) +++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/source/SourceSaxHandler.java Mon Aug 27 09:48:33 2018 @@ -64,11 +64,11 @@ public abstract class SourceSaxHandler e * The transformer definitions in the source element. */ private List<SourceTransformerDefinition> transformerDefinitions - = new ArrayList<SourceTransformerDefinition>(); + = new ArrayList<>(); /** The handler which handles transformer elements. */ private ConfigurableClassSaxHandler<SourceTransformer> - transformerSaxHandler; + transformerSaxHandler; /** Whether this handler has completed its task. */ private boolean finished = false; @@ -113,8 +113,8 @@ public abstract class SourceSaxHandler e */ @Override public void startElement(final String uri, final String localName, final String rawName, - final Attributes attributes) - throws SAXException + final Attributes attributes) + throws SAXException { if (transformerSaxHandler != null) { @@ -124,10 +124,10 @@ public abstract class SourceSaxHandler e else if (TRANSFORMER_TAG.equals(rawName)) { transformerSaxHandler - = new ConfigurableClassSaxHandler<SourceTransformer>( - configurationProvider, - unitDescriptor, - TRANSFORMER_TAG); + = new ConfigurableClassSaxHandler<>( + configurationProvider, + unitDescriptor, + TRANSFORMER_TAG); transformerSaxHandler.startElement( uri, localName, rawName, attributes); } @@ -145,7 +145,7 @@ public abstract class SourceSaxHandler e catch (ConfigurationException e) { throw new SAXException("Could not create source: " - + e.getMessage(), + + e.getMessage(), e); } } @@ -160,7 +160,7 @@ public abstract class SourceSaxHandler e */ @Override public void endElement(final String uri, final String localName, final String rawName) - throws SAXException + throws SAXException { if (transformerSaxHandler != null) { @@ -180,7 +180,7 @@ public abstract class SourceSaxHandler e sourceProcessConfiguration.setSourceTransformerDefinitions( transformerDefinitions); transformerDefinitions - = new ArrayList<SourceTransformerDefinition>(); + = new ArrayList<>(); } } Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/source/SourceSaxHandlerFactories.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/source/SourceSaxHandlerFactories.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/source/SourceSaxHandlerFactories.java (original) +++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/source/SourceSaxHandlerFactories.java Mon Aug 27 09:48:33 2018 @@ -36,14 +36,14 @@ public class SourceSaxHandlerFactories { /** The class log. */ private static Log log - = LogFactory.getLog(SourceSaxHandlerFactories.class); + = LogFactory.getLog(SourceSaxHandlerFactories.class); /** * A map containing all known SourceSaxHandlerFactories, * keyed by the type of the sources. */ private Map<String, SourceSaxHandlerFactory> factories - = new HashMap<String, SourceSaxHandlerFactory>(); + = new HashMap<>(); /** * Constructor. Registers the default SourceSaxHandlerFactories. @@ -73,7 +73,7 @@ public class SourceSaxHandlerFactories * already exists. */ public void register(SourceSaxHandlerFactory sourceSaxHandlerFactory) - throws ConfigurationException + throws ConfigurationException { String type = sourceSaxHandlerFactory.getType(); @@ -82,13 +82,13 @@ public class SourceSaxHandlerFactories { throw new ConfigurationException( "Attempted to register an SourceSaxHandlerFactory " - + "of type " - + sourceSaxHandlerFactory.getType() - + " and class " - + sourceSaxHandlerFactory.getClass().getName() - + " : A factory with this type already exists, " - + " it has the class " - + oldFactory.getClass().getName()); + + "of type " + + sourceSaxHandlerFactory.getType() + + " and class " + + sourceSaxHandlerFactory.getClass().getName() + + " : A factory with this type already exists, " + + " it has the class " + + oldFactory.getClass().getName()); } factories.put(type, sourceSaxHandlerFactory); } Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/source/SourceSaxHandlerFactory.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/source/SourceSaxHandlerFactory.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/source/SourceSaxHandlerFactory.java (original) +++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/source/SourceSaxHandlerFactory.java Mon Aug 27 09:48:33 2018 @@ -60,5 +60,5 @@ public abstract interface SourceSaxHandl ConfigurationProvider configurationProvider, UnitDescriptor unitDescriptor, ConfigurationHandlers configurationHandlers) - throws SAXException; + throws SAXException; } Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/Checksums.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/Checksums.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/Checksums.java (original) +++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/Checksums.java Mon Aug 27 09:48:33 2018 @@ -72,11 +72,11 @@ public class Checksums /** The checksums, keyed by the name of the checked entity. */ private final Map<String, byte[]> checksums - = new HashMap<String, byte[]>(); + = new HashMap<>(); /** The modification dates, keyed by the name of the checked entity. */ private final Map<String, Date> modificationDates - = new HashMap<String, Date>(); + = new HashMap<>(); public byte[] getChecksum(final String name) { @@ -125,7 +125,7 @@ public class Checksums public Checksums writeToFile(final File toWriteTo) throws IOException { - Set<String> keys = new HashSet<String>(); + Set<String> keys = new HashSet<>(); keys.addAll(checksums.keySet()); keys.addAll(modificationDates.keySet()); @@ -167,7 +167,7 @@ public class Checksums { int v = checksum[j] & HEX_LARGEST_TWOCHAR_NUMBER; content.append(HEX_ARRAY[v >>> HEX_BITS_PER_CHAR]) - .append(HEX_ARRAY[v & HEX_LARGEST_ONECHAR_NUMBER]); + .append(HEX_ARRAY[v & HEX_LARGEST_ONECHAR_NUMBER]); } } content.append(SEPARATOR).append(key).append("\n"); Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/Controller.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/Controller.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/Controller.java (original) +++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/Controller.java Mon Aug 27 09:48:33 2018 @@ -78,23 +78,23 @@ public class Controller * are stored. */ public static final String LAST_SOURCE_CHANGE_CACHE_FILE - = "last-source-changes.checksums"; + = "last-source-changes.checksums"; /** The content of checksum files if no checksum can be computed. */ public static final String NO_CHECKSUM_CONTENT - = "[checksum could not be determined]"; + = "[checksum could not be determined]"; /** * All known ExistingTargetStrategies. * TODO: move to a better place. */ private static final List<ExistingTargetStrategy> - EXISTING_TARGET_STRATEGIES; + EXISTING_TARGET_STRATEGIES; static { final List<ExistingTargetStrategy> existingTargetStrategies - = new ArrayList<ExistingTargetStrategy>(); + = new ArrayList<>(); existingTargetStrategies.add(new ReplaceTargetFileStrategy()); existingTargetStrategies.add(new SkipExistingTargetFileStrategy()); existingTargetStrategies.add(new MergeTargetFileStrategy()); @@ -113,7 +113,7 @@ public class Controller * of the sourceModified check. */ private final Map<String, Boolean> sourceModifiedCache - = new HashMap<String, Boolean>(); + = new HashMap<>(); /** * Executes the controller action. @@ -129,14 +129,14 @@ public class Controller * @throws IOException if a IOException occurs during processing. */ public void run(final List<UnitDescriptor> unitDescriptors) - throws GeneratorException + throws GeneratorException { initLogging(); sourceModifiedCache.clear(); final Configuration configuration = readConfiguration(unitDescriptors); final List<UnitConfiguration> unitConfigurations - = configuration.getUnitConfigurations(); + = configuration.getUnitConfigurations(); final ControllerState controllerState = new ControllerState(); for (final UnitConfiguration unitConfiguration : unitConfigurations) { @@ -160,8 +160,8 @@ public class Controller } final InputStream log4jStream - = Controller.class.getClassLoader().getResourceAsStream( - "org/apache/torque/generator/log4j.properties"); + = Controller.class.getClassLoader().getResourceAsStream( + "org/apache/torque/generator/log4j.properties"); final Properties log4jProperties = new Properties(); try { @@ -185,8 +185,8 @@ public class Controller * @throws ConfigurationException if the configuration is faulty. */ private Configuration readConfiguration( - final List<UnitDescriptor> unitDescriptors) - throws ConfigurationException + final List<UnitDescriptor> unitDescriptors) + throws ConfigurationException { log.info("readConfiguration() : Starting to read configuration files"); final Configuration configuration = new Configuration(); @@ -206,9 +206,9 @@ public class Controller * @throws GeneratorException if a generation error occurs. */ protected void processGenerationUnit( - final ControllerState controllerState, - final UnitConfiguration unitConfiguration) - throws GeneratorException + final ControllerState controllerState, + final UnitConfiguration unitConfiguration) + throws GeneratorException { log.debug("processGenerationUnit() : start"); unitConfiguration.getLoglevel().apply(); @@ -230,7 +230,7 @@ public class Controller throw new GeneratorException("could not read " + "LastSourceChange checksum file" + sourceChecksumsFile.getAbsolutePath(), - e); + e); } } final List<Output> outputList = unitConfiguration.getOutputList(); @@ -253,7 +253,7 @@ public class Controller throw new GeneratorException("could not write " + "LastSourceChange checksum file" + sourceChecksumsFile.getAbsolutePath(), - e); + e); } } } @@ -269,17 +269,17 @@ public class Controller * @throws GeneratorException if a generation error occurs. */ private void processOutput( - final Output output, - final ControllerState controllerState, - final UnitConfiguration unitConfiguration) - throws GeneratorException + final Output output, + final ControllerState controllerState, + final UnitConfiguration unitConfiguration) + throws GeneratorException { log.info("Processing output " + output.getName()); controllerState.setOutput(output); SourceProvider sourceProvider = output.getSourceProvider(); SourceProvider overrideSourceProvider - = unitConfiguration.getOverrideSourceProvider(); + = unitConfiguration.getOverrideSourceProvider(); if (overrideSourceProvider != null) { overrideSourceProvider = overrideSourceProvider.copy(); @@ -323,17 +323,17 @@ public class Controller * @throws GeneratorException if a generation error occurs. */ private void processSourceInOutput( - final Source source, - final Output output, - final ControllerState controllerState, - final UnitConfiguration unitConfiguration) - throws GeneratorException + final Source source, + final Output output, + final ControllerState controllerState, + final UnitConfiguration unitConfiguration) + throws GeneratorException { log.info("Processing source " + source.getDescription()); Object modelRoot = source.getRootElement(); controllerState.setSourceFile(source.getSourceFile()); final SourceProcessConfiguration sourceProcessConfiguration - = output.getSourceProcessConfiguration(); + = output.getSourceProcessConfiguration(); modelRoot = transformSource( modelRoot, sourceProcessConfiguration.getTransformerDefinitions(), @@ -341,7 +341,7 @@ public class Controller controllerState.setModelRoot(modelRoot); final String startElementsPath - = sourceProcessConfiguration.getStartElementsPath(); + = sourceProcessConfiguration.getStartElementsPath(); final Iterator<SourcePathPointer> iterator = SourcePath.iteratePointer( null, @@ -401,17 +401,17 @@ public class Controller * the output filename. */ protected void createOutputFilename( - final Output output, - final ControllerState controllerState) - throws GeneratorException + final Output output, + final ControllerState controllerState) + throws GeneratorException { if (output.getFilenameOutlet() == null) { if (output.getFilename() == null) { throw new ConfigurationException( - "neither filename nor filenameOutlet are set" - + " on output" + output); + "neither filename nor filenameOutlet are set" + + " on output" + output); } } else @@ -424,8 +424,8 @@ public class Controller final Outlet filenameOutlet = output.getFilenameOutlet(); final OutletReference contentOutletReference - = new OutletReference( - filenameOutlet.getName()); + = new OutletReference( + filenameOutlet.getName()); controllerState.setRootOutletReference( contentOutletReference); // use the namespace not of the filenameOutlet @@ -435,12 +435,12 @@ public class Controller output.getContentOutlet().getNamespace()); filenameOutlet.beforeExecute(controllerState); final OutletResult filenameResult - = filenameOutlet.execute(controllerState); + = filenameOutlet.execute(controllerState); if (!filenameResult.isStringResult()) { throw new GeneratorException( "The result of a filename generation must be a String," - + " not a byte array"); + + " not a byte array"); } final String filename = filenameResult.getStringResult(); filenameOutlet.afterExecute(controllerState); @@ -469,20 +469,20 @@ public class Controller * during execution. */ private void processModel( - final Object model, - final Output output, - final Source source, - final UnitConfiguration unitConfiguration, - final ControllerState controllerState) - throws GeneratorException + final Object model, + final Output output, + final Source source, + final UnitConfiguration unitConfiguration, + final ControllerState controllerState) + throws GeneratorException { if (model == null) { throw new ControllerException( - "Null start element found in source " - + "for generating the filename " - + "of output file " - + output); + "Null start element found in source " + + "for generating the filename " + + "of output file " + + output); } log.debug("Processing new model " + model); @@ -529,14 +529,14 @@ public class Controller } final OutletReference contentOutletConfiguration - = output.getContentOutlet(); + = output.getContentOutlet(); controllerState.setOutletNamespace( contentOutletConfiguration.getNamespace()); controllerState.setRootOutletReference( contentOutletConfiguration); final OutletConfiguration outletConfiguration - = unitConfiguration.getOutletConfiguration(); + = unitConfiguration.getOutletConfiguration(); final Outlet outlet = outletConfiguration.getOutlet( contentOutletConfiguration.getName()); @@ -544,12 +544,12 @@ public class Controller { throw new ControllerException( "No outlet configured for outlet name \"" - + contentOutletConfiguration.getName() - + "\""); + + contentOutletConfiguration.getName() + + "\""); } final SkipDecider skipDecider - = output.getSourceProcessConfiguration().getSkipDecider(); + = output.getSourceProcessConfiguration().getSkipDecider(); if (skipDecider != null) { if (!skipDecider.proceed(controllerState)) @@ -569,7 +569,7 @@ public class Controller { final File parentOutputDir - = controllerState.getOutputFile().getParentFile(); + = controllerState.getOutputFile().getParentFile(); if (parentOutputDir != null && !parentOutputDir.isDirectory()) { @@ -578,8 +578,8 @@ public class Controller { throw new ControllerException( "Could not create directory \"" - + parentOutputDir.getAbsolutePath() - + "\""); + + parentOutputDir.getAbsolutePath() + + "\""); } } } @@ -594,9 +594,9 @@ public class Controller : output.getPostprocessorDefinitions()) { StringProcessor postprocessor - = postprocessorDefinition.getPostprocessor(); + = postprocessorDefinition.getPostprocessor(); String postprocessedResult - = postprocessor.process(result.getStringResult()); + = postprocessor.process(result.getStringResult()); result = new OutletResult(postprocessedResult); } } @@ -627,10 +627,10 @@ public class Controller * @return the transformed root element, not null. */ public Object transformSource( - final Object sourceRoot, - final List<SourceTransformerDefinition> transformerDefinitions, - final ControllerState controllerState) - throws SourceTransformerException, SourceException + final Object sourceRoot, + final List<SourceTransformerDefinition> transformerDefinitions, + final ControllerState controllerState) + throws SourceTransformerException, SourceException { Object toTransform = sourceRoot; Object result = sourceRoot; @@ -638,7 +638,7 @@ public class Controller : transformerDefinitions) { final SourceTransformer sourceTransformer - = transformerDefinition.getSourceTransformer(); + = transformerDefinition.getSourceTransformer(); log.debug("Applying source transformer " + sourceTransformer.getClass().getName() + " to source root object " + toTransform); @@ -732,8 +732,8 @@ public class Controller sourceChangeKey, sourceChecksum); Date lastGenerationTime - = controllerState.getLastGeneratedSourceChecksums() - .getModificationDate(sourceChangeKey); + = controllerState.getLastGeneratedSourceChecksums() + .getModificationDate(sourceChangeKey); if (lastGenerationTime == null) { log.debug("checkSourceModified(): " @@ -753,8 +753,8 @@ public class Controller return true; } byte[] lastGeneratedChecksum - = controllerState.getLastGeneratedSourceChecksums() - .getChecksum(sourceChangeKey); + = controllerState.getLastGeneratedSourceChecksums() + .getChecksum(sourceChangeKey); if (!Arrays.equals(lastGeneratedChecksum, sourceChecksum)) { log.debug("checkSourceModified(): " @@ -771,9 +771,9 @@ public class Controller final UnitConfiguration unitConfiguration, final File sourceFile) { String sourceChangeCacheKey - = unitConfiguration.getTemplateSetName() - + ":" - + sourceFile.getAbsolutePath(); + = unitConfiguration.getTemplateSetName() + + ":" + + sourceFile.getAbsolutePath(); return sourceChangeCacheKey; } Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/ControllerHelper.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/ControllerHelper.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/ControllerHelper.java (original) +++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/ControllerHelper.java Mon Aug 27 09:48:33 2018 @@ -53,7 +53,7 @@ public final class ControllerHelper UnitConfiguration unitConfiguration) { File targetDirectory - = unitConfiguration.getOutputDirectory(outputDirKey); + = unitConfiguration.getOutputDirectory(outputDirKey); File outputFile = new File( targetDirectory, outputPath); Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/ControllerState.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/ControllerState.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/ControllerState.java (original) +++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/ControllerState.java Mon Aug 27 09:48:33 2018 @@ -56,7 +56,7 @@ public class ControllerState /** * The current stack of outlets being executed. */ - private final List<Outlet> outlets = new ArrayList<Outlet>(); + private final List<Outlet> outlets = new ArrayList<>(); /** * The root object of the source model. @@ -113,14 +113,14 @@ public class ControllerState * not null. */ private final Checksums lastGeneratedSourceChecksums - = new Checksums(); + = new Checksums(); /** * The checksums of the source files for this generation run, * not null. */ private final Checksums thisGenerationSourceChecksums - = new Checksums(); + = new Checksums(); /** * Returns the source provider which is currently in use. @@ -604,16 +604,16 @@ public class ControllerState { StringBuffer result = new StringBuffer(); result.append("sourceProvider=").append(sourceProvider) - .append("output=").append(output) - .append("outputFilePath=").append(outputFile) - .append("\noutletNamespace=").append(outletNamespace) - .append("\noutlets=").append(outlets) - .append("\nmodelRoot=").append(modelRoot) - .append("\nmodel").append(model) - .append("\nrootOutletReference=") - .append(rootOutletReference) - .append("\nunitConfiguration=").append(unitConfiguration) - .append("\nvariableStore=").append(variableStore); + .append("output=").append(output) + .append("outputFilePath=").append(outputFile) + .append("\noutletNamespace=").append(outletNamespace) + .append("\noutlets=").append(outlets) + .append("\nmodelRoot=").append(modelRoot) + .append("\nmodel").append(model) + .append("\nrootOutletReference=") + .append(rootOutletReference) + .append("\nunitConfiguration=").append(unitConfiguration) + .append("\nvariableStore=").append(variableStore); return result.toString(); } } Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/TokenReplacer.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/TokenReplacer.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/TokenReplacer.java (original) +++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/TokenReplacer.java Mon Aug 27 09:48:33 2018 @@ -67,6 +67,7 @@ public class TokenReplacer implements St * * @param toProcess the String to remove tokens from, or null. */ + @Override public String process(String toProcess) { if (toProcess == null) Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/action/ApplyAction.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/action/ApplyAction.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/action/ApplyAction.java (original) +++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/action/ApplyAction.java Mon Aug 27 09:48:33 2018 @@ -90,8 +90,9 @@ public class ApplyAction implements Merg * The output of the outlet is appended to the output. * ${...} Tokens are replaced within outletName and path. */ + @Override public OutletResult execute(final ControllerState controllerState) - throws GeneratorException + throws GeneratorException { TokenReplacer tokenReplacer = new TokenReplacer(controllerState); String detokenizedOutletName = tokenReplacer.process(outletName); @@ -113,7 +114,7 @@ public class ApplyAction implements Merg String detokenizedPath = tokenReplacer.process(path); Iterator<SourcePathPointer> selectedObjectsIt - = SourcePath.iteratePointer( + = SourcePath.iteratePointer( controllerState.getModelRoot(), pathToModel, model, @@ -124,9 +125,9 @@ public class ApplyAction implements Merg { throw new GeneratorException( "ApplyAction : selected path " - + path - + " does not match an element" - + " and acceptNotSet was set to false"); + + path + + " does not match an element" + + " and acceptNotSet was set to false"); } return new OutletResult(""); } @@ -136,8 +137,8 @@ public class ApplyAction implements Merg { throw new GeneratorException( "ApplyAction : selected path " - + path - + " contains more than one element"); + + path + + " contains more than one element"); } String oldPathToModel = controllerState.getPathToModel(); Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/action/MergepointAction.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/action/MergepointAction.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/action/MergepointAction.java (original) +++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/action/MergepointAction.java Mon Aug 27 09:48:33 2018 @@ -38,6 +38,6 @@ public interface MergepointAction * @throws GeneratorException if an error occurs during generation. */ OutletResult execute(ControllerState controllerState) - throws GeneratorException; + throws GeneratorException; } Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/action/OptionAction.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/action/OptionAction.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/action/OptionAction.java (original) +++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/action/OptionAction.java Mon Aug 27 09:48:33 2018 @@ -73,8 +73,9 @@ public class OptionAction implements Mer * @throws GeneratorException if acceptNotSet is false and the option * is not set. */ + @Override public OutletResult execute(ControllerState controllerState) - throws GeneratorException + throws GeneratorException { Object option = controllerState.getOption(optionName); if (option == null) Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/action/OutputAction.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/action/OutputAction.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/action/OutputAction.java (original) +++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/action/OutputAction.java Mon Aug 27 09:48:33 2018 @@ -60,8 +60,9 @@ public class OutputAction implements Mer * @throws GeneratorException if acceptNotSet is false and the option * is not set. */ + @Override public OutletResult execute(ControllerState controllerState) - throws GeneratorException + throws GeneratorException { TokenReplacer tokenReplacer = new TokenReplacer(controllerState); String detokenizedValue = tokenReplacer.process(value); Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/action/SourceElementAttributeAction.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/action/SourceElementAttributeAction.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/action/SourceElementAttributeAction.java (original) +++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/action/SourceElementAttributeAction.java Mon Aug 27 09:48:33 2018 @@ -89,8 +89,9 @@ public class SourceElementAttributeActio * @throws GeneratorException if acceptNotSet is false and either no * source element can be found or the attribute is not set. */ + @Override public OutletResult execute(final ControllerState controllerState) - throws GeneratorException + throws GeneratorException { TokenReplacer tokenReplacer = new TokenReplacer(controllerState); String detonizedElementPath = tokenReplacer.process(elementPath); Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/action/TraverseAllAction.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/action/TraverseAllAction.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/action/TraverseAllAction.java (original) +++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/action/TraverseAllAction.java Mon Aug 27 09:48:33 2018 @@ -74,7 +74,7 @@ public class TraverseAllAction implement { throw new IllegalArgumentException( "TraverseAllAction: " - + "elementsToTraverseName must not be null"); + + "elementsToTraverseName must not be null"); } this.elementsToTraverseName = elementsToTraverseName; @@ -96,18 +96,19 @@ public class TraverseAllAction implement * ${...} Tokens are replaced within outletName and * elementsToTraverseName. */ + @Override public OutletResult execute(final ControllerState controllerState) - throws GeneratorException + throws GeneratorException { final TokenReplacer tokenReplacer = new TokenReplacer(controllerState); Outlet outlet; { final OutletConfiguration outletConfiguration - = controllerState.getUnitConfiguration() - .getOutletConfiguration(); + = controllerState.getUnitConfiguration() + .getOutletConfiguration(); final String detokenizedOutletName - = tokenReplacer.process(outletName); + = tokenReplacer.process(outletName); final QualifiedName outletQName = new QualifiedName( detokenizedOutletName, Namespace.ROOT_NAMESPACE); @@ -122,11 +123,11 @@ public class TraverseAllAction implement } final String detokenizedElementToTraverseName - = tokenReplacer.process(elementsToTraverseName); + = tokenReplacer.process(elementsToTraverseName); final Object currentModel = controllerState.getModel(); final Iterator<SourcePathPointer> toTraverseIt - = SourcePath.iteratePointer( + = SourcePath.iteratePointer( controllerState.getModelRoot(), controllerState.getPathToModel(), currentModel, @@ -135,11 +136,11 @@ public class TraverseAllAction implement { throw new GeneratorException( "TraverseAllAction : selected element " - + elementsToTraverseName - + " does not exist and acceptEmpty was set to false"); + + elementsToTraverseName + + " does not exist and acceptEmpty was set to false"); } - final List<OutletResult> resultList = new ArrayList<OutletResult>(); + final List<OutletResult> resultList = new ArrayList<>(); String oldPathToModel = controllerState.getPathToModel(); while (toTraverseIt.hasNext()) { Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/existingtargetstrategy/AppendToTargetFileStrategy.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/existingtargetstrategy/AppendToTargetFileStrategy.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/existingtargetstrategy/AppendToTargetFileStrategy.java (original) +++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/existingtargetstrategy/AppendToTargetFileStrategy.java Mon Aug 27 09:48:33 2018 @@ -56,6 +56,7 @@ public class AppendToTargetFileStrategy * * @return true always. */ + @Override public boolean beforeGeneration( String outputDirKey, String outputPath, @@ -80,13 +81,14 @@ public class AppendToTargetFileStrategy * unit, not null. * @throws GeneratorException on an error. */ + @Override public void afterGeneration( - String outputDirKey, - String outputPath, - String encoding, - OutletResult generationResult, - UnitConfiguration unitConfiguration) - throws GeneratorException + String outputDirKey, + String outputPath, + String encoding, + OutletResult generationResult, + UnitConfiguration unitConfiguration) + throws GeneratorException { File outputFile = ControllerHelper.getOutputFile( outputDirKey, @@ -117,7 +119,7 @@ public class AppendToTargetFileStrategy outputFile); } byte[] result = new byte[originalContent.length - + generationResult.getByteArrayResult().length]; + + generationResult.getByteArrayResult().length]; System.arraycopy( originalContent, 0, @@ -139,9 +141,9 @@ public class AppendToTargetFileStrategy { throw new ControllerException( "Could not write file \"" - + outputFile.getAbsolutePath() - + "\"", - e); + + outputFile.getAbsolutePath() + + "\"", + e); } } @@ -150,6 +152,7 @@ public class AppendToTargetFileStrategy * * @return "replace" */ + @Override public String getStrategyName() { return STRATEGY_NAME; Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/existingtargetstrategy/ExistingTargetStrategy.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/existingtargetstrategy/ExistingTargetStrategy.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/existingtargetstrategy/ExistingTargetStrategy.java (original) +++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/existingtargetstrategy/ExistingTargetStrategy.java Mon Aug 27 09:48:33 2018 @@ -54,7 +54,7 @@ public interface ExistingTargetStrategy String outputPath, String encoding, UnitConfiguration unitConfiguration) - throws GeneratorException; + throws GeneratorException; /** * Processes the results of the generation. @@ -73,12 +73,12 @@ public interface ExistingTargetStrategy * @throws GeneratorException on an error. */ void afterGeneration( - String outputDirKey, - String outputPath, - String encoding, - OutletResult generationResult, - UnitConfiguration unitConfiguration) - throws GeneratorException; + String outputDirKey, + String outputPath, + String encoding, + OutletResult generationResult, + UnitConfiguration unitConfiguration) + throws GeneratorException; /** * Returns the name of the existing target strategy. Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/existingtargetstrategy/MergeTargetFileStrategy.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/existingtargetstrategy/MergeTargetFileStrategy.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/existingtargetstrategy/MergeTargetFileStrategy.java (original) +++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/existingtargetstrategy/MergeTargetFileStrategy.java Mon Aug 27 09:48:33 2018 @@ -71,6 +71,7 @@ public class MergeTargetFileStrategy imp * * @return true always. */ + @Override public boolean beforeGeneration( final String outputDirKey, final String outputPath, @@ -95,28 +96,29 @@ public class MergeTargetFileStrategy imp * * @throws GeneratorException on an error. */ + @Override public void afterGeneration( - final String outputDirKey, - final String outputPath, - final String encoding, - final OutletResult generationResult, - final UnitConfiguration unitConfiguration) - throws GeneratorException + final String outputDirKey, + final String outputPath, + final String encoding, + final OutletResult generationResult, + final UnitConfiguration unitConfiguration) + throws GeneratorException { File generationStorageDir - = new File(unitConfiguration.getWorkDirectory(), WORK_SUBDIR); + = new File(unitConfiguration.getWorkDirectory(), WORK_SUBDIR); File generationStorageFile; if (outputDirKey == null) { generationStorageFile - = new File(generationStorageDir, - FilenameUtils.concat("default", outputPath)); + = new File(generationStorageDir, + FilenameUtils.concat("default", outputPath)); } else { generationStorageFile - = new File(generationStorageDir, - FilenameUtils.concat("other", + = new File(generationStorageDir, + FilenameUtils.concat("other", FilenameUtils.concat(outputDirKey, outputPath))); } String oldGenerationContent = readFileToString( @@ -135,8 +137,8 @@ public class MergeTargetFileStrategy imp { throw new GeneratorException( "The merge target file strategy onlys works" - + " for String generation results (target file=" - + targetFile.getAbsolutePath() + ")"); + + " for String generation results (target file=" + + targetFile.getAbsolutePath() + ")"); } String newTargetContent = null; @@ -174,6 +176,7 @@ public class MergeTargetFileStrategy imp * * @return "merge" */ + @Override public String getStrategyName() { return STRATEGY_NAME; @@ -190,9 +193,9 @@ public class MergeTargetFileStrategy imp * @throws ControllerException if an error occurs while reading the file. */ private String readFileToString( - final File file, - final String charset) - throws ControllerException + final File file, + final String charset) + throws ControllerException { String result = null; if (file.exists()) @@ -207,9 +210,9 @@ public class MergeTargetFileStrategy imp { throw new ControllerException( "Could not read file \"" - + file.getAbsolutePath() - + "\"", - e); + + file.getAbsolutePath() + + "\"", + e); } } return result; @@ -226,10 +229,10 @@ public class MergeTargetFileStrategy imp * @throws ControllerException if writing the file fails. */ private void writeStringToFile( - final File file, - final String content, - final String charset) - throws ControllerException + final File file, + final String content, + final String charset) + throws ControllerException { try { @@ -239,9 +242,9 @@ public class MergeTargetFileStrategy imp { throw new ControllerException( "Could not write file \"" - + file.getAbsolutePath() - + "\"", - e); + + file.getAbsolutePath() + + "\"", + e); } } } Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/existingtargetstrategy/ReplaceTargetFileStrategy.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/existingtargetstrategy/ReplaceTargetFileStrategy.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/existingtargetstrategy/ReplaceTargetFileStrategy.java (original) +++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/existingtargetstrategy/ReplaceTargetFileStrategy.java Mon Aug 27 09:48:33 2018 @@ -55,6 +55,7 @@ public class ReplaceTargetFileStrategy i * * @return true always. */ + @Override public boolean beforeGeneration( String outputDirKey, String outputPath, @@ -79,13 +80,14 @@ public class ReplaceTargetFileStrategy i * unit, not null. * @throws GeneratorException on an error. */ + @Override public void afterGeneration( - String outputDirKey, - String outputPath, - String encoding, - OutletResult generationResult, - UnitConfiguration unitConfiguration) - throws GeneratorException + String outputDirKey, + String outputPath, + String encoding, + OutletResult generationResult, + UnitConfiguration unitConfiguration) + throws GeneratorException { File outputFile = ControllerHelper.getOutputFile( outputDirKey, @@ -111,9 +113,9 @@ public class ReplaceTargetFileStrategy i { throw new ControllerException( "Could not write file \"" - + outputFile.getAbsolutePath() - + "\"", - e); + + outputFile.getAbsolutePath() + + "\"", + e); } } @@ -122,6 +124,7 @@ public class ReplaceTargetFileStrategy i * * @return "replace" */ + @Override public String getStrategyName() { return STRATEGY_NAME; Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/existingtargetstrategy/SkipExistingTargetFileStrategy.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/existingtargetstrategy/SkipExistingTargetFileStrategy.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/existingtargetstrategy/SkipExistingTargetFileStrategy.java (original) +++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/existingtargetstrategy/SkipExistingTargetFileStrategy.java Mon Aug 27 09:48:33 2018 @@ -48,12 +48,12 @@ public class SkipExistingTargetFileStrat * * @return true if the target file does not exist, false otherwise. */ - @Override - public boolean beforeGeneration( - String outputDirKey, - String outputPath, - String encoding, - UnitConfiguration unitConfiguration) + @Override + public boolean beforeGeneration( + String outputDirKey, + String outputPath, + String encoding, + UnitConfiguration unitConfiguration) { File outputFile = ControllerHelper.getOutputFile( outputDirKey, @@ -67,6 +67,7 @@ public class SkipExistingTargetFileStrat * * @return "skip" */ + @Override public String getStrategyName() { return STRATEGY_NAME; Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/outputtype/HtmlOutputType.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/outputtype/HtmlOutputType.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/outputtype/HtmlOutputType.java (original) +++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/outputtype/HtmlOutputType.java Mon Aug 27 09:48:33 2018 @@ -43,6 +43,7 @@ public class HtmlOutputType implements O * * @return the String which starts a comment, not null. */ + @Override public String getCommentStart(String lineBreak) { return COMMENT_START; @@ -56,6 +57,7 @@ public class HtmlOutputType implements O * * @return the String which starts a comment, not null. */ + @Override public String getCommentEnd(String lineBreak) { return COMMENT_END + lineBreak; Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/outputtype/JavaOutputType.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/outputtype/JavaOutputType.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/outputtype/JavaOutputType.java (original) +++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/outputtype/JavaOutputType.java Mon Aug 27 09:48:33 2018 @@ -40,6 +40,7 @@ public class JavaOutputType implements O * * @return the String which starts a comment, not null. */ + @Override public String getCommentStart(String lineBreak) { return COMMENT_START; @@ -53,6 +54,7 @@ public class JavaOutputType implements O * * @return the String which starts a comment, not null. */ + @Override public String getCommentEnd(String lineBreak) { return lineBreak; Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/outputtype/PropertiesOutputType.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/outputtype/PropertiesOutputType.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/outputtype/PropertiesOutputType.java (original) +++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/outputtype/PropertiesOutputType.java Mon Aug 27 09:48:33 2018 @@ -40,6 +40,7 @@ public class PropertiesOutputType implem * * @return the String which starts a comment, not null. */ + @Override public String getCommentStart(String lineBreak) { return COMMENT_START; @@ -53,6 +54,7 @@ public class PropertiesOutputType implem * * @return the String which starts a comment, not null. */ + @Override public String getCommentEnd(String lineBreak) { return lineBreak; Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/outputtype/UnknownOutputType.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/outputtype/UnknownOutputType.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/outputtype/UnknownOutputType.java (original) +++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/outputtype/UnknownOutputType.java Mon Aug 27 09:48:33 2018 @@ -43,6 +43,7 @@ public class UnknownOutputType implement * * @return the String which starts a comment, not null. */ + @Override public String getCommentStart(String lineBreak) { return COMMENT_START; @@ -56,6 +57,7 @@ public class UnknownOutputType implement * * @return the String which starts a comment, not null. */ + @Override public String getCommentEnd(String lineBreak) { return COMMENT_END + lineBreak; Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/outputtype/XmlOutputType.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/outputtype/XmlOutputType.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/outputtype/XmlOutputType.java (original) +++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/outputtype/XmlOutputType.java Mon Aug 27 09:48:33 2018 @@ -43,6 +43,7 @@ public class XmlOutputType implements Ou * * @return the String which starts a comment, not null. */ + @Override public String getCommentStart(String lineBreak) { return COMMENT_START; @@ -56,6 +57,7 @@ public class XmlOutputType implements Ou * * @return the String which starts a comment, not null. */ + @Override public String getCommentEnd(String lineBreak) { return COMMENT_END + lineBreak; Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/file/Fileset.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/file/Fileset.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/file/Fileset.java (original) +++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/file/Fileset.java Mon Aug 27 09:48:33 2018 @@ -157,7 +157,7 @@ public class Fileset */ public List<File> getFiles() throws IOException { - List<File> result = new ArrayList<File>(); + List<File> result = new ArrayList<>(); if (includes == null || includes.isEmpty()) { getAllFiles(basedir, result); @@ -168,7 +168,7 @@ public class Fileset for (String includePattern : includes) { int wildcardFreeSeparatorPos - = getWildcardFreeSeparatorPos(includePattern); + = getWildcardFreeSeparatorPos(includePattern); String wildcardFreeIncludePart = getPathPartBefore( includePattern, wildcardFreeSeparatorPos); @@ -183,7 +183,7 @@ public class Fileset basedir, wildcardFreeIncludePart); String wildcardPattern - = getPathPartAfter(includePattern, wildcardFreeSeparatorPos); + = getPathPartAfter(includePattern, wildcardFreeSeparatorPos); String[] wildcardParts = StringUtils.split(wildcardPattern, "\\/"); List<String> wildcardPartList = Arrays.asList(wildcardParts); @@ -273,8 +273,8 @@ public class Fileset { throw new IOException( "Could not list files in the following Directory " - + "while reading the sources: " - + currentBaseDir.getAbsolutePath()); + + "while reading the sources: " + + currentBaseDir.getAbsolutePath()); } if (log.isTraceEnabled()) { @@ -306,8 +306,8 @@ public class Fileset * @throws IOException if an error occurs during reading the directory. */ static List<File> getFiles( - File currentBaseDir, List<String> pathPartList) - throws IOException + File currentBaseDir, List<String> pathPartList) + throws IOException { if (log.isTraceEnabled()) { @@ -316,7 +316,7 @@ public class Fileset + ", current path parts: " + pathPartList); } - List<String> partsCopy = new ArrayList<String>(pathPartList); + List<String> partsCopy = new ArrayList<>(pathPartList); String includeToProcess = partsCopy.remove(0); if (partsCopy.size() == 0) { @@ -326,8 +326,8 @@ public class Fileset { throw new IOException( "Could not list files in the following Directory " - + "while reading the sources: " - + currentBaseDir.getAbsolutePath()); + + "while reading the sources: " + + currentBaseDir.getAbsolutePath()); } List<File> result = Arrays.asList(matches); if (log.isTraceEnabled()) @@ -343,7 +343,7 @@ public class Fileset } File[] matchingDirs = currentBaseDir.listFiles( new WildcardFilter(includeToProcess, true, false)); - List<File> result = new ArrayList<File>(); + List<File> result = new ArrayList<>(); for (File dir : matchingDirs) { result.addAll(getFiles(dir, partsCopy)); @@ -488,7 +488,7 @@ public class Fileset static List<String> splitAndNormalize(String path) { String[] parts = StringUtils.split(path, "\\/"); - List<String> normalizedParts = new ArrayList<String>(); + List<String> normalizedParts = new ArrayList<>(); for (String part : parts) { if (".".equals(part)) @@ -509,7 +509,7 @@ public class Fileset public String toString() { return "Fileset [basedir=" + basedir - + ", excludes=" + excludes - + ", includes=" + includes + "]"; + + ", excludes=" + excludes + + ", includes=" + includes + "]"; } } Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/file/WildcardFilter.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/file/WildcardFilter.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/file/WildcardFilter.java (original) +++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/file/WildcardFilter.java Mon Aug 27 09:48:33 2018 @@ -76,6 +76,7 @@ public class WildcardFilter implements F * * @return false if the file is rejected, true if it is accepted. */ + @Override public boolean accept(File file) { if (!acceptDir && file.isDirectory()) Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/merge/ThreeWayMerger.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/merge/ThreeWayMerger.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/merge/ThreeWayMerger.java (original) +++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/merge/ThreeWayMerger.java Mon Aug 27 09:48:33 2018 @@ -50,11 +50,11 @@ public class ThreeWayMerger * @throws GeneratorException if merging fails. */ public String merge( - String base, - String generated, - String edited, - String charsetName) - throws GeneratorException + String base, + String generated, + String edited, + String charsetName) + throws GeneratorException { MergeAlgorithm mergeAlgorithm = new MergeAlgorithm(); MergeResult<RawText> mergeResult; @@ -90,7 +90,7 @@ public class ThreeWayMerger try { String result - = new String(outputStream.toByteArray(), charsetName); + = new String(outputStream.toByteArray(), charsetName); return result; } catch (UnsupportedEncodingException e) Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/option/OptionImpl.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/option/OptionImpl.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/option/OptionImpl.java (original) +++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/option/OptionImpl.java Mon Aug 27 09:48:33 2018 @@ -89,6 +89,7 @@ public class OptionImpl implements Optio * * @return the qualified name of the option, not null. */ + @Override public QualifiedName getQualifiedName() { return qualifiedName; @@ -99,6 +100,7 @@ public class OptionImpl implements Optio * * @return the value of the option, may be null. */ + @Override public Object getValue() { return value; Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/option/Options.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/option/Options.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/option/Options.java (original) +++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/option/Options.java Mon Aug 27 09:48:33 2018 @@ -37,7 +37,7 @@ public class Options { /** The options with global scope. */ private QualifiedNameMap<Option> globalScope - = new QualifiedNameMap<Option>(); + = new QualifiedNameMap<>(); /** * Sets an option with global scope. @@ -130,7 +130,7 @@ public class Options public Collection<Option> values() { Map<QualifiedName, Option> result - = new HashMap<QualifiedName, Option>(); + = new HashMap<>(); for (Option globalOption : globalScope.values()) { result.put(globalOption.getQualifiedName(), globalOption); @@ -147,7 +147,7 @@ public class Options public Collection<QualifiedName> keySet() { Collection<Option> options = values(); - Set<QualifiedName> result = new HashSet<QualifiedName>(options.size()); + Set<QualifiedName> result = new HashSet<>(options.size()); for (Option option : options) { result.add(option.getQualifiedName()); Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/outlet/DebuggingOutletWrapper.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/outlet/DebuggingOutletWrapper.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/outlet/DebuggingOutletWrapper.java (original) +++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/outlet/DebuggingOutletWrapper.java Mon Aug 27 09:48:33 2018 @@ -58,6 +58,7 @@ public class DebuggingOutletWrapper impl * * @return the name of the delegate, not null. */ + @Override public QualifiedName getName() { return delegate.getName(); @@ -72,6 +73,7 @@ public class DebuggingOutletWrapper impl * @throws ConfigurationException if an mergepointMapping * for the given name already exists. */ + @Override public void addMergepointMapping(MergepointMapping mergepointMapping) throws ConfigurationException { @@ -87,6 +89,7 @@ public class DebuggingOutletWrapper impl * * @throws NullPointerException if mergepointMapping is null. */ + @Override public MergepointMapping setMergepointMapping( MergepointMapping mergepointMapping) { @@ -102,6 +105,7 @@ public class DebuggingOutletWrapper impl * @return the mergepoint mapping for the given name, or null if no * mergepoint mapping exists for this name. */ + @Override public MergepointMapping getMergepointMapping(String name) { return delegate.getMergepointMapping(name); @@ -113,6 +117,7 @@ public class DebuggingOutletWrapper impl * * @return the map of mergepoint mappings, not null. */ + @Override public Map<String, MergepointMapping> getMergepointMappings() { return delegate.getMergepointMappings(); @@ -124,6 +129,7 @@ public class DebuggingOutletWrapper impl * @param inputName the name of the root element of the source, * or null to accept any input name. */ + @Override public void setInputElementName(String inputName) { delegate.setInputElementName(inputName); @@ -135,6 +141,7 @@ public class DebuggingOutletWrapper impl * @return the name of the root element of the source, * or null if any input name is accepted. */ + @Override public String getInputElementName() { return delegate.getInputElementName(); @@ -146,6 +153,7 @@ public class DebuggingOutletWrapper impl * @param className the class name of the root object of the source, * or null to accept any object class. */ + @Override public void setInputClass(String className) { delegate.setInputClass(className); @@ -157,6 +165,7 @@ public class DebuggingOutletWrapper impl * @return the class name of the root object of the source, * or null if any object class is accepted. */ + @Override public String getInputClass() { return delegate.getInputClass(); @@ -169,6 +178,7 @@ public class DebuggingOutletWrapper impl * * @throws GeneratorException if adjusting the controller state fails. */ + @Override public void beforeExecute(ControllerState controllerState) throws GeneratorException { @@ -182,6 +192,7 @@ public class DebuggingOutletWrapper impl * * @throws GeneratorException if adjusting the controller state fails. */ + @Override public void afterExecute(ControllerState controllerState) throws GeneratorException { @@ -198,6 +209,7 @@ public class DebuggingOutletWrapper impl * * @throws GeneratorException if adjusting the controller state fails. */ + @Override public OutletResult execute(ControllerState controllerState) throws GeneratorException { @@ -212,9 +224,9 @@ public class DebuggingOutletWrapper impl outletResult.getStringResult()); String outputTypeString = output.getType(); Map<String, OutputType> outputTypes - = controllerState.getUnitConfiguration() - .getConfigurationHandlers() - .getOutputTypes(); + = controllerState.getUnitConfiguration() + .getConfigurationHandlers() + .getOutputTypes(); OutputType outputType = outputTypes.get(outputTypeString); if (outputType == null) { --------------------------------------------------------------------- To unsubscribe, e-mail: torque-dev-unsubscr...@db.apache.org For additional commands, e-mail: torque-dev-h...@db.apache.org