You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-dev@jackrabbit.apache.org by "reschke (via GitHub)" <gi...@apache.org> on 2024/10/31 09:56:24 UTC

[PR] OAK-11239: Remove usage of Guava newArrayList(vargargs) in test classes [jackrabbit-oak]

reschke opened a new pull request, #1836:
URL: https://github.com/apache/jackrabbit-oak/pull/1836

   (no comment)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: oak-dev-unsubscribe@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] OAK-11239: Remove usage of Guava newArrayList(vargargs) in test classes [jackrabbit-oak]

Posted by "mbaedke (via GitHub)" <gi...@apache.org>.
mbaedke commented on code in PR #1836:
URL: https://github.com/apache/jackrabbit-oak/pull/1836#discussion_r1824277441


##########
oak-auth-external/src/test/java/org/apache/jackrabbit/oak/spi/security/authentication/external/basic/DefaultSyncContextTest.java:
##########
@@ -1459,7 +1459,7 @@ public void testCreateValuesEmptyCollection() throws Exception {
 
     @Test
     public void testCreateValuesSkipsNull() throws Exception {
-        List<String> strings = Lists.newArrayList("s", null, null, "t");
+        List<String> strings = new ArrayList<>(Arrays.asList("s", null, null, "t"));

Review Comment:
   Why not just `List.of("s", null, null, "t")` ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: oak-dev-unsubscribe@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] OAK-11239: Remove usage of Guava newArrayList(vargargs) in test classes [jackrabbit-oak]

Posted by "mbaedke (via GitHub)" <gi...@apache.org>.
mbaedke commented on code in PR #1836:
URL: https://github.com/apache/jackrabbit-oak/pull/1836#discussion_r1824277441


##########
oak-auth-external/src/test/java/org/apache/jackrabbit/oak/spi/security/authentication/external/basic/DefaultSyncContextTest.java:
##########
@@ -1459,7 +1459,7 @@ public void testCreateValuesEmptyCollection() throws Exception {
 
     @Test
     public void testCreateValuesSkipsNull() throws Exception {
-        List<String> strings = Lists.newArrayList("s", null, null, "t");
+        List<String> strings = new ArrayList<>(Arrays.asList("s", null, null, "t"));

Review Comment:
   Why not just `List.of("s", null, null, "t")` ? 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: oak-dev-unsubscribe@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] OAK-11239: Remove usage of Guava newArrayList(vargargs) in test classes [jackrabbit-oak]

Posted by "mbaedke (via GitHub)" <gi...@apache.org>.
mbaedke commented on code in PR #1836:
URL: https://github.com/apache/jackrabbit-oak/pull/1836#discussion_r1824277441


##########
oak-auth-external/src/test/java/org/apache/jackrabbit/oak/spi/security/authentication/external/basic/DefaultSyncContextTest.java:
##########
@@ -1459,7 +1459,7 @@ public void testCreateValuesEmptyCollection() throws Exception {
 
     @Test
     public void testCreateValuesSkipsNull() throws Exception {
-        List<String> strings = Lists.newArrayList("s", null, null, "t");
+        List<String> strings = new ArrayList<>(Arrays.asList("s", null, null, "t"));

Review Comment:
   Why not just `List.of("s", null, null, "t")` ? 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: oak-dev-unsubscribe@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] OAK-11239: Remove usage of Guava newArrayList(vargargs) in test classes [jackrabbit-oak]

Posted by "reschke (via GitHub)" <gi...@apache.org>.
reschke commented on PR #1836:
URL: https://github.com/apache/jackrabbit-oak/pull/1836#issuecomment-2449789206

   > I think that at some places List.of() could be used instead of an ArrayList. 
   
   I actually tested that.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: oak-dev-unsubscribe@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] OAK-11239: Remove usage of Guava newArrayList(vargargs) in test classes [jackrabbit-oak]

Posted by "reschke (via GitHub)" <gi...@apache.org>.
reschke commented on code in PR #1836:
URL: https://github.com/apache/jackrabbit-oak/pull/1836#discussion_r1824279221


##########
oak-auth-external/src/test/java/org/apache/jackrabbit/oak/spi/security/authentication/external/basic/DefaultSyncContextTest.java:
##########
@@ -1459,7 +1459,7 @@ public void testCreateValuesEmptyCollection() throws Exception {
 
     @Test
     public void testCreateValuesSkipsNull() throws Exception {
-        List<String> strings = Lists.newArrayList("s", null, null, "t");
+        List<String> strings = new ArrayList<>(Arrays.asList("s", null, null, "t"));

Review Comment:
   Because "List.of" does not suppoet null. See https://issues.apache.org/jira/browse/OAK-11239



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: oak-dev-unsubscribe@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] OAK-11239: Remove usage of Guava newArrayList(vargargs) in test classes [jackrabbit-oak]

Posted by "reschke (via GitHub)" <gi...@apache.org>.
reschke merged PR #1836:
URL: https://github.com/apache/jackrabbit-oak/pull/1836


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: oak-dev-unsubscribe@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org