Use policy/common map double converter to ensure integers saved
in policy content do not get converted to doubles.
Issue-ID: POLICY-2486
Change-Id: I887c6b5c337e2594c425b645af4b2668d06715bd
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import com.att.research.xacml.api.Identifier;
import com.att.research.xacml.api.Obligation;
import com.google.gson.Gson;
import com.att.research.xacml.api.Identifier;
import com.att.research.xacml.api.Obligation;
import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
import java.util.Map;
import lombok.AccessLevel;
import lombok.Getter;
import java.util.Map;
import lombok.AccessLevel;
import lombok.Getter;
import oasis.names.tc.xacml._3_0.core.schema.wd_17.EffectType;
import oasis.names.tc.xacml._3_0.core.schema.wd_17.ObjectFactory;
import oasis.names.tc.xacml._3_0.core.schema.wd_17.ObligationExpressionType;
import oasis.names.tc.xacml._3_0.core.schema.wd_17.EffectType;
import oasis.names.tc.xacml._3_0.core.schema.wd_17.ObjectFactory;
import oasis.names.tc.xacml._3_0.core.schema.wd_17.ObligationExpressionType;
+import org.onap.policy.common.gson.MapDoubleAdapterFactory;
private static final ObjectFactory factory = new ObjectFactory();
@Getter(AccessLevel.NONE)
private static final ObjectFactory factory = new ObjectFactory();
@Getter(AccessLevel.NONE)
- private static final Gson gson = new Gson();
+ private static final Gson gson =
+ new GsonBuilder().registerTypeAdapterFactory(new MapDoubleAdapterFactory()).create();
private String policyId;
private String policyType;
private String policyId;
private String policyType;
<description>This code implements the XACML PDP engine</description>
<properties>
<description>This code implements the XACML PDP engine</description>
<properties>
- <policy.common.version>1.6.3</policy.common.version>
- <policy.models.version>2.2.3</policy.models.version>
+ <policy.common.version>1.6.4-SNAPSHOT</policy.common.version>
+ <policy.models.version>2.2.4-SNAPSHOT</policy.models.version>