[jira] [Resolved] (WICKET-6621) Exceeding exception retries should return control back to server

2018-12-08 Thread Sven Meier (JIRA)


 [ 
https://issues.apache.org/jira/browse/WICKET-6621?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sven Meier resolved WICKET-6621.

   Resolution: Fixed
Fix Version/s: 9.0.0
   8.3.0

Control is now passed back to the container, when request couldn't be processed 
because of no exception handler or exceeded exception count.

> Exceeding exception retries should return control back to server
> 
>
> Key: WICKET-6621
> URL: https://issues.apache.org/jira/browse/WICKET-6621
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket
>Affects Versions: 8.2.0
>Reporter: Sven Meier
>Assignee: Sven Meier
>Priority: Minor
> Fix For: 8.3.0, 9.0.0
>
>
> Currently RequestCycle#processRequest() returns true - indicating successfull 
> proccessing of the request - even when processing has failed because of 
> exceeded exception retry count.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


wicket git commit: WICKET-6621 return control back to container

2018-12-08 Thread svenmeier
Repository: wicket
Updated Branches:
  refs/heads/wicket-8.x 23c46412d -> 768ae971f


WICKET-6621 return control back to container

when exception retry count is exceeded (and fixed test setup in
WicketFilterTest)


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/768ae971
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/768ae971
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/768ae971

Branch: refs/heads/wicket-8.x
Commit: 768ae971f38e7550fd9a5e87c09e25d23619325b
Parents: 23c4641
Author: Sven Meier 
Authored: Sun Dec 9 00:31:41 2018 +0100
Committer: Sven Meier 
Committed: Sun Dec 9 00:48:16 2018 +0100

--
 .../wicket/request/cycle/RequestCycle.java  | 14 
 .../wicket/protocol/http/WicketFilterTest.java  | 19 ++
 .../request/cycle/RequestCycleListenerTest.java | 37 +++-
 3 files changed, 49 insertions(+), 21 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/768ae971/wicket-core/src/main/java/org/apache/wicket/request/cycle/RequestCycle.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/request/cycle/RequestCycle.java 
b/wicket-core/src/main/java/org/apache/wicket/request/cycle/RequestCycle.java
index 272fcde..5e864bf 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/request/cycle/RequestCycle.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/request/cycle/RequestCycle.java
@@ -256,8 +256,7 @@ public class RequestCycle implements IRequestCycle, 
IEventSink
}
catch (Exception exception)
{
-   executeExceptionRequestHandler(exception, 
getExceptionRetryCount());
-   return true;
+   return executeExceptionRequestHandler(exception, 
getExceptionRetryCount());
}
finally
{
@@ -305,12 +304,12 @@ public class RequestCycle implements IRequestCycle, 
IEventSink
}
 
/**
-* Execute a requestHandler for the given exception.
+* Process the given exception.
 * 
 * @param exception
 * @param retryCount
 */
-   private void executeExceptionRequestHandler(Exception exception, int 
retryCount)
+   private boolean executeExceptionRequestHandler(Exception exception, int 
retryCount)
{
scheduleRequestHandlerAfterCurrent(null);
 
@@ -318,7 +317,7 @@ public class RequestCycle implements IRequestCycle, 
IEventSink
if (handler == null)
{
log.error("Error during request processing. URL=" + 
request.getUrl(), exception);
-   return;
+   return false;
}
 
try
@@ -326,16 +325,19 @@ public class RequestCycle implements IRequestCycle, 
IEventSink
listeners.onExceptionRequestHandlerResolved(this, 
handler, exception);
 
execute(handler);
+   
+   return true;
}
catch (Exception e)
{
if (retryCount > 0)
{
-   executeExceptionRequestHandler(exception, 
retryCount - 1);
+   return 
executeExceptionRequestHandler(exception, retryCount - 1);
}
else
{
log.error("Exception retry count exceeded", e);
+   return false;
}
}
}

http://git-wip-us.apache.org/repos/asf/wicket/blob/768ae971/wicket-core/src/test/java/org/apache/wicket/protocol/http/WicketFilterTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/protocol/http/WicketFilterTest.java
 
b/wicket-core/src/test/java/org/apache/wicket/protocol/http/WicketFilterTest.java
index 13d10cf..96d6522 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/protocol/http/WicketFilterTest.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/protocol/http/WicketFilterTest.java
@@ -17,7 +17,10 @@
 package org.apache.wicket.protocol.http;
 
 import static org.hamcrest.CoreMatchers.is;
