Fix policy property type issue

When VF is exported as csar, policy properties
are typed regardless types in the related shemas.
This patch fixes this issue.

Change-Id: Ib34f329888d454283c89a8a1aec6349069ea7234
Issue-ID: SDC-2773
Signed-off-by: Dmitry Puzikov <d.puzikov2@partner.samsung.com>
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/converters/ToscaMapValueConverter.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/converters/ToscaMapValueConverter.java
index 5bbd38e..163d59a 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/converters/ToscaMapValueConverter.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/converters/ToscaMapValueConverter.java
@@ -122,24 +122,22 @@
         }
     }
 
-    private void convertEntry(String innerType, Map<String, DataTypeDefinition> dataTypes, List<PropertyDefinition> allPropertiesRecursive, Map<String, Object> toscaMap, final boolean isScalarF, final ToscaValueConverter innerConverterFinal,
-            Entry<String, JsonElement> e) {
+    private void convertEntry(final String innerType, final Map<String, DataTypeDefinition> dataTypes,
+            final List<PropertyDefinition> allPropertiesRecursive, final Map<String, Object> toscaMap, final boolean isScalarF,
+            final ToscaValueConverter innerConverterFinal, final Entry<String, JsonElement> e) {
         log.debug("try convert element ");
-        boolean scalar = false;
-        String propType = null;
+        boolean scalar = isScalarF;
+        String propType = innerType;
         ToscaValueConverter innerConverterProp = innerConverterFinal;
-        if ( isScalarF ){
-            scalar = isScalarF;
-            propType = innerType;
-        }else{
-            for ( PropertyDefinition pd : allPropertiesRecursive ){
-                if ( pd.getName().equals(e.getKey()) ){
+        if (!scalar) {
+            for (PropertyDefinition pd : allPropertiesRecursive) {
+                if (pd.getName().equals(e.getKey())) {
                     propType = pd.getType();
-                    DataTypeDefinition pdDataType = dataTypes.get(propType);
-                    ToscaPropertyType toscaPropType = isScalarType(pdDataType);
-                    if ( toscaPropType == null ){
+                    final DataTypeDefinition pdDataType = dataTypes.get(propType);
+                    final ToscaPropertyType toscaPropType = isScalarType(pdDataType);
+                    if (toscaPropType == null) {
                         scalar = false;
-                    }else{
+                    } else {
                         scalar = true;
                         propType = toscaPropType.getType();
                         innerConverterProp = toscaPropType.getValueConverter();
@@ -148,7 +146,8 @@
                 }
             }
         }
-        Object convertedValue = convertDataTypeToToscaObject(propType, dataTypes, innerConverterProp, scalar, e.getValue(), false);
+        final Object convertedValue =
+                convertDataTypeToToscaObject(propType, dataTypes, innerConverterProp, scalar, e.getValue(), false);
         toscaMap.put(e.getKey(), convertedValue);
     }