You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by ad...@apache.org on 2019/05/08 14:51:44 UTC

[wicket] branch WICKET-6662 updated (755ecdd -> 5a220e1)

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

adelbene pushed a change to branch WICKET-6662
in repository https://gitbox.apache.org/repos/asf/wicket.git.


    from 755ecdd  Code improvmentsfor #356
     new d7d0e7b  Added missing import
     new 5a220e1  Changed back timeout for JMX RequestCycleSettings to string

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../org/apache/wicket/page/PageAccessSynchronizerTest.java |  3 +--
 .../org/apache/wicket/jmx/RequestCycleSettingsMBean.java   | 14 ++++++--------
 .../apache/wicket/jmx/wrapper/RequestCycleSettings.java    |  9 ++++-----
 3 files changed, 11 insertions(+), 15 deletions(-)


[wicket] 01/02: Added missing import

Posted by ad...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

adelbene pushed a commit to branch WICKET-6662
in repository https://gitbox.apache.org/repos/asf/wicket.git

commit d7d0e7bd2f64e7fe15d4fb5dafdb165e640cc003
Author: Andrea Del Bene <an...@gmail.com>
AuthorDate: Wed May 8 16:43:49 2019 +0200

    Added missing import
---
 .../test/java/org/apache/wicket/page/PageAccessSynchronizerTest.java   | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/wicket-core/src/test/java/org/apache/wicket/page/PageAccessSynchronizerTest.java b/wicket-core/src/test/java/org/apache/wicket/page/PageAccessSynchronizerTest.java
index 70b393e..a711c29 100644
--- a/wicket-core/src/test/java/org/apache/wicket/page/PageAccessSynchronizerTest.java
+++ b/wicket-core/src/test/java/org/apache/wicket/page/PageAccessSynchronizerTest.java
@@ -19,15 +19,14 @@ package org.apache.wicket.page;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertNull;
 import static org.junit.jupiter.api.Assertions.assertTrue;
-
 import java.time.Duration;
 import java.time.Instant;
 import java.util.Random;
 import java.util.concurrent.ConcurrentLinkedQueue;
 import java.util.concurrent.ConcurrentMap;
 import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicInteger;
-
 import org.apache.wicket.MockPage;
 import org.apache.wicket.core.util.lang.WicketObjects;
 import org.apache.wicket.mock.MockPageManager;


[wicket] 02/02: Changed back timeout for JMX RequestCycleSettings to string

Posted by ad...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

adelbene pushed a commit to branch WICKET-6662
in repository https://gitbox.apache.org/repos/asf/wicket.git

commit 5a220e1c5556ed226ac83104bbc091966d91e4b3
Author: Andrea Del Bene <an...@gmail.com>
AuthorDate: Wed May 8 16:44:02 2019 +0200

    Changed back timeout for JMX RequestCycleSettings to string
---
 .../org/apache/wicket/jmx/RequestCycleSettingsMBean.java   | 14 ++++++--------
 .../apache/wicket/jmx/wrapper/RequestCycleSettings.java    |  9 ++++-----
 2 files changed, 10 insertions(+), 13 deletions(-)

diff --git a/wicket-jmx/src/main/java/org/apache/wicket/jmx/RequestCycleSettingsMBean.java b/wicket-jmx/src/main/java/org/apache/wicket/jmx/RequestCycleSettingsMBean.java
index c11f396..9a6e9b6 100644
--- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/RequestCycleSettingsMBean.java
+++ b/wicket-jmx/src/main/java/org/apache/wicket/jmx/RequestCycleSettingsMBean.java
@@ -17,8 +17,6 @@
 package org.apache.wicket.jmx;
 
 import java.io.UnsupportedEncodingException;
-import java.time.Duration;
-
 import org.apache.wicket.markup.html.pages.BrowserInfoPage;
 
 /**
@@ -53,12 +51,12 @@ public interface RequestCycleSettingsMBean
 	String getResponseRequestEncoding();
 
 	/**
-	 * Gets the time that a request will by default be waiting for the previous request to be
+	 * Gets the time (in milliseconds) that a request will by default be waiting for the previous request to be
 	 * handled before giving up.
 	 * 
-	 * @return The time out
+	 * @return The time out in milliseconds
 	 */
-	Duration getTimeout();
+	String getTimeout();
 
 	/**
 	 * @param bufferResponse
@@ -93,12 +91,12 @@ public interface RequestCycleSettingsMBean
 		throws UnsupportedEncodingException;
 
 	/**
-	 * Sets the time that a request will by default be waiting for the previous request to be
+	 * Sets the time (in milliseconds) that a request will by default be waiting for the previous request to be
 	 * handled before giving up.
 	 * 
-	 * @param timeout
+	 * @param timeout in milliseconds
 	 */
-	void setTimeout(Duration timeout);
+	void setTimeout(String timeout);
 
 
 	/**
diff --git a/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/RequestCycleSettings.java b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/RequestCycleSettings.java
index 028ec6a..5c57a3a 100644
--- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/RequestCycleSettings.java
+++ b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/RequestCycleSettings.java
@@ -18,7 +18,6 @@ package org.apache.wicket.jmx.wrapper;
 
 import java.io.UnsupportedEncodingException;
 import java.time.Duration;
-
 import org.apache.wicket.Application;
 import org.apache.wicket.jmx.RequestCycleSettingsMBean;
 
@@ -73,9 +72,9 @@ public class RequestCycleSettings implements RequestCycleSettingsMBean
 	 * @see org.apache.wicket.jmx.RequestCycleSettingsMBean#getTimeout()
 	 */
 	@Override
-	public Duration getTimeout()
+	public String getTimeout()
 	{
-		return application.getRequestCycleSettings().getTimeout();
+		return application.getRequestCycleSettings().getTimeout().toString();
 	}
 
 	/**
@@ -117,9 +116,9 @@ public class RequestCycleSettings implements RequestCycleSettingsMBean
 	 * @see org.apache.wicket.jmx.RequestCycleSettingsMBean#setTimeout(java.lang.String)
 	 */
 	@Override
-	public void setTimeout(final Duration timeout)
+	public void setTimeout(final String timeout)
 	{
-		application.getRequestCycleSettings().setTimeout(timeout);
+		application.getRequestCycleSettings().setTimeout(Duration.parse(timeout));
 	}
 
 	@Override