You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by en...@apache.org on 2022/06/12 19:38:24 UTC

[sling-org-apache-sling-api] branch master updated: replace usage of deprecated apis and suppress some expected warnings (#43)

This is an automated email from the ASF dual-hosted git repository.

enorman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-api.git


The following commit(s) were added to refs/heads/master by this push:
     new cf965a3  replace usage of deprecated apis and suppress some expected warnings (#43)
cf965a3 is described below

commit cf965a342baafaebac37bbd7fb551de2afe9e694
Author: Eric Norman <en...@apache.org>
AuthorDate: Sun Jun 12 12:38:21 2022 -0700

    replace usage of deprecated apis and suppress some expected warnings (#43)
---
 src/test/java/org/apache/sling/api/resource/path/PathBuilderTest.java  | 2 +-
 src/test/java/org/apache/sling/api/resource/path/PathTest.java         | 1 +
 src/test/java/org/apache/sling/api/wrappers/ValueMapDecoratorTest.java | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/test/java/org/apache/sling/api/resource/path/PathBuilderTest.java b/src/test/java/org/apache/sling/api/resource/path/PathBuilderTest.java
index 0c92c18..ef22dab 100644
--- a/src/test/java/org/apache/sling/api/resource/path/PathBuilderTest.java
+++ b/src/test/java/org/apache/sling/api/resource/path/PathBuilderTest.java
@@ -18,7 +18,7 @@
  */
 package org.apache.sling.api.resource.path;
 
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
 
 import org.hamcrest.Matchers;
 import org.junit.Test;
diff --git a/src/test/java/org/apache/sling/api/resource/path/PathTest.java b/src/test/java/org/apache/sling/api/resource/path/PathTest.java
index d696cf7..765832d 100644
--- a/src/test/java/org/apache/sling/api/resource/path/PathTest.java
+++ b/src/test/java/org/apache/sling/api/resource/path/PathTest.java
@@ -188,6 +188,7 @@ public class PathTest {
         assertFalse(new Path("/libs/foo").isPattern());
     }
 
+    @SuppressWarnings({ "java:S5785", "unlikely-arg-type" })
     @Test public void testEquals() {
         final Path path = new Path("/foo/bar");
         assertTrue(path.equals(path));
diff --git a/src/test/java/org/apache/sling/api/wrappers/ValueMapDecoratorTest.java b/src/test/java/org/apache/sling/api/wrappers/ValueMapDecoratorTest.java
index 185f497..c889ecc 100644
--- a/src/test/java/org/apache/sling/api/wrappers/ValueMapDecoratorTest.java
+++ b/src/test/java/org/apache/sling/api/wrappers/ValueMapDecoratorTest.java
@@ -18,7 +18,7 @@
  */
 package org.apache.sling.api.wrappers;
 
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;