diff --git a/org.springframework.aop/.classpath b/org.springframework.aop/.classpath index 512a59cf5f1..af8be6e1b28 100644 --- a/org.springframework.aop/.classpath +++ b/org.springframework.aop/.classpath @@ -7,7 +7,7 @@ - + diff --git a/org.springframework.aop/aop.iml b/org.springframework.aop/aop.iml index 18ccbe26885..c4e766846b7 100644 --- a/org.springframework.aop/aop.iml +++ b/org.springframework.aop/aop.iml @@ -104,11 +104,11 @@ - + - + diff --git a/org.springframework.aop/ivy.xml b/org.springframework.aop/ivy.xml index ad3a779f6ac..adcf4814350 100644 --- a/org.springframework.aop/ivy.xml +++ b/org.springframework.aop/ivy.xml @@ -33,7 +33,7 @@ - + diff --git a/org.springframework.beans/.classpath b/org.springframework.beans/.classpath index d76169022ab..46d24dab238 100644 --- a/org.springframework.beans/.classpath +++ b/org.springframework.beans/.classpath @@ -11,6 +11,6 @@ - + diff --git a/org.springframework.beans/beans.iml b/org.springframework.beans/beans.iml index 362fbff8ed2..88f7c20d751 100644 --- a/org.springframework.beans/beans.iml +++ b/org.springframework.beans/beans.iml @@ -81,11 +81,11 @@ - + - + diff --git a/org.springframework.beans/ivy.xml b/org.springframework.beans/ivy.xml index 35e406b6e78..3205b8568a0 100644 --- a/org.springframework.beans/ivy.xml +++ b/org.springframework.beans/ivy.xml @@ -27,7 +27,7 @@ - + diff --git a/org.springframework.context.support/.classpath b/org.springframework.context.support/.classpath index 203c72781b2..0306cb0eb9e 100644 --- a/org.springframework.context.support/.classpath +++ b/org.springframework.context.support/.classpath @@ -22,7 +22,7 @@ - + diff --git a/org.springframework.context.support/context-support.iml b/org.springframework.context.support/context-support.iml index 89581ee4b1c..5aafbba9de0 100644 --- a/org.springframework.context.support/context-support.iml +++ b/org.springframework.context.support/context-support.iml @@ -151,11 +151,11 @@ - + - + diff --git a/org.springframework.context.support/ivy.xml b/org.springframework.context.support/ivy.xml index 5edcf568906..cb8dfb61f72 100644 --- a/org.springframework.context.support/ivy.xml +++ b/org.springframework.context.support/ivy.xml @@ -47,7 +47,7 @@ - + diff --git a/org.springframework.context/.classpath b/org.springframework.context/.classpath index 2db63a760a9..e334a6e36c7 100644 --- a/org.springframework.context/.classpath +++ b/org.springframework.context/.classpath @@ -29,7 +29,7 @@ - + diff --git a/org.springframework.context/context.iml b/org.springframework.context/context.iml index 2ee940df9a3..16f094b9aea 100644 --- a/org.springframework.context/context.iml +++ b/org.springframework.context/context.iml @@ -176,11 +176,11 @@ - + - + diff --git a/org.springframework.context/ivy.xml b/org.springframework.context/ivy.xml index 793f9938e78..bb4f7b35f49 100644 --- a/org.springframework.context/ivy.xml +++ b/org.springframework.context/ivy.xml @@ -58,7 +58,7 @@ - + diff --git a/org.springframework.core/.classpath b/org.springframework.core/.classpath index fbc9daafaba..6271b5f4e5c 100644 --- a/org.springframework.core/.classpath +++ b/org.springframework.core/.classpath @@ -11,7 +11,7 @@ - + diff --git a/org.springframework.core/core.iml b/org.springframework.core/core.iml index 83229123d02..62343b6a1c7 100644 --- a/org.springframework.core/core.iml +++ b/org.springframework.core/core.iml @@ -91,11 +91,11 @@ - + - + diff --git a/org.springframework.core/ivy.xml b/org.springframework.core/ivy.xml index 3465fd8d15c..a27ee7461e9 100644 --- a/org.springframework.core/ivy.xml +++ b/org.springframework.core/ivy.xml @@ -33,7 +33,7 @@ - + diff --git a/org.springframework.integration-tests/.classpath b/org.springframework.integration-tests/.classpath index 67233bbe81b..50f068b74ba 100644 --- a/org.springframework.integration-tests/.classpath +++ b/org.springframework.integration-tests/.classpath @@ -52,7 +52,7 @@ - + diff --git a/org.springframework.integration-tests/integration-tests.iml b/org.springframework.integration-tests/integration-tests.iml index 1f06973719b..929dba9a2ad 100644 --- a/org.springframework.integration-tests/integration-tests.iml +++ b/org.springframework.integration-tests/integration-tests.iml @@ -35,11 +35,11 @@ - + - + diff --git a/org.springframework.integration-tests/ivy.xml b/org.springframework.integration-tests/ivy.xml index 2fdf9e5e7bd..a0a27a4257c 100644 --- a/org.springframework.integration-tests/ivy.xml +++ b/org.springframework.integration-tests/ivy.xml @@ -65,8 +65,6 @@ - - @@ -93,7 +91,8 @@ - + + diff --git a/org.springframework.jdbc/.classpath b/org.springframework.jdbc/.classpath index 0f2cdefa67f..fd85218782e 100644 --- a/org.springframework.jdbc/.classpath +++ b/org.springframework.jdbc/.classpath @@ -14,7 +14,7 @@ - + diff --git a/org.springframework.jdbc/ivy.xml b/org.springframework.jdbc/ivy.xml index 0b388d0c1b6..f43d5169317 100644 --- a/org.springframework.jdbc/ivy.xml +++ b/org.springframework.jdbc/ivy.xml @@ -35,7 +35,7 @@ - + diff --git a/org.springframework.jdbc/jdbc.iml b/org.springframework.jdbc/jdbc.iml index 38e90218bc1..fffe32d6820 100644 --- a/org.springframework.jdbc/jdbc.iml +++ b/org.springframework.jdbc/jdbc.iml @@ -85,11 +85,11 @@ - + - + diff --git a/org.springframework.jms/.classpath b/org.springframework.jms/.classpath index c2e5e13575a..61ba52f5823 100644 --- a/org.springframework.jms/.classpath +++ b/org.springframework.jms/.classpath @@ -11,7 +11,7 @@ - + diff --git a/org.springframework.jms/ivy.xml b/org.springframework.jms/ivy.xml index f0c6ce14f8d..41846574791 100644 --- a/org.springframework.jms/ivy.xml +++ b/org.springframework.jms/ivy.xml @@ -30,7 +30,7 @@ conf="compile->compile"/> - + diff --git a/org.springframework.jms/jms.iml b/org.springframework.jms/jms.iml index 83e52fde9fd..ca4c097e524 100644 --- a/org.springframework.jms/jms.iml +++ b/org.springframework.jms/jms.iml @@ -96,11 +96,11 @@ - + - + diff --git a/org.springframework.orm/.classpath b/org.springframework.orm/.classpath index f74ef944b78..a6f2aecc332 100644 --- a/org.springframework.orm/.classpath +++ b/org.springframework.orm/.classpath @@ -28,7 +28,7 @@ - + diff --git a/org.springframework.orm/ivy.xml b/org.springframework.orm/ivy.xml index 93e0a9673e8..92c09f01432 100644 --- a/org.springframework.orm/ivy.xml +++ b/org.springframework.orm/ivy.xml @@ -55,7 +55,7 @@ - + diff --git a/org.springframework.orm/orm.iml b/org.springframework.orm/orm.iml index 5d1a290e8bc..60330185f31 100644 --- a/org.springframework.orm/orm.iml +++ b/org.springframework.orm/orm.iml @@ -206,11 +206,11 @@ - + - + diff --git a/org.springframework.oxm/.classpath b/org.springframework.oxm/.classpath index 6fe1af5a166..97942cdf544 100644 --- a/org.springframework.oxm/.classpath +++ b/org.springframework.oxm/.classpath @@ -17,7 +17,7 @@ - + diff --git a/org.springframework.oxm/ivy.xml b/org.springframework.oxm/ivy.xml index 2ea678b4690..16d2cd3bb18 100644 --- a/org.springframework.oxm/ivy.xml +++ b/org.springframework.oxm/ivy.xml @@ -48,7 +48,7 @@ conf="compile->compile"/> - + - + - + diff --git a/org.springframework.transaction/.classpath b/org.springframework.transaction/.classpath index 8e28caf3de7..b519b30f2ca 100644 --- a/org.springframework.transaction/.classpath +++ b/org.springframework.transaction/.classpath @@ -14,7 +14,7 @@ - + diff --git a/org.springframework.transaction/ivy.xml b/org.springframework.transaction/ivy.xml index 5cd249a66e4..46337637866 100644 --- a/org.springframework.transaction/ivy.xml +++ b/org.springframework.transaction/ivy.xml @@ -35,7 +35,7 @@ - + diff --git a/org.springframework.transaction/src/test/java/org/springframework/jca/cci/CciTemplateTests.java b/org.springframework.transaction/src/test/java/org/springframework/jca/cci/CciTemplateTests.java index 4ab98579026..d724b77190c 100644 --- a/org.springframework.transaction/src/test/java/org/springframework/jca/cci/CciTemplateTests.java +++ b/org.springframework.transaction/src/test/java/org/springframework/jca/cci/CciTemplateTests.java @@ -16,8 +16,13 @@ package org.springframework.jca.cci; -import static org.easymock.EasyMock.*; -import static org.junit.Assert.*; +import static org.easymock.EasyMock.createMock; +import static org.easymock.EasyMock.expect; +import static org.easymock.EasyMock.replay; +import static org.easymock.EasyMock.verify; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; import java.sql.SQLException; @@ -58,7 +63,8 @@ public class CciTemplateTests { expect(connectionFactory.getRecordFactory()).andReturn(recordFactory); - expect(recordFactory.createIndexedRecord("name")).andReturn(indexedRecord); + expect(recordFactory.createIndexedRecord("name")).andReturn( + indexedRecord); replay(connectionFactory, recordFactory); @@ -76,7 +82,8 @@ public class CciTemplateTests { expect(connectionFactory.getRecordFactory()).andReturn(recordFactory); - expect(recordFactory.createMappedRecord("name")).andReturn(mappedRecord); + expect(recordFactory.createMappedRecord("name")) + .andReturn(mappedRecord); replay(connectionFactory, recordFactory); @@ -101,7 +108,8 @@ public class CciTemplateTests { expect(connection.createInteraction()).andReturn(interaction); - expect(interaction.execute(interactionSpec, inputRecord, outputRecord)).andReturn(true); + expect(interaction.execute(interactionSpec, inputRecord, outputRecord)) + .andReturn(true); interaction.close(); @@ -116,7 +124,8 @@ public class CciTemplateTests { } @Test - public void testTemplateExecuteWithCreatorAndRecordFactoryNotSupported() throws ResourceException { + public void testTemplateExecuteWithCreatorAndRecordFactoryNotSupported() + throws ResourceException { ConnectionFactory connectionFactory = createMock(ConnectionFactory.class); Connection connection = createMock(Connection.class); Interaction interaction = createMock(Interaction.class); @@ -128,11 +137,13 @@ public class CciTemplateTests { expect(connectionFactory.getConnection()).andReturn(connection); - expect(connectionFactory.getRecordFactory()).andThrow(new NotSupportedException("not supported")); + expect(connectionFactory.getRecordFactory()).andThrow( + new NotSupportedException("not supported")); expect(connection.createInteraction()).andReturn(interaction); - expect(interaction.execute(interactionSpec, inputRecord, outputRecord)).andReturn(true); + expect(interaction.execute(interactionSpec, inputRecord, outputRecord)) + .andReturn(true); interaction.close(); @@ -151,9 +162,10 @@ public class CciTemplateTests { verify(connectionFactory, connection, interaction); } - + @Test - public void testTemplateExecuteInputTrueWithCreator2() throws ResourceException { + public void testTemplateExecuteInputTrueWithCreator2() + throws ResourceException { ConnectionFactory connectionFactory = createMock(ConnectionFactory.class); RecordFactory recordFactory = createMock(RecordFactory.class); Connection connection = createMock(Connection.class); @@ -173,7 +185,8 @@ public class CciTemplateTests { expect(creator.createRecord(recordFactory)).andReturn(outputRecord); - expect(interaction.execute(interactionSpec, inputRecord, outputRecord)).andReturn(true); + expect(interaction.execute(interactionSpec, inputRecord, outputRecord)) + .andReturn(true); interaction.close(); @@ -203,7 +216,8 @@ public class CciTemplateTests { expect(connection.createInteraction()).andReturn(interaction); - expect(interaction.execute(interactionSpec, inputRecord)).andReturn(outputRecord); + expect(interaction.execute(interactionSpec, inputRecord)).andReturn( + outputRecord); interaction.close(); @@ -217,13 +231,15 @@ public class CciTemplateTests { verify(connectionFactory, connection, interaction); } + @SuppressWarnings("unchecked") @Test - public void testTemplateExecuteInputExtractorTrueWithCreator() throws ResourceException, SQLException { + public void testTemplateExecuteInputExtractorTrueWithCreator() + throws ResourceException, SQLException { ConnectionFactory connectionFactory = createMock(ConnectionFactory.class); RecordFactory recordFactory = createMock(RecordFactory.class); Connection connection = createMock(Connection.class); Interaction interaction = createMock(Interaction.class); - RecordExtractor extractor = createMock(RecordExtractor.class); + RecordExtractor extractor = createMock(RecordExtractor.class); RecordCreator creator = createMock(RecordCreator.class); Record inputRecord = createMock(Record.class); @@ -239,7 +255,8 @@ public class CciTemplateTests { expect(creator.createRecord(recordFactory)).andReturn(outputRecord); - expect(interaction.execute(interactionSpec, inputRecord, outputRecord)).andReturn(true); + expect(interaction.execute(interactionSpec, inputRecord, outputRecord)) + .andReturn(true); expect(extractor.extractData(outputRecord)).andStubReturn(new Object()); @@ -256,12 +273,14 @@ public class CciTemplateTests { verify(connectionFactory, connection, interaction, extractor, creator); } + @SuppressWarnings("unchecked") @Test - public void testTemplateExecuteInputExtractorFalse() throws ResourceException, SQLException { + public void testTemplateExecuteInputExtractorFalse() + throws ResourceException, SQLException { ConnectionFactory connectionFactory = createMock(ConnectionFactory.class); Connection connection = createMock(Connection.class); Interaction interaction = createMock(Interaction.class); - RecordExtractor extractor = createMock(RecordExtractor.class); + RecordExtractor extractor = createMock(RecordExtractor.class); Record inputRecord = createMock(Record.class); Record outputRecord = createMock(Record.class); @@ -272,7 +291,8 @@ public class CciTemplateTests { expect(connection.createInteraction()).andReturn(interaction); - expect(interaction.execute(interactionSpec, inputRecord)).andReturn(outputRecord); + expect(interaction.execute(interactionSpec, inputRecord)).andReturn( + outputRecord); expect(extractor.extractData(outputRecord)).andStubReturn(new Object()); @@ -289,7 +309,8 @@ public class CciTemplateTests { } @Test - public void testTemplateExecuteInputGeneratorTrueWithCreator() throws ResourceException { + public void testTemplateExecuteInputGeneratorTrueWithCreator() + throws ResourceException { ConnectionFactory connectionFactory = createMock(ConnectionFactory.class); RecordFactory recordFactory = createMock(RecordFactory.class); Connection connection = createMock(Connection.class); @@ -314,7 +335,8 @@ public class CciTemplateTests { expect(connectionFactory.getRecordFactory()).andReturn(recordFactory); - expect(interaction.execute(interactionSpec, inputRecord, outputRecord)).andReturn(true); + expect(interaction.execute(interactionSpec, inputRecord, outputRecord)) + .andReturn(true); interaction.close(); @@ -328,9 +350,10 @@ public class CciTemplateTests { verify(connectionFactory, connection, interaction, generator, creator); } - + @Test - public void testTemplateExecuteInputGeneratorFalse() throws ResourceException { + public void testTemplateExecuteInputGeneratorFalse() + throws ResourceException { ConnectionFactory connectionFactory = createMock(ConnectionFactory.class); RecordFactory recordFactory = createMock(RecordFactory.class); Connection connection = createMock(Connection.class); @@ -343,14 +366,15 @@ public class CciTemplateTests { InteractionSpec interactionSpec = createMock(InteractionSpec.class); expect(connectionFactory.getRecordFactory()).andReturn(recordFactory); - + expect(connectionFactory.getConnection()).andReturn(connection); expect(connection.createInteraction()).andReturn(interaction); expect(generator.createRecord(recordFactory)).andReturn(inputRecord); - expect(interaction.execute(interactionSpec, inputRecord)).andReturn(outputRecord); + expect(interaction.execute(interactionSpec, inputRecord)).andReturn( + outputRecord); interaction.close(); @@ -364,21 +388,23 @@ public class CciTemplateTests { verify(connectionFactory, connection, interaction, generator); } + @SuppressWarnings("unchecked") @Test - public void testTemplateExecuteInputGeneratorExtractorTrueWithCreator() throws ResourceException, SQLException { + public void testTemplateExecuteInputGeneratorExtractorTrueWithCreator() + throws ResourceException, SQLException { ConnectionFactory connectionFactory = createMock(ConnectionFactory.class); RecordFactory recordFactory = createMock(RecordFactory.class); Connection connection = createMock(Connection.class); Interaction interaction = createMock(Interaction.class); RecordCreator generator = createMock(RecordCreator.class); - RecordExtractor extractor = createMock(RecordExtractor.class); + RecordExtractor extractor = createMock(RecordExtractor.class); RecordCreator creator = createMock(RecordCreator.class); Record inputRecord = createMock(Record.class); Record outputRecord = createMock(Record.class); - + Object obj = new Object(); - + InteractionSpec interactionSpec = createMock(InteractionSpec.class); expect(connectionFactory.getRecordFactory()).andReturn(recordFactory); @@ -393,7 +419,8 @@ public class CciTemplateTests { expect(generator.createRecord(recordFactory)).andReturn(inputRecord); - expect(interaction.execute(interactionSpec, inputRecord, outputRecord)).andReturn(true); + expect(interaction.execute(interactionSpec, inputRecord, outputRecord)) + .andReturn(true); expect(extractor.extractData(outputRecord)).andStubReturn(obj); @@ -401,27 +428,31 @@ public class CciTemplateTests { connection.close(); - replay(connectionFactory, connection, interaction, generator, creator, extractor); + replay(connectionFactory, connection, interaction, generator, creator, + extractor); CciTemplate ct = new CciTemplate(connectionFactory); ct.setOutputRecordCreator(creator); assertEquals(obj, ct.execute(interactionSpec, generator, extractor)); - verify(connectionFactory, connection, interaction, generator, creator, extractor); + verify(connectionFactory, connection, interaction, generator, creator, + extractor); } + @SuppressWarnings("unchecked") @Test - public void testTemplateExecuteInputGeneratorExtractorFalse() throws ResourceException, SQLException { + public void testTemplateExecuteInputGeneratorExtractorFalse() + throws ResourceException, SQLException { ConnectionFactory connectionFactory = createMock(ConnectionFactory.class); RecordFactory recordFactory = createMock(RecordFactory.class); Connection connection = createMock(Connection.class); Interaction interaction = createMock(Interaction.class); RecordCreator generator = createMock(RecordCreator.class); - RecordExtractor extractor = createMock(RecordExtractor.class); + RecordExtractor extractor = createMock(RecordExtractor.class); Record inputRecord = createMock(Record.class); Record outputRecord = createMock(Record.class); - + InteractionSpec interactionSpec = createMock(InteractionSpec.class); expect(connectionFactory.getRecordFactory()).andReturn(recordFactory); @@ -432,7 +463,8 @@ public class CciTemplateTests { expect(generator.createRecord(recordFactory)).andReturn(inputRecord); - expect(interaction.execute(interactionSpec, inputRecord)).andReturn(outputRecord); + expect(interaction.execute(interactionSpec, inputRecord)).andReturn( + outputRecord); expect(extractor.extractData(outputRecord)).andStubReturn(new Object()); @@ -449,7 +481,8 @@ public class CciTemplateTests { } @Test - public void testTemplateExecuteInputOutputConnectionSpec() throws ResourceException { + public void testTemplateExecuteInputOutputConnectionSpec() + throws ResourceException { ConnectionFactory connectionFactory = createMock(ConnectionFactory.class); ConnectionSpec connectionSpec = createMock(ConnectionSpec.class); Connection connection = createMock(Connection.class); @@ -457,15 +490,16 @@ public class CciTemplateTests { Record inputRecord = createMock(Record.class); Record outputRecord = createMock(Record.class); - + InteractionSpec interactionSpec = createMock(InteractionSpec.class); - - expect(connectionFactory.getConnection(connectionSpec)).andReturn(connection); + expect(connectionFactory.getConnection(connectionSpec)).andReturn( + connection); expect(connection.createInteraction()).andReturn(interaction); - expect(interaction.execute(interactionSpec, inputRecord, outputRecord)).andReturn(true); + expect(interaction.execute(interactionSpec, inputRecord, outputRecord)) + .andReturn(true); interaction.close(); @@ -482,8 +516,10 @@ public class CciTemplateTests { verify(connectionFactory, connection, interaction); } + @SuppressWarnings("unchecked") @Test - public void testTemplateExecuteInputOutputResultsSetFalse() throws ResourceException, SQLException { + public void testTemplateExecuteInputOutputResultsSetFalse() + throws ResourceException, SQLException { ConnectionFactory connectionFactory = createMock(ConnectionFactory.class); RecordFactory recordFactory = createMock(RecordFactory.class); Connection connection = createMock(Connection.class); @@ -491,7 +527,7 @@ public class CciTemplateTests { Record record = createMock(Record.class); ResultSet resultset = createMock(ResultSet.class); RecordCreator generator = createMock(RecordCreator.class); - RecordExtractor extractor = createMock(RecordExtractor.class); + RecordExtractor extractor = createMock(RecordExtractor.class); InteractionSpec interactionSpec = createMock(InteractionSpec.class); @@ -503,7 +539,8 @@ public class CciTemplateTests { expect(generator.createRecord(recordFactory)).andReturn(record); - expect(interaction.execute(interactionSpec, record)).andReturn(resultset); + expect(interaction.execute(interactionSpec, record)).andReturn( + resultset); expect(extractor.extractData(resultset)).andStubReturn(new Object()); @@ -513,23 +550,28 @@ public class CciTemplateTests { connection.close(); - replay(connectionFactory, connection, interaction, generator, extractor, resultset); + replay(connectionFactory, connection, interaction, generator, + extractor, resultset); CciTemplate ct = new CciTemplate(connectionFactory); ct.execute(interactionSpec, generator, extractor); - verify(connectionFactory, connection, interaction, generator, extractor, resultset); + verify(connectionFactory, connection, interaction, generator, + extractor, resultset); } + @SuppressWarnings("unchecked") @Test - public void testTemplateExecuteConnectionCallback() throws ResourceException, SQLException { + public void testTemplateExecuteConnectionCallback() + throws ResourceException, SQLException { ConnectionFactory connectionFactory = createMock(ConnectionFactory.class); Connection connection = createMock(Connection.class); - ConnectionCallback connectionCallback = createMock(ConnectionCallback.class); + ConnectionCallback connectionCallback = createMock(ConnectionCallback.class); expect(connectionFactory.getConnection()).andReturn(connection); - expect(connectionCallback.doInConnection(connection, connectionFactory)).andStubReturn(new Object()); + expect(connectionCallback.doInConnection(connection, connectionFactory)) + .andStubReturn(new Object()); connection.close(); @@ -541,18 +583,22 @@ public class CciTemplateTests { verify(connectionFactory, connection, connectionCallback); } + @SuppressWarnings("unchecked") @Test - public void testTemplateExecuteInteractionCallback() throws ResourceException, SQLException { + public void testTemplateExecuteInteractionCallback() + throws ResourceException, SQLException { ConnectionFactory connectionFactory = createMock(ConnectionFactory.class); Connection connection = createMock(Connection.class); Interaction interaction = createMock(Interaction.class); - InteractionCallback interactionCallback = createMock(InteractionCallback.class); + InteractionCallback interactionCallback = createMock(InteractionCallback.class); expect(connectionFactory.getConnection()).andReturn(connection); expect(connection.createInteraction()).andReturn(interaction); - expect(interactionCallback.doInInteraction(interaction, connectionFactory)).andStubReturn(new Object()); + expect( + interactionCallback.doInInteraction(interaction, + connectionFactory)).andStubReturn(new Object()); interaction.close(); @@ -567,7 +613,8 @@ public class CciTemplateTests { } @Test - public void testTemplateExecuteInputTrueTrueWithCreator() throws ResourceException { + public void testTemplateExecuteInputTrueTrueWithCreator() + throws ResourceException { ConnectionFactory connectionFactory = createMock(ConnectionFactory.class); Connection connection = createMock(Connection.class); Interaction interaction = createMock(Interaction.class); @@ -581,7 +628,9 @@ public class CciTemplateTests { expect(connection.createInteraction()).andReturn(interaction); - expect(interaction.execute(interactionSpec, inputOutputRecord, inputOutputRecord)).andReturn(true); + expect( + interaction.execute(interactionSpec, inputOutputRecord, + inputOutputRecord)).andReturn(true); interaction.close(); @@ -610,10 +659,12 @@ public class CciTemplateTests { expect(connection.createInteraction()).andReturn(interaction); - expect(interaction.execute(interactionSpec, inputOutputRecord, inputOutputRecord)).andReturn(true); + expect( + interaction.execute(interactionSpec, inputOutputRecord, + inputOutputRecord)).andReturn(true); interaction.close(); - + connection.close(); replay(connectionFactory, connection, interaction); @@ -638,7 +689,8 @@ public class CciTemplateTests { expect(connection.createInteraction()).andReturn(interaction); - expect(interaction.execute(interactionSpec, inputOutputRecord)).andReturn(null); + expect(interaction.execute(interactionSpec, inputOutputRecord)) + .andReturn(null); interaction.close(); @@ -647,7 +699,8 @@ public class CciTemplateTests { replay(connectionFactory, connection, interaction); CciTemplate ct = new CciTemplate(connectionFactory); - Record tmpOutputRecord = (Record) ct.execute(interactionSpec, inputOutputRecord); + Record tmpOutputRecord = (Record) ct.execute(interactionSpec, + inputOutputRecord); assertNull(tmpOutputRecord); verify(connectionFactory, connection, interaction); diff --git a/org.springframework.transaction/src/test/java/org/springframework/transaction/support/JtaTransactionManagerSerializationTests.java b/org.springframework.transaction/src/test/java/org/springframework/transaction/support/JtaTransactionManagerSerializationTests.java index 19513be7ee8..cce8a857647 100644 --- a/org.springframework.transaction/src/test/java/org/springframework/transaction/support/JtaTransactionManagerSerializationTests.java +++ b/org.springframework.transaction/src/test/java/org/springframework/transaction/support/JtaTransactionManagerSerializationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2005 the original author or authors. + * Copyright 2002-2009 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,11 +16,12 @@ package org.springframework.transaction.support; +import static org.easymock.EasyMock.createMock; + import javax.transaction.TransactionManager; import javax.transaction.UserTransaction; import junit.framework.TestCase; -import org.easymock.MockControl; import org.springframework.mock.jndi.SimpleNamingContextBuilder; import org.springframework.transaction.jta.JtaTransactionManager; @@ -32,28 +33,29 @@ import org.springframework.util.SerializationTestUtils; public class JtaTransactionManagerSerializationTests extends TestCase { public void testSerializable() throws Exception { - MockControl utMock = MockControl.createControl(UserTransaction.class); - UserTransaction ut = (UserTransaction) utMock.getMock(); - MockControl ut2Mock = MockControl.createControl(UserTransaction.class); - UserTransaction ut2 = (UserTransaction) ut2Mock.getMock(); - MockControl tmMock = MockControl.createControl(TransactionManager.class); - TransactionManager tm = (TransactionManager) tmMock.getMock(); + UserTransaction ut1 = createMock(UserTransaction.class); + UserTransaction ut2 = createMock(UserTransaction.class); + TransactionManager tm = createMock(TransactionManager.class); JtaTransactionManager jtam = new JtaTransactionManager(); - jtam.setUserTransaction(ut); + jtam.setUserTransaction(ut1); jtam.setTransactionManager(tm); jtam.setRollbackOnCommitFailure(true); jtam.afterPropertiesSet(); - SimpleNamingContextBuilder jndiEnv = SimpleNamingContextBuilder.emptyActivatedContextBuilder(); + SimpleNamingContextBuilder jndiEnv = SimpleNamingContextBuilder + .emptyActivatedContextBuilder(); jndiEnv.bind(JtaTransactionManager.DEFAULT_USER_TRANSACTION_NAME, ut2); - JtaTransactionManager serializedJtatm = - (JtaTransactionManager) SerializationTestUtils.serializeAndDeserialize(jtam); - + JtaTransactionManager serializedJtatm = (JtaTransactionManager) SerializationTestUtils + .serializeAndDeserialize(jtam); + // should do client-side lookup - assertNotNull("Logger must survive serialization", serializedJtatm.logger); - assertTrue("UserTransaction looked up on client", serializedJtatm.getUserTransaction() == ut2); - assertNull("TransactionManager didn't survive", serializedJtatm.getTransactionManager()); + assertNotNull("Logger must survive serialization", + serializedJtatm.logger); + assertTrue("UserTransaction looked up on client", serializedJtatm + .getUserTransaction() == ut2); + assertNull("TransactionManager didn't survive", serializedJtatm + .getTransactionManager()); assertEquals(true, serializedJtatm.isRollbackOnCommitFailure()); } diff --git a/org.springframework.transaction/transaction.iml b/org.springframework.transaction/transaction.iml index 4ebec68b6a3..bcc285d4e96 100644 --- a/org.springframework.transaction/transaction.iml +++ b/org.springframework.transaction/transaction.iml @@ -126,11 +126,11 @@ - + - + diff --git a/org.springframework.web.portlet/.classpath b/org.springframework.web.portlet/.classpath index ab7d3f72609..04db23494e7 100644 --- a/org.springframework.web.portlet/.classpath +++ b/org.springframework.web.portlet/.classpath @@ -15,7 +15,7 @@ - + diff --git a/org.springframework.web.portlet/ivy.xml b/org.springframework.web.portlet/ivy.xml index c50c2653ca0..86f1a14ba20 100644 --- a/org.springframework.web.portlet/ivy.xml +++ b/org.springframework.web.portlet/ivy.xml @@ -33,7 +33,7 @@ - + diff --git a/org.springframework.web.portlet/web-portlet.iml b/org.springframework.web.portlet/web-portlet.iml index c32a583e48b..063f5ea8f57 100644 --- a/org.springframework.web.portlet/web-portlet.iml +++ b/org.springframework.web.portlet/web-portlet.iml @@ -74,11 +74,11 @@ - + - + diff --git a/org.springframework.web.servlet/.classpath b/org.springframework.web.servlet/.classpath index b5b922f4503..8c1a83c51b1 100644 --- a/org.springframework.web.servlet/.classpath +++ b/org.springframework.web.servlet/.classpath @@ -37,7 +37,7 @@ - + diff --git a/org.springframework.web.servlet/ivy.xml b/org.springframework.web.servlet/ivy.xml index 8fba6e90ab8..988198590f5 100644 --- a/org.springframework.web.servlet/ivy.xml +++ b/org.springframework.web.servlet/ivy.xml @@ -78,7 +78,7 @@ conf="compile->compile"/> - + - + - + diff --git a/org.springframework.web/.classpath b/org.springframework.web/.classpath index 073a9a14ea1..457dac5485f 100644 --- a/org.springframework.web/.classpath +++ b/org.springframework.web/.classpath @@ -27,7 +27,7 @@ - + diff --git a/org.springframework.web/ivy.xml b/org.springframework.web/ivy.xml index 5815f38280a..f629e875db8 100644 --- a/org.springframework.web/ivy.xml +++ b/org.springframework.web/ivy.xml @@ -70,7 +70,7 @@ conf="test->runtime"/> - + - + - +