Sonar issues clean-up
[yangtools.git] / yang / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / repo / api / SchemaResolutionException.java
index 42b9d3802e137b3f6be5d71cb58ab3833d8ab98b..9f5e22bc9f9e22c827e51924ff8ae1a00f7de54b 100644 (file)
@@ -8,17 +8,14 @@
 package org.opendaylight.yangtools.yang.model.repo.api;
 
 import com.google.common.annotations.Beta;
-import com.google.common.base.Objects;
-import com.google.common.base.Objects.ToStringHelper;
+import com.google.common.base.MoreObjects;
+import com.google.common.base.MoreObjects.ToStringHelper;
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableMultimap;
 import com.google.common.collect.Multimap;
-
 import java.util.Collection;
 import java.util.Collections;
-
 import javax.annotation.Nonnull;
-
 import org.opendaylight.yangtools.yang.model.api.ModuleImport;
 
 /**
@@ -26,24 +23,27 @@ import org.opendaylight.yangtools.yang.model.api.ModuleImport;
  */
 @Beta
 public class SchemaResolutionException extends SchemaSourceException {
+
+    private static final String MESSAGE_BLUEPRINT = "%s, resolved sources: %s, unsatisfied imports: %s";
+
     private static final long serialVersionUID = 1L;
     private final Multimap<SourceIdentifier, ModuleImport> unsatisfiedImports;
     private final Collection<SourceIdentifier> resolvedSources;
 
-    public SchemaResolutionException(final @Nonnull String message) {
+    public SchemaResolutionException(@Nonnull final String message) {
         this(message, (Throwable)null);
     }
 
-    public SchemaResolutionException(final @Nonnull String message, final Throwable cause) {
+    public SchemaResolutionException(@Nonnull final String message, final Throwable cause) {
         this(message, cause, Collections.<SourceIdentifier>emptySet(), ImmutableMultimap.<SourceIdentifier, ModuleImport>of());
     }
 
-    public SchemaResolutionException(final @Nonnull String message, final Collection<SourceIdentifier> resolvedSources,
+    public SchemaResolutionException(@Nonnull final String message, final Collection<SourceIdentifier> resolvedSources,
             final @Nonnull Multimap<SourceIdentifier, ModuleImport> unsatisfiedImports) {
         this(message, null, resolvedSources, unsatisfiedImports);
     }
 
-    public SchemaResolutionException(final @Nonnull String message, final Throwable cause,
+    public SchemaResolutionException(@Nonnull final String message, final Throwable cause,
             @Nonnull final Collection<SourceIdentifier> resolvedSources,
             @Nonnull final Multimap<SourceIdentifier, ModuleImport> unsatisfiedImports) {
         super(formatMessage(message, resolvedSources, unsatisfiedImports), cause);
@@ -51,7 +51,6 @@ public class SchemaResolutionException extends SchemaSourceException {
         this.resolvedSources = ImmutableList.copyOf(resolvedSources);
     }
 
-    private static final String MESSAGE_BLUEPRINT = "%s, resolved sources: %s, unsatisfied imports: %s";
     private static String formatMessage(final String message, final Collection<SourceIdentifier> resolvedSources, final Multimap<SourceIdentifier, ModuleImport> unsatisfiedImports) {
         return String.format(MESSAGE_BLUEPRINT, message, resolvedSources, unsatisfiedImports);
     }
@@ -74,7 +73,7 @@ public class SchemaResolutionException extends SchemaSourceException {
 
     @Override
     public final String toString() {
-        return addToStringAttributes(Objects.toStringHelper(this).add("unsatisfiedImports", unsatisfiedImports)).toString();
+        return addToStringAttributes(MoreObjects.toStringHelper(this).add("unsatisfiedImports", unsatisfiedImports)).toString();
     }
 
     protected ToStringHelper addToStringAttributes(final ToStringHelper toStringHelper) {