Rename to match the name of classes that are supplied to codec
Change-Id: I4b67ce8343cd0227728c55ba9a0181855464ecc6
(cherry picked from commit a0f6530e1ba05274e0638db4556393243da6ff37)
diff --git a/core/store/dist/src/main/java/org/onosproject/store/resource/impl/Codecs.java b/core/store/dist/src/main/java/org/onosproject/store/resource/impl/Codecs.java
index 07ce9bf..41769e2 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/resource/impl/Codecs.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/resource/impl/Codecs.java
@@ -46,8 +46,8 @@
}
private void init() {
- codecs.put(VlanId.class, new VlanCodec());
- codecs.put(MplsLabel.class, new MplsCodec());
+ codecs.put(VlanId.class, new VlanIdCodec());
+ codecs.put(MplsLabel.class, new MplsLabelCodec());
}
/**
diff --git a/core/store/dist/src/main/java/org/onosproject/store/resource/impl/ConsistentResourceStore.java b/core/store/dist/src/main/java/org/onosproject/store/resource/impl/ConsistentResourceStore.java
index da16485..e581a5b 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/resource/impl/ConsistentResourceStore.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/resource/impl/ConsistentResourceStore.java
@@ -78,8 +78,8 @@
.register(EmptyDiscreteResources.class)
.register(new EncodedResourcesSerializer(), EncodedDiscreteResources.class)
.register(ContinuousResourceAllocation.class)
- .register(VlanCodec.class)
- .register(MplsCodec.class)
+ .register(VlanIdCodec.class)
+ .register(MplsLabelCodec.class)
.build());
// TODO: We should provide centralized values for this
diff --git a/core/store/dist/src/main/java/org/onosproject/store/resource/impl/MplsCodec.java b/core/store/dist/src/main/java/org/onosproject/store/resource/impl/MplsLabelCodec.java
similarity index 91%
rename from core/store/dist/src/main/java/org/onosproject/store/resource/impl/MplsCodec.java
rename to core/store/dist/src/main/java/org/onosproject/store/resource/impl/MplsLabelCodec.java
index ce5972e..d1f8a98 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/resource/impl/MplsCodec.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/resource/impl/MplsLabelCodec.java
@@ -23,7 +23,7 @@
* Codec for MplsLabel.
*/
@Beta
-final class MplsCodec implements DiscreteResourceCodec<MplsLabel> {
+final class MplsLabelCodec implements DiscreteResourceCodec<MplsLabel> {
@Override
public int encode(MplsLabel resource) {
return resource.toInt();
@@ -49,6 +49,6 @@
@Override
public int hashCode() {
- return MplsCodec.class.hashCode();
+ return MplsLabelCodec.class.hashCode();
}
}
diff --git a/core/store/dist/src/main/java/org/onosproject/store/resource/impl/VlanCodec.java b/core/store/dist/src/main/java/org/onosproject/store/resource/impl/VlanIdCodec.java
similarity index 92%
rename from core/store/dist/src/main/java/org/onosproject/store/resource/impl/VlanCodec.java
rename to core/store/dist/src/main/java/org/onosproject/store/resource/impl/VlanIdCodec.java
index f6a34c1..70defa1 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/resource/impl/VlanCodec.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/resource/impl/VlanIdCodec.java
@@ -23,7 +23,7 @@
* Codec for Vlan.
*/
@Beta
-final class VlanCodec implements DiscreteResourceCodec<VlanId> {
+final class VlanIdCodec implements DiscreteResourceCodec<VlanId> {
@Override
public int encode(VlanId resource) {
return resource.toShort();
@@ -49,6 +49,6 @@
@Override
public int hashCode() {
- return VlanCodec.class.hashCode();
+ return VlanIdCodec.class.hashCode();
}
}