ACS-1125 : Bump json from 20200518 to 20201115 (#160)

* Bump json from 20200518 to 20201115

Bumps [json](https://github.com/douglascrockford/JSON-java) from 20200518 to 20201115.
- [Release notes](https://github.com/douglascrockford/JSON-java/releases)
- [Commits](https://github.com/douglascrockford/JSON-java/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* ACS-1125 : Fix failing tests after json upgrade

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: DenisGabriela <Denis.Ungureanu1@ness.com>
This commit is contained in:
dependabot-preview[bot]
2021-01-12 22:43:39 +02:00
committed by GitHub
parent 23b5dc3aef
commit 401833665e
3 changed files with 33 additions and 30 deletions

View File

@@ -62,7 +62,7 @@
<dependency.webscripts.version>8.15</dependency.webscripts.version>
<dependency.bouncycastle.version>1.68</dependency.bouncycastle.version>
<dependency.mockito-core.version>3.7.0</dependency.mockito-core.version>
<dependency.org-json.version>20200518</dependency.org-json.version>
<dependency.org-json.version>20201115</dependency.org-json.version>
<dependency.commons-dbcp.version>1.4-DBCP330</dependency.commons-dbcp.version>
<dependency.commons-io.version>2.8.0</dependency.commons-io.version>
<dependency.gson.version>2.8.5</dependency.gson.version>

View File

@@ -1,30 +1,32 @@
/*
* #%L
* Alfresco Remote API
* %%
* Copyright (C) 2005 - 2016 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
/*
* #%L
* Alfresco Remote API
* %%
* Copyright (C) 2005 - 2016 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
package org.alfresco.repo.web.scripts.preference;
import java.math.BigDecimal;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.security.authentication.AuthenticationComponent;
import org.alfresco.repo.security.authentication.AuthenticationUtil;
@@ -204,7 +206,7 @@ public class PreferenceServiceTest extends BaseWebScriptTest
{
assertEquals("value", jsonObject.get("stringValue"));
assertEquals(10, jsonObject.get("numberValue"));
assertEquals(3.142, jsonObject.get("numberValue2"));
assertEquals(BigDecimal.valueOf(3.142), jsonObject.get("numberValue2"));
}
}

View File

@@ -40,6 +40,7 @@ import static org.mockito.Mockito.when;
import java.io.IOException;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
@@ -363,14 +364,14 @@ public class ResultMapperTests
assertEquals("created",statsFacet.getLabel());
Set<Metric> statsMetrics = statsFacet.getBuckets().get(0).getMetrics();
assertEquals(8,statsMetrics.size());
assertTrue(statsMetrics.contains(new SimpleMetric(METRIC_TYPE.sumOfSquares, 2.1513045770343806E27 )));
assertTrue(statsMetrics.contains(new SimpleMetric(METRIC_TYPE.sumOfSquares, BigDecimal.valueOf(2.1513045770343806E27) )));
assertTrue(statsMetrics.contains(new SimpleMetric(METRIC_TYPE.min, "2011-02-15T20:16:27.080Z" )));
assertTrue(statsMetrics.contains(new SimpleMetric(METRIC_TYPE.max, "2017-04-10T15:06:30.143Z" )));
assertTrue(statsMetrics.contains(new SimpleMetric(METRIC_TYPE.mean, "2016-09-05T04:20:12.898Z" )));
assertTrue(statsMetrics.contains(new SimpleMetric(METRIC_TYPE.countValues, 990 )));
assertTrue(statsMetrics.contains(new SimpleMetric(METRIC_TYPE.missing, 290 )));
assertTrue(statsMetrics.contains(new SimpleMetric(METRIC_TYPE.sum, 1.458318720769983E15)));
assertTrue(statsMetrics.contains(new SimpleMetric(METRIC_TYPE.stddev, 5.6250677994522545E10)));
assertTrue(statsMetrics.contains(new SimpleMetric(METRIC_TYPE.sum, BigDecimal.valueOf(1.458318720769983E15))));
assertTrue(statsMetrics.contains(new SimpleMetric(METRIC_TYPE.stddev, BigDecimal.valueOf(5.6250677994522545E10))));
statsFacet = searchContext.getFacets().get(6);
assertEquals("numericLabel",statsFacet.getLabel());