From 3fee0582b90432482b38dabae70311ee580c8f82 Mon Sep 17 00:00:00 2001 From: Lukas Eder Date: Thu, 28 Feb 2013 12:35:05 +0100 Subject: [PATCH] Fixed whitespace (no tabs, only spaces) --- .../java/org/jooq/util/GenerationTool.java | 98 +++++++++---------- .../main/java/org/jooq/util/Generator.java | 14 +-- 2 files changed, 56 insertions(+), 56 deletions(-) diff --git a/jOOQ-codegen/src/main/java/org/jooq/util/GenerationTool.java b/jOOQ-codegen/src/main/java/org/jooq/util/GenerationTool.java index e812ee1b78..36481608d2 100644 --- a/jOOQ-codegen/src/main/java/org/jooq/util/GenerationTool.java +++ b/jOOQ-codegen/src/main/java/org/jooq/util/GenerationTool.java @@ -105,26 +105,26 @@ public class GenerationTool { GenerationTool.connection = connection; } - public static void main(String[] args) throws Exception { - if (args.length < 1) { - error(); - } + public static void main(String[] args) throws Exception { + if (args.length < 1) { + error(); + } - InputStream in = GenerationTool.class.getResourceAsStream(args[0]); + InputStream in = GenerationTool.class.getResourceAsStream(args[0]); - if (in == null) { - log.error("Cannot find " + args[0]); - log.error("-----------"); - log.error("Please be sure it is located on the classpath and qualified as a classpath location."); - log.error("If it is located at the current working directory, try adding a '/' to the path"); - error(); - } + if (in == null) { + log.error("Cannot find " + args[0]); + log.error("-----------"); + log.error("Please be sure it is located on the classpath and qualified as a classpath location."); + log.error("If it is located at the current working directory, try adding a '/' to the path"); + error(); + } - log.info("Initialising properties", args[0]); + log.info("Initialising properties", args[0]); - try { - main(load(in)); - } catch (Exception e) { + try { + main(load(in)); + } catch (Exception e) { log.error("Cannot read " + args[0] + ". Error : " + e.getMessage()); e.printStackTrace(); error(); @@ -133,18 +133,18 @@ public class GenerationTool { in.close(); } } - } + } - @SuppressWarnings("unchecked") + @SuppressWarnings("unchecked") public static void main(Configuration configuration) throws Exception { - Jdbc j = defaultIfNull(configuration.getJdbc(), new Jdbc()); - org.jooq.util.jaxb.Generator g = configuration.getGenerator(); + Jdbc j = defaultIfNull(configuration.getJdbc(), new Jdbc()); + org.jooq.util.jaxb.Generator g = configuration.getGenerator(); - // Some default values for optional elements to avoid NPE's - if (g.getStrategy() == null) - g.setStrategy(new Strategy()); - if (g.getTarget() == null) - g.setTarget(new Target()); + // Some default values for optional elements to avoid NPE's + if (g.getStrategy() == null) + g.setStrategy(new Strategy()); + if (g.getTarget() == null) + g.setTarget(new Target()); try { @@ -288,35 +288,35 @@ public class GenerationTool { connection.close(); } } - } + } - private static Class loadClass(String className, ClassLoader loader) throws ClassNotFoundException { + private static Class loadClass(String className, ClassLoader loader) throws ClassNotFoundException { - // [#2283] If no explicit class loader was provided try loading the class - // with "default" techniques - if (loader == null) { - try { - return Class.forName(className); - } - catch (ClassNotFoundException e) { - return Thread.currentThread().getContextClassLoader().loadClass(className); - } - } + // [#2283] If no explicit class loader was provided try loading the class + // with "default" techniques + if (loader == null) { + try { + return Class.forName(className); + } + catch (ClassNotFoundException e) { + return Thread.currentThread().getContextClassLoader().loadClass(className); + } + } - // Prefer the explicit class loader if available - else { - return loader.loadClass(className); - } - } + // Prefer the explicit class loader if available + else { + return loader.loadClass(className); + } + } - private static String trim(String string) { - return (string == null ? null : string.trim()); - } + private static String trim(String string) { + return (string == null ? null : string.trim()); + } - private static void error() { - log.error("Usage : GenerationTool "); - System.exit(-1); - } + private static void error() { + log.error("Usage : GenerationTool "); + System.exit(-1); + } /** * Copy bytes from a large (over 2GB) InputStream to an diff --git a/jOOQ-codegen/src/main/java/org/jooq/util/Generator.java b/jOOQ-codegen/src/main/java/org/jooq/util/Generator.java index c6c3042152..0b506e4cc0 100644 --- a/jOOQ-codegen/src/main/java/org/jooq/util/Generator.java +++ b/jOOQ-codegen/src/main/java/org/jooq/util/Generator.java @@ -45,14 +45,14 @@ import javax.annotation.Generated; */ public interface Generator { - /** - * Do the code generation - */ - void generate(Database database); + /** + * Do the code generation + */ + void generate(Database database); - /** - * Set a naming strategy to this generator - */ + /** + * Set a naming strategy to this generator + */ void setStrategy(GeneratorStrategy strategy); /**