-import static org.mockito.Mockito.*;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -51,20 +54,14 @@ import org.apache.wicket.mock.MockApplication;
 import org.apache.wicket.protocol.http.mock.MockHttpServ

[jira] [Commented] (WICKET-6621) Exceeding exception retries should return control back to server

2018-12-08 Thread ASF subversion and git services (JIRA)


[ 
https://issues.apache.org/jira/browse/WICKET-6621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16713807#comment-16713807
 ] 

ASF subversion and git services commented on WICKET-6621:
-

Commit 768ae971f38e7550fd9a5e87c09e25d23619325b in wicket's branch 
refs/heads/wicket-8.x from [~svenmeier]
[ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=768ae97 ]

WICKET-6621 return control back to container

when exception retry count is exceeded (and fixed test setup in
WicketFilterTest)


> Exceeding exception retries should return control back to server
> 
>
> Key: WICKET-6621
> URL: https://issues.apache.org/jira/browse/WICKET-6621
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket
>Affects Versions: 8.2.0
>Reporter: Sven Meier
>Assignee: Sven Meier
>Priority: Minor
>
> Currently RequestCycle#processRequest() returns true - indicating successfull 
> proccessing of the request - even when processing has failed because of 
> exceeded exception retry count.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (WICKET-6621) Exceeding exception retries should return control back to server

2018-12-08 Thread ASF subversion and git services (JIRA)


[ 
https://issues.apache.org/jira/browse/WICKET-6621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16713805#comment-16713805
 ] 

ASF subversion and git services commented on WICKET-6621:
-

Commit 7bb4d2743ba4599d1c05140ea89280f2fae23358 in wicket's branch 
refs/heads/master from [~svenmeier]
[ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=7bb4d27 ]

WICKET-6621 return control back to container

when exception retry count is exceeded (and fixed test setup in
WicketFilterTest)

> Exceeding exception retries should return control back to server
> 
>
> Key: WICKET-6621
> URL: https://issues.apache.org/jira/browse/WICKET-6621
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket
>Affects Versions: 8.2.0
>Reporter: Sven Meier
>Assignee: Sven Meier
>Priority: Minor
>
> Currently RequestCycle#processRequest() returns true - indicating successfull 
> proccessing of the request - even when processing has failed because of 
> exceeded exception retry count.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


wicket git commit: WICKET-6621 return control back to container

2018-12-08 Thread svenmeier
Repository: wicket
Updated Branches:
  refs/heads/master 4ebdafb60 -> 7bb4d2743


WICKET-6621 return control back to container

when exception retry count is exceeded (and fixed test setup in
WicketFilterTest)

Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/7bb4d274
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/7bb4d274
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/7bb4d274

Branch: refs/heads/master
Commit: 7bb4d2743ba4599d1c05140ea89280f2fae23358
Parents: 4ebdafb
Author: Sven Meier 
Authored: Sun Dec 9 00:31:41 2018 +0100
Committer: Sven Meier 
Committed: Sun Dec 9 00:34:00 2018 +0100

--
 .../wicket/request/cycle/RequestCycle.java  | 14 
 .../wicket/protocol/http/WicketFilterTest.java  |  9 +
 .../request/cycle/RequestCycleListenerTest.java | 37 +++-
 3 files changed, 46 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/7bb4d274/wicket-core/src/main/java/org/apache/wicket/request/cycle/RequestCycle.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/request/cycle/RequestCycle.java 
b/wicket-core/src/main/java/org/apache/wicket/request/cycle/RequestCycle.java
index 327bede..37b63b0 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/request/cycle/RequestCycle.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/request/cycle/RequestCycle.java
@@ -257,8 +257,7 @@ public class RequestCycle implements IRequestCycle, 
IEventSink, IMetadataContext
}
catch (Exception exception)
{
-   executeExceptionRequestHandler(exception, 
getExceptionRetryCount());
-   return true;
+   return executeExceptionRequestHandler(exception, 
getExceptionRetryCount());
}
finally
{
@@ -306,12 +305,12 @@ public class RequestCycle implements IRequestCycle, 
IEventSink, IMetadataContext
}
 
/**
-* Execute a requestHandler for the given exception.
+* Process the given exception.
 * 
 * @param exception
 * @param retryCount
 */
