Scripted update of if statements 93/39793/2
authorRobert Varga <rovarga@cisco.com>
Thu, 2 Jun 2016 17:41:30 +0000 (19:41 +0200)
committerRobert Varga <nite@hq.sk>
Fri, 3 Jun 2016 08:35:00 +0000 (08:35 +0000)
These trigger checkstyle warnings, hence turn both 'if( ' and 'if('
into proper 'if ('. Same for for and while.

Change-Id: I78714d3370806cccc3f42ae9a15d4d14ba1361c3
Signed-off-by: Robert Varga <rovarga@cisco.com>
74 files changed:
common/util/src/main/java/org/opendaylight/yangtools/util/ExecutorServiceUtil.java
common/util/src/main/java/org/opendaylight/yangtools/util/concurrent/CachedThreadPoolExecutor.java
common/util/src/main/java/org/opendaylight/yangtools/util/concurrent/QueuedNotificationManager.java
common/util/src/main/java/org/opendaylight/yangtools/util/concurrent/TrackingLinkedBlockingQueue.java
common/util/src/test/java/org/opendaylight/yangtools/util/concurrent/AsyncNotifyingListeningExecutorServiceTest.java
common/util/src/test/java/org/opendaylight/yangtools/util/concurrent/CommonTestUtils.java
common/util/src/test/java/org/opendaylight/yangtools/util/concurrent/CountingRejectedExecutionHandlerTest.java
common/util/src/test/java/org/opendaylight/yangtools/util/concurrent/DeadlockDetectingListeningExecutorServiceTest.java
common/util/src/test/java/org/opendaylight/yangtools/util/concurrent/MappingCheckedFutureTest.java
common/util/src/test/java/org/opendaylight/yangtools/util/concurrent/QueuedNotificationManagerTest.java
common/util/src/test/java/org/opendaylight/yangtools/util/concurrent/ThreadPoolExecutorTest.java
yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/stream/NormalizedNodeWriter.java
yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/tree/StoreTreeNodes.java
yang/yang-data-codec-gson/src/main/java/org/opendaylight/yangtools/yang/data/codec/gson/JSONNormalizedNodeStreamWriter.java
yang/yang-data-codec-gson/src/main/java/org/opendaylight/yangtools/yang/data/codec/gson/JsonParserStream.java
yang/yang-data-codec-gson/src/test/java/org/opendaylight/yangtools/yang/data/codec/gson/TestUtils.java
yang/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/codec/SchemaTracker.java
yang/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/codec/xml/XMLStreamNormalizedNodeStreamWriter.java
yang/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/codec/xml/XmlDocumentUtils.java
yang/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/codec/xml/XmlStreamUtils.java
yang/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/leafref/LeafRefPathParserListenerImpl.java
yang/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/leafref/LeafRefValidatation.java
yang/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/schema/ImmutableNormalizedNodeStreamWriter.java
yang/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/schema/InstanceIdToNodes.java
yang/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/schema/InstanceIdToSimpleNodes.java
yang/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/schema/SchemaOrderedNormalizedNodeWriter.java
yang/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/schema/SchemaUtils.java
yang/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/schema/builder/impl/ImmutableChoiceNodeSchemaAwareBuilder.java
yang/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/schema/builder/impl/ImmutableMapEntryNodeBuilder.java
yang/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/schema/builder/impl/valid/DataNodeContainerValidator.java
yang/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/schema/transform/dom/DomUtils.java
yang/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/schema/tree/AugmentationModificationStrategy.java
yang/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/schema/tree/ChoiceModificationStrategy.java
yang/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/schema/tree/InMemoryDataTreeModification.java
yang/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/schema/tree/SchemaAwareApplyOperation.java
yang/yang-data-impl/src/test/java/org/opendaylight/yangtools/yang/data/impl/codecs/TypeDefinitionAwareCodecTestHelper.java
yang/yang-data-impl/src/test/java/org/opendaylight/yangtools/yang/data/impl/schema/tree/Bug4454Test.java
yang/yang-data-jaxen/src/test/java/org/opendaylight/yangtools/yang/data/jaxen/TestUtils.java
yang/yang-data-util/src/main/java/org/opendaylight/yangtools/yang/data/util/ListNodeDataWithSchema.java
yang/yang-data-util/src/main/java/org/opendaylight/yangtools/yang/data/util/RpcAsContainer.java
yang/yang-data-util/src/main/java/org/opendaylight/yangtools/yang/data/util/XpathStringParsingPathArgumentBuilder.java
yang/yang-maven-plugin/src/main/java/org/opendaylight/yangtools/yang2sources/plugin/YangToSourcesProcessor.java
yang/yang-model-export/src/main/java/org/opendaylight/yangtools/yang/model/export/ExtensionStatement.java
yang/yang-model-export/src/main/java/org/opendaylight/yangtools/yang/model/export/SchemaContextEmitter.java
yang/yang-model-export/src/main/java/org/opendaylight/yangtools/yang/model/export/SingleModuleYinStatementWriter.java
yang/yang-model-export/src/main/java/org/opendaylight/yangtools/yang/model/export/YinExportUtils.java
yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/repo/util/FilesystemSchemaSourceCache.java
yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/DerivedType.java
yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/EnumerationType.java
yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/FilteringSchemaContextProxy.java
yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/SchemaContextUtil.java
yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/SchemaNodeUtils.java
yang/yang-model-util/src/test/java/org/opendaylight/yangtools/yang/model/util/SchemaContextProxyTest.java
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/builder/impl/ModuleBuilder.java
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/builder/impl/RefineUtils.java
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/impl/ParserListenerUtils.java
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/repo/DependencyResolver.java
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/NamespaceBehaviour.java
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/BuildGlobalContext.java
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/ModifierImpl.java
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/NamespaceBehaviourWithListeners.java
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/NamespaceStorageSupport.java
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/RootStatementContext.java
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/SourceSpecificContext.java
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/StatementContextWriter.java
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/SubstatementContext.java
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/AugmentUtils.java
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/ChildSchemaNodes.java
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/SchemaNodeIdentifierBuildNamespace.java
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/YangStatementSourceImpl.java
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/EffectiveStatementBase.java
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/ExtensionEffectiveStatementImpl.java
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/util/ModuleOrModuleBuilder.java
yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/UsesAugmentTest.java

