From c7d24b07377cb00ce4c0c531c6d3dff25e04dc12 Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Fri, 7 May 2021 15:35:55 -0400 Subject: Change java.util.regex to re2j Sonar complains about java.util.regex. Thought I used re2j when creating all of the patterns, but apparently not. Fixed that oversight. Issue-ID: POLICY-3284 Change-Id: Idbec112ab0d4c3b477ce357f8a556d95e4dea083 Signed-off-by: Jim Hahn --- gson/pom.xml | 4 ++++ gson/src/main/java/org/onap/policy/common/gson/internal/Adapter.java | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'gson') diff --git a/gson/pom.xml b/gson/pom.xml index 53489bac..309ce342 100644 --- a/gson/pom.xml +++ b/gson/pom.xml @@ -33,6 +33,10 @@ jar + + com.google.re2j + re2j + org.slf4j slf4j-api diff --git a/gson/src/main/java/org/onap/policy/common/gson/internal/Adapter.java b/gson/src/main/java/org/onap/policy/common/gson/internal/Adapter.java index 64a51d0b..c15ccb7d 100644 --- a/gson/src/main/java/org/onap/policy/common/gson/internal/Adapter.java +++ b/gson/src/main/java/org/onap/policy/common/gson/internal/Adapter.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP * ================================================================================ - * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2019-2021 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. @@ -24,11 +24,11 @@ import com.google.gson.Gson; import com.google.gson.JsonElement; import com.google.gson.TypeAdapter; import com.google.gson.reflect.TypeToken; +import com.google.re2j.Pattern; import java.lang.reflect.Field; import java.lang.reflect.Method; import java.lang.reflect.Type; import java.util.function.Supplier; -import java.util.regex.Pattern; import org.onap.policy.common.gson.annotation.GsonJsonProperty; /** -- cgit 1.2.3-korg