Checkstyle: fix ParenPad violations 08/51408/2
authorLorand Jakab <lojakab@cisco.com>
Fri, 3 Feb 2017 15:08:46 +0000 (17:08 +0200)
committerLorand Jakab <lojakab@cisco.com>
Fri, 3 Feb 2017 17:09:59 +0000 (19:09 +0200)
Enforcing no space(s) after a left parenthesis and before a right
parenthesis is a proposed change [0] which can only be merged when all
violations are fixed in projects enforcing checkstyle. This patch fixes
those violations.

[0] https://git.opendaylight.org/gerrit/#/c/51316/

Change-Id: Iae1f085f903579a264b24176d0b4c17416f6b8a0
Signed-off-by: Lorand Jakab <lojakab@cisco.com>
19 files changed:
binding/mdsal-binding-dom-adapter/src/main/java/org/opendaylight/mdsal/binding/dom/adapter/BindingDOMWriteTransactionAdapter.java
binding/mdsal-binding-dom-codec/src/main/java/org/opendaylight/yangtools/binding/data/codec/impl/BindingNormalizedNodeCodecRegistry.java
binding/mdsal-binding-dom-codec/src/test/java/org/opendaylight/yangtools/binding/data/codec/test/ExceptionReportingTest.java
binding/mdsal-binding-dom-codec/src/test/java/org/opendaylight/yangtools/binding/data/codec/test/NormalizedNodeSerializeDeserializeTest.java
binding/mdsal-binding-generator-impl/src/main/java/org/opendaylight/yangtools/sal/binding/generator/util/DefaultSourceCodeGenerator.java
binding/mdsal-binding-generator-impl/src/main/java/org/opendaylight/yangtools/sal/binding/generator/util/NullSourceCodeGenerator.java
binding/mdsal-binding-generator-impl/src/main/java/org/opendaylight/yangtools/sal/binding/generator/util/SourceCodeGenerator.java
binding/mdsal-binding-generator-impl/src/main/java/org/opendaylight/yangtools/sal/binding/generator/util/SourceCodeGeneratorFactory.java
binding/mdsal-binding-generator-impl/src/main/java/org/opendaylight/yangtools/sal/binding/generator/util/YangSchemaUtils.java
binding/mdsal-binding-generator-impl/src/test/java/org/opendaylight/yangtools/sal/binding/yang/types/TypeProviderImplTest.java
common/mdsal-common-api/src/main/java/org/opendaylight/mdsal/common/api/AsyncWriteTransaction.java
dom/mdsal-dom-broker/src/main/java/org/opendaylight/mdsal/dom/broker/TransactionCommitFailedExceptionMapper.java
dom/mdsal-dom-broker/src/main/java/org/opendaylight/mdsal/dom/broker/osgi/OsgiBundleScanningSchemaService.java
dom/mdsal-dom-broker/src/test/java/org/opendaylight/mdsal/dom/broker/DOMBrokerTest.java
dom/mdsal-dom-inmemory-datastore/src/main/java/org/opendaylight/mdsal/dom/store/inmemory/InMemoryDOMDataStoreFactory.java
dom/mdsal-dom-inmemory-datastore/src/test/java/org/opendaylight/controller/md/sal/dom/store/impl/InMemoryDataStoreTest.java
dom/mdsal-dom-inmemory-datastore/src/test/java/org/opendaylight/controller/md/sal/dom/store/impl/TestDCLExecutorService.java
dom/mdsal-dom-inmemory-datastore/src/test/java/org/opendaylight/mdsal/dom/store/inmemory/InmemoryDOMDataTreeShardWriteTransactionTest.java
entityownership/mdsal-eos-binding-adapter/src/test/java/org/opendaylight/mdsal/eos/binding/dom/adapter/BindingDOMEntityOwnershipServiceAdapterTest.java

index e3eed744a5046f6fcd68fb0f2d6e2554582f70c7..c67f210e4e36d2c83308cdff8f250e057a21af36 100644 (file)
@@ -38,7 +38,7 @@ class BindingDOMWriteTransactionAdapter<T extends DOMDataTreeWriteTransaction> e
 
     @Override
     public void delete(final LogicalDatastoreType store, final InstanceIdentifier<?> path) {
-        doDelete( store, path);
+        doDelete(store, path);
     }
 
     @Override
index 334a20415b5bc4c4c53b5b0011fc613a3596d140..f735394236459a668fc0da4ec271b556c8b16a0d 100644 (file)
@@ -159,7 +159,7 @@ public class BindingNormalizedNodeCodecRegistry implements DataObjectSerializerR
         if (data instanceof LeafSetNode) {
             return false;
         }
