Propagate @Nonnull and @Nullable annotations
[yangtools.git] / yang / yang-data-api / src / main / java / org / opendaylight / yangtools / yang / data / api / StackedPathArguments.java
index df047a7fdff1643a11ba301a084bde0f66cfea17..690e2a438b3c3f9a32fe3e24fea30255a91caeab 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
+ *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
@@ -39,9 +40,8 @@ final class StackedPathArguments extends PathArgumentList {
     public PathArgument get(final int index) {
         if (index < base.size()) {
             return base.get(index);
-        } else {
-            return stack.get(index - base.size());
         }
+        return stack.get(index - base.size());
     }
 
     @Override
@@ -70,6 +70,7 @@ final class StackedPathArguments extends PathArgumentList {
         return base.lastIndexOf(srch);
     }
 
+    @Nonnull
     @Override
     public UnmodifiableIterator<PathArgument> iterator() {
         return new IteratorImpl(base, stack);