Bug 7438: Allow identityref type to reference multiple base identities
[yangtools.git] / yang / yang-model-util / src / main / java / org / opendaylight / yangtools / yang / model / util / SchemaNodeUtils.java
index 3fec57a621c5de970fec76863e1f8b9100d593ef..5121da0ec7d75ce02d776572b0567ce16903b1fd 100644 (file)
@@ -23,8 +23,8 @@ public class SchemaNodeUtils {
         throw new UnsupportedOperationException("Utility class");
     }
 
-    public static final Optional<SchemaNode> getOriginalIfPossible(final SchemaNode node) {
-        if(node instanceof DerivableSchemaNode) {
+    public static Optional<SchemaNode> getOriginalIfPossible(final SchemaNode node) {
+        if (node instanceof DerivableSchemaNode) {
             @SuppressWarnings("unchecked")
             final Optional<SchemaNode> ret  = (Optional<SchemaNode>) (((DerivableSchemaNode) node).getOriginal());
             return ret;
@@ -32,10 +32,10 @@ public class SchemaNodeUtils {
         return Optional.absent();
     }
 
-    public static final  SchemaNode getRootOriginalIfPossible(final SchemaNode data) {
+    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());
         }
@@ -49,7 +49,7 @@ public class SchemaNodeUtils {
      * @param qname input or output QName with namespace same as RPC
      * @return input or output schema. Returns null if RPC does not have input/output specified.
      */
-    public static @Nullable ContainerSchemaNode getRpcDataSchema(final @Nonnull RpcDefinition rpc, @Nonnull final QName qname) {
+    @Nullable public static ContainerSchemaNode getRpcDataSchema(@Nonnull final RpcDefinition rpc, @Nonnull final QName qname) {
         Preconditions.checkNotNull(rpc, "Rpc Schema must not be null");
         Preconditions.checkNotNull(qname,"QName must not be null");
         switch (qname.getLocalName()) {