[ONOS-7366]YANG Runtime: Exception while decoding XML

Change-Id: Ic3447a5c6bcc110d59710e3b661016977cafefea
diff --git a/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/utils/builtindatatype/LeafContextUtil.java b/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/utils/builtindatatype/LeafContextUtil.java
index 07c7127..6e7d008 100644
--- a/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/utils/builtindatatype/LeafContextUtil.java
+++ b/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/utils/builtindatatype/LeafContextUtil.java
@@ -118,7 +118,7 @@
                 try {
                     YangBits e = ((YangBits) typeInfo
                             .getDataTypeExtendedInfo());
-                    String[] bitSet = v.split(SPACE);
+                    String[] bitSet = v.trim().split(SPACE);
                     Set set = new HashSet(Arrays.asList(bitSet));
                     if (e.getBitNameMap().keySet().containsAll(set)) {
                         return v;