-        ifdata instanceof LeafSetEntryNode<?>) {
+        if (data instanceof LeafSetEntryNode<?>) {
             return false;
         }
         if (data instanceof MapNode) {
index 2452ca2f910f36cba18ecf65955c82235c646db2..9e2a5beb2f96ffcf45c3bed48226ddf4774b3861 100644 (file)
@@ -81,7 +81,7 @@ public class ExceptionReportingTest {
     }
 
 
-    private static BindingNormalizedNodeCodecRegistry codec(final Class<?>... classes ) {
+    private static BindingNormalizedNodeCodecRegistry codec(final Class<?>... classes) {
         final ModuleInfoBackedContext ctx = ModuleInfoBackedContext.create();
         for(final Class<?> clazz : classes) {
             YangModuleInfo modInfo;
index b7bea005587f15cc768636d7c78ff3e125fd8135..1ec124d838141c08b5838425060c5738eefb9a8d 100644 (file)
@@ -407,7 +407,7 @@ public class NormalizedNodeSerializeDeserializeTest extends AbstractBindingRunti
         assertNotNull(entryContainer.getKey());
 
         final YangInstanceIdentifier.NodeIdentifierWithPredicates nodeIdentifierWithPredicates4798 = new YangInstanceIdentifier
-                .NodeIdentifierWithPredicates( nestedListQname4798, nestedListKeyQname4798, "foo" );
+                .NodeIdentifierWithPredicates(nestedListQname4798, nestedListKeyQname4798, "foo");
         final YangInstanceIdentifier yangInstanceIdentifier4798 = YangInstanceIdentifier.of(containerIdentifierQname4798)
                 .node(choiceIdentifierQname4798)
                 .node(nestedListQname4798)
index a98ccee3021753e9087397e4cd98b1f3d9306404..b1f92106a584c7e1a6b907e330f0dc1ed204ce9f 100644 (file)
@@ -44,12 +44,12 @@ public class DefaultSourceCodeGenerator implements SourceCodeGenerator {
      *     is obtained from a system property (<i>org.opendaylight.yangtools.sal.generatedCodecSourceDir</i>) or
      *     defaults to "generated-codecs".
      */
-    public DefaultSourceCodeGenerator( String generatedSourceDir ) {
-        if( generatedSourceDir != null ) {
+    public DefaultSourceCodeGenerator(String generatedSourceDir) {
+        if(generatedSourceDir != null) {
             this.generatedSourceDir = generatedSourceDir;
         }
         else {
-            this.generatedSourceDir = System.getProperty( GENERATED_SOURCE_DIR_PROP, "generated-codecs" );
+            this.generatedSourceDir = System.getProperty(GENERATED_SOURCE_DIR_PROP, "generated-codecs");
         }
     }
 
index f087d5469b15520d7854fdba3acc9ef01c44c935..34e9d4b1133b8cd19d742e0f8f33a6aa11cf511b 100644 (file)
@@ -20,14 +20,14 @@ import javassist.CtMethod;
 public class NullSourceCodeGenerator implements SourceCodeGenerator {
 
     @Override
-    public void appendField( CtField field, String value ) {
+    public void appendField(CtField field, String value) {
     }
 
     @Override
-    public void appendMethod( CtMethod method, String code ) {
+    public void appendMethod(CtMethod method, String code) {
     }
 
     @Override
-    public void outputGeneratedSource( CtClass ctClass ) {
+    public void outputGeneratedSource(CtClass ctClass) {
     }
 }
index bfbb031e49833407312976edc8a1973a8197c56e..5f7c2718e9c009663edc9fe2859a635653940172 100644 (file)
@@ -24,15 +24,15 @@ public interface SourceCodeGenerator {
     /**
      * Appends the given class field and value to the temporary output.
      */
-    void appendField( CtField field, String value );
+    void appendField(CtField field, String value);
 
     /**
      * Appends the given method and source code body to the temporary output.
      */
-    void appendMethod( CtMethod method, String code );
+    void appendMethod(CtMethod method, String code);
 
     /**
      * Generates the full source code for the given class and outputs it.
      */
-    void outputGeneratedSource( CtClass ctClass );
+    void outputGeneratedSource(CtClass ctClass);
 }
\ No newline at end of file
index 23549c6bd418ff5f2fae826b2f81e68a7de2e99c..0cc2bca82a3185827eb3652806b20e6a8931a0c3 100644 (file)
@@ -29,11 +29,11 @@ public class SourceCodeGeneratorFactory {
      * @param generatedSourceDir the directory in which to put generated source files. If null,
      *     a default is used (see DefaultSourceCodeGenerator).
      */
-    public SourceCodeGenerator getInstance( String generatedSourceDir ) {
+    public SourceCodeGenerator getInstance(String generatedSourceDir) {
 
-        boolean generateSource = Boolean.valueOf( System.getProperty( GENERATE_CODEC_SOURCE_PROP, "false") );
-        if( generateSource ) {
-            return new DefaultSourceCodeGenerator( generatedSourceDir );
+        boolean generateSource = Boolean.valueOf(System.getProperty( GENERATE_CODEC_SOURCE_PROP, "false"));
+        if(generateSource) {
+            return new DefaultSourceCodeGenerator(generatedSourceDir);
         }
 
         return NULL_GENERATOR;
index 5c35454039931e8a45b16e2b77c69f8ab3e76552..bd5886457dccd7aea6f804d5e622094efa54adb2 100644 (file)
@@ -92,8 +92,8 @@ public final class YangSchemaUtils {
                 currentNode = ((ChoiceSchemaNode) child).getCaseNodeByName(caseQName);
             } else {
                 // Search in grouping
-                forfinal GroupingDefinition grouping : currentNode.getGroupings()) {
-                    if(currentArg.equals(grouping.getQName())) {
+                for (final GroupingDefinition grouping : currentNode.getGroupings()) {
+                    if (currentArg.equals(grouping.getQName())) {
                         currentNode = grouping;
                         break;
                     }
index 80a19d830d5f8380ab897272d76d07ce30d9b528..450096d10835be4ec8462b4d2ba5c45a65fdd438 100644 (file)
@@ -193,7 +193,7 @@ public class TypeProviderImplTest {
             assertEquals("\"default value\"", typeProvider.getTypeDefaultConstruction(leafSchemaNode, "default value"));
             fail("Expected NoSuchElementException");
         } catch (Exception e) {
-            assertTrue( e instanceof NoSuchElementException);
+            assertTrue(e instanceof NoSuchElementException);
         }
 
         // identityref type
index c8ef5e4e5c24bbb4177fcd360763fd6a8e30dda8..8754ee33d0281c89f7473efebdfa288d5255b770 100644 (file)
@@ -142,30 +142,30 @@ public interface AsyncWriteTransaction<P extends Path<P>, D> extends AsyncTransa
      * <h3>Example usage:</h3>
      *
      * <pre>
-     *  private void doWrite( final int tries ) {
+     *  private void doWrite(final int tries) {
      *      WriteTransaction writeTx = dataBroker.newWriteOnlyTransaction();
      *      MyDataObject data = ...;
      *      InstanceIdentifier&lt;MyDataObject&gt; path = ...;
-     *      writeTx.put( LogicalDatastoreType.OPERATIONAL, path, data );
-     *      Futures.addCallback( writeTx.submit(), new FutureCallback&lt;Void&gt;() {
-     *          public void onSuccess( Void result ) {
+     *      writeTx.put(LogicalDatastoreType.OPERATIONAL, path, data);
+     *      Futures.addCallback(writeTx.submit(), new FutureCallback&lt;Void&gt;() {
+     *          public void onSuccess(Void result) {
      *              // succeeded
      *          }
-     *          public void onFailure( Throwable t ) {
-     *              if( t instanceof OptimisticLockFailedException ) {
-     *                  if( ( tries - 1 ) &gt; 0 ) {
+     *          public void onFailure(Throwable t) {
+     *              if(t instanceof OptimisticLockFailedException) {
+     *                  if(( tries - 1) &gt; 0 ) {
      *                      // do retry
-     *                      doWrite( tries - 1 );
+     *                      doWrite(tries - 1);
      *                  } else {
      *                      // out of retries
      *                  }
      *              } else {
      *                  // failed due to another type of TransactionCommitFailedException.
      *              }
-     *          } );
+     *          });
      * }
      * ...
-     * doWrite( 2 );
+     * doWrite(2);
      * </pre>
      *
      * <h2>Failure scenarios</h2>
index 4818d8a847d2345475284a38235a78fc9817e888..d807e6be34aa14f54a756a7e47eec8e8da8c19ad 100644 (file)
@@ -25,7 +25,7 @@ public final class TransactionCommitFailedExceptionMapper
     public static final TransactionCommitFailedExceptionMapper COMMIT_ERROR_MAPPER = create("commit");
 
     private TransactionCommitFailedExceptionMapper(final String opName) {
-        super( opName, TransactionCommitFailedException.class );
+        super(opName, TransactionCommitFailedException.class);
     }
 
     public static TransactionCommitFailedExceptionMapper create(final String opName) {
@@ -33,7 +33,7 @@ public final class TransactionCommitFailedExceptionMapper
     }
 
     @Override
-    protected TransactionCommitFailedException newWithCause( final String message, final Throwable cause ) {
-        return new TransactionCommitFailedException( message, cause );
+    protected TransactionCommitFailedException newWithCause(final String message, final Throwable cause) {
+        return new TransactionCommitFailedException(message, cause);
     }
 }
\ No newline at end of file
index 46dfccde7f6e5b9f3e8ba0aa4f71af69fb0b8286..91ed5fb62cf511b95a2ab84d0130cb12e008e9a0 100644 (file)
@@ -218,7 +218,7 @@ public class OsgiBundleScanningSchemaService implements SchemaContextProvider, D
             }
 
             final int numUrls = Iterables.size(urls);
-            if (numUrls > 0 ) {
+            if (numUrls > 0) {
                 if (LOG.isDebugEnabled()) {
                     LOG.debug("removedBundle: {}, state: {}, # urls: {}", bundle.getSymbolicName(),
                             bundle.getState(), numUrls);
index b57f0710d32a8c7df54f56d8d8aa4a8904e960da..53e5643726998ccd1088c1725321ab743c4ee419 100644 (file)
@@ -83,7 +83,7 @@ public class DOMBrokerTest {
 
     @After
     public void tearDown() {
-        if (executor != null ) {
+        if (executor != null) {
             executor.shutdownNow();
         }
 
@@ -136,23 +136,23 @@ public class DOMBrokerTest {
 
     @Test(expected = TransactionCommitFailedException.class)
     public void testRejectedCommit() throws Exception {
-        commitExecutor.delegate = Mockito.mock( ExecutorService.class );
-        Mockito.doThrow( new RejectedExecutionException( "mock" ) )
-            .when( commitExecutor.delegate ).execute( Mockito.any( Runnable.class ) );
-        Mockito.doNothing().when( commitExecutor.delegate ).shutdown();
-        Mockito.doReturn( Collections.emptyList() ).when( commitExecutor.delegate ).shutdownNow();
-        Mockito.doReturn( "" ).when( commitExecutor.delegate ).toString();
-        Mockito.doReturn( true ).when( commitExecutor.delegate )
-            .awaitTermination( Mockito.anyLong(), Mockito.any( TimeUnit.class ) );
+        commitExecutor.delegate = Mockito.mock(ExecutorService.class);
+        Mockito.doThrow(new RejectedExecutionException("mock"))
+            .when(commitExecutor.delegate).execute(Mockito.any(Runnable.class));
+        Mockito.doNothing().when(commitExecutor.delegate).shutdown();
+        Mockito.doReturn(Collections.emptyList()).when(commitExecutor.delegate).shutdownNow();
+        Mockito.doReturn("").when(commitExecutor.delegate).toString();
+        Mockito.doReturn(true).when(commitExecutor.delegate)
+            .awaitTermination(Mockito.anyLong(), Mockito.any(TimeUnit.class));
 
         final DOMDataTreeWriteTransaction writeTx = domBroker.newWriteOnlyTransaction();
-        writeTx.put( OPERATIONAL, TestModel.TEST_PATH, ImmutableNodes.containerNode(TestModel.TEST_QNAME) );
+        writeTx.put(OPERATIONAL, TestModel.TEST_PATH, ImmutableNodes.containerNode(TestModel.TEST_QNAME));
 
-        writeTx.submit().checkedGet( 5, TimeUnit.SECONDS );
+        writeTx.submit().checkedGet(5, TimeUnit.SECONDS);
     }
 
     @SuppressWarnings("checkstyle:IllegalCatch")
-    AtomicReference<Throwable> submitTxAsync( final DOMDataTreeWriteTransaction writeTx ) {
+    AtomicReference<Throwable> submitTxAsync(final DOMDataTreeWriteTransaction writeTx) {
         final AtomicReference<Throwable> caughtEx = new AtomicReference<>();
         new Thread() {
             @Override
@@ -160,8 +160,8 @@ public class DOMBrokerTest {
 
                 try {
                     writeTx.submit();
-                } catch ( final Throwable e ) {
-                    caughtEx.set( e );
+                } catch (final Throwable e) {
+                    caughtEx.set(e);
                 }
             }
 
@@ -234,7 +234,7 @@ public class DOMBrokerTest {
 
         ExecutorService delegate;
 
-        CommitExecutorService( final ExecutorService delegate ) {
+        CommitExecutorService(final ExecutorService delegate) {
             this.delegate = delegate;
         }
 
index 8b278ec93b26ea47ad596852d5bd7bcdd9cdf4bc..d823e29ecd52f300f2bc64f78dcce6c1db75311a 100644 (file)
@@ -69,7 +69,7 @@ public final class InMemoryDOMDataStoreFactory {
         int dclExecutorMaxPoolSize = actualProperties.getMaxDataChangeExecutorPoolSize();
 
         ExecutorService dataChangeListenerExecutor = SpecialExecutors.newBlockingBoundedFastThreadPool(
-                dclExecutorMaxPoolSize, dclExecutorMaxQueueSize, name + "-DCL" );
+                dclExecutorMaxPoolSize, dclExecutorMaxQueueSize, name + "-DCL");
 
         final InMemoryDOMDataStore dataStore = new InMemoryDOMDataStore(name, dataChangeListenerExecutor,
                 actualProperties.getMaxDataChangeListenerQueueSize(), debugTransactions);
index a76fa3fbf0ac45433e901ddee3c5f063aced999b..5d25fba4004a413fb25cd769f5a0df8cc96a2ce8 100644 (file)
@@ -119,71 +119,71 @@ public class InMemoryDataStoreTest {
     public void testDelete() throws Exception {
 
         DOMStoreWriteTransaction writeTx = domStore.newWriteOnlyTransaction();
-        assertNotNull( writeTx );
+        assertNotNull(writeTx);
 
         // Write /test and commit
 
-        writeTx.write( TestModel.TEST_PATH, ImmutableNodes.containerNode( TestModel.TEST_QNAME ) );
+        writeTx.write(TestModel.TEST_PATH, ImmutableNodes.containerNode(TestModel.TEST_QNAME));
 
-        assertThreePhaseCommit( writeTx.ready() );
+        assertThreePhaseCommit(writeTx.ready());
 
         Optional<NormalizedNode<?, ?>> afterCommitRead =
-                domStore.newReadOnlyTransaction().read(TestModel.TEST_PATH ).get();
-        assertEquals( "After commit read: isPresent", true, afterCommitRead.isPresent() );
+                domStore.newReadOnlyTransaction().read(TestModel.TEST_PATH).get();
+        assertEquals("After commit read: isPresent", true, afterCommitRead.isPresent());
 
         // Delete /test and verify
 
         writeTx = domStore.newWriteOnlyTransaction();
 
-        writeTx.delete( TestModel.TEST_PATH );
+        writeTx.delete(TestModel.TEST_PATH);
 
-        assertThreePhaseCommit( writeTx.ready() );
+        assertThreePhaseCommit(writeTx.ready());
 
-        afterCommitRead = domStore.newReadOnlyTransaction().read(TestModel.TEST_PATH ).get();
-        assertEquals( "After commit read: isPresent", false, afterCommitRead.isPresent() );
+        afterCommitRead = domStore.newReadOnlyTransaction().read(TestModel.TEST_PATH).get();
+        assertEquals("After commit read: isPresent", false, afterCommitRead.isPresent());
     }
 
     @Test
     public void testMerge() throws Exception {
 
         DOMStoreWriteTransaction writeTx = domStore.newWriteOnlyTransaction();
-        assertNotNull( writeTx );
+        assertNotNull(writeTx);
 
         ContainerNode containerNode = ImmutableContainerNodeBuilder.create()
-                .withNodeIdentifier( new NodeIdentifier( TestModel.TEST_QNAME ) )
-                .addChild( ImmutableNodes.mapNodeBuilder( TestModel.OUTER_LIST_QNAME )
-                        .addChild( ImmutableNodes.mapEntry( TestModel.OUTER_LIST_QNAME,
-                                                            TestModel.ID_QNAME, 1 ) ).build() ).build();
+                .withNodeIdentifier(new NodeIdentifier(TestModel.TEST_QNAME))
+                .addChild(ImmutableNodes.mapNodeBuilder(TestModel.OUTER_LIST_QNAME)
+                        .addChild(ImmutableNodes.mapEntry(TestModel.OUTER_LIST_QNAME,
+                                                            TestModel.ID_QNAME, 1)).build()).build();
 
-        writeTx.merge( TestModel.TEST_PATH, containerNode );
+        writeTx.merge(TestModel.TEST_PATH, containerNode);
 
-        assertThreePhaseCommit( writeTx.ready() );
+        assertThreePhaseCommit(writeTx.ready());
 
         Optional<NormalizedNode<?, ?>> afterCommitRead =
-                domStore.newReadOnlyTransaction().read(TestModel.TEST_PATH ).get();
-        assertEquals( "After commit read: isPresent", true, afterCommitRead.isPresent() );
-        assertEquals( "After commit read: data", containerNode, afterCommitRead.get() );
+                domStore.newReadOnlyTransaction().read(TestModel.TEST_PATH).get();
+        assertEquals("After commit read: isPresent", true, afterCommitRead.isPresent());
+        assertEquals("After commit read: data", containerNode, afterCommitRead.get());
 
         // Merge a new list entry node
 
         writeTx = domStore.newWriteOnlyTransaction();
-        assertNotNull( writeTx );
+        assertNotNull(writeTx);
 
         containerNode = ImmutableContainerNodeBuilder.create()
-                .withNodeIdentifier( new NodeIdentifier( TestModel.TEST_QNAME ) )
-                .addChild( ImmutableNodes.mapNodeBuilder( TestModel.OUTER_LIST_QNAME )
-                        .addChild( ImmutableNodes.mapEntry( TestModel.OUTER_LIST_QNAME,
-                                                            TestModel.ID_QNAME, 1 ) )
-                        .addChild( ImmutableNodes.mapEntry( TestModel.OUTER_LIST_QNAME,
-                                                            TestModel.ID_QNAME, 2 ) ).build() ).build();
+                .withNodeIdentifier(new NodeIdentifier(TestModel.TEST_QNAME))
+                .addChild(ImmutableNodes.mapNodeBuilder(TestModel.OUTER_LIST_QNAME)
+                        .addChild(ImmutableNodes.mapEntry(TestModel.OUTER_LIST_QNAME,
+                                                            TestModel.ID_QNAME, 1))
+                        .addChild(ImmutableNodes.mapEntry(TestModel.OUTER_LIST_QNAME,
+                                                            TestModel.ID_QNAME, 2)).build()).build();
 
-        writeTx.merge( TestModel.TEST_PATH, containerNode );
+        writeTx.merge(TestModel.TEST_PATH, containerNode);
 
-        assertThreePhaseCommit( writeTx.ready() );
+        assertThreePhaseCommit(writeTx.ready());
 
-        afterCommitRead = domStore.newReadOnlyTransaction().read(TestModel.TEST_PATH ).get();
-        assertEquals( "After commit read: isPresent", true, afterCommitRead.isPresent() );
-        assertEquals( "After commit read: data", containerNode, afterCommitRead.get() );
+        afterCommitRead = domStore.newReadOnlyTransaction().read(TestModel.TEST_PATH).get();
+        assertEquals("After commit read: isPresent", true, afterCommitRead.isPresent());
+        assertEquals("After commit read: data", containerNode, afterCommitRead.get());
     }
 
 
@@ -191,15 +191,15 @@ public class InMemoryDataStoreTest {
     public void testExistsForExistingData() throws Exception {
 
         DOMStoreReadWriteTransaction writeTx = domStore.newReadWriteTransaction();
-        assertNotNull( writeTx );
+        assertNotNull(writeTx);
 
         ContainerNode containerNode = ImmutableContainerNodeBuilder.create()
-            .withNodeIdentifier( new NodeIdentifier( TestModel.TEST_QNAME ) )
-            .addChild( ImmutableNodes.mapNodeBuilder( TestModel.OUTER_LIST_QNAME )
-                .addChild( ImmutableNodes.mapEntry( TestModel.OUTER_LIST_QNAME,
-                    TestModel.ID_QNAME, 1 ) ).build() ).build();
+            .withNodeIdentifier(new NodeIdentifier(TestModel.TEST_QNAME))
+            .addChild(ImmutableNodes.mapNodeBuilder(TestModel.OUTER_LIST_QNAME)
+                .addChild(ImmutableNodes.mapEntry(TestModel.OUTER_LIST_QNAME,
+                    TestModel.ID_QNAME, 1)).build()).build();
 
-        writeTx.merge( TestModel.TEST_PATH, containerNode );
+        writeTx.merge(TestModel.TEST_PATH, containerNode);
 
         CheckedFuture<Boolean, ReadFailedException> exists =
             writeTx.exists(TestModel.TEST_PATH);
@@ -213,7 +213,7 @@ public class InMemoryDataStoreTest {
         ready.commit().get();
 
         DOMStoreReadTransaction readTx = domStore.newReadOnlyTransaction();
-        assertNotNull( readTx );
+        assertNotNull(readTx);
 
         exists =
             readTx.exists(TestModel.TEST_PATH);
@@ -225,7 +225,7 @@ public class InMemoryDataStoreTest {
     public void testExistsForNonExistingData() throws Exception {
 
         DOMStoreReadWriteTransaction writeTx = domStore.newReadWriteTransaction();
-        assertNotNull( writeTx );
+        assertNotNull(writeTx);
 
         CheckedFuture<Boolean, ReadFailedException> exists =
             writeTx.exists(TestModel.TEST_PATH);
@@ -233,7 +233,7 @@ public class InMemoryDataStoreTest {
         assertEquals(false, exists.checkedGet());
 
         DOMStoreReadTransaction readTx = domStore.newReadOnlyTransaction();
-        assertNotNull( readTx );
+        assertNotNull(readTx);
 
         exists =
             readTx.exists(TestModel.TEST_PATH);
@@ -245,7 +245,7 @@ public class InMemoryDataStoreTest {
     public void testExistsThrowsReadFailedException() throws Exception {
 
         DOMStoreReadTransaction readTx = domStore.newReadOnlyTransaction();
-        assertNotNull( readTx );
+        assertNotNull(readTx);
 
         readTx.close();
 
@@ -258,24 +258,24 @@ public class InMemoryDataStoreTest {
     public void testReadWithReadOnlyTransactionClosed() throws Throwable {
 
         DOMStoreReadTransaction readTx = domStore.newReadOnlyTransaction();
-        assertNotNull( readTx );
+        assertNotNull(readTx);
 
         readTx.close();
 
-        doReadAndThrowEx( readTx );
+        doReadAndThrowEx(readTx);
     }
 
     @SuppressWarnings("checkstyle:IllegalThrows")
     @Test(expected = ReadFailedException.class)
     public void testReadWithReadOnlyTransactionFailure() throws Throwable {
 
-        DataTreeSnapshot mockSnapshot = Mockito.mock( DataTreeSnapshot.class );
-        Mockito.doThrow( new RuntimeException( "mock ex" ) ).when( mockSnapshot )
-        .readNode( Mockito.any( YangInstanceIdentifier.class ) );
+        DataTreeSnapshot mockSnapshot = Mockito.mock(DataTreeSnapshot.class);
+        Mockito.doThrow(new RuntimeException("mock ex")).when(mockSnapshot)
+        .readNode(Mockito.any(YangInstanceIdentifier.class));
 
         DOMStoreReadTransaction readTx = SnapshotBackedTransactions.newReadTransaction("1", true, mockSnapshot);
 
-        doReadAndThrowEx( readTx );
+        doReadAndThrowEx(readTx);
     }
 
     @SuppressWarnings("checkstyle:IllegalThrows")
@@ -283,35 +283,35 @@ public class InMemoryDataStoreTest {
     public void testReadWithReadWriteTransactionClosed() throws Throwable {
 
         DOMStoreReadTransaction readTx = domStore.newReadWriteTransaction();
-        assertNotNull( readTx );
+        assertNotNull(readTx);
 
         readTx.close();
 
-        doReadAndThrowEx( readTx );
+        doReadAndThrowEx(readTx);
     }
 
     @SuppressWarnings("checkstyle:IllegalThrows")
     @Test(expected = ReadFailedException.class)
     public void testReadWithReadWriteTransactionFailure() throws Throwable {
 
-        DataTreeSnapshot mockSnapshot = Mockito.mock( DataTreeSnapshot.class );
-        DataTreeModification mockModification = Mockito.mock( DataTreeModification.class );
-        Mockito.doThrow( new RuntimeException( "mock ex" ) ).when( mockModification )
-        .readNode( Mockito.any( YangInstanceIdentifier.class ) );
-        Mockito.doReturn( mockModification ).when( mockSnapshot ).newModification();
+        DataTreeSnapshot mockSnapshot = Mockito.mock(DataTreeSnapshot.class);
+        DataTreeModification mockModification = Mockito.mock(DataTreeModification.class);
+        Mockito.doThrow(new RuntimeException("mock ex")).when(mockModification)
+        .readNode(Mockito.any(YangInstanceIdentifier.class));
+        Mockito.doReturn(mockModification).when(mockSnapshot).newModification();
         @SuppressWarnings("unchecked")
-        TransactionReadyPrototype<String> mockReady = Mockito.mock( TransactionReadyPrototype.class );
+        TransactionReadyPrototype<String> mockReady = Mockito.mock(TransactionReadyPrototype.class);
         DOMStoreReadTransaction readTx = SnapshotBackedTransactions.newReadWriteTransaction(
                 "1", false, mockSnapshot, mockReady);
 
-        doReadAndThrowEx( readTx );
+        doReadAndThrowEx(readTx);
     }
 
     @SuppressWarnings("checkstyle:IllegalThrows")
-    private static void doReadAndThrowEx( final DOMStoreReadTransaction readTx ) throws Throwable {
+    private static void doReadAndThrowEx(final DOMStoreReadTransaction readTx) throws Throwable {
         try {
             readTx.read(TestModel.TEST_PATH).get();
-        } catch ( ExecutionException e ) {
+        } catch (ExecutionException e) {
             throw e.getCause();
         }
     }
@@ -324,7 +324,7 @@ public class InMemoryDataStoreTest {
         writeTx.ready();
 
         // Should throw ex
-        writeTx.write( TestModel.TEST_PATH, ImmutableNodes.containerNode( TestModel.TEST_QNAME ) );
+        writeTx.write(TestModel.TEST_PATH, ImmutableNodes.containerNode(TestModel.TEST_QNAME));
     }
 
     @Test(expected = IllegalStateException.class)
index 966e4550681e1f129e87ae51f999523825d03f4c..6a9afe0cf485d16923963adf54ea3b8a39db8516 100644 (file)
@@ -26,7 +26,7 @@ public class TestDCLExecutorService extends ForwardingExecutorService {
     private final ExecutorService postSetupExecutor;
 
 
-    public TestDCLExecutorService( final ExecutorService postSetupExecutor ) {
+    public TestDCLExecutorService(final ExecutorService postSetupExecutor) {
         this.postSetupExecutor = postSetupExecutor;
     }
 
index 10d0be6ef52025366dad327f18818de1ca5197e8..92e05ccbb6c91938dd209307d6e2a5e22ed9e5e3 100644 (file)
@@ -72,7 +72,7 @@ public class InmemoryDOMDataTreeShardWriteTransactionTest {
         shardDataModification = TestUtils.createModification(SHARD_ROOT_MODIFICATION_CONTEXT,
                 ImmutableMap.of(YANG_INSTANCE_IDENTIFIER, FOREIGN_SHARD_MODIFICATION_CONTEXT));
         final DataTreeModificationCursor dataTreeModificationCursor = mock(DataTreeModificationCursor.class);
-        doReturn(DataTreeModificationCursorAdaptor.of( dataTreeModificationCursor))
+        doReturn(DataTreeModificationCursorAdaptor.of(dataTreeModificationCursor))
                 .when(SHARD_ROOT_MODIFICATION_CONTEXT).cursor();
         doNothing().when(SHARD_ROOT_MODIFICATION_CONTEXT).closeCursor();
         final DataTreeCandidate dataTreeCandidate = mock(DataTreeCandidate.class);
index 61d70b2259ec9611f7e4b8a7e28f82be1b4f2ce7..a22faef569cfaabb8819940ab1aafc235a7088ae 100644 (file)
@@ -106,7 +106,7 @@ public class BindingDOMEntityOwnershipServiceAdapterTest {
 
         final DOMEntityOwnershipChange domOwnershipChange = new DOMEntityOwnershipChange(DOM_ENTITY,
                 EntityOwnershipChangeState.LOCAL_OWNERSHIP_GRANTED, true);
-        domListenerCaptor.getValue().ownershipChanged(domOwnershipChange );
+        domListenerCaptor.getValue().ownershipChanged(domOwnershipChange);
 
         final ArgumentCaptor<EntityOwnershipChange> ownershipChangeCaptor = ArgumentCaptor.forClass(
                 EntityOwnershipChange.class);
@@ -144,6 +144,6 @@ public class BindingDOMEntityOwnershipServiceAdapterTest {
                             mockCodecRegistry));
         final DOMEntityOwnershipChange domOwnershipChange = mock(DOMEntityOwnershipChange.class);
         doThrow(IllegalStateException.class).when(domOwnershipChange).getEntity();
-        domEntityOwnershipListenerAdapter.ownershipChanged(domOwnershipChange );
+        domEntityOwnershipListenerAdapter.ownershipChanged(domOwnershipChange);
     }
 }