Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/TokenReplacerTest.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/TokenReplacerTest.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/TokenReplacerTest.java (original) +++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/TokenReplacerTest.java Mon Aug 27 09:48:33 2018 @@ -85,7 +85,7 @@ public class TokenReplacerTest extends B public void testTokenWithNamespace() throws Exception { String input - = "Prefix${option:org.apache.torque.generator.optionWithNamespace}Postfix"; + = "Prefix${option:org.apache.torque.generator.optionWithNamespace}Postfix"; String output = tokenReplacer.process(input); assertEquals("PrefixValueWithNamespacePostfix", output); } @@ -102,7 +102,7 @@ public class TokenReplacerTest extends B public void testEscapingInToken() throws Exception { String input - = "Prefix${option:option\\W\\ithoutNamespace}Postfix"; + = "Prefix${option:option\\W\\ithoutNamespace}Postfix"; String output = tokenReplacer.process(input); assertEquals("PrefixValueWithoutNamespacePostfix", output); } @@ -119,7 +119,7 @@ public class TokenReplacerTest extends B public void testTokenWithSpecialChars() throws Exception { String input - = "Prefix${option:opt${\\}i\\\\on}Postfix"; + = "Prefix${option:opt${\\}i\\\\on}Postfix"; String output = tokenReplacer.process(input); assertEquals("PrefixValueWith${}Special\\CharsPostfix", output); } @@ -128,7 +128,7 @@ public class TokenReplacerTest extends B public void testEscapingTokenStart1() throws Exception { String input - = "Prefix\\${XXX}Postfix"; + = "Prefix\\${XXX}Postfix"; String output = tokenReplacer.process(input); assertEquals("Prefix${XXX}Postfix", output); } @@ -137,7 +137,7 @@ public class TokenReplacerTest extends B public void testEscapingTokenStart2() throws Exception { String input - = "Prefix$\\{XXX}Postfix"; + = "Prefix$\\{XXX}Postfix"; String output = tokenReplacer.process(input); assertEquals("Prefix${XXX}Postfix", output); }
Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/example/gettingstarted/GettingStarted.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/example/gettingstarted/GettingStarted.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/example/gettingstarted/GettingStarted.java (original) +++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/example/gettingstarted/GettingStarted.java Mon Aug 27 09:48:33 2018 @@ -36,7 +36,7 @@ public class GettingStarted File target = new File("target/gettingStarted"); FileUtils.deleteDirectory(target); Controller controller = new Controller(); - List<UnitDescriptor> unitDescriptors = new ArrayList<UnitDescriptor>(); + List<UnitDescriptor> unitDescriptors = new ArrayList<>(); unitDescriptors.add(new UnitDescriptor( UnitDescriptor.Packaging.DIRECTORY, new Maven2DirectoryProjectPaths( Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/example/gettingstarted/GettingStartedTest.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/example/gettingstarted/GettingStartedTest.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/example/gettingstarted/GettingStartedTest.java (original) +++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/example/gettingstarted/GettingStartedTest.java Mon Aug 27 09:48:33 2018 @@ -42,7 +42,7 @@ public class GettingStartedTest extends File targetDir = new File("target/test/site/gettingStarted"); FileUtils.deleteDirectory(targetDir); Controller controller = new Controller(); - List<UnitDescriptor> unitDescriptors = new ArrayList<UnitDescriptor>(); + List<UnitDescriptor> unitDescriptors = new ArrayList<>(); CustomProjectPaths projectPaths = new CustomProjectPaths( new Maven2DirectoryProjectPaths( new File("src/test/site/gettingStarted"))); Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/file/FileTestUtils.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/file/FileTestUtils.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/file/FileTestUtils.java (original) +++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/file/FileTestUtils.java Mon Aug 27 09:48:33 2018 @@ -39,9 +39,9 @@ public class FileTestUtils * @throws IOException if Fileset#getFiles() throws it. */ public static void assertFileListEquals( - final Fileset fileset, - final File... expectedPaths) - throws IOException + final Fileset fileset, + final File... expectedPaths) + throws IOException { List<File> fileList = fileset.getFiles(); assertFileListEquals(fileList, expectedPaths); @@ -55,15 +55,15 @@ public class FileTestUtils * @param expected the paths which should be in the file list. */ public static void assertFileListEquals( - final List<File> fileList, - final File... expected) + final List<File> fileList, + final File... expected) { - Set<File> actualFiles = new HashSet<File>(); + Set<File> actualFiles = new HashSet<>(); for (File file : fileList) { actualFiles.add(file); } - Set<File> expectedFiles = new HashSet<File>(); + Set<File> expectedFiles = new HashSet<>(); for (File file : expected) { expectedFiles.add(file); @@ -80,7 +80,7 @@ public class FileTestUtils */ public static Set<String> createSetFrom(final String... content) { - Set<String> result = new HashSet<String>(); + Set<String> result = new HashSet<>(); for (String part : content) { result.add(part); Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/file/FilesetTest.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/file/FilesetTest.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/file/FilesetTest.java (original) +++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/file/FilesetTest.java Mon Aug 27 09:48:33 2018 @@ -48,10 +48,10 @@ public class FilesetTest int baseDirSeparatorPos = Fileset.getWildcardFreeSeparatorPos(path); assertEquals(4, baseDirSeparatorPos); String wildcardFree - = Fileset.getPathPartBefore(path, baseDirSeparatorPos); + = Fileset.getPathPartBefore(path, baseDirSeparatorPos); assertEquals("/tmp", wildcardFree); String wildcardPattern - = Fileset.getPathPartAfter(path, baseDirSeparatorPos); + = Fileset.getPathPartAfter(path, baseDirSeparatorPos); assertEquals("schema.xml", wildcardPattern); } @@ -62,10 +62,10 @@ public class FilesetTest int baseDirSeparatorPos = Fileset.getWildcardFreeSeparatorPos(path); assertEquals(-1, baseDirSeparatorPos); String wildcardFree - = Fileset.getPathPartBefore(path, baseDirSeparatorPos); + = Fileset.getPathPartBefore(path, baseDirSeparatorPos); assertEquals(".", wildcardFree); String wildcardPattern - = Fileset.getPathPartAfter(path, baseDirSeparatorPos); + = Fileset.getPathPartAfter(path, baseDirSeparatorPos); assertEquals("schema.xml", wildcardPattern); } @@ -76,10 +76,10 @@ public class FilesetTest int baseDirSeparatorPos = Fileset.getWildcardFreeSeparatorPos(path); assertEquals(9, baseDirSeparatorPos); String wildcardFree - = Fileset.getPathPartBefore(path, baseDirSeparatorPos); + = Fileset.getPathPartBefore(path, baseDirSeparatorPos); assertEquals("C:\\schema", wildcardFree); String wildcardPattern - = Fileset.getPathPartAfter(path, baseDirSeparatorPos); + = Fileset.getPathPartAfter(path, baseDirSeparatorPos); assertEquals("?\\schema.xml", wildcardPattern); } @@ -90,10 +90,10 @@ public class FilesetTest int baseDirSeparatorPos = Fileset.getWildcardFreeSeparatorPos(path); assertEquals(9, baseDirSeparatorPos); String wildcardFree - = Fileset.getPathPartBefore(path, baseDirSeparatorPos); + = Fileset.getPathPartBefore(path, baseDirSeparatorPos); assertEquals("C:\\schema", wildcardFree); String wildcardPattern - = Fileset.getPathPartAfter(path, baseDirSeparatorPos); + = Fileset.getPathPartAfter(path, baseDirSeparatorPos); assertEquals("*\\schema.xml", wildcardPattern); } @@ -104,10 +104,10 @@ public class FilesetTest int baseDirSeparatorPos = Fileset.getWildcardFreeSeparatorPos(path); assertEquals(4, baseDirSeparatorPos); String wildcardFree - = Fileset.getPathPartBefore(path, baseDirSeparatorPos); + = Fileset.getPathPartBefore(path, baseDirSeparatorPos); assertEquals("/tmp", wildcardFree); String wildcardPattern - = Fileset.getPathPartAfter(path, baseDirSeparatorPos); + = Fileset.getPathPartAfter(path, baseDirSeparatorPos); assertEquals("*/???/schema.xml", wildcardPattern); } @@ -118,10 +118,10 @@ public class FilesetTest int baseDirSeparatorPos = Fileset.getWildcardFreeSeparatorPos(path); assertEquals(-1, baseDirSeparatorPos); String wildcardFree - = Fileset.getPathPartBefore(path, baseDirSeparatorPos); + = Fileset.getPathPartBefore(path, baseDirSeparatorPos); assertEquals(".", wildcardFree); String wildcardPattern - = Fileset.getPathPartAfter(path, baseDirSeparatorPos); + = Fileset.getPathPartAfter(path, baseDirSeparatorPos); assertEquals("*/???/schema.xml", wildcardPattern); } @@ -332,7 +332,7 @@ public class FilesetTest createSetFrom("su??old?r/2.properties")); assertFileListEquals( fileset, - new File[] {}); + new File[] {}); } @Test Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/outlet/OutletResultTest.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/outlet/OutletResultTest.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/outlet/OutletResultTest.java (original) +++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/outlet/OutletResultTest.java Mon Aug 27 09:48:33 2018 @@ -40,7 +40,7 @@ public class OutletResultTest private static final String STRING_INITIAL_CONTENT = "String!\r\ncontent"; private static final byte[] BYTE_ARRAY_INITIAL_CONTENT - = new byte[] {34, -56, 126, -127 }; + = new byte[] {34, -56, 126, -127 }; /** System under test. */ private OutletResult stringOutletResult; @@ -126,7 +126,7 @@ public class OutletResultTest + "byte array." + " All concatenated results must be " + "of the same type", - e.getMessage()); + e.getMessage()); } try { @@ -140,7 +140,7 @@ public class OutletResultTest + "String result." + " All concatenated results must be " + "of the same type", - e.getMessage()); + e.getMessage()); } } Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/outlet/java/JavadocOutletTest.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/outlet/java/JavadocOutletTest.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/outlet/java/JavadocOutletTest.java (original) +++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/outlet/java/JavadocOutletTest.java Mon Aug 27 09:48:33 2018 @@ -53,13 +53,13 @@ public class JavadocOutletTest public void testCompleteJavadoc() throws Exception { List<MergepointAction> mergepointActions - = new ArrayList<MergepointAction>(); + = new ArrayList<>(); mergepointActions.add(new OutputAction("Test-body for.a,javadoc")); javadocOutlet.setMergepointMapping( new MergepointMapping( "body", mergepointActions)); - mergepointActions = new ArrayList<MergepointAction>(); + mergepointActions = new ArrayList<>(); mergepointActions.add( new OutputAction("@param param1 description,of param1")); javadocOutlet.setMergepointMapping( @@ -69,16 +69,16 @@ public class JavadocOutletTest OutletResult result = javadocOutlet.execute(new ControllerState()); assertTrue(result.isStringResult()); assertEquals( - " /**\n" - + " * Test-body\n" - + " * for.a,javadoc\n" - + " *\n" - + " * @param param1\n" - + " * description,\n" - + " * of\n" - + " * param1\n" - + " */\n", - result.getStringResult()); + " /**\n" + + " * Test-body\n" + + " * for.a,javadoc\n" + + " *\n" + + " * @param param1\n" + + " * description,\n" + + " * of\n" + + " * param1\n" + + " */\n", + result.getStringResult()); } /** @@ -92,12 +92,12 @@ public class JavadocOutletTest String result = javadocOutlet.wrapLinesAndIndent( "Test-body111-breaking.at1. 111111 not; removed1111,characters"); assertEquals( - " * Test-body111-\n" - + " * breaking.at1.\n" - + " * 111111 not; \n" - + " * removed1111,\n" - + " * characters\n", - result); + " * Test-body111-\n" + + " * breaking.at1.\n" + + " * 111111 not; \n" + + " * removed1111,\n" + + " * characters\n", + result); } /** @@ -111,10 +111,10 @@ public class JavadocOutletTest String result = javadocOutlet.wrapLinesAndIndent( "Test body1111 breaking at1 space"); assertEquals( - " * Test body1111\n" - + " * breaking at1\n" - + " * space\n", - result); + " * Test body1111\n" + + " * breaking at1\n" + + " * space\n", + result); } /** @@ -126,11 +126,11 @@ public class JavadocOutletTest String result = javadocOutlet.wrapLinesAndIndent( "body @since 1 2 3 4 5"); assertEquals( - " * body\n" - + " *\n" - + " * @since 1 2 3\n" - + " * 4 5\n", - result); + " * body\n" + + " *\n" + + " * @since 1 2 3\n" + + " * 4 5\n", + result); } /** @@ -143,10 +143,10 @@ public class JavadocOutletTest String result = javadocOutlet.wrapLinesAndIndent( "@since 1 @see y"); assertEquals( - " * @since 1\n" - + " *\n" - + " * @see y\n", - result); + " * @since 1\n" + + " *\n" + + " * @see y\n", + result); } /** @@ -160,10 +160,10 @@ public class JavadocOutletTest String result = javadocOutlet.wrapLinesAndIndent( "@since 1\n@see y"); assertEquals( - " * @since 1\n" - + " *\n" - + " * @see y\n", - result); + " * @since 1\n" + + " *\n" + + " * @see y\n", + result); } /** @@ -176,12 +176,12 @@ public class JavadocOutletTest String result = javadocOutlet.wrapLinesAndIndent( "body\n@since 11 2 3 4 5 @since x"); assertEquals( - " * body\n" - + " *\n" - + " * @since 11 2 3\n" - + " * 4 5\n" - + " * @since x\n", - result); + " * body\n" + + " *\n" + + " * @since 11 2 3\n" + + " * 4 5\n" + + " * @since x\n", + result); } /** @@ -194,9 +194,9 @@ public class JavadocOutletTest String result = javadocOutlet.wrapLinesAndIndent( "@since x\n@since y"); assertEquals( - " * @since x\n" - + " * @since y\n", - result); + " * @since x\n" + + " * @since y\n", + result); } /** @@ -209,9 +209,9 @@ public class JavadocOutletTest String result = javadocOutlet.wrapLinesAndIndent( "123-456,789;012.345"); assertEquals( - " * 123-456,789;012.\n" - + " * 345\n", - result); + " * 123-456,789;012.\n" + + " * 345\n", + result); } /** @@ -224,9 +224,9 @@ public class JavadocOutletTest String result = javadocOutlet.wrapLinesAndIndent( "123-456,789;012"); assertEquals( - " * 123-456,\n" - + " * 789;012\n", - result); + " * 123-456,\n" + + " * 789;012\n", + result); } /** @@ -239,10 +239,10 @@ public class JavadocOutletTest String result = javadocOutlet.wrapLinesAndIndent( "xxx123-456,789\n012.345"); assertEquals( - " * xxx123-456,\r\n" - + " * 789\r\n" - + " * 012.345\r\n", - result); + " * xxx123-456,\r\n" + + " * 789\r\n" + + " * 012.345\r\n", + result); } /** @@ -257,7 +257,7 @@ public class JavadocOutletTest /** * Tests that removeEnd works for an empty String. */ - @Test + @Test public void testRemoveEndEmptyString() { StringBuilder builder = new StringBuilder(); @@ -265,9 +265,9 @@ public class JavadocOutletTest assertEquals("", builder.toString()); } - /** - * Tests that removeEnd works if everything is removed. - */ + /** + * Tests that removeEnd works if everything is removed. + */ @Test public void testRemoveEndEverythingRemoved() { Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/processor/string/RemoveUnusedImportsProcessorTest.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/processor/string/RemoveUnusedImportsProcessorTest.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/processor/string/RemoveUnusedImportsProcessorTest.java (original) +++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/processor/string/RemoveUnusedImportsProcessorTest.java Mon Aug 27 09:48:33 2018 @@ -34,19 +34,19 @@ public class RemoveUnusedImportsProcesso { /** System under test. */ private final RemoveUnusedImportsProcessor organizeImportsProcessor - = new RemoveUnusedImportsProcessor(); + = new RemoveUnusedImportsProcessor(); @Test public void testProcess() { String result = organizeImportsProcessor.process( "package abc.def\r\n" - + "import a.b.c.Class1 ; \n" - + "import a.b.c.Class2;\r\n" - + "import a.b.c.Class3;\r\n" - + "ClaSS1\r\n" - + "class2\n" - + "Class3"); + + "import a.b.c.Class1 ; \n" + + "import a.b.c.Class2;\r\n" + + "import a.b.c.Class3;\r\n" + + "ClaSS1\r\n" + + "class2\n" + + "Class3"); assertEquals("package abc.def\r\n" + "import a.b.c.Class3;\r\n" + "ClaSS1\r\n" Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/processor/string/UnixLinefeedProcessorTest.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/processor/string/UnixLinefeedProcessorTest.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/processor/string/UnixLinefeedProcessorTest.java (original) +++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/processor/string/UnixLinefeedProcessorTest.java Mon Aug 27 09:48:33 2018 @@ -32,7 +32,7 @@ public class UnixLinefeedProcessorTest { /** System under test. */ private final UnixLinefeedProcessor unixLinefeedProcessor - = new UnixLinefeedProcessor(); + = new UnixLinefeedProcessor(); @Test public void testProcess() Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/qname/NamespaceTest.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/qname/NamespaceTest.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/qname/NamespaceTest.java (original) +++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/qname/NamespaceTest.java Mon Aug 27 09:48:33 2018 @@ -31,7 +31,7 @@ public class NamespaceTest public void testIsVisibleToe() { Namespace namespace - = new Namespace("org.apache.torque"); + = new Namespace("org.apache.torque"); assertTrue(namespace.isVisibleTo(Namespace.ROOT_NAMESPACE)); assertTrue(namespace.isVisibleTo( new Namespace("org"))); @@ -54,7 +54,7 @@ public class NamespaceTest public void testIsVisibleFrom() { Namespace namespace - = new Namespace("org.apache.torque"); + = new Namespace("org.apache.torque"); assertFalse(namespace.isVisibleFrom(Namespace.ROOT_NAMESPACE)); assertFalse(namespace.isVisibleFrom(new Namespace("org.apache"))); assertTrue(namespace.isVisibleFrom(new Namespace("org.apache.torque"))); Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/qname/QualifiedNameMapTest.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/qname/QualifiedNameMapTest.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/qname/QualifiedNameMapTest.java (original) +++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/qname/QualifiedNameMapTest.java Mon Aug 27 09:48:33 2018 @@ -29,28 +29,28 @@ import org.junit.Test; public class QualifiedNameMapTest { private static final QualifiedName qualifiedNameChild - = new QualifiedName("org.apache.torque.generator.name"); + = new QualifiedName("org.apache.torque.generator.name"); private static final QualifiedName qualifiedName - = new QualifiedName("org.apache.torque.name"); + = new QualifiedName("org.apache.torque.name"); private static final QualifiedName qualifiedNameParent - = new QualifiedName("org.apache.name"); + = new QualifiedName("org.apache.name"); private static final QualifiedName qualifiedNameAncestor - = new QualifiedName("org.name"); + = new QualifiedName("org.name"); private static final QualifiedName qualifiedNameDefault - = new QualifiedName("name"); + = new QualifiedName("name"); private static final QualifiedName qualifiedNameUnrelated - = new QualifiedName("org.apa.name"); + = new QualifiedName("org.apa.name"); private static final QualifiedName qualifiedNameOtherName - = new QualifiedName("org.apache.torque.otherName"); + = new QualifiedName("org.apache.torque.otherName"); @Test public void testGetKeyInHierarchyByQualifiedName() { QualifiedNameMap<String> qualifiedNameMap - = new QualifiedNameMap<String>(); + = new QualifiedNameMap<>(); QualifiedName result - = qualifiedNameMap.getKeyInHierarchy(qualifiedName); + = qualifiedNameMap.getKeyInHierarchy(qualifiedName); assertNull(result); qualifiedNameMap.put(qualifiedNameUnrelated, "org.apa"); @@ -86,7 +86,7 @@ public class QualifiedNameMapTest public void testGetInHierarchyByQualifiedName() { QualifiedNameMap<String> qualifiedNameMap - = new QualifiedNameMap<String>(); + = new QualifiedNameMap<>(); String result = qualifiedNameMap.getInHierarchy(qualifiedName); assertNull(result); @@ -128,7 +128,7 @@ public class QualifiedNameMapTest public void testGetInHierarchyByNamespace() { QualifiedNameMap<String> qualifiedNameMap - = new QualifiedNameMap<String>(); + = new QualifiedNameMap<>(); qualifiedNameMap.put(qualifiedNameUnrelated, "org.apa"); qualifiedNameMap.put(qualifiedNameChild, "org.apache.torque.generator"); @@ -140,7 +140,7 @@ public class QualifiedNameMapTest "org.apache.torque.otherName"); QualifiedNameMap<String> expected - = new QualifiedNameMap<String>(); + = new QualifiedNameMap<>(); expected.put(qualifiedName, "org.apache.torque"); expected.put( @@ -148,8 +148,8 @@ public class QualifiedNameMapTest "org.apache.torque.otherName"); QualifiedNameMap<String> result - = qualifiedNameMap.getInHierarchy( - qualifiedName.getNamespace()); + = qualifiedNameMap.getInHierarchy( + qualifiedName.getNamespace()); assertEquals(expected, result); } @@ -158,7 +158,7 @@ public class QualifiedNameMapTest public void testGetAllInHierarchy() { QualifiedNameMap<String> qualifiedNameMap - = new QualifiedNameMap<String>(); + = new QualifiedNameMap<>(); qualifiedNameMap.put(qualifiedNameUnrelated, "org.apa"); qualifiedNameMap.put(qualifiedNameChild, "org.apache.torque.generator"); @@ -170,7 +170,7 @@ public class QualifiedNameMapTest "org.apache.torque.otherName"); QualifiedNameMap<String> expected - = new QualifiedNameMap<String>(); + = new QualifiedNameMap<>(); expected.put(qualifiedNameDefault, "default"); expected.put(qualifiedNameParent, "org.apache"); @@ -180,8 +180,8 @@ public class QualifiedNameMapTest "org.apache.torque.otherName"); QualifiedNameMap<String> result - = qualifiedNameMap.getAllInHierarchy( - qualifiedName.getNamespace()); + = qualifiedNameMap.getAllInHierarchy( + qualifiedName.getNamespace()); assertEquals(expected, result); } Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/qname/QualifiedNameTest.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/qname/QualifiedNameTest.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/qname/QualifiedNameTest.java (original) +++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/qname/QualifiedNameTest.java Mon Aug 27 09:48:33 2018 @@ -36,7 +36,7 @@ public class QualifiedNameTest public void testConstructors() { QualifiedName qualifiedName - = new QualifiedName("org.apache.torque.name"); + = new QualifiedName("org.apache.torque.name"); assertEquals("name", qualifiedName.getName()); assertEquals( new Namespace("org.apache.torque"), @@ -51,7 +51,7 @@ public class QualifiedNameTest assertEquals(Namespace.ROOT_NAMESPACE, qualifiedName.getNamespace()); qualifiedName - = new QualifiedName("name", new Namespace("org.apache.torque")); + = new QualifiedName("name", new Namespace("org.apache.torque")); assertEquals("name", qualifiedName.getName()); assertEquals( new Namespace("org.apache.torque"), @@ -92,14 +92,14 @@ public class QualifiedNameTest @Test public void testNamespaceFromParts() { - List<String> parts = new ArrayList<String>(3); + List<String> parts = new ArrayList<>(3); parts.add("org"); parts.add("apache"); parts.add("torque"); Namespace namespace = new Namespace(parts); assertEquals(namespace, new Namespace("org.apache.torque")); - parts = new ArrayList<String>(); + parts = new ArrayList<>(); namespace = new Namespace(parts); assertEquals(Namespace.ROOT_NAMESPACE, namespace); @@ -119,7 +119,7 @@ public class QualifiedNameTest public void testGetNamespaceParts() { QualifiedName qualifiedName - = new QualifiedName("org.apache.torque.name"); + = new QualifiedName("org.apache.torque.name"); List<String> parts = qualifiedName.getNamespace().getParts(); assertEquals(parts.size(), 3); assertEquals(parts.get(0), "org"); @@ -131,7 +131,7 @@ public class QualifiedNameTest public void testGetParentNamespace() { QualifiedName qualifiedName - = new QualifiedName("org.apache.torque.name"); + = new QualifiedName("org.apache.torque.name"); Namespace parentNamespace = qualifiedName.getParentNamespace(); assertEquals(parentNamespace, new Namespace("org.apache")); @@ -148,7 +148,7 @@ public class QualifiedNameTest public void testEquals() { QualifiedName qualifiedName - = new QualifiedName("org.apache.torque.name"); + = new QualifiedName("org.apache.torque.name"); assertEquals( qualifiedName, new QualifiedName("org.apache.torque.name")); Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/RichSourceElementImplTest.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/RichSourceElementImplTest.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/RichSourceElementImplTest.java (original) +++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/RichSourceElementImplTest.java Mon Aug 27 09:48:33 2018 @@ -122,7 +122,7 @@ public class RichSourceElementImplTest public void testRemoveChildViaIterator() { Iterator<SourceElement> childIt - = rootSourceElement.getChildren().iterator(); + = rootSourceElement.getChildren().iterator(); List<SourceElement> children = rootSourceElement.getChildren(); SourceElement child1 = children.get(0); SourceElement child2 = children.get(1); @@ -208,7 +208,7 @@ public class RichSourceElementImplTest { SourceElement original = new SourceElement("root"); SourceElement toCompare - = new SourceElement("wrongName"); + = new SourceElement("wrongName"); if (original.graphEquals(toCompare)) { fail("SourceElements with different names must not be equal"); @@ -331,9 +331,9 @@ public class RichSourceElementImplTest sourceElement.getChildren().add(new SourceElement("child")); sourceElement.getChildren().add(sourceElement); String expected - = "(name=root,attributes=(attributeName=123)," - + "children=((name=child,attributes=(),children=())," - + "<<loop detected>>))"; + = "(name=root,attributes=(attributeName=123)," + + "children=((name=child,attributes=(),children=())," + + "<<loop detected>>))"; assertEquals(expected, sourceElement.toString()); } @@ -341,19 +341,19 @@ public class RichSourceElementImplTest public void testCopySourceElement() throws Exception { ProjectPaths projectPaths - = new Maven2DirectoryProjectPaths( - new File("src/test/propertyToJava")); + = new Maven2DirectoryProjectPaths( + new File("src/test/propertyToJava")); File propertiesFile - = new File( - projectPaths.getDefaultSourcePath(), - "propertiesData.properties"); + = new File( + projectPaths.getDefaultSourcePath(), + "propertiesData.properties"); FileSource fileSource - = new FileSource( - new PropertiesSourceFormat(), - propertiesFile, - new ControllerState()); + = new FileSource( + new PropertiesSourceFormat(), + propertiesFile, + new ControllerState()); SourceElement rootElement - = (SourceElement) fileSource.getRootElement(); + = fileSource.getRootElement(); SourceElement copiedRootElement = rootElement.copy(); if (!rootElement.graphEquals(copiedRootElement)) Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/SourcePathTest.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/SourcePathTest.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/SourcePathTest.java (original) +++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/SourcePathTest.java Mon Aug 27 09:48:33 2018 @@ -102,8 +102,8 @@ public class SourcePathTest public void testGetElementFromRootWithSlash() { final List<SourceElement> result - = SourcePath.getElementsFromRoot(root, "/"); - final List<SourceElement> expected = new ArrayList<SourceElement>(); + = SourcePath.getElementsFromRoot(root, "/"); + final List<SourceElement> expected = new ArrayList<>(); expected.add(root); assertEquals(expected, result); } @@ -112,8 +112,8 @@ public class SourcePathTest public void testGetElementFromRootSingleRelativeElement() { final List<SourceElement> result - = SourcePath.getElementsFromRoot(root, "root"); - final List<SourceElement> expected = new ArrayList<SourceElement>(); + = SourcePath.getElementsFromRoot(root, "root"); + final List<SourceElement> expected = new ArrayList<>(); expected.add(root); assertEquals(expected, result); } @@ -122,7 +122,7 @@ public class SourcePathTest public void testGetElementFromRootSingleRelativeElementNoMatch() { final List<SourceElement> result - = SourcePath.getElementsFromRoot(root, "root1"); + = SourcePath.getElementsFromRoot(root, "root1"); assertEquals(0, result.size()); } @@ -130,8 +130,8 @@ public class SourcePathTest public void testGetElementFromRootSingleAbsoluteElement() { final List<SourceElement> result - = SourcePath.getElementsFromRoot(root, "/root"); - final List<SourceElement> expected = new ArrayList<SourceElement>(); + = SourcePath.getElementsFromRoot(root, "/root"); + final List<SourceElement> expected = new ArrayList<>(); expected.add(root); assertEquals(expected, result); } @@ -140,7 +140,7 @@ public class SourcePathTest public void testGetElementFromRootSingleAbsoluteElementNoMatch() { final List<SourceElement> result - = SourcePath.getElementsFromRoot(root, "/root1"); + = SourcePath.getElementsFromRoot(root, "/root1"); assertEquals(0, result.size()); } @@ -148,8 +148,8 @@ public class SourcePathTest public void testGetElementFromRootWildcardAtStart() { final List<SourceElement> result - = SourcePath.getElementsFromRoot(root, "/*"); - final List<SourceElement> expected = new ArrayList<SourceElement>(); + = SourcePath.getElementsFromRoot(root, "/*"); + final List<SourceElement> expected = new ArrayList<>(); expected.add(root); assertEquals(expected, result); } @@ -158,24 +158,24 @@ public class SourcePathTest public void testGetElementFromRootWildcardInMiddle() { final List<SourceElement> result - = SourcePath.getElementsFromRoot(root, "/root/*/secondLevel"); - final List<SourceElement> expected = new ArrayList<SourceElement>(); + = SourcePath.getElementsFromRoot(root, "/root/*/secondLevel"); + final List<SourceElement> expected = new ArrayList<>(); expected.add(secondLevel); expected.add(secondLevela); expected.add(secondLevelb); assertEquals(expected, result); } -// does not yet work -// @Test -// public void testGetElementFromRootBacktoRootWithParent() -// { -// List<SourceElement> result -// = SourcePath.getElementsFromRoot(root, "/root/../root"); -// List<SourceElement> expected = new ArrayList<SourceElement>(); -// expected.add(root); -// assertEquals(expected, result); -// } + // does not yet work + // @Test + // public void testGetElementFromRootBacktoRootWithParent() + // { + // List<SourceElement> result + // = SourcePath.getElementsFromRoot(root, "/root/../root"); + // List<SourceElement> expected = new ArrayList<SourceElement>(); + // expected.add(root); + // assertEquals(expected, result); + // } @Test public void testGetElementFromRootParentInMiddle() @@ -183,7 +183,7 @@ public class SourcePathTest final List<SourceElement> result = SourcePath.getElementsFromRoot( root, "/root/firstLevel1/../firstLevel2"); - final List<SourceElement> expected = new ArrayList<SourceElement>(); + final List<SourceElement> expected = new ArrayList<>(); expected.add(firstLevel2); assertEquals(expected, result); } @@ -192,7 +192,7 @@ public class SourcePathTest public void testGetPreceding() { final List<SourceElement> result - = SourcePath.getPreceding(firstLevel2, "firstLevel1"); + = SourcePath.getPreceding(firstLevel2, "firstLevel1"); assertEquals(1, result.size()); assertSame(firstLevel1, result.get(0)); } @@ -201,7 +201,7 @@ public class SourcePathTest public void testGetPrecedingNoMatch() { final List<SourceElement> result - = SourcePath.getPreceding(firstLevel2, "firstLevel2"); + = SourcePath.getPreceding(firstLevel2, "firstLevel2"); assertEquals(0, result.size()); } @Test @@ -209,7 +209,7 @@ public class SourcePathTest public void testGetFollowing() { final List<SourceElement> result - = SourcePath.getFollowing(firstLevel2, "firstLevel3"); + = SourcePath.getFollowing(firstLevel2, "firstLevel3"); assertEquals(1, result.size()); assertSame(firstLevel3, result.get(0)); } @@ -218,7 +218,7 @@ public class SourcePathTest public void testGetFollowingNoMatch() { final List<SourceElement> result - = SourcePath.getFollowing(firstLevel2, "firstLevel2"); + = SourcePath.getFollowing(firstLevel2, "firstLevel2"); assertEquals(0, result.size()); } @@ -402,8 +402,8 @@ public class SourcePathTest assertTrue(resultIt.hasNext()); assertEquals( new SourcePathPointer( - root, - "/root[1]"), + root, + "/root[1]"), resultIt.next()); assertFalse(resultIt.hasNext()); } @@ -418,10 +418,10 @@ public class SourcePathTest "fieldValue"); assertTrue(resultIt.hasNext()); assertEquals( - new SourcePathPointer( - "fieldValue", - "/fieldValue"), - resultIt.next()); + new SourcePathPointer( + "fieldValue", + "/fieldValue"), + resultIt.next()); assertFalse(resultIt.hasNext()); } @@ -436,8 +436,8 @@ public class SourcePathTest assertTrue(resultIt.hasNext()); assertEquals( new SourcePathPointer( - "fieldValue", - "/fieldValue"), + "fieldValue", + "/fieldValue"), resultIt.next()); assertFalse(resultIt.hasNext()); } @@ -453,8 +453,8 @@ public class SourcePathTest assertTrue(resultIt.hasNext()); assertEquals( new SourcePathPointer( - "propertyValue", - "/propertyValue"), + "propertyValue", + "/propertyValue"), resultIt.next()); assertFalse(resultIt.hasNext()); } @@ -470,8 +470,8 @@ public class SourcePathTest assertTrue(resultIt.hasNext()); assertEquals( new SourcePathPointer( - "setterValue", - "/value"), + "setterValue", + "/value"), resultIt.next()); assertFalse(resultIt.hasNext()); } @@ -487,14 +487,14 @@ public class SourcePathTest assertTrue(resultIt.hasNext()); assertEquals( new SourcePathPointer( - "string1", - "/stringList[1]"), + "string1", + "/stringList[1]"), resultIt.next()); assertTrue(resultIt.hasNext()); assertEquals( new SourcePathPointer( - "string2", - "/stringList[2]"), + "string2", + "/stringList[2]"), resultIt.next()); assertFalse(resultIt.hasNext()); } @@ -510,8 +510,8 @@ public class SourcePathTest assertTrue(resultIt.hasNext()); assertEquals( new SourcePathPointer( - modelRoot.childList.get(0), - "/childList[1]"), + modelRoot.childList.get(0), + "/childList[1]"), resultIt.next()); assertFalse(resultIt.hasNext()); } @@ -527,14 +527,14 @@ public class SourcePathTest assertTrue(resultIt.hasNext()); assertEquals( new SourcePathPointer( - "propertyString1", - "/propertyList[1]"), + "propertyString1", + "/propertyList[1]"), resultIt.next()); assertTrue(resultIt.hasNext()); assertEquals( new SourcePathPointer( - "propertyString2", - "/propertyList[2]"), + "propertyString2", + "/propertyList[2]"), resultIt.next()); assertFalse(resultIt.hasNext()); } @@ -550,8 +550,8 @@ public class SourcePathTest assertTrue(resultIt.hasNext()); assertEquals( new SourcePathPointer( - "propertyString2", - "/propertyList[2]"), + "propertyString2", + "/propertyList[2]"), resultIt.next()); assertFalse(resultIt.hasNext()); } @@ -607,11 +607,11 @@ public class SourcePathTest public static class Root { - public List<String> stringList = new ArrayList<String>(); + public List<String> stringList = new ArrayList<>(); - public List<Child> childList = new ArrayList<Child>(); + public List<Child> childList = new ArrayList<>(); - private final List<String> propertyList = new ArrayList<String>(); + private final List<String> propertyList = new ArrayList<>(); public String fieldValue; Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/jdbc/JdbcMetadataSourceTest.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/jdbc/JdbcMetadataSourceTest.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/jdbc/JdbcMetadataSourceTest.java (original) +++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/jdbc/JdbcMetadataSourceTest.java Mon Aug 27 09:48:33 2018 @@ -43,7 +43,7 @@ import org.junit.Test; public class JdbcMetadataSourceTest { private static Logger logger - = Logger.getLogger(JdbcMetadataSourceTest.class); + = Logger.getLogger(JdbcMetadataSourceTest.class); private static String SQL_FILENAME = "jdbcMetadataSourceTest.sql"; @@ -78,20 +78,20 @@ public class JdbcMetadataSourceTest queryBuffer.append(line); } StringTokenizer tokenizer - = new StringTokenizer(queryBuffer.toString(), ";", false); + = new StringTokenizer(queryBuffer.toString(), ";", false); while (tokenizer.hasMoreTokens()) { - String sqlQuery = tokenizer.nextToken(); - Statement statement = connection.createStatement(); - try - { - statement.execute(sqlQuery); - } - catch (SQLException e) - { - logger.info(e.getMessage()); - } - statement.close(); + String sqlQuery = tokenizer.nextToken(); + Statement statement = connection.createStatement(); + try + { + statement.execute(sqlQuery); + } + catch (SQLException e) + { + logger.info(e.getMessage()); + } + statement.close(); } connection.close(); } @@ -100,7 +100,7 @@ public class JdbcMetadataSourceTest public void testExecute() throws Exception { JdbcMetadataSource source - = new JdbcMetadataSource(DRIVER, URL, null, null, null); + = new JdbcMetadataSource(DRIVER, URL, null, null, null); SourceElement rootElement = source.createRootElement(); assertEquals("database", rootElement.getName()); List<SourceElement> tableElements = rootElement.getChildren(); @@ -112,7 +112,7 @@ public class JdbcMetadataSourceTest if ("AUTHOR".equals(tableName)) { List<SourceElement> columnElements - = tableElement.getChildren(); + = tableElement.getChildren(); assertEquals(2, columnElements.size()); for (SourceElement columnElement : columnElements) { @@ -158,7 +158,7 @@ public class JdbcMetadataSourceTest { assertEquals(5, tableElement.getChildren().size()); List<SourceElement> columnElements - = tableElement.getChildren("column"); + = tableElement.getChildren("column"); assertEquals(4, columnElements.size()); for (SourceElement columnElement : columnElements) { @@ -228,7 +228,7 @@ public class JdbcMetadataSourceTest } } List<SourceElement> foreignKeyElements - = tableElement.getChildren("foreign-key"); + = tableElement.getChildren("foreign-key"); assertEquals(1, foreignKeyElements.size()); SourceElement foreignKeyElement = foreignKeyElements.get(0); assertEquals( @@ -240,8 +240,8 @@ public class JdbcMetadataSourceTest fail("Unknown table : " + tableName); } } -// -// String xml = new SourceToXml().toXml(rootElement, false); -// System.out.println(xml); + // + // String xml = new SourceToXml().toXml(rootElement, false); + // System.out.println(xml); } } Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/properties/PropertiesParserTest.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/properties/PropertiesParserTest.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/properties/PropertiesParserTest.java (original) +++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/properties/PropertiesParserTest.java Mon Aug 27 09:48:33 2018 @@ -49,12 +49,12 @@ public class PropertiesParserTest throws ConfigurationException, SourceException { File propertiesFile - = new File("src/test/resources/org/apache/torque/generator/source/properties/propertiesParserTest.properties"); + = new File("src/test/resources/org/apache/torque/generator/source/properties/propertiesParserTest.properties"); FileSource fileSource - = new FileSource( - new PropertiesSourceFormat(), - propertiesFile, - controllerState); + = new FileSource( + new PropertiesSourceFormat(), + propertiesFile, + controllerState); SourceElement rootElement = fileSource.getRootElement(); assertEquals("properties", rootElement.getName()); Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/stream/CombinedFileSourceTest.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/stream/CombinedFileSourceTest.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/stream/CombinedFileSourceTest.java (original) +++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/stream/CombinedFileSourceTest.java Mon Aug 27 09:48:33 2018 @@ -54,7 +54,7 @@ public class CombinedFileSourceTest public void setUp() throws Exception { MockitoAnnotations.initMocks(this); - List<FileSource> fileSources = new ArrayList<FileSource>(); + List<FileSource> fileSources = new ArrayList<>(); fileSources.add(fileSource1); fileSources.add(fileSource2); fileSources.add(fileSource3); Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/stream/FileSourceProviderTest.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/stream/FileSourceProviderTest.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/stream/FileSourceProviderTest.java (original) +++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/stream/FileSourceProviderTest.java Mon Aug 27 09:48:33 2018 @@ -49,7 +49,7 @@ public class FileSourceProviderTest createSetFrom("*.properties"), null); FileSourceProvider fileSourceProvider - = new FileSourceProvider(null, fileset, false); + = new FileSourceProvider(null, fileset, false); fileSourceProvider.init( new ConfigurationHandlers(), new ControllerState()); @@ -57,7 +57,7 @@ public class FileSourceProviderTest // We read all sources and add the first property key to a hash set. // As all the source files only have one key equal to the base filename // we can make sure we have read the expected files correctly. - Set<String> resultKeys = new HashSet<String>(); + Set<String> resultKeys = new HashSet<>(); { assertTrue(fileSourceProvider.hasNext()); Source source = fileSourceProvider.next(); @@ -73,7 +73,7 @@ public class FileSourceProviderTest resultKeys.add((String) key); } assertFalse(fileSourceProvider.hasNext()); - Set<String> expectedKeys = new HashSet<String>(); + Set<String> expectedKeys = new HashSet<>(); expectedKeys.add("1"); expectedKeys.add("11"); assertEquals(expectedKeys, resultKeys); @@ -88,7 +88,7 @@ public class FileSourceProviderTest createSetFrom("*.properties"), null); FileSourceProvider fileSourceProvider - = new FileSourceProvider(null, fileset, true); + = new FileSourceProvider(null, fileset, true); fileSourceProvider.init( new ConfigurationHandlers(), new ControllerState()); @@ -96,7 +96,7 @@ public class FileSourceProviderTest // We read all sources and add the first property key to a hash set. // As all the source files only have one key equal to the base filename // we can make sure we have read the expected files correctly. - Set<String> resultKeys = new HashSet<String>(); + Set<String> resultKeys = new HashSet<>(); assertTrue(fileSourceProvider.hasNext()); Source source = fileSourceProvider.next(); @@ -113,12 +113,12 @@ public class FileSourceProviderTest .getChild("entry") .getAttribute("key"); resultKeys.add((String) key); - Set<String> expectedKeys = new HashSet<String>(); + Set<String> expectedKeys = new HashSet<>(); expectedKeys.add("1"); expectedKeys.add("11"); assertEquals(expectedKeys, resultKeys); - Set<String> resultPaths = new HashSet<String>(); + Set<String> resultPaths = new HashSet<>(); String expectedPath = (String) source.getRootElement() .getChildren("file").get(0).getAttribute("path"); expectedPath = expectedPath.replace('\\', '/'); @@ -127,7 +127,7 @@ public class FileSourceProviderTest .getChildren("file").get(1).getAttribute("path"); expectedPath = expectedPath.replace('\\', '/'); resultPaths.add(expectedPath); - Set<String> expectedPaths = new HashSet<String>(); + Set<String> expectedPaths = new HashSet<>(); expectedPaths.add("src/test/file/./1.properties"); expectedPaths.add("src/test/file/./11.properties"); assertEquals(expectedPaths, resultPaths); @@ -144,7 +144,7 @@ public class FileSourceProviderTest createSetFrom("*.properties"), null); FileSourceProvider fileSourceProvider - = new FileSourceProvider(null, fileset, false); + = new FileSourceProvider(null, fileset, false); fileSourceProvider.init( new ConfigurationHandlers(), new ControllerState()); Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/stream/SourceToXmlTest.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/stream/SourceToXmlTest.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/stream/SourceToXmlTest.java (original) +++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/stream/SourceToXmlTest.java Mon Aug 27 09:48:33 2018 @@ -54,7 +54,7 @@ public class SourceToXmlTest public void testSourceToXml() throws Exception { File xmlFile - = new File("src/test/resources/org/apache/torque/generator/source/xml/source.xml"); + = new File("src/test/resources/org/apache/torque/generator/source/xml/source.xml"); FileSource fileSource = new FileSource( new XmlSourceFormat(), xmlFile, Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/stream/XmlParserTest.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/stream/XmlParserTest.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/stream/XmlParserTest.java (original) +++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/stream/XmlParserTest.java Mon Aug 27 09:48:33 2018 @@ -62,7 +62,7 @@ public class XmlParserTest public void testReadXmlSource() throws Exception { File xmlFile = new File( - "src/test/resources/org/apache/torque/generator/source/xml/source.xml"); + "src/test/resources/org/apache/torque/generator/source/xml/source.xml"); FileSource fileSource = new FileSource( new XmlSourceFormat(), xmlFile, @@ -118,8 +118,8 @@ public class XmlParserTest public void testReadXmlSourceWithSchema() throws Exception { File xmlFile = new File( - "src/test/resources/org/apache/torque/generator/source/xml/" - + "sourceConformingWithSchema.xml"); + "src/test/resources/org/apache/torque/generator/source/xml/" + + "sourceConformingWithSchema.xml"); FileSource fileSource = new FileSource( new XmlSourceFormat(), xmlFile, @@ -132,8 +132,8 @@ public class XmlParserTest public void testReadXmlSourceNotConformWithSchema() throws Exception { File xmlFile = new File( - "src/test/resources/org/apache/torque/generator/source/xml/" - + "sourceNotConformingWithSchema.xml"); + "src/test/resources/org/apache/torque/generator/source/xml/" + + "sourceNotConformingWithSchema.xml"); FileSource fileSource = new FileSource( new XmlSourceFormat(), xmlFile, Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/transform/AttributeTransformerTest.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/transform/AttributeTransformerTest.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/transform/AttributeTransformerTest.java (original) +++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/transform/AttributeTransformerTest.java Mon Aug 27 09:48:33 2018 @@ -44,7 +44,7 @@ public class AttributeTransformerTest public void testParsePlainText() throws SourceTransformerException { List<AttributeTransformer.Definition> result - = emptyTransformer.parse("abcxy", true); + = emptyTransformer.parse("abcxy", true); assertEquals(1, result.size()); assertEquals( AttributeTransformer.Definition.Type.PLAIN, @@ -56,7 +56,7 @@ public class AttributeTransformerTest public void testParseOption() throws SourceTransformerException { List<AttributeTransformer.Definition> result - = emptyTransformer.parse("${option:torque:someOption}", true); + = emptyTransformer.parse("${option:torque:someOption}", true); assertEquals(1, result.size()); assertEquals( AttributeTransformer.Definition.Type.OPTION, @@ -68,9 +68,9 @@ public class AttributeTransformerTest public void testParseAttribute() throws SourceTransformerException { List<AttributeTransformer.Definition> result - = emptyTransformer.parse( - "${attribute:org.apache.torque:someAttribute}", - true); + = emptyTransformer.parse( + "${attribute:org.apache.torque:someAttribute}", + true); assertEquals(1, result.size()); assertEquals( AttributeTransformer.Definition.Type.ATTRIBUTE, @@ -84,9 +84,9 @@ public class AttributeTransformerTest public void testParseOverrideAttribute() throws SourceTransformerException { List<AttributeTransformer.Definition> result - = emptyTransformer.parse( - "${attribute(override):torque:someAttribute}", - false); + = emptyTransformer.parse( + "${attribute(override):torque:someAttribute}", + false); assertEquals(1, result.size()); assertEquals( AttributeTransformer.Definition.Type.ATTRIBUTE_OVERRIDE, @@ -100,9 +100,9 @@ public class AttributeTransformerTest public void testParseNoOverrideAttribute() throws SourceTransformerException { List<AttributeTransformer.Definition> result - = emptyTransformer.parse( - "${attribute(noOverride):torque:someAttribute}", - false); + = emptyTransformer.parse( + "${attribute(noOverride):torque:someAttribute}", + false); assertEquals(1, result.size()); assertEquals( AttributeTransformer.Definition.Type.ATTRIBUTE_NO_OVERRIDE, @@ -116,7 +116,7 @@ public class AttributeTransformerTest public void testParseEscapingInPlain() throws SourceTransformerException { List<AttributeTransformer.Definition> result - = emptyTransformer.parse("\\:\\$\\}\\{\\\\l", true); + = emptyTransformer.parse("\\:\\$\\}\\{\\\\l", true); assertEquals(1, result.size()); assertEquals( AttributeTransformer.Definition.Type.PLAIN, @@ -130,9 +130,9 @@ public class AttributeTransformerTest public void testParseEscapingInDefinition() throws SourceTransformerException { List<AttributeTransformer.Definition> result - = emptyTransformer.parse( - "${attribute:\\:\\$\\}\\{l\\\\}", - true); + = emptyTransformer.parse( + "${attribute:\\:\\$\\}\\{l\\\\}", + true); assertEquals(1, result.size()); assertEquals( AttributeTransformer.Definition.Type.ATTRIBUTE, @@ -146,8 +146,8 @@ public class AttributeTransformerTest public void testParseSeveralDefinitions() throws SourceTransformerException { List<AttributeTransformer.Definition> result - = emptyTransformer.parse( - "${attribute:someAttribute}" + = emptyTransformer.parse( + "${attribute:someAttribute}" + "${option:someOption}" + "plainText" + "${option:someOption1}" Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/transform/BeanPropertyMethodNameTransformerTest.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/transform/BeanPropertyMethodNameTransformerTest.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/transform/BeanPropertyMethodNameTransformerTest.java (original) +++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/transform/BeanPropertyMethodNameTransformerTest.java Mon Aug 27 09:48:33 2018 @@ -50,7 +50,7 @@ public class BeanPropertyMethodNameTrans public void testNoPrefixSuffix() throws SourceTransformerException { SourceElement sourceElement - = new SourceElement("elementName"); + = new SourceElement("elementName"); sourceElement.setAttribute("name", "vaL_ue"); transformer.setTargetAttributeName("targetAttribute"); @@ -62,7 +62,7 @@ public class BeanPropertyMethodNameTrans public void testPrefixSuffix() throws SourceTransformerException { SourceElement sourceElement - = new SourceElement("elementName"); + = new SourceElement("elementName"); sourceElement.setAttribute("sourceAttribute", "someProperty"); transformer.setSourceAttributeName("sourceAttribute"); @@ -79,7 +79,7 @@ public class BeanPropertyMethodNameTrans public void testNoOverwrite() throws SourceTransformerException { SourceElement sourceElement - = new SourceElement("elementName"); + = new SourceElement("elementName"); sourceElement.setAttribute("name", "modified"); sourceElement.setAttribute("targetAttribute", "unmodified"); @@ -95,7 +95,7 @@ public class BeanPropertyMethodNameTrans public void testNoOverwriteEmptyTarget() throws SourceTransformerException { SourceElement sourceElement - = new SourceElement("elementName"); + = new SourceElement("elementName"); sourceElement.setAttribute("name", "source"); transformer.setOverwrite(false); Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/transform/LoadAdditionalSourceTransformerTest.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/transform/LoadAdditionalSourceTransformerTest.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/transform/LoadAdditionalSourceTransformerTest.java (original) +++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/transform/LoadAdditionalSourceTransformerTest.java Mon Aug 27 09:48:33 2018 @@ -41,17 +41,17 @@ import org.junit.Test; public class LoadAdditionalSourceTransformerTest extends BaseTest { private static final String EXPECTED = "<root>\n" - + " <element>\n" - + " <child/>\n" - + " <additional>\n" - + " <element/>\n" - + " </additional>\n" - + " <additional>\n" - + " <element/>\n" - + " </additional>\n" - + " </element>\n" - + " <element/>\n" - + "</root>\n"; + + " <element>\n" + + " <child/>\n" + + " <additional>\n" + + " <element/>\n" + + " </additional>\n" + + " <additional>\n" + + " <element/>\n" + + " </additional>\n" + + " </element>\n" + + " <element/>\n" + + "</root>\n"; @Test public void testLoadAdditionalSourceTransformerGeneration() throws Exception @@ -59,7 +59,7 @@ public class LoadAdditionalSourceTransfo File targetDir = new File("target/test/loadAdditionalSourceTransformer"); FileUtils.deleteDirectory(targetDir); Controller controller = new Controller(); - List<UnitDescriptor> unitDescriptors = new ArrayList<UnitDescriptor>(); + List<UnitDescriptor> unitDescriptors = new ArrayList<>(); CustomProjectPaths projectPaths = new CustomProjectPaths( new Maven2DirectoryProjectPaths( new File("src/test/loadAdditionalSourceTransformer"))); Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/transform/LoadAllSourceFilesTransformerTest.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/transform/LoadAllSourceFilesTransformerTest.java?rev=1839288&r1=1839287&r2=1839288&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/transform/LoadAllSourceFilesTransformerTest.java (original) +++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/transform/LoadAllSourceFilesTransformerTest.java Mon Aug 27 09:48:33 2018 @@ -41,7 +41,7 @@ import org.junit.Test; public class LoadAllSourceFilesTransformerTest extends BaseTest { private static final String TEST_RESOURCES_ROOT - = "src/test/loadAllSourceFilesTransformer"; + = "src/test/loadAllSourceFilesTransformer"; @Test public void testLoadAllSourceFilesTransformerGeneration() throws Exception @@ -49,7 +49,7 @@ public class LoadAllSourceFilesTransform File targetDir = new File("target/test/loadAllSourceFilesTransformer"); FileUtils.deleteDirectory(targetDir); Controller controller = new Controller(); - List<UnitDescriptor> unitDescriptors = new ArrayList<UnitDescriptor>(); + List<UnitDescriptor> unitDescriptors = new ArrayList<>(); CustomProjectPaths projectPaths = new CustomProjectPaths( new Maven2DirectoryProjectPaths( new File(TEST_RESOURCES_ROOT))); --------------------------------------------------------------------- To unsubscribe, e-mail: torque-dev-unsubscr...@db.apache.org For additional commands, e-mail: torque-dev-h...@db.apache.org