You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by mg...@apache.org on 2025/02/04 11:11:39 UTC

(wicket) branch wicket-9.x updated: WICKET-7147: reversed order of parameters to `null` check methods. (#1097)

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

mgrigorov pushed a commit to branch wicket-9.x
in repository https://gitbox.apache.org/repos/asf/wicket.git


The following commit(s) were added to refs/heads/wicket-9.x by this push:
     new 8945e69cf1 WICKET-7147: reversed order of parameters to `null` check methods. (#1097)
8945e69cf1 is described below

commit 8945e69cf1b08a069e39581de6eef0f98dac1a10
Author: Johan Stuyts <j....@javathinker.com>
AuthorDate: Tue Feb 4 12:11:34 2025 +0100

    WICKET-7147: reversed order of parameters to `null` check methods. (#1097)
---
 .../apache/wicket/protocol/http/OriginResourceIsolationPolicy.java    | 2 +-
 .../src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java | 4 ++--
 .../java/org/apache/wicket/core/util/tester/WicketTesterTest.java     | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/wicket-core/src/main/java/org/apache/wicket/protocol/http/OriginResourceIsolationPolicy.java b/wicket-core/src/main/java/org/apache/wicket/protocol/http/OriginResourceIsolationPolicy.java
index ea742b056c..58076dca32 100644
--- a/wicket-core/src/main/java/org/apache/wicket/protocol/http/OriginResourceIsolationPolicy.java
+++ b/wicket-core/src/main/java/org/apache/wicket/protocol/http/OriginResourceIsolationPolicy.java
@@ -65,7 +65,7 @@ public class OriginResourceIsolationPolicy implements IResourceIsolationPolicy
 	 */
 	public OriginResourceIsolationPolicy addAcceptedOrigin(String acceptedOrigin)
 	{
-		Checks.notNull("acceptedOrigin", acceptedOrigin);
+		Checks.notNull(acceptedOrigin, "acceptedOrigin");
 
 		// strip any leading dot characters
 		final int len = acceptedOrigin.length();
diff --git a/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java b/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java
index dd19670ba8..79e6aa70b3 100644
--- a/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java
+++ b/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java
@@ -2511,7 +2511,7 @@ public class BaseWicketTester
 	public String getContentTypeFromResponseHeader()
 	{
 		String contentType = getLastResponse().getContentType();
-		assertNotNull("No Content-Type header found", contentType);
+		assertNotNull(contentType, "No Content-Type header found");
 		return contentType;
 	}
 
@@ -2523,7 +2523,7 @@ public class BaseWicketTester
 	public int getContentLengthFromResponseHeader()
 	{
 		String contentLength = getLastResponse().getHeader("Content-Length");
-		assertNotNull("No Content-Length header found", contentLength);
+		assertNotNull(contentLength, "No Content-Length header found");
 		return Integer.parseInt(contentLength);
 	}
 
diff --git a/wicket-core/src/test/java/org/apache/wicket/core/util/tester/WicketTesterTest.java b/wicket-core/src/test/java/org/apache/wicket/core/util/tester/WicketTesterTest.java
index c51ff1dac0..b2692d55bb 100644
--- a/wicket-core/src/test/java/org/apache/wicket/core/util/tester/WicketTesterTest.java
+++ b/wicket-core/src/test/java/org/apache/wicket/core/util/tester/WicketTesterTest.java
@@ -692,7 +692,7 @@ class WicketTesterTest extends WicketTestCase
 		// executeAjaxEvent weren't submitting the form the name would have been
 		// reset to null, because the form would have been updated but there
 		// wouldn't be any data to update it with.
-		assertNotNull("executeAjaxEvent() did not properly submit the form", pojo.getName());
+		assertNotNull(pojo.getName(), "executeAjaxEvent() did not properly submit the form");
 		assertEquals("Mock name", pojo.getName());
 	}