index 51a8d16f84ce007c3499b8f9e04e78766c310c6e..cfa43064399b00f6fdd287c9cfd587cb82622428 100644 (file)
@@ -26,7 +26,7 @@ public final class ExecutorServiceUtil {
     private static final class WaitInQueueExecutionHandler implements RejectedExecutionHandler {
         @Override
         public void rejectedExecution(final Runnable r, final ThreadPoolExecutor executor) {
-            ifexecutor.isShutdown() ) {
+            if (executor.isShutdown() ) {
                 throw new RejectedExecutionException( "Executor has been shutdown." );
             }
 
@@ -90,7 +90,7 @@ public final class ExecutorServiceUtil {
         executor.shutdown();
 
         try {
-            if(!executor.awaitTermination(timeout, unit)) {
+            if (!executor.awaitTermination(timeout, unit)) {
                 executor.shutdownNow();
             }
         } catch( InterruptedException e ) {
index e7672ac4586351f81e8e977c649c2ed3d2a47df8..7f2e77f73141c5819bea990834a86008c7b5701e 100644 (file)
@@ -164,7 +164,7 @@ public class CachedThreadPoolExecutor extends ThreadPoolExecutor {
                     task = super.poll( waitTime, TimeUnit.MILLISECONDS );
 
                     totalWaitTime -= POLL_WAIT_TIME_IN_MS;
-                    iftotalWaitTime <= 0 ) {
+                    if (totalWaitTime <= 0 ) {
                         break;
                     }
 
index f4846f8fce7280185f9f9c5ad91ca42c97b880c4..502db34ca809b132b1c3204c5082dcf890100b20 100644 (file)
@@ -107,7 +107,7 @@ public class QueuedNotificationManager<L,N> implements NotificationManager<L,N>
     public void submitNotification( final L listener, final N notification )
             throws RejectedExecutionException {
 
-        if( notification == null ) {
+        if (notification == null) {
             return;
         }
 
@@ -121,11 +121,11 @@ public class QueuedNotificationManager<L,N> implements NotificationManager<L,N>
     public void submitNotifications( final L listener, final Iterable<N> notifications )
             throws RejectedExecutionException {
 
-        if( notifications == null || listener == null ) {
+        if (notifications == null || listener == null) {
             return;
         }
 
-        if( LOG.isTraceEnabled() ) {
+        if (LOG.isTraceEnabled()) {
             LOG.trace( "{}: submitNotifications for listener {}: {}",
                        name, listener.toString(), notifications );
         }
@@ -138,10 +138,10 @@ public class QueuedNotificationManager<L,N> implements NotificationManager<L,N>
         // will occur.
 
         try {
-            while( true ) {
+            while (true) {
                 NotificationTask existingTask = listenerCache.get( key );
 
-                if( existingTask == null || !existingTask.submitNotifications( notifications ) ) {
+                if (existingTask == null || !existingTask.submitNotifications( notifications )) {
 
                     // Either there's no existing task or we couldn't add our notifications to the
                     // existing one because it's in the process of exiting and removing itself from
@@ -151,12 +151,12 @@ public class QueuedNotificationManager<L,N> implements NotificationManager<L,N>
                     // shouldn't be called concurrently for the same listener as that would violate
                     // notification ordering. In any case loop back up and try again.
 
-                    if( newNotificationTask == null ) {
+                    if (newNotificationTask == null) {
                         newNotificationTask = new NotificationTask( key, notifications );
                     }
 
                     existingTask = listenerCache.putIfAbsent( key, newNotificationTask );
-                    if( existingTask == null ) {
+                    if (existingTask == null) {
 
                         // We were able to put our new task - now submit it to the executor and
                         // we're done. If it throws a RejectedxecutionException, let that propagate
@@ -184,7 +184,7 @@ public class QueuedNotificationManager<L,N> implements NotificationManager<L,N>
                        name, listener.toString() );
         }
 
-        if( LOG.isTraceEnabled() ) {
+        if (LOG.isTraceEnabled()) {
             LOG.trace( "{}: submitNotifications dine for listener {}",
                        name, listener.toString() );
         }
@@ -196,7 +196,7 @@ public class QueuedNotificationManager<L,N> implements NotificationManager<L,N>
      */
     public List<ListenerNotificationQueueStats> getListenerNotificationQueueStats() {
         List<ListenerNotificationQueueStats> statsList = new ArrayList<>( listenerCache.size() );
-        for( NotificationTask task: listenerCache.values() ) {
+        for (NotificationTask task: listenerCache.values()) {
             statsList.add( new ListenerNotificationQueueStats(
                     task.listenerKey.toString(), task.notificationQueue.size() ) );
         }
@@ -283,7 +283,7 @@ public class QueuedNotificationManager<L,N> implements NotificationManager<L,N>
             this.listenerKey = listenerKey;
             this.notificationQueue = new LinkedBlockingQueue<>( maxQueueCapacity );
 
-            for( N notification: notifications ) {
+            for (N notification: notifications) {
                 this.notificationQueue.add( notification );
             }
         }
@@ -296,24 +296,24 @@ public class QueuedNotificationManager<L,N> implements NotificationManager<L,N>
                 // Check the done flag - if true then #run is in the process of exiting so return
                 // false to indicate such. Otherwise, offer the notifications to the queue.
 
-                if( done ) {
+                if (done) {
                     return false;
                 }
 
-                for( N notification: notifications ) {
+                for (N notification: notifications) {
                     boolean notificationOfferAttemptSuccess = false;
                     // The offer is attempted for up to 10 minutes, with a status message printed each minute
                     for (int notificationOfferAttempts = 0;
-                         notificationOfferAttempts < MAX_NOTIFICATION_OFFER_ATTEMPTS; notificationOfferAttempts++ ) {
+                         notificationOfferAttempts < MAX_NOTIFICATION_OFFER_ATTEMPTS; notificationOfferAttempts++) {
 
                         // Try to offer for up to a minute and log a message if it times out.
-                        if( LOG.isDebugEnabled() ) {
+                        if (LOG.isDebugEnabled()) {
                             LOG.debug( "{}: Offering notification to the queue for listener {}: {}",
                                        name, listenerKey.toString(), notification );
                         }
 
-                        ifnotificationOfferAttemptSuccess = notificationQueue.offer(
-                                notification, 1, TimeUnit.MINUTES ) ) {
+                        if (notificationOfferAttemptSuccess = notificationQueue.offer(
+                                notification, 1, TimeUnit.MINUTES)) {
                             break;
                         }
 
@@ -353,19 +353,19 @@ public class QueuedNotificationManager<L,N> implements NotificationManager<L,N>
             try {
                 // Loop until we've dispatched all the notifications in the queue.
 
-                while( true ) {
+                while (true) {
 
                     // Get the notification at the head of the queue, waiting a little bit for one
                     // to get offered.
 
                     N notification = notificationQueue.poll( 10, TimeUnit.MILLISECONDS );
-                    if( notification == null ) {
+                    if (notification == null) {
 
                         // The queue is empty - try to get the queuingLock. If we can't get the lock
                         // then #submitNotifications is in the process of offering to the queue so
                         // we'll loop back up and poll the queue again.
 
-                        if( queuingLock.tryLock() ) {
+                        if (queuingLock.tryLock()) {
                             try {
 
                                 // Check the queuedNotifications flag to see if #submitNotifications
@@ -374,7 +374,7 @@ public class QueuedNotificationManager<L,N> implements NotificationManager<L,N>
                                 // Once we set the done flag and unlock, calls to
                                 // #submitNotifications will fail and a new task will be created.
 
-                                if( !queuedNotifications ) {
+                                if (!queuedNotifications) {
                                     done = true;
                                     break;
                                 }
@@ -408,13 +408,13 @@ public class QueuedNotificationManager<L,N> implements NotificationManager<L,N>
 
         private void notifyListener( N notification ) {
 
-            if( notification == null ) {
+            if (notification == null) {
                 return;
             }
 
             try {
 
-                if( LOG.isDebugEnabled() ) {
+                if (LOG.isDebugEnabled()) {
                     LOG.debug( "{}: Invoking listener {} with notification: {}",
                                name, listenerKey.toString(), notification );
                 }
index 33ffb78887ea8304d8dbd872251f310b92c331eb..5e2858220d845e0c93a44f0b10995abdac47af93 100644 (file)
@@ -66,7 +66,7 @@ public class TrackingLinkedBlockingQueue<E> extends LinkedBlockingQueue<E> {
 
     @Override
     public boolean offer( final E e, final long timeout, final TimeUnit unit ) throws InterruptedException {
-        ifsuper.offer( e, timeout, unit ) ) {
+        if (super.offer( e, timeout, unit ) ) {
             updateLargestQueueSize();
             return true;
         }
@@ -76,7 +76,7 @@ public class TrackingLinkedBlockingQueue<E> extends LinkedBlockingQueue<E> {
 
     @Override
     public boolean offer( final E e ) {
-        ifsuper.offer( e ) ) {
+        if (super.offer( e ) ) {
             updateLargestQueueSize();
             return true;
         }
index 1a3bf0d4fd702879016c0d05e25168d96e6c7e9b..15c9162dddd9784d382d4777a2870b0a6fecf335 100644 (file)
@@ -50,11 +50,11 @@ public class AsyncNotifyingListeningExecutorServiceTest {
 
     @After
     public void tearDown() {
-        iflistenerExecutor != null ) {
+        if (listenerExecutor != null ) {
             listenerExecutor.shutdownNow();
         }
 
-        iftestExecutor != null ) {
+        if (testExecutor != null ) {
             testExecutor.shutdownNow();
         }
     }
@@ -113,7 +113,7 @@ public class AsyncNotifyingListeningExecutorServiceTest {
         assertTrue( "ListenableFuture callback was not notified of onSuccess",
                     futureNotifiedLatch.await( 5, TimeUnit.SECONDS ) );
 
-        ifassertError.get() != null ) {
+        if (assertError.get() != null ) {
             throw assertError.get();
         }
 
@@ -126,7 +126,7 @@ public class AsyncNotifyingListeningExecutorServiceTest {
         assertTrue( "ListenableFuture callback was not notified of onSuccess",
                     futureNotifiedLatch.await( 5, TimeUnit.SECONDS ) );
 
-        ifassertError.get() != null ) {
+        if (assertError.get() != null ) {
             throw assertError.get();
         }
     }
index 584c8674c300c0c6cd3f10d44d9625847afe0719..330fc01e951408b341959b790d1c2ccf5aff803d 100644 (file)
@@ -33,7 +33,7 @@ public class CommonTestUtils {
             return executor.submit( new Callable<Void>() {
                 @Override
                 public Void call() throws Exception {
-                    ifblockingLatch != null ) {
+                    if (blockingLatch != null ) {
                         Uninterruptibles.awaitUninterruptibly( blockingLatch );
                     }
                     return null;
@@ -49,7 +49,7 @@ public class CommonTestUtils {
             return executor.submit( new Runnable() {
                 @Override
                 public void run() {
-                    ifblockingLatch != null ) {
+                    if (blockingLatch != null ) {
                         Uninterruptibles.awaitUninterruptibly( blockingLatch );
                     }
                 }
@@ -64,7 +64,7 @@ public class CommonTestUtils {
             return executor.submit( new Runnable() {
                 @Override
                 public void run() {
-                    ifblockingLatch != null ) {
+                    if (blockingLatch != null ) {
                         Uninterruptibles.awaitUninterruptibly( blockingLatch );
                     }
                 }
index 8c45dc25bb6ceb03582a7386a21b6f36566bdcef..7abc688cffda734c352e09e8e9bfeaee55febcfb 100644 (file)
@@ -33,7 +33,7 @@ public class CountingRejectedExecutionHandlerTest {
 
     @After
     public void tearDown() {
-        if( executor != null ) {
+        if (executor != null) {
             executor.shutdownNow();
         }
     }
@@ -54,7 +54,7 @@ public class CountingRejectedExecutionHandlerTest {
 
         executor.execute( new Task( tasksRunLatch, blockLatch ) );
 
-        for( int i = 0; i < nTasks - 1; i++ ) {
+        for (int i = 0; i < nTasks - 1; i++) {
             executor.execute( new Task( null, null, null, null, 0 ) );
         }
 
@@ -81,7 +81,7 @@ public class CountingRejectedExecutionHandlerTest {
 
         executor.execute( new Task( tasksRunLatch, blockLatch ) );
 
-        for( int i = 0; i < nTasks - 1; i++ ) {
+        for (int i = 0; i < nTasks - 1; i++) {
             try {
                 executor.execute( new Task( null, null, null, null, 0 ) );
                 fail( "Expected RejectedExecutionException" );
index 8e50b5873f58919d4db528bc9ccf3884cdd6cef5..49da2784891fd03a3822e951a08e570e042d8af6 100644 (file)
@@ -77,7 +77,7 @@ public class DeadlockDetectingListeningExecutorServiceTest {
 
     @After
     public void tearDown() {
-        ifexecutor != null ) {
+        if (executor != null ) {
             executor.shutdownNow();
         }
     }
@@ -166,7 +166,7 @@ public class DeadlockDetectingListeningExecutorServiceTest {
         assertTrue( "Task did not complete - executor likely deadlocked",
                 futureCompletedLatch.await( 5, TimeUnit.SECONDS ) );
 
-        ifcaughtEx.get() != null ) {
+        if (caughtEx.get() != null ) {
             throw caughtEx.get();
         }
     }
index e9cf1beee32afda0f22a0bdcf901ec8e21905dbe..5087f15895f823ae8641f8276b4571c24a8339ec 100644 (file)
@@ -59,7 +59,7 @@ public class MappingCheckedFutureTest {
 
         @Override
         public Throwable extractWrappedTestEx( final Exception from ) {
-            iffrom instanceof ExecutionException ) {
+            if (from instanceof ExecutionException ) {
                 return ((ExecutionException)from).getCause();
             }
 
@@ -75,7 +75,7 @@ public class MappingCheckedFutureTest {
 
         @Override
         public Throwable extractWrappedTestEx( final Exception from ) {
-            iffrom instanceof ExecutionException ) {
+            if (from instanceof ExecutionException ) {
                 return ((ExecutionException)from).getCause();
             }
 
@@ -174,7 +174,7 @@ public class MappingCheckedFutureTest {
             assertNotNull( "Expected returned exception is null", expectedTestEx );
             assertEquals( "Exception type", TestException.class, expectedTestEx.getClass() );
 
-            ifcause instanceof TestException ) {
+            if (cause instanceof TestException ) {
                 assertNull( "Expected null cause", expectedTestEx.getCause() );
             } else {
                 assertSame( "TestException cause", cause, expectedTestEx.getCause() );
@@ -241,7 +241,7 @@ public class MappingCheckedFutureTest {
         thread.interrupt();
         assertEquals( "get call completed", true, doneLatch.await( 5, TimeUnit.SECONDS ) );
 
-        ifassertError.get() != null ) {
+        if (assertError.get() != null ) {
             throw assertError.get();
         }
     }
index 455ccdd1b0b974ad248bd46b7b01945a54cc1a81..684797d4daf0f001d80852565c908dbf48ee5d6d 100644 (file)
@@ -61,22 +61,22 @@ public class QueuedNotificationManagerTest {
         void onNotification( N data ) {
 
             try {
-                if( sleepTime > 0 ) {
+                if (sleepTime > 0) {
                     Uninterruptibles.sleepUninterruptibly( sleepTime, TimeUnit.MILLISECONDS );
                 }
 
-                if( cacheNotifications ) {
+                if (cacheNotifications) {
                     actual.add( data );
                 }
 
                 RuntimeException localRuntimeEx = runtimeEx;
-                if( localRuntimeEx != null ) {
+                if (localRuntimeEx != null) {
                     runtimeEx = null;
                     throw localRuntimeEx;
                 }
 
                 Error localJvmError = jvmError;
-                if( localJvmError != null ) {
+                if (localJvmError != null) {
                     jvmError = null;
                     throw localJvmError;
                 }
@@ -88,7 +88,7 @@ public class QueuedNotificationManagerTest {
 
         void verifyNotifications() {
             boolean done = Uninterruptibles.awaitUninterruptibly( latch, 10, TimeUnit.SECONDS );
-            if( !done ) {
+            if (!done) {
                 long actualCount = latch.getCount();
                 fail( name + ": Received " + (expCount - actualCount) +
                       " notifications. Expected " + expCount );
@@ -138,7 +138,7 @@ public class QueuedNotificationManagerTest {
 
     @After
     public void tearDown() {
-        if( queueExecutor != null ) {
+        if (queueExecutor != null) {
             queueExecutor.shutdownNow();
         }
     }
@@ -172,7 +172,7 @@ public class QueuedNotificationManagerTest {
 
         List<Integer> expNotifications = Lists.newArrayListWithCapacity( nNotifications );
         expNotifications.addAll( Arrays.asList( 1, 2, 3, 4, 5, 6 ) );
-        for( int i = 1; i <= nNotifications - initialCount; i++ ) {
+        for (int i = 1; i <= nNotifications - initialCount; i++) {
             Integer v = Integer.valueOf( initialCount + i );
             expNotifications.add( v );
             manager.submitNotification( listener, v );
@@ -197,14 +197,14 @@ public class QueuedNotificationManagerTest {
                             " notifications each..." );
 
         final Integer[] notifications = new Integer[nNotifications];
-        for( int i = 1; i <= nNotifications; i++ ) {
+        for (int i = 1; i <= nNotifications; i++) {
             notifications[i-1] = Integer.valueOf( i );
         }
 
         Stopwatch stopWatch = Stopwatch.createStarted();
 
         List<TestListener<Integer>> listeners = Lists.newArrayList();
-        for( int i = 1; i <= nListeners; i++ ) {
+        for (int i = 1; i <= nListeners; i++) {
             final TestListener<Integer> listener =
                     i == 2 ? new TestListener2<>(nNotifications, i) :
                     i == 3 ? new TestListener3<>(nNotifications, i) :
@@ -214,7 +214,7 @@ public class QueuedNotificationManagerTest {
             new Thread( new Runnable() {
                 @Override
                 public void run() {
-                    for( int j = 1; j <= nNotifications; j++ ) {
+                    for (int j = 1; j <= nNotifications; j++) {
                         final Integer n = notifications[j-1];
                         stagingExecutor.execute( new Runnable() {
                             @Override
@@ -228,7 +228,7 @@ public class QueuedNotificationManagerTest {
         }
 
         try {
-            for( TestListener<Integer> listener: listeners ) {
+            for (TestListener<Integer> listener: listeners) {
                 listener.verifyNotifications();
                 System.out.println( listener.name + " succeeded" );
             }
index 71258b87adc0f47f654dfdca3ec60ccd658a24fb..c9b3dab1886c687d82f892873bbfb5fe99fd29f4 100644 (file)
@@ -36,7 +36,7 @@ public class ThreadPoolExecutorTest {
 
     @After
     public void tearDown() {
-        if( executor != null ) {
+        if (executor != null) {
             executor.shutdownNow();
         }
     }
@@ -54,7 +54,7 @@ public class ThreadPoolExecutorTest {
 
         executor = SpecialExecutors.newBoundedFastThreadPool( 1, 1, "TestPool" );
 
-        for( int i = 0; i < 5; i++ ) {
+        for (int i = 0; i < 5; i++) {
             executor.execute( new Task( null, null, null, null,
                     TimeUnit.MICROSECONDS.convert( 5, TimeUnit.SECONDS ) ) );
         }
@@ -82,7 +82,7 @@ public class ThreadPoolExecutorTest {
 
         ExecutorService executor = SpecialExecutors.newBoundedCachedThreadPool( 1, 1, "TestPool" );
 
-        for( int i = 0; i < 5; i++ ) {
+        for (int i = 0; i < 5; i++) {
             executor.execute( new Task( null, null, null, null,
                     TimeUnit.MICROSECONDS.convert( 5, TimeUnit.SECONDS ) ) );
         }
@@ -113,8 +113,8 @@ public class ThreadPoolExecutorTest {
         new Thread() {
             @Override
             public void run() {
-                for( int i = 0; i < numTasksToRun; i++ ) {
-//                    if(i%100 == 0) {
+                for (int i = 0; i < numTasksToRun; i++) {
+//                    if (i%100 == 0) {
 //                        Uninterruptibles.sleepUninterruptibly( 20, TimeUnit.MICROSECONDS );
 //                    }
 
@@ -128,17 +128,17 @@ public class ThreadPoolExecutorTest {
 
         stopWatch.stop();
 
-        if( !done ) {
+        if (!done) {
             fail( (numTasksToRun - tasksRunLatch.getCount()) + " tasks out of " +
                    numTasksToRun + " executed" );
         }
 
-        if( threadError.get() != null ) {
+        if (threadError.get() != null) {
             throw threadError.get();
         }
 
         System.out.println( taskCountPerThread.size() + " threads used:" );
-        for( Map.Entry<Thread, AtomicLong> e : taskCountPerThread.entrySet() ) {
+        for (Map.Entry<Thread, AtomicLong> e : taskCountPerThread.entrySet()) {
             System.out.println( "  " + e.getKey().getName() + " - " + e.getValue() + " tasks" );
         }
 
@@ -178,24 +178,24 @@ public class ThreadPoolExecutorTest {
         public void run() {
             try {
                 try {
-                    if( delay > 0 ) {
+                    if (delay > 0) {
                         TimeUnit.MICROSECONDS.sleep( delay );
-                    } else if( blockLatch != null ) {
+                    } else if (blockLatch != null) {
                         blockLatch.await();
                     }
                 } catch( InterruptedException e ) {}
 
-                if( expThreadPrefix != null ) {
+                if (expThreadPrefix != null) {
                     assertEquals( "Thread name starts with " + expThreadPrefix, true,
                             Thread.currentThread().getName().startsWith( expThreadPrefix ) );
                 }
 
-                if( taskCountPerThread != null ) {
+                if (taskCountPerThread != null) {
                     AtomicLong count = taskCountPerThread.get( Thread.currentThread() );
-                    if( count == null ) {
+                    if (count == null) {
                         count = new AtomicLong( 0 );
                         AtomicLong prev = taskCountPerThread.putIfAbsent( Thread.currentThread(), count );
-                        if( prev != null ) {
+                        if (prev != null) {
                             count = prev;
                         }
                     }
@@ -204,11 +204,11 @@ public class ThreadPoolExecutorTest {
                 }
 
             } catch( AssertionError e ) {
-                if( threadError != null ) {
+                if (threadError != null) {
                     threadError.set( e );
                 }
             } finally {
-                if( tasksRunLatch != null ) {
+                if (tasksRunLatch != null) {
                     tasksRunLatch.countDown();
                 }
             }
index 61bae7c4e832b10114695c0345460ec643f11304..be22c5091a1a7ef09b9f467b420cbe1e83d53fee 100644 (file)
@@ -137,7 +137,7 @@ public class NormalizedNodeWriter implements Closeable, Flushable {
         if (node instanceof LeafSetEntryNode) {
             final LeafSetEntryNode<?> nodeAsLeafList = (LeafSetEntryNode<?>)node;
             final QName name = nodeAsLeafList.getIdentifier().getNodeType();
-            if(writer instanceof NormalizedNodeStreamAttributeWriter) {
+            if (writer instanceof NormalizedNodeStreamAttributeWriter) {
                 ((NormalizedNodeStreamAttributeWriter) writer).leafSetEntryNode(name, nodeAsLeafList.getValue(),
                         nodeAsLeafList.getAttributes());
             } else {
@@ -146,7 +146,7 @@ public class NormalizedNodeWriter implements Closeable, Flushable {
             return true;
         } else if (node instanceof LeafNode) {
             final LeafNode<?> nodeAsLeaf = (LeafNode<?>)node;
-            if(writer instanceof NormalizedNodeStreamAttributeWriter) {
+            if (writer instanceof NormalizedNodeStreamAttributeWriter) {
                 ((NormalizedNodeStreamAttributeWriter) writer).leafNode(nodeAsLeaf.getIdentifier(), nodeAsLeaf.getValue(), nodeAsLeaf.getAttributes());
             } else {
                 writer.leafNode(nodeAsLeaf.getIdentifier(), nodeAsLeaf.getValue());
@@ -190,7 +190,7 @@ public class NormalizedNodeWriter implements Closeable, Flushable {
     protected boolean wasProcessedAsCompositeNode(final NormalizedNode<?, ?> node) throws IOException {
         if (node instanceof ContainerNode) {
             final ContainerNode n = (ContainerNode) node;
-            if(writer instanceof NormalizedNodeStreamAttributeWriter) {
+            if (writer instanceof NormalizedNodeStreamAttributeWriter) {
                 ((NormalizedNodeStreamAttributeWriter) writer).startContainerNode(n.getIdentifier(), childSizeHint(n.getValue()), n.getAttributes());
             } else {
                 writer.startContainerNode(n.getIdentifier(), childSizeHint(n.getValue()));
@@ -263,7 +263,7 @@ public class NormalizedNodeWriter implements Closeable, Flushable {
         @Override
         protected boolean writeMapEntryNode(final MapEntryNode node) throws IOException {
             final NormalizedNodeStreamWriter nnWriter = getWriter();
-            if(nnWriter instanceof NormalizedNodeStreamAttributeWriter) {
+            if (nnWriter instanceof NormalizedNodeStreamAttributeWriter) {
                 ((NormalizedNodeStreamAttributeWriter) nnWriter).startMapEntryNode(node.getIdentifier(), childSizeHint(node.getValue()), node.getAttributes());
             } else {
                 nnWriter.startMapEntryNode(node.getIdentifier(), childSizeHint(node.getValue()));
index 0fb94c54ac33f01171d485c7666dda5e0a8b41c9..33584640c54f5d2214d927816e5d2a4df877a4ca 100644 (file)
@@ -48,7 +48,7 @@ public final class StoreTreeNodes {
         T current = tree;
 
         int i = 1;
-        for(PathArgument pathArg : path.getPathArguments()) {
+        for (PathArgument pathArg : path.getPathArguments()) {
             Optional<T> potential = current.getChild(pathArg);
             if (!potential.isPresent()) {
                 throw new IllegalArgumentException(String.format("Child %s is not present in tree.",
index e5dc228b334a3dd88802f2a74d56cbb5c916a652..b869f5c3990d60925e9e01e0f422014168f8e348 100644 (file)
@@ -198,7 +198,7 @@ public final class JSONNormalizedNodeStreamWriter implements NormalizedNodeStrea
         tracker.endNode();
         context = context.endNode(codecs.getSchemaContext(), writer);
 
-        if(context instanceof JSONStreamWriterRootContext) {
+        if (context instanceof JSONStreamWriterRootContext) {
             context.emitEnd(writer);
         }
     }
index 99ac2809bde3135a21508b87a873a4db68b3933b..275a90dde0d57531104f3c69561e69baf819acf3 100644 (file)
@@ -159,7 +159,7 @@ public final class JsonParserStream implements Closeable, Flushable {
              * without wrapping array.
              *
              */
-            if(isArray(parent)) {
+            if (isArray(parent)) {
                 parent = newArrayEntry(parent);
             }
             while (in.hasNext()) {
index 0e13ecbbfe8e18e1f7be52a6de1419958b4e34ff..e9105db7b93f8e7f243ad5e35d6ec52c6f2781c2 100644 (file)
@@ -69,7 +69,7 @@ public class TestUtils {
 
         StatementStreamSource[] sources = new StatementStreamSource[files.length];
 
-        for(int i = 0; i<files.length; i++) {
+        for (int i = 0; i<files.length; i++) {
             sources[i] = new YangStatementSourceImpl(new FileInputStream(files[i]));
         }
 
index dcbcbd45fae94ed0900586e325f31550949ce477..79463d031951bd648ee8d28494e2b74c91bd7df6 100644 (file)
@@ -90,17 +90,17 @@ public final class SchemaTracker {
         final Object parent = getParent();
         SchemaNode schema = null;
         final QName qname = name.getNodeType();
-        if(parent instanceof DataNodeContainer) {
+        if (parent instanceof DataNodeContainer) {
             schema = ((DataNodeContainer)parent).getDataChildByName(qname);
 
-            if(schema == null && parent instanceof GroupingDefinition) {
+            if (schema == null && parent instanceof GroupingDefinition) {
                 schema = ((GroupingDefinition) parent);
             }
 
-            if(schema == null && parent instanceof NotificationDefinition) {
+            if (schema == null && parent instanceof NotificationDefinition) {
                 schema = ((NotificationDefinition) parent);
             }
-        } else if(parent instanceof ChoiceSchemaNode) {
+        } else if (parent instanceof ChoiceSchemaNode) {
             schema = findChildInCases((ChoiceSchemaNode) parent, qname);
         } else {
             throw new IllegalStateException("Unsupported schema type "+ parent.getClass() +" on stack.");
@@ -111,9 +111,9 @@ public final class SchemaTracker {
 
     private static SchemaNode findChildInCases(final ChoiceSchemaNode parent, final QName qname) {
         DataSchemaNode schema = null;
-        for(final ChoiceCaseNode caze : parent.getCases()) {
+        for (final ChoiceCaseNode caze : parent.getCases()) {
             final DataSchemaNode potential = caze.getDataChildByName(qname);
-            if(potential != null) {
+            if (potential != null) {
                 schema = potential;
                 break;
             }
@@ -123,9 +123,9 @@ public final class SchemaTracker {
 
     private static SchemaNode findCaseByChild(final ChoiceSchemaNode parent, final QName qname) {
         DataSchemaNode schema = null;
-        for(final ChoiceCaseNode caze : parent.getCases()) {
+        for (final ChoiceCaseNode caze : parent.getCases()) {
             final DataSchemaNode potential = caze.getDataChildByName(qname);
-            if(potential != null) {
+            if (potential != null) {
                 schema = caze;
                 break;
             }
@@ -206,14 +206,14 @@ public final class SchemaTracker {
         Object parent = getParent();
 
         Preconditions.checkArgument(parent instanceof AugmentationTarget, "Augmentation not allowed under %s", parent);
-        if(parent instanceof ChoiceSchemaNode) {
+        if (parent instanceof ChoiceSchemaNode) {
             final QName name = Iterables.get(identifier.getPossibleChildNames(), 0);
             parent = findCaseByChild((ChoiceSchemaNode) parent, name);
         }
         Preconditions.checkArgument(parent instanceof DataNodeContainer, "Augmentation allowed only in DataNodeContainer",parent);
         final AugmentationSchema schema = SchemaUtils.findSchemaForAugment((AugmentationTarget) parent, identifier.getPossibleChildNames());
         final HashSet<DataSchemaNode> realChildSchemas = new HashSet<>();
-        for(final DataSchemaNode child : schema.getChildNodes()) {
+        for (final DataSchemaNode child : schema.getChildNodes()) {
             realChildSchemas.add(((DataNodeContainer) parent).getDataChildByName(child.getQName()));
         }
         final AugmentationSchema resolvedSchema = new EffectiveAugmentationSchema(schema, realChildSchemas);
index 99f1507965cfb6e7d168cf3624b63eb43881e5aa..987f510c1f8b4d89edc8ec72190a96a0e8215d87 100644 (file)
@@ -121,7 +121,7 @@ public abstract class XMLStreamNormalizedNodeStreamWriter<T> implements Normaliz
     private void writeStartElement(final QName qname) throws XMLStreamException {
         String ns = qname.getNamespace().toString();
         writer.writeStartElement(XMLConstants.DEFAULT_NS_PREFIX, qname.getLocalName(), ns);
-        if(writer.getNamespaceContext() != null) {
+        if (writer.getNamespaceContext() != null) {
             String parentNs = writer.getNamespaceContext().getNamespaceURI(XMLConstants.DEFAULT_NS_PREFIX);
             if (!ns.equals(parentNs)) {
                 writer.writeDefaultNamespace(ns);
@@ -200,7 +200,7 @@ public abstract class XMLStreamNormalizedNodeStreamWriter<T> implements Normaliz
             try {
                 final String namespace = qNameStringEntry.getKey().getNamespace().toString();
 
-                if(Strings.isNullOrEmpty(namespace)) {
+                if (Strings.isNullOrEmpty(namespace)) {
                     writer.writeAttribute(qNameStringEntry.getKey().getLocalName(), qNameStringEntry.getValue());
                 } else {
                     final String prefix = randomPrefix.encodePrefix(qNameStringEntry.getKey().getNamespace());
index bdfb928ff7101619ae372e1810d8917e0a0e4774..f05cc7a7f89ce1ebae58cbef9db3d828615742fd 100644 (file)
@@ -80,7 +80,7 @@ public final class XmlDocumentUtils {
 
     public static Optional<ModifyAction> getModifyOperationFromAttributes(final Element xmlElement) {
         Attr attributeNodeNS = xmlElement.getAttributeNodeNS(OPERATION_ATTRIBUTE_QNAME.getNamespace().toString(), OPERATION_ATTRIBUTE_QNAME.getLocalName());
-        if(attributeNodeNS == null) {
+        if (attributeNodeNS == null) {
             return Optional.absent();
         }
 
index dfce4751b0b3e60ce86322a01605f63d6a141ca1..a54b44134a138d9febd3a67eae2afdff3fdb8d31 100644 (file)
@@ -205,7 +205,7 @@ public class XmlStreamUtils {
     }
 
     public void writeInstanceIdentifier(final XMLStreamWriter writer, final YangInstanceIdentifier value) throws XMLStreamException {
-        if(schemaContext.isPresent()) {
+        if (schemaContext.isPresent()) {
             RandomPrefixInstanceIdentifierSerializer iiCodec = new RandomPrefixInstanceIdentifierSerializer(schemaContext.get());
             String serializedValue = iiCodec.serialize(value);
             writeNamespaceDeclarations(writer,iiCodec.getPrefixes());
index 5f5e0b23d71d7478808ebd3a81d810f7b7593a45..255181341c23d0e6f8c1114db085619834218904 100644 (file)
@@ -205,7 +205,7 @@ final class LeafRefPathParserListenerImpl extends LeafRefPathParserBaseListener{
         final Set<ModuleImport> imports = module.getImports();
 
         for (final ModuleImport moduleImport : imports) {
-            if(moduleImport.getPrefix().equals(prefix)) {
+            if (moduleImport.getPrefix().equals(prefix)) {
                 return moduleImport;
             }
         }
index bf44fe0f176ed68350d1f8f5e3991e23b8367909..7490ecc68276d474a59b6615ac20f823f9f20439 100644 (file)
@@ -274,7 +274,7 @@ public class LeafRefValidatation {
                 }
             }
         }
-        // FIXME if(node instance of UnkeyedListNode ...
+        // FIXME if (node instance of UnkeyedListNode ...
     }
 
     private static LeafRefContext findReferencingCtxUnderChoice(
index 8f4c5eee911f6e6a44316ea706c02b223303d5bb..aec3a9c6db9d71651650243a2a83beb12e929ef2 100644 (file)
@@ -251,7 +251,7 @@ public class ImmutableNormalizedNodeStreamWriter implements SchemaAwareNormalize
 
     @Override
     public void startMapEntryNode(final NodeIdentifierWithPredicates identifier, final int childSizeHint) {
-        if(!(getCurrent() instanceof NormalizedNodeResultBuilder)) {
+        if (!(getCurrent() instanceof NormalizedNodeResultBuilder)) {
             Preconditions.checkArgument(getCurrent() instanceof ImmutableMapNodeBuilder || getCurrent() instanceof ImmutableOrderedMapNodeBuilder);
         }
 
index cb109bef5111124a1a2d4e5a240f313dc9bd9e33..f27815bac667dab8bc22518f09e6ed9c452127cc 100644 (file)
@@ -78,7 +78,7 @@ abstract class InstanceIdToNodes<T extends PathArgument> implements Identifiable
     abstract boolean isMixin();
 
     public void addModifyOpIfPresent(final Optional<Entry<QName,ModifyAction>> operation, final AttributesBuilder<?> builder) {
-        if(operation.isPresent()) {
+        if (operation.isPresent()) {
             builder.withAttributes(Collections.singletonMap(operation.get().getKey(), modifyOperationToXmlString(operation.get().getValue())));
         }
     }
@@ -128,7 +128,7 @@ abstract class InstanceIdToNodes<T extends PathArgument> implements Identifiable
 
         @Override
         public NormalizedNode<?, ?> create(final YangInstanceIdentifier instanceId, final Optional<NormalizedNode<?, ?>> deepestChild, final Optional<Entry<QName,ModifyAction>> operation) {
-            if(deepestChild.isPresent()) {
+            if (deepestChild.isPresent()) {
                 Preconditions.checkState(deepestChild instanceof AnyXmlNode);
                 final NormalizedNodeAttrBuilder<NodeIdentifier, DOMSource, AnyXmlNode> anyXmlBuilder =
                         Builders.anyXmlBuilder().withNodeIdentifier(getIdentifier()).withValue(((AnyXmlNode) deepestChild).getValue());
index e5d91fb3c8977ae5d03ac3e23a000eee05c681ce..17b8cff7a13f5cc28a5ad6fdcf90e870ff0c1b61 100644 (file)
@@ -39,7 +39,7 @@ abstract class InstanceIdToSimpleNodes<T extends PathArgument> extends InstanceI
         final PathArgument pathArgument = instanceId.getPathArguments().get(0);
         final NormalizedNodeAttrBuilder<? extends PathArgument, Object, ? extends NormalizedNode<? extends PathArgument, Object>> builder = getBuilder(pathArgument);
 
-        if(deepestChild.isPresent()) {
+        if (deepestChild.isPresent()) {
             builder.withValue(deepestChild.get().getValue());
         }
 
index e92f0dd7286f9d3a0e743c1390fab0bbbdabe817..037265f94f00e4764e5d082bf4df4cb2541638f3 100644 (file)
@@ -130,7 +130,7 @@ public class SchemaOrderedNormalizedNodeWriter extends NormalizedNodeWriter {
                     write(qNameToNodes.get(schemaNode.getQName()), schemaNode);
                 }
             }
-        } else if(parentSchemaNode instanceof ChoiceSchemaNode) {
+        } else if (parentSchemaNode instanceof ChoiceSchemaNode) {
             for (ChoiceCaseNode ccNode : ((ChoiceSchemaNode) parentSchemaNode).getCases()) {
                 for (DataSchemaNode dsn : ccNode.getChildNodes()) {
                     if (qNameToNodes.containsKey(dsn.getQName())) {
index 6869b57d619d61f283c5367a3a06a6619454f707..e4b923c2dbbe40a80cda99b23eca332cbeb24a1d 100644 (file)
@@ -129,7 +129,7 @@ public final class SchemaUtils {
 
         for (ChoiceCaseNode choiceCaseNode : schema.getCases()) {
             schemaForAugment = findAugment(choiceCaseNode, qNames);
-            if(schemaForAugment.isPresent()) {
+            if (schemaForAugment.isPresent()) {
                 break;
             }
         }
@@ -150,7 +150,7 @@ public final class SchemaUtils {
                 }
             }));
 
-            if(qNamesFromAugment.equals(qNames)) {
+            if (qNamesFromAugment.equals(qNames)) {
                 return Optional.of(augment);
             }
         }
@@ -209,7 +209,7 @@ public final class SchemaUtils {
         }
 
         for (AugmentationSchema augmentationSchema : ((AugmentationTarget) schema).getAvailableAugmentations()) {
-            if(augmentationSchema.getDataChildByName(childSchema.getQName()) != null) {
+            if (augmentationSchema.getDataChildByName(childSchema.getQName()) != null) {
                 return true;
             }
         }
@@ -292,11 +292,11 @@ public final class SchemaUtils {
         Set<QName> allChildNodes = Sets.newHashSet();
 
         for (DataSchemaNode childSchema : nodeContainer.getChildNodes()) {
-            if(childSchema instanceof ChoiceSchemaNode) {
+            if (childSchema instanceof ChoiceSchemaNode) {
                 for (ChoiceCaseNode choiceCaseNode : ((ChoiceSchemaNode) childSchema).getCases()) {
                     allChildNodes.addAll(getChildNodesRecursive(choiceCaseNode));
                 }
-            } else if(childSchema instanceof AugmentationSchema || childSchema instanceof ChoiceCaseNode) {
+            } else if (childSchema instanceof AugmentationSchema || childSchema instanceof ChoiceCaseNode) {
                 allChildNodes.addAll(getChildNodesRecursive((DataNodeContainer) childSchema));
             }
             else {
@@ -324,12 +324,12 @@ public final class SchemaUtils {
 
         Set<DataSchemaNode> realChildNodes = Sets.newHashSet();
 
-        if(targetSchema instanceof DataNodeContainer) {
+        if (targetSchema instanceof DataNodeContainer) {
             realChildNodes = getRealSchemasForAugment((DataNodeContainer)targetSchema, augmentSchema);
-        } else if(targetSchema instanceof ChoiceSchemaNode) {
+        } else if (targetSchema instanceof ChoiceSchemaNode) {
             for (DataSchemaNode dataSchemaNode : augmentSchema.getChildNodes()) {
                 for (ChoiceCaseNode choiceCaseNode : ((ChoiceSchemaNode) targetSchema).getCases()) {
-                    if(getChildNodesRecursive(choiceCaseNode).contains(dataSchemaNode.getQName())) {
+                    if (getChildNodesRecursive(choiceCaseNode).contains(dataSchemaNode.getQName())) {
                         realChildNodes.add(choiceCaseNode.getDataChildByName(dataSchemaNode.getQName()));
                     }
                 }
@@ -370,7 +370,7 @@ public final class SchemaUtils {
                 currentAugmentChildNodes.add(dataSchemaNode.getQName());
             }
 
-            if(childToProcess.getPossibleChildNames().equals(currentAugmentChildNodes)){
+            if (childToProcess.getPossibleChildNames().equals(currentAugmentChildNodes)){
                 return true;
             }
         }
@@ -413,14 +413,14 @@ public final class SchemaUtils {
         SchemaNode current = Preconditions.checkNotNull(schemaContext);
         for (final QName qname : path.getPathFromRoot()) {
             SchemaNode child;
-            if(current instanceof DataNodeContainer) {
+            if (current instanceof DataNodeContainer) {
                 child = ((DataNodeContainer) current).getDataChildByName(qname);
 
                 if (child == null && current instanceof SchemaContext) {
                     child = tryFindGroupings((SchemaContext) current, qname).orNull();
                 }
 
-                if(child == null && current instanceof SchemaContext) {
+                if (child == null && current instanceof SchemaContext) {
                     child = tryFindNotification((SchemaContext) current, qname)
                             .or(tryFindRpc(((SchemaContext) current), qname)).orNull();
                 }
index eee1a72ef38a289e2002ed421f96d978dc24f86d..037e406a3d1c6356634580792b3b246e13e36230 100644 (file)
@@ -36,7 +36,7 @@ public class ImmutableChoiceNodeSchemaAwareBuilder extends ImmutableChoiceNodeBu
 
     @Override
     public DataContainerNodeBuilder<NodeIdentifier, ChoiceNode> withChild(final DataContainerChild<?, ?> child) {
-        if(validator == null) {
+        if (validator == null) {
             Optional<ChoiceCaseNode> detectedCaseOpt = SchemaUtils.detectCase(schema, child);
             DataValidationException.checkLegalChild(detectedCaseOpt.isPresent(), child.getIdentifier(), schema);
             validator = new DataNodeContainerValidator(detectedCaseOpt.get());
index cebe26b0f577874e66cb2f57e0902986bd6eaed6..e6a7880c3e2595bdc685ee1fff3af63559d597f8 100644 (file)
@@ -66,7 +66,7 @@ public class ImmutableMapEntryNodeBuilder extends AbstractImmutableDataContainer
             final PathArgument identifier = childId.getIdentifier();
 
             // Augmentation nodes cannot be keys, and do not have to be present in childrenQNamesToPaths map
-            if(isAugment(identifier)) {
+            if (isAugment(identifier)) {
                 continue;
             }
 
@@ -88,7 +88,7 @@ public class ImmutableMapEntryNodeBuilder extends AbstractImmutableDataContainer
     @Override
     public DataContainerNodeAttrBuilder<NodeIdentifierWithPredicates, MapEntryNode> withChild(final DataContainerChild<?, ?> child) {
         // Augmentation nodes cannot be keys, and do not have to be present in childrenQNamesToPaths map
-        if(!isAugment(child.getIdentifier())) {
+        if (!isAugment(child.getIdentifier())) {
             childrenQNamesToPaths.put(child.getNodeType(), child.getIdentifier());
         }
 
index f2202c87ed5df8fd2332dc41324751229345fbe2..617083f98ac94ea800c57de9ac8819ee95b85168 100644 (file)
@@ -36,7 +36,7 @@ public class DataNodeContainerValidator {
 
         this.childNodes = getChildNodes(schema);
 
-        if(schema instanceof AugmentationTarget) {
+        if (schema instanceof AugmentationTarget) {
             for (AugmentationSchema augmentationSchema : ((AugmentationTarget) schema).getAvailableAugmentations()) {
                 augments.add(SchemaUtils.getNodeIdentifierForAugmentation(augmentationSchema));
             }
@@ -67,7 +67,7 @@ public class DataNodeContainerValidator {
         Set<QName> allChildNodes = Sets.newHashSet();
 
         for (DataSchemaNode childSchema : nodeContainer.getChildNodes()) {
-            if(childSchema instanceof ChoiceCaseNode) {
+            if (childSchema instanceof ChoiceCaseNode) {
                 allChildNodes.addAll(getChildNodes((DataNodeContainer) childSchema));
             } else if (!(childSchema instanceof AugmentationSchema)) {
                 allChildNodes.add(childSchema.getQName());
index 4c9ecf2f059c4524126b59963caf4405cc28947a..75372ed4f6336027be9b9320f4069f8204317e27 100644 (file)
@@ -76,7 +76,7 @@ public final class DomUtils {
         final List<Element> childNodesCollection = Lists.newArrayList();
         final NodeList childNodes = node.getChildNodes();
         for (int i = 0; i < childNodes.getLength(); i++) {
-            if(childNodes.item(i) instanceof Element) {
+            if (childNodes.item(i) instanceof Element) {
                 childNodesCollection.add((Element) childNodes.item(i));
             }
         }
@@ -107,7 +107,7 @@ public final class DomUtils {
             }
 
             // Skip namespace definitions
-            if(namespace.equals(XMLConstants.XMLNS_ATTRIBUTE_NS_URI)) {
+            if (namespace.equals(XMLConstants.XMLNS_ATTRIBUTE_NS_URI)) {
                 continue;
             }
 
index 91fd2e557c62198b728f7fce7a421300a3356c43..211473f92b92296cbf82058f9bcb5db31fb5980f 100644 (file)
@@ -42,7 +42,7 @@ final class AugmentationModificationStrategy extends AbstractDataNodeContainerMo
 
     private static AugmentationSchema createAugmentProxy(final AugmentationSchema schema, final DataNodeContainer resolved) {
         final Set<DataSchemaNode> realChildSchemas = new HashSet<>();
-        for(final DataSchemaNode augChild : schema.getChildNodes()) {
+        for (final DataSchemaNode augChild : schema.getChildNodes()) {
             realChildSchemas.add(resolved.getDataChildByName(augChild.getQName()));
         }
         return new EffectiveAugmentationSchema(schema, realChildSchemas);
index 62c6ebcad98463b5394419441184ceb8ac73ed25..aa65d3188c1001c5fdcea3ff15f2a6533cb5e4f0 100644 (file)
@@ -81,7 +81,7 @@ final class ChoiceModificationStrategy extends AbstractNodeContainerModification
 
     @Override
     void verifyStructure(final NormalizedNode<?, ?> writtenValue, final boolean verifyChildren) {
-        if(verifyChildrenStructure() && verifyChildren) {
+        if (verifyChildrenStructure() && verifyChildren) {
             enforceCases(writtenValue);
         }
         super.verifyStructure(writtenValue, verifyChildren);
index cd361ce32852eba5aff6fe1286f4bbb8adec4393..68ac57a15052a95cf8ee0c1fee497b4254cd3af4 100644 (file)
@@ -151,7 +151,7 @@ final class InMemoryDataTreeModification extends AbstractCursorAware implements
         ModifiedNode modification = rootNode;
 
         int i = 1;
-        for(final PathArgument pathArg : path.getPathArguments()) {
+        for (final PathArgument pathArg : path.getPathArguments()) {
             final Optional<ModificationApplyOperation> potential = operation.getChild(pathArg);
             if (!potential.isPresent()) {
                 throw new SchemaValidationFailedException(String.format("Child %s is not present in schema tree.",
index 2ca70603d4cf33db7a5ab2131a326cde8d78d0b5..29fa6070fa3b33acc47efb87ff6bd17efa42f08e 100644 (file)
@@ -93,7 +93,7 @@ abstract class SchemaAwareApplyOperation extends ModificationApplyOperation {
 
     private static SchemaAwareApplyOperation fromLeafListSchemaNode(final LeafListSchemaNode schemaNode, final TreeType treeType) {
         final SchemaAwareApplyOperation op;
-        if(schemaNode.isUserOrdered()) {
+        if (schemaNode.isUserOrdered()) {
             op =  new OrderedLeafSetModificationStrategy(schemaNode, treeType);
         } else {
             op = new UnorderedLeafSetModificationStrategy(schemaNode, treeType);
@@ -146,7 +146,7 @@ abstract class SchemaAwareApplyOperation extends ModificationApplyOperation {
              * it should not cause transaction to fail, since result of this merge
              * leads to same data.
              */
-            if(!original.get().getData().equals(current.get().getData())) {
+            if (!original.get().getData().equals(current.get().getData())) {
                 checkNotConflicting(path, original.get(), current.get());
             }
         }
@@ -167,7 +167,7 @@ abstract class SchemaAwareApplyOperation extends ModificationApplyOperation {
         final Optional<TreeNode> original = modification.getOriginal();
         if (original.isPresent() && current.isPresent()) {
             checkNotConflicting(path, original.get(), current.get());
-        } else if(original.isPresent()) {
+        } else if (original.isPresent()) {
             throw new ConflictingModificationAppliedException(path,"Node was deleted by other transaction.");
         } else if (current.isPresent()) {
             throw new ConflictingModificationAppliedException(path, "Node was created by other transaction.");
index 61562ce7780d7dc99a1ef9ca06221dd6e4887916..8c759e8074273020556cff2d44f744fc7d2c71fc 100644 (file)
@@ -51,7 +51,7 @@ public class TypeDefinitionAwareCodecTestHelper {
 
     public static EnumTypeDefinition toEnumTypeDefinition( String... enums ) {
         List<EnumTypeDefinition.EnumPair> enumList = Lists.newArrayList();
-        forString en: enums ) {
+        for (String en: enums ) {
             EnumTypeDefinition.EnumPair mockEnum = mock( EnumTypeDefinition.EnumPair.class );
             when( mockEnum.getName() ).thenReturn( en );
             enumList.add( mockEnum );
@@ -67,7 +67,7 @@ public class TypeDefinitionAwareCodecTestHelper {
 
     public static BitsTypeDefinition toBitsTypeDefinition( String... bits ) {
         List<BitsTypeDefinition.Bit> bitList = Lists.newArrayList();
-        forString bit: bits ) {
+        for (String bit: bits ) {
             BitsTypeDefinition.Bit mockBit = mock( BitsTypeDefinition.Bit.class );
             when( mockBit.getName() ).thenReturn( bit );
             bitList.add( mockBit );
index c509dab1ce18e73222a1632244955702edb25a41..9c999da6d205c1215ebd2f5d60cb0d58523892b8 100644 (file)
@@ -399,7 +399,7 @@ public class Bug4454Test {
         UnmodifiableCollection<?> collectionChildren = (UnmodifiableCollection<?>) minMaxListRead.get().getValue();
 
         for (Object collectionChild : collectionChildren) {
-            if(collectionChild.toString().contains(first)){
+            if (collectionChild.toString().contains(first)){
                 assertTrue(collectionChild.toString().contains(first));
             } else {
                 assertTrue(collectionChild.toString().contains(second));
index 9a5ff3ba716d80e5ad0115bb6efe6c0d42f31d78..15987f2d45cfde80825612c44949b9da334f4211 100644 (file)
@@ -87,7 +87,7 @@ final class TestUtils {
 
         StatementStreamSource[] sources = new StatementStreamSource[files.length];
 
-        for(int i = 0; i<files.length; i++) {
+        for (int i = 0; i<files.length; i++) {
             sources[i] = new YangStatementSourceImpl(new FileInputStream(files[i]));
         }
 
index 36690e45229ec92550306c5f336e790cd1ad3baa..2ec1b02f43fc94cae27dced8f06f6bae051d4ce6 100644 (file)
@@ -24,7 +24,7 @@ public class ListNodeDataWithSchema extends CompositeNodeDataWithSchema {
         writer.nextDataSchemaNode(schema);
         if (schema.getKeyDefinition().isEmpty()) {
             writer.startUnkeyedList(provideNodeIdentifier(), childSizeHint());
-        } else if(schema.isUserOrdered()) {
+        } else if (schema.isUserOrdered()) {
             writer.startOrderedMapNode(provideNodeIdentifier(), childSizeHint());
         } else {
             writer.startMapNode(provideNodeIdentifier(), childSizeHint());
index da1c5a8d4d042c5505f0c150f2b6a1208befa6f5..a2735e2ef5a644884581f70b12b528eef3150481 100644 (file)
@@ -118,10 +118,10 @@ public final class RpcAsContainer implements ContainerSchemaNode {
         final List<DataSchemaNode> ret = new ArrayList<>();
         final ContainerSchemaNode input = getInput();
         final ContainerSchemaNode output = getOutput();
-        if(input != null) {
+        if (input != null) {
             ret.add(input);
         }
-        if(output != null) {
+        if (output != null) {
             ret.add(output);
         }
         return ret;
index 133df37c1cc023f7791123a399c428091e9c8eaf..980f5f7c6741efbb965e6be230b850ee5e7b220f 100644 (file)
@@ -97,7 +97,7 @@ class XpathStringParsingPathArgumentBuilder implements Builder<Iterable<PathArgu
         skipCurrentChar();
         checkValid(!allCharactersConsumed(), "Identifier cannot end with '/'.");
         QName name = nextQName();
-        if(allCharactersConsumed() || SLASH == currentChar()) {
+        if (allCharactersConsumed() || SLASH == currentChar()) {
             return computeIdentifier(name);
         } else {
             checkValid(PRECONDITION_START == currentChar(), "Last element must be identifier, predicate or '/'");
@@ -109,7 +109,7 @@ class XpathStringParsingPathArgumentBuilder implements Builder<Iterable<PathArgu
     private DataSchemaContextNode<?> nextContextNode(QName name) {
         current = current.getChild(name);
         checkValid(current != null, "%s is not correct schema node identifier.",name);
-        while(current.isMixin()) {
+        while (current.isMixin()) {
             product.add(current.getIdentifier());
             current = current.getChild(name);
         }
@@ -138,11 +138,11 @@ class XpathStringParsingPathArgumentBuilder implements Builder<Iterable<PathArgu
         checkValid(currentNode.isKeyedEntry(), "Entry %s does not allow specifying predicates.", name);
 
         ImmutableMap.Builder<QName,Object> keyValues = ImmutableMap.builder();
-        while(!allCharactersConsumed() && PRECONDITION_START == currentChar()) {
+        while (!allCharactersConsumed() && PRECONDITION_START == currentChar()) {
             skipCurrentChar();
             skipWhitespaces();
             final QName key;
-            if(DOT == currentChar()) {
+            if (DOT == currentChar()) {
                 key = null;
                 skipCurrentChar();
             } else {
@@ -156,7 +156,7 @@ class XpathStringParsingPathArgumentBuilder implements Builder<Iterable<PathArgu
             checkCurrentAndSkip(PRECONDITION_END, "Precondition must ends with ']'");
 
             // Break-out from method for leaf-list case
-            if(key == null && currentNode.isLeaf()) {
+            if (key == null && currentNode.isLeaf()) {
                 checkValid(offset == data.length(), "Leaf argument must be last argument of instance identifier.");
                 return new YangInstanceIdentifier.NodeWithValue(name, keyValue);
             }
@@ -186,7 +186,7 @@ class XpathStringParsingPathArgumentBuilder implements Builder<Iterable<PathArgu
         // Consume prefix or identifie
         final String maybePrefix = nextIdentifier();
         final String prefix,localName;
-        if(COLON == currentChar()) {
+        if (COLON == currentChar()) {
             // previous token is prefix;
             prefix = maybePrefix;
             skipCurrentChar();
@@ -315,7 +315,7 @@ class XpathStringParsingPathArgumentBuilder implements Builder<Iterable<PathArgu
     }
 
     private void nextSequenceEnd(CharMatcher matcher) {
-        while(!allCharactersConsumed() && matcher.matches(data.charAt(offset))) {
+        while (!allCharactersConsumed() && matcher.matches(data.charAt(offset))) {
             offset++;
         }
     }
index 925fc17a7d340251c0f462aaf671526c9cccaf82..4140e01173499df86fe8b6d74df828a236c33113 100644 (file)
@@ -235,7 +235,7 @@ class YangToSourcesProcessor {
 
             File actualGeneratedYangDir = new File(project.getBuild().getDirectory(),
                     CodeGeneratorArg.YANG_GENERATED_DIR.replace("target" + File.separator, ""));
-            if(!actualGeneratedYangDir.equals(generatedYangDir)) {
+            if (!actualGeneratedYangDir.equals(generatedYangDir)) {
                 addYangsToMetaInf(project, yangFilesRootDir, excludedFiles, actualGeneratedYangDir);
             }
         }
index 7a3f1a3bd3744a43cdbf9dd810948a20989de61f..eeb6137e25fd6fd76a0ee813411ef34253d64754 100644 (file)
@@ -34,7 +34,7 @@ final class ExtensionStatement implements StatementDefinition {
 
     static Map<QName,StatementDefinition> mapFrom(final Collection<ExtensionDefinition> definitions) {
         final HashMap<QName,StatementDefinition> ret = new HashMap<>(definitions.size());
-        for(final ExtensionDefinition def : definitions) {
+        for (final ExtensionDefinition def : definitions) {
             final StatementDefinition value = from(def);
             ret.put(value.getStatementName(), value);
         }
index 542463cd77e1adaa0864a835e2df74cd5db160fc..144c750c7a4002bca27a6d7f86445b8a9828035a 100644 (file)
@@ -692,7 +692,7 @@ class SchemaContextEmitter {
     }
 
     private void emitMust(@Nullable final MustDefinition mustCondition) {
-        if(mustCondition != null && mustCondition.getXpath() != null) {
+        if (mustCondition != null && mustCondition.getXpath() != null) {
             writer.startMustNode(mustCondition.getXpath());
             emitErrorMessageNode(mustCondition.getErrorMessage());
             emitErrorAppTagNode(mustCondition.getErrorAppTag());
@@ -1073,7 +1073,7 @@ class SchemaContextEmitter {
         emitStatusNode(augmentation.getStatus());
         emitDescriptionNode(augmentation.getDescription());
         emitReferenceNode(augmentation.getReference());
-        for(final UsesNode uses: augmentation.getUses()) {
+        for (final UsesNode uses: augmentation.getUses()) {
             emitUsesNode(uses);
         }
 
@@ -1114,7 +1114,7 @@ class SchemaContextEmitter {
     }
 
     private void emitWhen(final RevisionAwareXPath revisionAwareXPath) {
-        if(revisionAwareXPath != null) {
+        if (revisionAwareXPath != null) {
             writer.startWhenNode(revisionAwareXPath);
             writer.endNode();
         }
@@ -1131,10 +1131,10 @@ class SchemaContextEmitter {
         emitDescriptionNode(rpc.getDescription());
         emitReferenceNode(rpc.getReference());
 
-        for(final TypeDefinition<?> typedef : rpc.getTypeDefinitions()) {
+        for (final TypeDefinition<?> typedef : rpc.getTypeDefinitions()) {
             emitTypedefNode(typedef);
         }
-        for(final GroupingDefinition grouping : rpc.getGroupings()) {
+        for (final GroupingDefinition grouping : rpc.getGroupings()) {
             emitGrouping(grouping);
         }
         emitInput(rpc.getInput());
@@ -1179,11 +1179,11 @@ class SchemaContextEmitter {
     private static <T> boolean  isPrefix(final Iterable<T> prefix, final Iterable<T> other) {
         final Iterator<T> prefixIt = prefix.iterator();
         final Iterator<T> otherIt = other.iterator();
-        while(prefixIt.hasNext()) {
-            if(!otherIt.hasNext()) {
+        while (prefixIt.hasNext()) {
+            if (!otherIt.hasNext()) {
                 return false;
             }
-            if(!Objects.deepEquals(prefixIt.next(), otherIt.next())) {
+            if (!Objects.deepEquals(prefixIt.next(), otherIt.next())) {
                 return false;
             }
         }
index d8adf1c89d3f58ba1d958c98e2601db16138fb1f..0baf827c0861029ab626a9cf05f94932c86b5d4c 100644 (file)
@@ -106,13 +106,13 @@ class SingleModuleYinStatementWriter implements StatementTextWriter {
     public void writeArgument(final SchemaPath targetPath) {
         checkArgumentApplicable();
         final StringBuilder valueStr = new StringBuilder();
-        if(targetPath.isAbsolute()) {
+        if (targetPath.isAbsolute()) {
             valueStr.append("/");
         }
         final Iterator<QName> argIt = targetPath.getPathFromRoot().iterator();
-        while(argIt.hasNext()) {
+        while (argIt.hasNext()) {
             valueStr.append(toPrefixedString(argIt.next()));
-            if(argIt.hasNext()) {
+            if (argIt.hasNext()) {
                 valueStr.append("/");
             }
         }
@@ -175,7 +175,7 @@ class SingleModuleYinStatementWriter implements StatementTextWriter {
     }
 
     private @Nullable String ensureAndGetXmlNamespacePrefix(final URI namespace) {
-        if(YangConstants.RFC6020_YANG_NAMESPACE.equals(namespace)) {
+        if (YangConstants.RFC6020_YANG_NAMESPACE.equals(namespace)) {
          // YANG namespace does not have prefix if used in arguments.
             return null;
 
@@ -185,7 +185,7 @@ class SingleModuleYinStatementWriter implements StatementTextWriter {
             // FIXME: declare prefix
             prefix =prefixToNamespace.inverse().get(namespace);
         }
-        if(prefix == null) {
+        if (prefix == null) {
             throw new IllegalArgumentException("Namespace " + namespace + " is not bound to imported prefixes.");
         }
         return prefix;
index e8461d559ed8a7c21386dfc0585f6b0b40b650b5..dcc63639ce403f62ad7e6fbb4fbbdbba93168f2b 100644 (file)
@@ -86,7 +86,7 @@ public final class YinExportUtils {
     private static Map<String, URI> prefixToNamespace(final SchemaContext ctx, final Module module) {
         final BiMap<String, URI> prefixMap = HashBiMap.create(module.getImports().size() + 1);
         prefixMap.put(module.getPrefix(), module.getNamespace());
-        for(final ModuleImport imp : module.getImports()) {
+        for (final ModuleImport imp : module.getImports()) {
             final String prefix = imp.getPrefix();
             final URI namespace = getModuleNamespace(ctx,imp.getModuleName());
             prefixMap.put(prefix, namespace);
@@ -95,8 +95,8 @@ public final class YinExportUtils {
     }
 
     private static URI getModuleNamespace(final SchemaContext ctx, final String moduleName) {
-        for(final Module module : ctx.getModules()) {
-            if(moduleName.equals(module.getName())) {
+        for (final Module module : ctx.getModules()) {
+            if (moduleName.equals(module.getName())) {
                 return module.getNamespace();
             }
         }
index 0234cc7759f74bc84e0f65190834da0a32e6c300..6a4b83a5ebd5e9976a248e6a75bc60e3004a1812 100644 (file)
@@ -73,7 +73,7 @@ public final class FilesystemSchemaSourceCache<T extends SchemaSourceRepresentat
 
         checkSupportedRepresentation(representation);
 
-        if(!storageDirectory.exists()) {
+        if (!storageDirectory.exists()) {
             Preconditions.checkArgument(storageDirectory.mkdirs(), "Unable to create cache directory at %s", storageDirectory);
         }
         Preconditions.checkArgument(storageDirectory.exists());
@@ -86,7 +86,7 @@ public final class FilesystemSchemaSourceCache<T extends SchemaSourceRepresentat
 
     private static void checkSupportedRepresentation(final Class<? extends SchemaSourceRepresentation> representation) {
         for (final Class<? extends SchemaSourceRepresentation> supportedRepresentation : STORAGE_ADAPTERS.keySet()) {
-            if(supportedRepresentation.isAssignableFrom(representation)) {
+            if (supportedRepresentation.isAssignableFrom(representation)) {
                 return;
             }
         }
@@ -116,7 +116,7 @@ public final class FilesystemSchemaSourceCache<T extends SchemaSourceRepresentat
     @Override
     public synchronized CheckedFuture<? extends T, SchemaSourceException> getSource(final SourceIdentifier sourceIdentifier) {
         final File file = sourceIdToFile(sourceIdentifier, storageDirectory);
-        if(file.exists() && file.canRead()) {
+        if (file.exists() && file.canRead()) {
             LOG.trace("Source {} found in cache as {}", sourceIdentifier, file);
             final SchemaSourceRepresentation restored = STORAGE_ADAPTERS.get(representation).restore(sourceIdentifier, file);
             return Futures.immediateCheckedFuture(representation.cast(restored));
@@ -130,7 +130,7 @@ public final class FilesystemSchemaSourceCache<T extends SchemaSourceRepresentat
     protected synchronized void offer(final T source) {
         LOG.trace("Source {} offered to cache", source.getIdentifier());
         final File file = sourceIdToFile(source);
-        if(file.exists()) {
+        if (file.exists()) {
             LOG.debug("Source {} already in cache as {}", source.getIdentifier(), file);
             return;
         }
@@ -276,7 +276,7 @@ public final class FilesystemSchemaSourceCache<T extends SchemaSourceRepresentat
             fileName = com.google.common.io.Files.getNameWithoutExtension(fileName);
 
             final Optional<SourceIdentifier> si = getSourceIdentifier(fileName);
-            if(si.isPresent()) {
+            if (si.isPresent()) {
                 LOG.trace("Restoring cached file {} as {}", file, si.get());
                 cachedSchemas.add(si.get());
             } else {
index 74ff865d17d8c768baefccd375a74cee64f78d00..f2d277d3cceec786d33b5f883f615e1c58848d2e 100644 (file)
@@ -50,7 +50,7 @@ public abstract class DerivedType<T extends TypeDefinition<T>> implements TypeDe
     }
 
     public static TypeDefinition<?> from(final TypeDefinition<?> type) {
-        if(type instanceof ExtendedType) {
+        if (type instanceof ExtendedType) {
             return from((ExtendedType) type);
         }
         return type;
@@ -88,13 +88,13 @@ public abstract class DerivedType<T extends TypeDefinition<T>> implements TypeDe
         if (baseType instanceof StringTypeDefinition) {
             return new DerivedStringType(type);
         }
-        if(baseType instanceof UnionTypeDefinition) {
+        if (baseType instanceof UnionTypeDefinition) {
             return new DerivedUnionType(type);
         }
-        if(baseType instanceof EnumTypeDefinition) {
+        if (baseType instanceof EnumTypeDefinition) {
             return new DerivedEnumType(type);
         }
-        if(baseType instanceof BitsTypeDefinition) {
+        if (baseType instanceof BitsTypeDefinition) {
             return new DerivedBitsType(type);
         }
         throw new IllegalArgumentException("Not supported base type of " + baseType.getClass());
index 1ea460e69517fb25e28dfbef5eec7508a6315705..8cf162b26c79db31620fe90b2e5057698a644bdd 100644 (file)
@@ -39,7 +39,7 @@ public final class EnumerationType implements EnumTypeDefinition {
     private EnumerationType(final SchemaPath path, final List<EnumPair> enums, final Optional<EnumPair> defaultEnum) {
         this.path = Preconditions.checkNotNull(path,"path must not be null");
         this.enums = ImmutableList.copyOf(Preconditions.checkNotNull(enums, "enums must not be null."));
-        if(defaultEnum.isPresent()) {
+        if (defaultEnum.isPresent()) {
             Preconditions.checkArgument(enums.contains(defaultEnum.get()),"defaultEnum must be contained in defined enumerations.");
             this.defaultEnum = defaultEnum.get();
         } else {
index 728f52d4580c906e86101a65c4c03dd3e3c30e45..2a5dd589f7ea3bded5afa849dc5faed651dd16ae 100644 (file)
@@ -193,16 +193,16 @@ public final class FilteringSchemaContextProxy extends AbstractSchemaContext {
 
         for (ModuleId rootModule : rootModules) {
 
-            if(rootModule.equals(new ModuleId(module.getName(), module.getRevision()))) {
+            if (rootModule.equals(new ModuleId(module.getName(), module.getRevision()))) {
                 return true;
             }
 
             //handling/checking imports regarding root modules
             for (ModuleImport moduleImport : module.getImports()) {
 
-                if(moduleImport.getModuleName().equals(rootModule.getName())) {
+                if (moduleImport.getModuleName().equals(rootModule.getName())) {
 
-                    if(moduleImport.getRevision() != null && !moduleImport.getRevision().equals(rootModule.getRev())) {
+                    if (moduleImport.getRevision() != null && !moduleImport.getRevision().equals(rootModule.getRev())) {
                         return false;
                     }
 
index b10633a2ea20e8d503fd886e92fe7dbad4335a61..7f494b14b5467d1368dc5e195fa98e4546083e7c 100644 (file)
@@ -655,13 +655,13 @@ public final class SchemaContextUtil {
         // FIXME this is just to preserve backwards compatibility since yangtools do not mind wrong leafref xpaths
         // and current expected behaviour for such cases is to just use pure string
         // This should throw an exception about incorrect XPath in leafref
-        if(dataSchemaNode == null) {
+        if (dataSchemaNode == null) {
             return null;
         }
 
         final TypeDefinition<?> targetTypeDefinition = typeDefinition(dataSchemaNode);
 
-        if(targetTypeDefinition instanceof LeafrefTypeDefinition) {
+        if (targetTypeDefinition instanceof LeafrefTypeDefinition) {
             return getBaseTypeForLeafRef(((LeafrefTypeDefinition) targetTypeDefinition), schemaContext, dataSchemaNode);
         } else {
             return targetTypeDefinition;
index f57224774030c42cbcc12678c938d6e9e1eea325..5121da0ec7d75ce02d776572b0567ce16903b1fd 100644 (file)
@@ -24,7 +24,7 @@ public class SchemaNodeUtils {
     }
 
     public static Optional<SchemaNode> getOriginalIfPossible(final SchemaNode node) {
-        if(node instanceof DerivableSchemaNode) {
+        if (node instanceof DerivableSchemaNode) {
             @SuppressWarnings("unchecked")
             final Optional<SchemaNode> ret  = (Optional<SchemaNode>) (((DerivableSchemaNode) node).getOriginal());
             return ret;
@@ -35,7 +35,7 @@ public class SchemaNodeUtils {
     public static SchemaNode getRootOriginalIfPossible(final SchemaNode data) {
         Optional<SchemaNode> previous = Optional.absent();
         Optional<SchemaNode> next = getOriginalIfPossible(data);
-        while(next.isPresent()) {
+        while (next.isPresent()) {
             previous = next;
             next = getOriginalIfPossible(next.get());
         }
index 5fd9c37364de30dca7c6a58ac099644b2f817046..c4f7f1acb4e5195ddbb68a94153b70b5acc00b2f 100644 (file)
@@ -418,7 +418,7 @@ public class SchemaContextProxyTest {
 
         Set<Module> modSet = Sets.newHashSet();
 
-        if(expected!=null) {
+        if (expected!=null) {
 
             modSet = Sets.newHashSet(expected);
         }
@@ -428,7 +428,7 @@ public class SchemaContextProxyTest {
         assertEquals(modSet, modSetFiltering);
 
         //asserting collections
-        if(expected!=null) {
+        if (expected!=null) {
             for (final Module module : expected) {
                 assertEquals(module, filteringSchemaContextProxy.findModuleByName(module.getName(), module.getRevision()));
 
@@ -447,7 +447,7 @@ public class SchemaContextProxyTest {
 
         Set<Module> modulesSet = new HashSet<>();
 
-        if(modules!=null) {
+        if (modules!=null) {
 
             modulesSet = Sets.newHashSet(modules);
 
@@ -460,7 +460,7 @@ public class SchemaContextProxyTest {
 
         Set<ModuleId> moduleIds = Sets.newHashSet();
 
-        if(modules!=null && modules.size()>0) {
+        if (modules!=null && modules.size()>0) {
 
             for (Module module : modules) {
 
index e7808dc37db17d26727c6470357e5f952e8e455b..fef3cf84daf96ec6749d84edfd6f00325feabaaa 100644 (file)
@@ -174,7 +174,7 @@ public class ModuleBuilder extends AbstractDocumentedDataNodeContainerBuilder im
      */
     @Override
     public Module build() {
-        if(instance != null) {
+        if (instance != null) {
             return instance;
         }
 
index d9d0c4138495119426632a26d5e26b7917449b60..b3a0aa7623f23c70d0744b6474e7494edd3cc619 100644 (file)
@@ -263,7 +263,7 @@ public final class RefineUtils {
 
 
         final DocumentedNodeBuilder documentedNode;
-        if(node instanceof DocumentedNodeBuilder) {
+        if (node instanceof DocumentedNodeBuilder) {
             documentedNode = ((DocumentedNodeBuilder) node);
         } else {
             documentedNode = null;
@@ -273,7 +273,7 @@ public final class RefineUtils {
 
 
         if (description != null) {
-            if(documentedNode != null) {
+            if (documentedNode != null) {
                 documentedNode.setDescription(description);
             } else {
                 throw new YangParseException(moduleName, line, String.format("Cannot refine description in of target %s",refine.getTargetPathString()));
@@ -283,7 +283,7 @@ public final class RefineUtils {
 
         String reference = refine.getReference();
         if (reference != null) {
-            if(documentedNode != null) {
+            if (documentedNode != null) {
                 documentedNode.setReference(reference);
             } else {
                 throw new YangParseException(moduleName, line, String.format("Cannot refine reference in of target %s",refine.getTargetPathString()));
@@ -292,7 +292,7 @@ public final class RefineUtils {
 
         Boolean config = refine.isConfiguration();
         if (config != null) {
-            if(node instanceof DataSchemaNodeBuilder) {
+            if (node instanceof DataSchemaNodeBuilder) {
                 ((DataSchemaNodeBuilder) node).setConfiguration(config);
             } else {
                 throw new YangParseException(moduleName, line, String.format("Cannot refine config of target %s ",refine.getTargetPathString()));
index 2cdf33ae2690dee1d378204410dab8d85882f382..2311abf1d2d8b287acb2e517bf8970e6b8820f47 100644 (file)
@@ -389,7 +389,7 @@ public final class ParserListenerUtils {
             final String str = stringNode.getText();
             char firstChar = str.charAt(0);
             final CharMatcher quoteMatcher;
-            if(SINGLE_QUOTE_MATCHER.matches(firstChar)) {
+            if (SINGLE_QUOTE_MATCHER.matches(firstChar)) {
                 quoteMatcher = SINGLE_QUOTE_MATCHER;
             } else if (DOUBLE_QUOTE_MATCHER.matches(firstChar)) {
                 quoteMatcher = DOUBLE_QUOTE_MATCHER;
@@ -1981,7 +1981,7 @@ public final class ParserListenerUtils {
 
     public static <T extends ParserRuleContext> Optional<T> getFirstContext(final ParserRuleContext context,final Class<T> contextType) {
         List<T> potential = context.getRuleContexts(contextType);
-        if(potential.isEmpty()) {
+        if (potential.isEmpty()) {
             return Optional.absent();
         }
         return Optional.of(potential.get(0));
index affa642e43db3f0dcfcc4628e79dee119bde33c0..f2180a3b2ec0706ad7ee021260252437ea4c7c87 100644 (file)
@@ -96,7 +96,7 @@ final class DependencyResolver {
                 final Set<ModuleImport> dependencies = dep.getDependencies();
 
                 // in case of submodule, remember belongs to
-                if(dep instanceof YangModelDependencyInfo.SubmoduleDependencyInfo) {
+                if (dep instanceof YangModelDependencyInfo.SubmoduleDependencyInfo) {
                     final String parent = ((YangModelDependencyInfo.SubmoduleDependencyInfo) dep).getParentModule();
                     submodules.put(id, new BelongsToDependency(parent));
                 }
index 53c12ccd5712e14940d51c60c8f87e34e29625c7..81984076fe18bf58020750e3d295b2a879a1563d 100644 (file)
@@ -247,7 +247,7 @@ public abstract class NamespaceBehaviour<K, V, N extends IdentifierNamespace<K,
 
     protected static NamespaceStorageNode findClosestTowardsRoot(NamespaceStorageNode storage, StorageNodeType type) {
         NamespaceStorageNode current = storage;
-        while(current != null && current.getStorageNodeType() != type) {
+        while (current != null && current.getStorageNodeType() != type) {
             current = current.getParentNamespaceStorage();
         }
         return current;
index 4ab08c5cdf2036d52391e0eb8d86a464dbd4e4f9..a4c0b4446b40dbc596e114a3ce6329b983133310 100644 (file)
@@ -268,7 +268,7 @@ class BuildGlobalContext extends NamespaceStorageSupport implements NamespaceBeh
                 // We reset progressing to false.
                 progressing = false;
                 Iterator<SourceSpecificContext> currentSource = sourcesToProgress.iterator();
-                while(currentSource.hasNext()) {
+                while (currentSource.hasNext()) {
                     SourceSpecificContext nextSourceCtx = currentSource.next();
                     PhaseCompletionProgress sourceProgress = nextSourceCtx.tryToCompletePhase(currentPhase);
                     switch (sourceProgress) {
index 296624567300c0c012fbb233b0b639dd04755566..25fe2ec911d91836182aa3121cb4663cef6cbef3 100644 (file)
@@ -66,8 +66,8 @@ class ModifierImpl implements ModelActionBuilder {
     private boolean removeSatisfied() {
         Iterator<AbstractPrerequisite<?>> prereq = unsatisfied.iterator();
         boolean allSatisfied = true;
-        while(prereq.hasNext()) {
-            if(prereq.next().isDone()) {
+        while (prereq.hasNext()) {
+            if (prereq.next().isDone()) {
                 // We are removing current prerequisite from list.
                 prereq.remove();
             } else {
index b62401b78d6dc97c5eb47f885552763110582283..5f77fd4aaf4c3ec9c60ce4a010728621e24499e7 100644 (file)
@@ -67,7 +67,7 @@ abstract class NamespaceBehaviourWithListeners<K, V, N extends IdentifierNamespa
                 toNotify.add(listener);
             }
         }
-        for(ValueAddedListener<K> listener : toNotify) {
+        for (ValueAddedListener<K> listener : toNotify) {
             listener.trigger(value);
         }
     }
index 63db5d1c7010c8abe6fdd8028bc9bb3b40d29350..e578e912ab210a982be1c53b3f0bd2849f625b26 100644 (file)
@@ -68,11 +68,11 @@ abstract class NamespaceStorageSupport implements NamespaceStorageNode {
         Map<K, V> localNamespace = (Map<K,V>) namespaces.get(type);
 
         V potential = null;
-        if(localNamespace != null) {
+        if (localNamespace != null) {
             potential = localNamespace.get(key);
         }
 
-        if(potential == null && Utils.isModuleIdentifierWithoutSpecifiedRevision(key)) {
+        if (potential == null && Utils.isModuleIdentifierWithoutSpecifiedRevision(key)) {
             potential = getRegardlessOfRevision((ModuleIdentifier)key,(Map<ModuleIdentifier,V>)localNamespace);
         }
 
@@ -108,7 +108,7 @@ abstract class NamespaceStorageSupport implements NamespaceStorageNode {
     public <K, V, N extends IdentifierNamespace<K, V>> void addToLocalStorage(final Class<N> type, final K key, final V value) {
         @SuppressWarnings("unchecked")
         Map<K, V> localNamespace = (Map<K,V>) namespaces.get(type);
-        if(localNamespace == null) {
+        if (localNamespace == null) {
             checkLocalNamespaceAllowed(type);
             localNamespace = new HashMap<>();
             namespaces.put(type, localNamespace);
index 7520c8ff730e1474094fc0a088205d3dc7bb7414..b24f6e3e04e4db27124921098e92991886ef7961 100644 (file)
@@ -145,7 +145,7 @@ public class RootStatementContext<A, D extends DeclaredStatement<A>, E extends E
         copy.addAllToCopyHistory(this.getCopyHistory());
         copy.addToCopyHistory(typeOfCopy);
 
-        if(this.getOriginalCtx() != null) {
+        if (this.getOriginalCtx() != null) {
             copy.setOriginalCtx(this.getOriginalCtx());
         } else {
             copy.setOriginalCtx(this);
index ef26cda0730361e2122ec47e873a76136b5b7a85..ead4acb8aad1afb194781dea09562afc97bbf3b0 100644 (file)
@@ -353,7 +353,7 @@ public class SourceSpecificContext implements NamespaceStorageNode, NamespaceBeh
     private PrefixToModule preLinkagePrefixes() {
         PrefixToModuleMap preLinkagePrefixes = new PrefixToModuleMap(true);
         Map<String, URI> prefixToNamespaceMap = getAllFromLocalStorage(ImpPrefixToNamespace.class);
-        if(prefixToNamespaceMap == null) {
+        if (prefixToNamespaceMap == null) {
             //:FIXME if it is a submodule without any import, the map is null. Handle also submodules and includes...
             return null;
         }
index 3f8684e7dba8d52e1bae475b7017188681cd5e33..f6499e1e6ae38017c7b9956d6b2e36ed06cd9cd3 100644 (file)
@@ -41,7 +41,7 @@ class StatementContextWriter implements StatementWriter {
     }
 
     void defferedCreate() throws SourceException {
-        if(current != null) {
+        if (current != null) {
             parent = current.build();
             current = null;
         }
index 8a6d80a856402fa32045d2b818c599c656adc897..c7e1c1a8de51adbefaf17b27088ba6adf1aceeee 100644 (file)
@@ -142,7 +142,7 @@ final class SubstatementContext<A, D extends DeclaredStatement<A>, E extends Eff
         copy.addAllToCopyHistory(this.getCopyHistory());
         copy.addToCopyHistory(typeOfCopy);
 
-        if(this.getOriginalCtx() != null) {
+        if (this.getOriginalCtx() != null) {
             copy.setOriginalCtx(this.getOriginalCtx());
         } else {
             copy.setOriginalCtx(this);
index 0c9fa1d9f4b145280b427cd55af780ea78f6c503..c171a7a1f308bd277f7bf4f264b3cebd5e8e9979 100644 (file)
@@ -118,7 +118,7 @@ public final class AugmentUtils {
          * If the statement argument is not QName, it cannot be mandatory statement,
          * therefore return false and skip mandatory nodes validation
          */
-        if(!(sourceCtx.getStatementArgument() instanceof QName)) {
+        if (!(sourceCtx.getStatementArgument() instanceof QName)) {
             return false;
         }
         QName sourceStmtQName = (QName) sourceCtx.getStatementArgument();
index 940e7c74eb292ce810b580b0306da632b313b625..cf5450afad4305787f97e640fe62dcd2e1397647 100644 (file)
@@ -54,7 +54,7 @@ public class ChildSchemaNodes<D extends DeclaredStatement<QName>,E extends Effec
 
     private static NamespaceStorageNode globalOrStatementSpecific(final NamespaceBehaviour.NamespaceStorageNode storage) {
         NamespaceStorageNode current = storage;
-        while(current.getStorageNodeType() != StorageNodeType.STATEMENT_LOCAL && current.getStorageNodeType() != StorageNodeType.GLOBAL) {
+        while (current.getStorageNodeType() != StorageNodeType.STATEMENT_LOCAL && current.getStorageNodeType() != StorageNodeType.GLOBAL) {
             current = current.getParentNamespaceStorage();
         }
         return current;
index 67297ebb1085490c71201bc42f93dff45ee0c7a4..40d84cee4c475f468952b1d75d37698f59389a17 100644 (file)
@@ -41,14 +41,14 @@ class SchemaNodeIdentifierBuildNamespace extends
     public StmtContext.Mutable<?, ?, EffectiveStatement<?, ?>> getFrom(NamespaceStorageNode storage, SchemaNodeIdentifier key) {
 
         final NamespaceStorageNode lookupStartStorage;
-        if(key.isAbsolute() || storage.getStorageNodeType() == StorageNodeType.ROOT_STATEMENT_LOCAL) {
+        if (key.isAbsolute() || storage.getStorageNodeType() == StorageNodeType.ROOT_STATEMENT_LOCAL) {
             lookupStartStorage = NamespaceBehaviour.findClosestTowardsRoot(storage, StorageNodeType.GLOBAL);
         } else {
             lookupStartStorage = storage;
         }
         Iterator<QName> iterator = key.getPathFromRoot().iterator();
-        if(!iterator.hasNext()) {
-            if(lookupStartStorage instanceof StmtContext<?, ?, ?>) {
+        if (!iterator.hasNext()) {
+            if (lookupStartStorage instanceof StmtContext<?, ?, ?>) {
                 return (StmtContext.Mutable<?, ?, EffectiveStatement<?, ?>>) lookupStartStorage;
             } else {
                 return null;
@@ -57,7 +57,7 @@ class SchemaNodeIdentifierBuildNamespace extends
         QName nextPath = iterator.next();
         StmtContext.Mutable<?, ?, EffectiveStatement<?, ?>> current = (StmtContext.Mutable<?, ?, EffectiveStatement<?, ?>>) lookupStartStorage
                 .getFromLocalStorage(ChildSchemaNodes.class, nextPath);
-        if(current == null && lookupStartStorage instanceof StmtContext<?, ?, ?>) {
+        if (current == null && lookupStartStorage instanceof StmtContext<?, ?, ?>) {
             return tryToFindUnknownStatement(nextPath.getLocalName(), (Mutable<?, ?, EffectiveStatement<?, ?>>) lookupStartStorage);
         }
         while (current != null && iterator.hasNext()) {
index 3080e48b5e4bbfc4ced75a4ff00f085b9197f763..fb322026479f3f71d07b2ebcd2381ffbd8ae5211 100644 (file)
@@ -124,7 +124,7 @@ public final class YangStatementSourceImpl implements StatementStreamSource {
         final YangErrorListener errorListener = new YangErrorListener();
         parser.addErrorListener(errorListener);
 
-        if(stream instanceof NamedFileInputStream) {
+        if (stream instanceof NamedFileInputStream) {
             sourceName = stream.toString();
         } else {
             sourceName = null;
index 15888ae5906beac36a4f6a37fff79c854c09b1b7..7b35dad07ce68c6bcb99d9619998388c8f4182e2 100644 (file)
@@ -78,7 +78,7 @@ public abstract class EffectiveStatementBase<A, D extends DeclaredStatement<A>>
         final Collection<StatementContextBase<?, ?, ?>> effectiveSubstatements = ctx.effectiveSubstatements();
         final Collection<StatementContextBase<?, ?, ?>> substatementsInit = new ArrayList<>();
 
-        for(StatementContextBase<?, ?, ?> declaredSubstatement : ctx.declaredSubstatements()) {
+        for (StatementContextBase<?, ?, ?> declaredSubstatement : ctx.declaredSubstatements()) {
             if (declaredSubstatement.getPublicDefinition().equals(Rfc6020Mapping.USES)) {
                 substatementsInit.add(declaredSubstatement);
                 substatementsInit.addAll(declaredSubstatement.getEffectOfStatement());
index 00bf6c10ca2c86479fbadee2a358aa3de0406935..da4a2a92ec937e6e6c2fbec70fa2ef3b46a6f283 100644 (file)
@@ -80,7 +80,7 @@ public class ExtensionEffectiveStatementImpl extends AbstractEffectiveDocumented
 
     @Override
     public List<UnknownSchemaNode> getUnknownSchemaNodes() {
-        if(unknownNodes == null) {
+        if (unknownNodes == null) {
             initUnknownSchemaNodes();
         }
         return unknownNodes;
index 7e3fcbede7edd1f78557cd3668bda8dcc18fc0d0..3083dad802289162a22fa105fe95602a97d6991a 100644 (file)
@@ -48,7 +48,7 @@ class ModuleOrModuleBuilder {
 
     static List<ModuleOrModuleBuilder> fromAll(final Collection<Module> modules, final Collection<ModuleBuilder> moduleBuilders) {
         List<ModuleOrModuleBuilder> result = new ArrayList<>(modules.size() + moduleBuilders.size());
-        for(Module m: modules){
+        for (Module m: modules){
             result.add(new ModuleOrModuleBuilder(m));
         }
         for (ModuleBuilder mb : moduleBuilders) {
index d88d36eade2eddc86431baa94e63c0c368c5737e..15ba925673c9fe00493bcf1d2148e0711f16e150 100644 (file)
@@ -615,8 +615,8 @@ public class UsesAugmentTest {
         Set<TypeDefinition<?>> types = testModule.getTypeDefinitions();
 
         TypeDefinition<?> intExt = null;
-        for(TypeDefinition<?> td : types) {
-            if("int-ext".equals(td.getQName().getLocalName())) {
+        for (TypeDefinition<?> td : types) {
+            if ("int-ext".equals(td.getQName().getLocalName())) {
                 intExt = td;
             }
         }
@@ -629,10 +629,10 @@ public class UsesAugmentTest {
 
         TypeDefinition<?> uint8 = null;
         TypeDefinition<?> pv = null;
-        for(TypeDefinition<?> td : union.getTypes()) {
-            if("uint8".equals(td.getQName().getLocalName())) {
+        for (TypeDefinition<?> td : union.getTypes()) {
+            if ("uint8".equals(td.getQName().getLocalName())) {
                 uint8 = td;
-            } else if("protocol-version".equals(td.getQName().getLocalName())) {
+            } else if ("protocol-version".equals(td.getQName().getLocalName())) {
                 pv = td;
             }
         }