adding EthType to secure handling ether types

this will also pretty print ethertypes in flow output

Change-Id: I9363070ad308f3c756735e29b3992c500e503636
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/MplsPathIntentCompiler.java b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/MplsPathIntentCompiler.java
index f9e445a..c133483 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/MplsPathIntentCompiler.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/MplsPathIntentCompiler.java
@@ -243,7 +243,7 @@
             Criterion c = intent.selector().getCriterion(Criterion.Type.ETH_TYPE);
             if (c != null && c instanceof EthTypeCriterion) {
                 EthTypeCriterion ethertype = (EthTypeCriterion) c;
-                treat.popMpls((short) ethertype.ethType());
+                treat.popMpls(ethertype.ethType().toShort());
             } else {
                 treat.popMpls(Ethernet.TYPE_IPV4);
             }