-   private void executeExceptionRequestHandler(Exception exception, int 
retryCount)
+   private boolean executeExceptionRequestHandler(Exception exception, int 
retryCount)
{
scheduleRequestHandlerAfterCurrent(null);
 
@@ -319,7 +318,7 @@ public class RequestCycle implements IRequestCycle, 
IEventSink, IMetadataContext
if (handler == null)
{
log.error("Error during request processing. URL=" + 
request.getUrl(), exception);
-   return;
+   return false;
}
 
try
@@ -327,16 +326,19 @@ public class RequestCycle implements IRequestCycle, 
IEventSink, IMetadataContext
listeners.onExceptionRequestHandlerResolved(this, 
handler, exception);
 
execute(handler);
+   
+   return true;
}
catch (Exception e)
{
if (retryCount > 0)
{
-   executeExceptionRequestHandler(exception, 
retryCount - 1);
+   return 
executeExceptionRequestHandler(exception, retryCount - 1);
}
else
{
log.error("Exception retry count exceeded", e);
+   return false;
}
}
}

http://git-wip-us.apache.org/repos/asf/wicket/blob/7bb4d274/wicket-core/src/test/java/org/apache/wicket/protocol/http/WicketFilterTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/protocol/http/WicketFilterTest.java
 
b/wicket-core/src/test/java/org/apache/wicket/protocol/http/WicketFilterTest.java
index 7d75bab..cf754cb 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/protocol/http/WicketFilterTest.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/protocol/http/WicketFilterTest.java
@@ -53,6 +53,7 @@ import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.xml.parsers.ParserConfigurationException;
 
+import org.apache.commons.io.filefilter.AgeFileFilter;
 import org.apache.wicket.Application;
 import org.apache.wicket.ThreadContext;
 import org.apache.wicket.mock.MockApplication;
@@ -547,6 +548,14 @@ public class WicketFilterTest
when(request.get

[jira] [Updated] (WICKET-6621) Exceeding exception retries should return control back to server

2018-12-08 Thread Sven Meier (JIRA)


 [ 
https://issues.apache.org/jira/browse/WICKET-6621?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sven Meier updated WICKET-6621:
---
Summary: Exceeding exception retries should return control back to server  
(was: Exceeding exception retry count return control back to server)

> Exceeding exception retries should return control back to server
> 
>
> Key: WICKET-6621
> URL: https://issues.apache.org/jira/browse/WICKET-6621
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket
>Affects Versions: 8.2.0
>Reporter: Sven Meier
>Assignee: Sven Meier
>Priority: Minor
>
> Currently RequestCycle#processRequest() returns true - indicating successfull 
> proccessing of the request - even when processing has failed because of 
> exceeded exception retry count.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (WICKET-6621) Exceeding exception retry count return control back to server

2018-12-08 Thread Sven Meier (JIRA)
Sven Meier created WICKET-6621:
--

 Summary: Exceeding exception retry count return control back to 
server
 Key: WICKET-6621
 URL: https://issues.apache.org/jira/browse/WICKET-6621
 Project: Wicket
  Issue Type: Improvement
  Components: wicket
Affects Versions: 8.2.0
Reporter: Sven Meier
Assignee: Sven Meier


Currently RequestCycle#processRequest() returns true - indicating successfull 
proccessing of the request - even when processing has failed because of 
exceeded exception retry count.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (WICKET-6617) Header contribution ignore

2018-12-08 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/WICKET-6617?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16713583#comment-16713583
 ] 

ASF GitHub Bot commented on WICKET-6617:


Github user solomax commented on the issue:

https://github.com/apache/wicket/pull/343
  
OK :)


> Header contribution ignore 
> -
>
> Key: WICKET-6617
> URL: https://issues.apache.org/jira/browse/WICKET-6617
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 8.2.0
>Reporter: Maxim Solodovnik
>Assignee: Maxim Solodovnik
>Priority: Major
> Fix For: 8.3.0, 9.0.0
>
>
> Components added via AJAX and contributing to {{}} using {{@Override 
> renderHead}} ignores {{}} if any
> Here is the example:
> Imaging you have following markup:
> {code}
> 
>   
> 
> Hello
>   
>   
>   
>   
> 
> {code}
> In your java code you replacing component A with component B on the page via 
> AJAX
> Component B contributing to {{}} as follows:
> {code}
>   @Override
>   public void renderHead(IHeaderResponse response) {
>   super.renderHead(response);
>   response.render(JavaScriptHeaderItem.forReference(new 
> JavaScriptResourceReference(B.class, "some.js")));
>   }
> {code}
> As developer I would expect additional JS/CSS files (or any other header 
> resources) will be appended before {{}} tag since I have placed 
> {{}} tag
> Currently only initial header resources will take {{}} 
> into account



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)