Use String concatenation instead of StringBuffer/Builder
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / builder / impl / ModuleIdentifierImpl.java
index 7a2c8f1c1d203e198a9df02079ae81aa03b1f10c..63608b3e7a71d6d41aa40468fb8e56f623ead4d9 100644 (file)
@@ -8,12 +8,9 @@
 package org.opendaylight.yangtools.yang.parser.builder.impl;
 
 import static com.google.common.base.Preconditions.checkNotNull;
-
 import com.google.common.base.Optional;
-
 import java.net.URI;
 import java.util.Date;
-
 import org.opendaylight.yangtools.yang.common.QNameModule;
 import org.opendaylight.yangtools.yang.model.api.ModuleIdentifier;
 
@@ -21,7 +18,10 @@ import org.opendaylight.yangtools.yang.model.api.ModuleIdentifier;
  * ModuleIdentifier that can be used for indexing/searching by name.
  * Name is only non-null attribute.
  * Equality check on namespace and revision is only triggered if they are non-null
+ *
+ * @deprecated Pre-Beryllium implementation, scheduled for removal.
  */
+@Deprecated
 public class ModuleIdentifierImpl implements ModuleIdentifier {
     private final QNameModule qnameModule;
     private final String name;
@@ -56,7 +56,7 @@ public class ModuleIdentifierImpl implements ModuleIdentifier {
         return "ModuleIdentifierImpl{" +
                 "name='" + name + '\'' +
                 ", namespace=" + getNamespace() +
-                ", revision=" + getRevision() +
+                ", revision=" + qnameModule.getFormattedRevision() +
                 '}';
     }
 
@@ -65,7 +65,7 @@ public class ModuleIdentifierImpl implements ModuleIdentifier {
         if (this == o) {
             return true;
         }
-        if (o == null || (o instanceof ModuleIdentifier == false)) {
+        if (!(o instanceof ModuleIdentifier)) {
             return false;
         }