[jira] [Resolved] (WICKET-6473) Double slash break 404page

2018-02-20 Thread Pedro Santos (JIRA)

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

Pedro Santos resolved WICKET-6473.
--
   Resolution: Fixed
Fix Version/s: 8.0.0
   7.11.0

> Double slash break 404page
> --
>
> Key: WICKET-6473
> URL: https://issues.apache.org/jira/browse/WICKET-6473
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 7.8.0
>Reporter: Ilia Naryzhny
>Assignee: Pedro Santos
>Priority: Major
> Fix For: 7.11.0, 8.0.0
>
>
> Issue came from email thread: http://markmail.org/thread/rlozkiz7gy2z3bkc
> --
> We have in Orienteer customized NotFoundPage 
> https://github.com/OrienteerBAP/Orienteer/blob/master/orienteer-core/src/main/java/org/orienteer/core/web/NotFoundPage.java
>  . And it works perfectly except one case: if somebody by mistake put double 
> slash in URL. For example https://demo.orienteer.org// Application is trying 
> to render 404 page, but all resources are not found and user see just plan 
> page without styles and scripts. Taking into account that resources are 
> included commonly through XXXPackageResource and WebJarsResourc - it looks 
> like Wicket issue.
> Demonstatin can be found there: Please check this one: 
> https://github.com/PhantomYdn/wicket-bugs/tree/master/doubleslash



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


wicket git commit: WICKET-6473 Flagging context relative URLs

2018-02-20 Thread pedro
Repository: wicket
Updated Branches:
  refs/heads/master d8142a7e2 -> dfa32cd15


WICKET-6473 Flagging context relative URLs

- flagging context relative URLs used in the ServletWebRequest so
they don't lose their empty segments information when being processed
inside UrlRenderer

- preserving the base URL segments by sending a copy of it to
UrlRenderer#removeCommonPrefixes

- preserving empty segments of problematic and forward URIs by
hinting the URL parser they are not full


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

Branch: refs/heads/master
Commit: dfa32cd151fec1e85ed65a83a363ef33144a652e
Parents: d8142a7
Author: Pedro Santos <pedros...@gmail.com>
Authored: Wed Jan 17 02:09:51 2018 -0200
Committer: Pedro Santos <pedros...@gmail.com>
Committed: Tue Feb 20 22:10:27 2018 -0300

--
 .../org/apache/wicket/mock/MockWebRequest.java  |  4 ++-
 .../http/servlet/ServletWebRequest.java |  5 +--
 .../wicket/request/cycle/UrlRendererTest.java   | 18 +++
 .../java/org/apache/wicket/request/Url.java | 34 ++--
 .../org/apache/wicket/request/UrlRenderer.java  |  8 +++--
 .../java/org/apache/wicket/request/UrlTest.java | 18 +++
 6 files changed, 80 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/dfa32cd1/wicket-core/src/main/java/org/apache/wicket/mock/MockWebRequest.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/mock/MockWebRequest.java 
b/wicket-core/src/main/java/org/apache/wicket/mock/MockWebRequest.java
index 61e95c9..ffbbd6f 100644
--- a/wicket-core/src/main/java/org/apache/wicket/mock/MockWebRequest.java
+++ b/wicket-core/src/main/java/org/apache/wicket/mock/MockWebRequest.java
@@ -281,7 +281,9 @@ public class MockWebRequest extends WebRequest
@Override
public Url getClientUrl()
{
-   return new Url(url.getSegments(), Collections. 
emptyList());
+   Url baseUrl = new Url(url.getSegments(), 
Collections. emptyList());
+   baseUrl.setContextRelative(url.isContextRelative());
+   return baseUrl;
}
 
@Override

http://git-wip-us.apache.org/repos/asf/wicket/blob/dfa32cd1/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java
 
b/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java
index c668cdf..45b0544 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java
@@ -132,13 +132,13 @@ public class ServletWebRequest extends WebRequest
{
if (errorAttributes != null && 
!Strings.isEmpty(errorAttributes.getRequestUri()))
{
-   String problematicURI = 
Url.parse(errorAttributes.getRequestUri(), getCharset())
+   String problematicURI = 
Url.parse(errorAttributes.getRequestUri(), getCharset(), false)
.toString();
return getContextRelativeUrl(problematicURI, 
filterPrefix);
}
else if (forwardAttributes != null && 
!Strings.isEmpty(forwardAttributes.getRequestUri()))
{
-   String forwardURI = 
Url.parse(forwardAttributes.getRequestUri(), getCharset())
+   String forwardURI = 
Url.parse(forwardAttributes.getRequestUri(), getCharset(), false)
.toString();
return getContextRelativeUrl(forwardURI, filterPrefix);
}
@@ -170,6 +170,7 @@ public class ServletWebRequest extends WebRequest
url.setPort(httpServletRequest.getServerPort());
url.setHost(httpServletRequest.getServerName());
url.setProtocol(httpServletRequest.getScheme());
+   url.setContextRelative(true);
return url;
}
 

http://git-wip-us.apache.org/repos/asf/wicket/blob/dfa32cd1/wicket-core/src/test/java/org/apache/wicket/request/cycle/UrlRendererTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/request/cycle/UrlRendererTest.java
 
b/wicket-core/src/test/java/org/apache/wicket/request/cycle/UrlRendererT

wicket git commit: WICKET-6473 Flagging context relative URLs

2018-02-20 Thread pedro
Repository: wicket
Updated Branches:
  refs/heads/wicket-7.x 7ba197c68 -> 08f0f61fb


WICKET-6473 Flagging context relative URLs

- flagging context relative URLs used in the ServletWebRequest so
they don't lose their empty segments information when being processed
inside UrlRenderer

- preserving the base URL segments by sending a copy of it to
UrlRenderer#removeCommonPrefixes

- preserving empty segments of problematic and forward URIs by
hinting the URL parser they are not full


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

Branch: refs/heads/wicket-7.x
Commit: 08f0f61fbd8a5959e35b599fdf288dfe1f669d00
Parents: 7ba197c
Author: Pedro Santos <pedros...@gmail.com>
Authored: Wed Jan 17 02:09:51 2018 -0200
Committer: Pedro Santos <pedros...@gmail.com>
Committed: Tue Feb 20 21:32:43 2018 -0300

--
 .../org/apache/wicket/mock/MockWebRequest.java  |  4 ++-
 .../http/servlet/ServletWebRequest.java |  5 +--
 .../wicket/request/cycle/UrlRendererTest.java   | 18 +++
 .../java/org/apache/wicket/request/Url.java | 34 ++--
 .../org/apache/wicket/request/UrlRenderer.java  |  8 +++--
 .../java/org/apache/wicket/request/UrlTest.java | 18 +++
 6 files changed, 80 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/08f0f61f/wicket-core/src/main/java/org/apache/wicket/mock/MockWebRequest.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/mock/MockWebRequest.java 
b/wicket-core/src/main/java/org/apache/wicket/mock/MockWebRequest.java
index 61e95c9..ffbbd6f 100644
--- a/wicket-core/src/main/java/org/apache/wicket/mock/MockWebRequest.java
+++ b/wicket-core/src/main/java/org/apache/wicket/mock/MockWebRequest.java
@@ -281,7 +281,9 @@ public class MockWebRequest extends WebRequest
@Override
public Url getClientUrl()
{
-   return new Url(url.getSegments(), Collections. 
emptyList());
+   Url baseUrl = new Url(url.getSegments(), 
Collections. emptyList());
+   baseUrl.setContextRelative(url.isContextRelative());
+   return baseUrl;
}
 
@Override

http://git-wip-us.apache.org/repos/asf/wicket/blob/08f0f61f/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java
 
b/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java
index c668cdf..45b0544 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java
@@ -132,13 +132,13 @@ public class ServletWebRequest extends WebRequest
{
if (errorAttributes != null && 
!Strings.isEmpty(errorAttributes.getRequestUri()))
{
-   String problematicURI = 
Url.parse(errorAttributes.getRequestUri(), getCharset())
+   String problematicURI = 
Url.parse(errorAttributes.getRequestUri(), getCharset(), false)
.toString();
return getContextRelativeUrl(problematicURI, 
filterPrefix);
}
else if (forwardAttributes != null && 
!Strings.isEmpty(forwardAttributes.getRequestUri()))
{
-   String forwardURI = 
Url.parse(forwardAttributes.getRequestUri(), getCharset())
+   String forwardURI = 
Url.parse(forwardAttributes.getRequestUri(), getCharset(), false)
.toString();
return getContextRelativeUrl(forwardURI, filterPrefix);
}
@@ -170,6 +170,7 @@ public class ServletWebRequest extends WebRequest
url.setPort(httpServletRequest.getServerPort());
url.setHost(httpServletRequest.getServerName());
url.setProtocol(httpServletRequest.getScheme());
+   url.setContextRelative(true);
return url;
}
 

http://git-wip-us.apache.org/repos/asf/wicket/blob/08f0f61f/wicket-core/src/test/java/org/apache/wicket/request/cycle/UrlRendererTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/request/cycle/UrlRendererTest.java
 
b/wicket-core/src/test/java/org/apache/wicket/request/cycle/Url

wicket git commit: - flagging context relative URLs used in the ServletWebRequest so they don't lose their empty segments information when being processed inside UrlRenderer

2018-01-16 Thread pedro
Repository: wicket
Updated Branches:
  refs/heads/WICKET-6473-preserving-empty-url-segments [created] 86d5c0366


- flagging context relative URLs used in the ServletWebRequest so
they don't lose their empty segments information when being processed
inside UrlRenderer

- preserving the base URL segments by sending a copy of it to
UrlRenderer#removeCommonPrefixes

- preserving empty segments of problematic and forward URIs by
hinting the URL parser they are not full


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

Branch: refs/heads/WICKET-6473-preserving-empty-url-segments
Commit: 86d5c0366e3b075f771968354020cb9300ccc39e
Parents: ae7f324
Author: Pedro Santos <pedros...@gmail.com>
Authored: Wed Jan 17 02:09:51 2018 -0200
Committer: Pedro Santos <pedros...@gmail.com>
Committed: Wed Jan 17 02:09:51 2018 -0200

--
 .../org/apache/wicket/mock/MockWebRequest.java  |  4 ++-
 .../http/servlet/ServletWebRequest.java |  5 ++--
 .../wicket/request/cycle/UrlRendererTest.java   | 18 
 .../java/org/apache/wicket/request/Url.java | 29 +++-
 .../org/apache/wicket/request/UrlRenderer.java  |  6 ++--
 5 files changed, 56 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/86d5c036/wicket-core/src/main/java/org/apache/wicket/mock/MockWebRequest.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/mock/MockWebRequest.java 
b/wicket-core/src/main/java/org/apache/wicket/mock/MockWebRequest.java
index 61e95c9..ffbbd6f 100644
--- a/wicket-core/src/main/java/org/apache/wicket/mock/MockWebRequest.java
+++ b/wicket-core/src/main/java/org/apache/wicket/mock/MockWebRequest.java
@@ -281,7 +281,9 @@ public class MockWebRequest extends WebRequest
@Override
public Url getClientUrl()
{
-   return new Url(url.getSegments(), Collections. 
emptyList());
+   Url baseUrl = new Url(url.getSegments(), 
Collections. emptyList());
+   baseUrl.setContextRelative(url.isContextRelative());
+   return baseUrl;
}
 
@Override

http://git-wip-us.apache.org/repos/asf/wicket/blob/86d5c036/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java
 
b/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java
index c668cdf..45b0544 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java
@@ -132,13 +132,13 @@ public class ServletWebRequest extends WebRequest
{
if (errorAttributes != null && 
!Strings.isEmpty(errorAttributes.getRequestUri()))
{
-   String problematicURI = 
Url.parse(errorAttributes.getRequestUri(), getCharset())
+   String problematicURI = 
Url.parse(errorAttributes.getRequestUri(), getCharset(), false)
.toString();
return getContextRelativeUrl(problematicURI, 
filterPrefix);
}
else if (forwardAttributes != null && 
!Strings.isEmpty(forwardAttributes.getRequestUri()))
{
-   String forwardURI = 
Url.parse(forwardAttributes.getRequestUri(), getCharset())
+   String forwardURI = 
Url.parse(forwardAttributes.getRequestUri(), getCharset(), false)
.toString();
return getContextRelativeUrl(forwardURI, filterPrefix);
}
@@ -170,6 +170,7 @@ public class ServletWebRequest extends WebRequest
url.setPort(httpServletRequest.getServerPort());
url.setHost(httpServletRequest.getServerName());
url.setProtocol(httpServletRequest.getScheme());
+   url.setContextRelative(true);
return url;
}
 

http://git-wip-us.apache.org/repos/asf/wicket/blob/86d5c036/wicket-core/src/test/java/org/apache/wicket/request/cycle/UrlRendererTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/request/cycle/UrlRendererTest.java
 
b/wicket-core/src/test/java/org/apache/wicket/request/cycle/UrlRendererTest.java
index b294b4f..a64ae61 100644
--- 

[jira] [Commented] (WICKET-4920) Rendered Url on root context with cookies disabled might result in double slash //

2018-01-16 Thread Pedro Santos (JIRA)

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

Pedro Santos commented on WICKET-4920:
--

Hi [~svenmeier],

the test UrlRendererTest#test14 parsers the URL:

"http://localhost:8080/;jsessionid=1p87c5424zjuvd57kljcu2bwa?0-1.IBehaviorListener.1-component;

To an URL containing two segments. Is this expected? Don't this URL has only 
one segment?

> Rendered Url on root context with cookies disabled might result in double 
> slash //
> --
>
> Key: WICKET-4920
> URL: https://issues.apache.org/jira/browse/WICKET-4920
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 6.3.0
>Reporter: Sven Meier
>Assignee: Sven Meier
>Priority: Major
> Fix For: 6.4.0
>
>
> When a link is rendered on root context with cookies disabled (or on first 
> access with container sending jsessionid), a rendered link url might be 
> prepended with "./" thus resulting in a double slash, (".//").



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


[jira] [Assigned] (WICKET-6473) Double slash break 404page

2018-01-16 Thread Pedro Santos (JIRA)

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

Pedro Santos reassigned WICKET-6473:


Assignee: Pedro Santos

> Double slash break 404page
> --
>
> Key: WICKET-6473
> URL: https://issues.apache.org/jira/browse/WICKET-6473
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 7.8.0
>Reporter: Ilia Naryzhny
>Assignee: Pedro Santos
>Priority: Major
>
> Issue came from email thread: http://markmail.org/thread/rlozkiz7gy2z3bkc
> --
> We have in Orienteer customized NotFoundPage 
> https://github.com/OrienteerBAP/Orienteer/blob/master/orienteer-core/src/main/java/org/orienteer/core/web/NotFoundPage.java
>  . And it works perfectly except one case: if somebody by mistake put double 
> slash in URL. For example https://demo.orienteer.org// Application is trying 
> to render 404 page, but all resources are not found and user see just plan 
> page without styles and scripts. Taking into account that resources are 
> included commonly through XXXPackageResource and WebJarsResourc - it looks 
> like Wicket issue.
> Demonstatin can be found there: Please check this one: 
> https://github.com/PhantomYdn/wicket-bugs/tree/master/doubleslash



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


[jira] [Commented] (WICKET-6490) Apply site style to examples

2017-11-03 Thread Pedro Santos (JIRA)

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

Pedro Santos commented on WICKET-6490:
--

Hi Andrea, the main site style looks pretty good on the examples page, thx. 
While testing, I found a few problems; will list them here for reference (maybe 
they are bugs in the master branch):

- couldn't open the site home page due a missing "mainNavigation" component in 
the markup, I just added:

in WicketExamplePage.html so I could get the site running ( I started it with 
StartExamples )

- the submit button looks big next to other form elements. At 
http://localhost:8080/stateless/state-in-url for example, it looks weird next 
to a text input. I just tweaked the margin/padding to:
  margin: 0;
  padding: 0.2rem 0.75rem;
at style.css:280 and it looks better

- the "ajax with prototype" example at http://localhost:8080/prototype looks 
broken, it redirects me to a new page when I click at "Click me!"

- "templating using markup inheritance" and "templating using a border" 
examples at http://localhost:8080/template/ are failing

> Apply site style to examples
> 
>
> Key: WICKET-6490
> URL: https://issues.apache.org/jira/browse/WICKET-6490
> Project: Wicket
>  Issue Type: Improvement
>Reporter: Andrea Del Bene
>Assignee: Andrea Del Bene
>Priority: Minor
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (WICKET-6347) IChoiceRenderer implements IDetachable

2017-03-27 Thread Pedro Santos (JIRA)

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

Pedro Santos commented on WICKET-6347:
--

Because we have another interface doing it (IModel, and I also pointed the 
semantic error in Martjin's mail thread earlier today) does not actually 
counter my point that it's a semantic error. But you are invited to show your 
technical point instead of to plain point that are not convinced.

The alternative implementation I proposed for the components that could detach 
renderers should cover your use case and adds no semantic error to the code.

> IChoiceRenderer implements IDetachable
> --
>
> Key: WICKET-6347
> URL: https://issues.apache.org/jira/browse/WICKET-6347
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket
>Affects Versions: 8.0.0-M4
>Reporter: Sven Meier
>Assignee: Sven Meier
>Priority: Trivial
>
> IChoiceRenderer (and other renderers ) don't implement IDetachable currently.
> I've came across situations where this would have been handy, and apparently 
> other users would also welcome such an improvement:
> 
> http://stackoverflow.com/questions/42933128/automatically-detaching-choice-renderer-in-wicket
> I've made the required changes locally and there's no negative impact as far 
> as I can see.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (WICKET-6347) IChoiceRenderer implements IDetachable

2017-03-27 Thread Pedro Santos (JIRA)

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

Pedro Santos commented on WICKET-6347:
--

Hi Sven, 

it does look that you are eager to shove this Java 8 new sexy feature 
regardless if you are adding a *default* implementation. It isn't because you 
can reach something by breaking contracts/interfaces with this new feature (a 
lot of renderers won't be detachable) that it suits Wicket well for renderes 
(we can discuss models in another thread).

> IChoiceRenderer implements IDetachable
> --
>
> Key: WICKET-6347
> URL: https://issues.apache.org/jira/browse/WICKET-6347
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket
>Affects Versions: 8.0.0-M4
>Reporter: Sven Meier
>Assignee: Sven Meier
>Priority: Trivial
>
> IChoiceRenderer (and other renderers ) don't implement IDetachable currently.
> I've came across situations where this would have been handy, and apparently 
> other users would also welcome such an improvement:
> 
> http://stackoverflow.com/questions/42933128/automatically-detaching-choice-renderer-in-wicket
> I've made the required changes locally and there's no negative impact as far 
> as I can see.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (WICKET-6347) IChoiceRenderer implements IDetachable

2017-03-27 Thread Pedro Santos (JIRA)

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

Pedro Santos commented on WICKET-6347:
--

Again (I pointed the semantic error in your point earlier today), there's no 
temporary value being detached in this implementation. This empty method is 
rather a placeholder than a default implementation.

Yes it's forcing all renderers to communicate that they fulfill the contract: 
"I can be detached", regardless if they really do, which is another semantic 
error.

> IChoiceRenderer implements IDetachable
> --
>
> Key: WICKET-6347
> URL: https://issues.apache.org/jira/browse/WICKET-6347
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket
>Affects Versions: 8.0.0-M4
>Reporter: Sven Meier
>Assignee: Sven Meier
>Priority: Trivial
>
> IChoiceRenderer (and other renderers ) don't implement IDetachable currently.
> I've came across situations where this would have been handy, and apparently 
> other users would also welcome such an improvement:
> 
> http://stackoverflow.com/questions/42933128/automatically-detaching-choice-renderer-in-wicket
> I've made the required changes locally and there's no negative impact as far 
> as I can see.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (WICKET-6347) IChoiceRenderer implements IDetachable

2017-03-27 Thread Pedro Santos (JIRA)

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

Pedro Santos commented on WICKET-6347:
--

Hi Sven, why don't:

if(renderer instanceof IDetachable) ((IDetachable)renderer).detach();

instead of to force this interface to all renderes?

> IChoiceRenderer implements IDetachable
> --
>
> Key: WICKET-6347
> URL: https://issues.apache.org/jira/browse/WICKET-6347
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket
>Affects Versions: 8.0.0-M4
>Reporter: Sven Meier
>Assignee: Sven Meier
>Priority: Trivial
>
> IChoiceRenderer (and other renderers ) don't implement IDetachable currently.
> I've came across situations where this would have been handy, and apparently 
> other users would also welcome such an improvement:
> 
> http://stackoverflow.com/questions/42933128/automatically-detaching-choice-renderer-in-wicket
> I've made the required changes locally and there's no negative impact as far 
> as I can see.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Resolved] (WICKET-4201) IPageProvider and its implementations need to be improved

2017-03-25 Thread Pedro Santos (JIRA)

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

Pedro Santos resolved WICKET-4201.
--
   Resolution: Fixed
Fix Version/s: 8.0.0-M5

I saw Wicket 8.0.0-M5 is being voted, but I selected it as the fix version 
anyway just so we know that this ticket is fixed only for Wicket 8 branch. Will 
update the version when the next number got available.

> IPageProvider and its implementations need to be improved
> -
>
> Key: WICKET-4201
> URL: https://issues.apache.org/jira/browse/WICKET-4201
> Project: Wicket
>  Issue Type: Task
>  Components: wicket
>Affects Versions: 1.5.0, 1.5.1, 1.5.2
>Reporter: Emond Papegaaij
>Assignee: Pedro Santos
> Fix For: 8.0.0-M5
>
>
> During the development op 1.5, IPageProvider and its implementations have 
> become a bit of a mess. The interface is not clearly defined. One of the 
> biggest problems is that several methods can throw exceptions and there is no 
> way of knowing which method will throw which exception and when. It should 
> always be clear what exceptions to expect. For example, getPage can throw a 
> PageExpiredException, but getPageClass cannot, it should return null if no 
> page class is set. Perhaps, it's even better to never throw exceptions at 
> all. Also, the various introspection methods are not very well defined and 
> make it almost impossible to come up with an alternative implementation of 
> the interface (which, IMHO is a sign of a broken API).
> Changing this interface is not an option for 1.5, but looking at the number 
> of subtle bugs that came from this part of the code, it should really be 
> considered for wicket.next.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[7/9] wicket git commit: WICKET-4201 removing the page expired exception from page provider and using its API to determine such state throughout the code

2017-03-25 Thread pedro
WICKET-4201 removing the page expired exception from page provider and using 
its API to determine such state throughout the code


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

Branch: refs/heads/master
Commit: d2a809262811a7696660425dd80cdd9d0c55ed4d
Parents: cc0fe99
Author: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Authored: Sun Feb 5 01:36:23 2017 -0200
Committer: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Committed: Sat Mar 25 14:58:12 2017 -0300

--
 .../request/handler/ListenerRequestHandler.java |  19 ++-
 .../core/request/handler/PageProvider.java  | 141 +++
 .../mapper/AbstractBookmarkableMapper.java  |   2 +-
 3 files changed, 98 insertions(+), 64 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/d2a80926/wicket-core/src/main/java/org/apache/wicket/core/request/handler/ListenerRequestHandler.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/ListenerRequestHandler.java
 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/ListenerRequestHandler.java
index 400feb2..f9b3bbc 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/ListenerRequestHandler.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/ListenerRequestHandler.java
@@ -23,6 +23,7 @@ import org.apache.wicket.WicketRuntimeException;
 import org.apache.wicket.behavior.Behavior;
 import 
org.apache.wicket.core.request.handler.RenderPageRequestHandler.RedirectPolicy;
 import org.apache.wicket.core.request.handler.logger.ListenerLogData;
+import org.apache.wicket.protocol.http.PageExpiredException;
 import org.apache.wicket.request.ILoggableRequestHandler;
 import org.apache.wicket.request.IRequestCycle;
 import org.apache.wicket.request.component.IRequestableComponent;
@@ -94,7 +95,23 @@ public class ListenerRequestHandler
@Override
public IRequestablePage getPage()
{
-   return pageComponentProvider.getPageInstance();
+   try
+   {
+   return pageComponentProvider.getPageInstance();
+   }
+   catch (IllegalStateException e)
+   {
+   if (pageComponentProvider.wasExpired())
+   {
+
+   throw new PageExpiredException(
+   "Page with id '" + 
pageComponentProvider.getPageId() + "' has expired.");
+   }
+   else
+   {
+   throw e;// bubbles up
+   }
+   }
}
 
@Override

http://git-wip-us.apache.org/repos/asf/wicket/blob/d2a80926/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
index cda486a..2934cf3 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
@@ -20,7 +20,6 @@ import org.apache.wicket.Application;
 import org.apache.wicket.core.request.mapper.IPageSource;
 import org.apache.wicket.core.request.mapper.StalePageException;
 import org.apache.wicket.page.IPageManager;
-import org.apache.wicket.protocol.http.PageExpiredException;
 import org.apache.wicket.request.IRequestHandler;
 import org.apache.wicket.request.IRequestMapper;
 import org.apache.wicket.request.component.IRequestablePage;
@@ -59,7 +58,7 @@ public class PageProvider implements IPageProvider, 
IClusterable
 
private PageParameters pageParameters;
 
-   private Provision provision;
+   private Provision provision = new Provision();
 
/**
 * Creates a new page provider object. Upon calling of {@link 
#getPageInstance()} this provider
@@ -151,18 +150,17 @@ public class PageProvider implements IPageProvider, 
IClusterable
{
Args.notNull(page, "page");
 
-   provision = new Provision(page);
+   provision = new Provision().resolve(page);
pageId = page.getPageId();
renderCount = page.getRenderCount();
}
 
-   private Provision getProvision()
+   

[9/9] wicket git commit: WICKET-4201 removing unnecessary runtime exception from PageProvider#doesProvideNewPage() and code cleanup

2017-03-25 Thread pedro
WICKET-4201 removing unnecessary runtime exception from 
PageProvider#doesProvideNewPage() and code cleanup


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

Branch: refs/heads/master
Commit: df5f141d7241903b0721b45921296db74247e4e2
Parents: ee1363d
Author: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Authored: Tue Feb 7 21:29:09 2017 -0200
Committer: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Committed: Sat Mar 25 15:39:56 2017 -0300

--
 .../wicket/core/request/handler/PageProvider.java   | 10 --
 .../apache/wicket/request/handler/PageProviderTest.java | 12 ++--
 2 files changed, 6 insertions(+), 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/df5f141d/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
index 5728628..74e30c3 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
@@ -219,7 +219,9 @@ public class PageProvider implements IPageProvider, 
IClusterable
return getProvision().didResolveToPage();
}
else
+   {
return false;
+   }
}
 
/**
@@ -232,10 +234,6 @@ public class PageProvider implements IPageProvider, 
IClusterable
@Override
public final boolean doesProvideNewPage()
{
-   if (provision == null)
-   {
-   throw new IllegalStateException("Page instance not yet 
resolved");
-   }
return getProvision().doesProvideNewPage();
}
 
@@ -382,9 +380,9 @@ public class PageProvider implements IPageProvider, 
IClusterable
IRequestablePage getPage()
{
if (page == null && doesProvideNewPage())
-
+   {
page = 
getPageSource().newPageInstance(pageClass, pageParameters);
-
+   }
return page;
}
 

http://git-wip-us.apache.org/repos/asf/wicket/blob/df5f141d/wicket-core/src/test/java/org/apache/wicket/request/handler/PageProviderTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/request/handler/PageProviderTest.java
 
b/wicket-core/src/test/java/org/apache/wicket/request/handler/PageProviderTest.java
index f5af25a..622b48b 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/request/handler/PageProviderTest.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/request/handler/PageProviderTest.java
@@ -198,21 +198,13 @@ public class PageProviderTest extends WicketTestCase
public void testPageProperties_bookmarkable()
{
PageProvider provider = new 
PageProvider(StatelessPageTest.class);
+   assertTrue(provider.doesProvideNewPage());
assertFalse(provider.hasPageInstance());
-   try
-   {
-   provider.doesProvideNewPage();
-   fail("expected illegal state exception");
-   }
-   catch (IllegalStateException e)
-   {
-   // expected
-   }
 
provider.getPageInstance();
 
-   assertTrue(provider.hasPageInstance());
assertTrue(provider.doesProvideNewPage());
+   assertTrue(provider.hasPageInstance());
}
 
@Test



[1/9] wicket git commit: WICKET-4201 better exception message

2017-03-25 Thread pedro
Repository: wicket
Updated Branches:
  refs/heads/master b909ea8e2 -> df5f141d7


WICKET-4201 better exception message


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

Branch: refs/heads/master
Commit: ee1363d8e2b0eb353c44f7e25ec54ca1523cc7d7
Parents: 0a702f0
Author: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Authored: Tue Feb 7 20:43:46 2017 -0200
Committer: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Committed: Sat Mar 25 14:58:12 2017 -0300

--
 .../java/org/apache/wicket/core/request/handler/PageProvider.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/ee1363d8/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
index 44e51cb..5728628 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
@@ -308,8 +308,7 @@ public class PageProvider implements IPageProvider, 
IClusterable
{
if (provision != null)
{
-   throw new IllegalStateException(
-   "A provision was already been done. The 
provider can be forcefully detached or a new one needs to be used to provide 
using this page source.");
+   throw new IllegalStateException("A page was already 
provided.");
}
this.pageSource = pageSource;
}



[6/9] wicket git commit: WICKET-4201 removing unnecessary parameters plus javadoc for PageProvider#Provision class

2017-03-25 Thread pedro
WICKET-4201 removing unnecessary parameters plus javadoc for 
PageProvider#Provision class


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

Branch: refs/heads/master
Commit: 88f783d3c83ae7c764e8bfcab19fc68741e3d2d5
Parents: 5422d5f
Author: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Authored: Sun Feb 5 19:13:03 2017 -0200
Committer: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Committed: Sat Mar 25 14:58:12 2017 -0300

--
 .../core/request/handler/PageProvider.java  | 27 
 1 file changed, 22 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/88f783d3/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
index f558a5e..6cf6f95 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
@@ -150,7 +150,7 @@ public class PageProvider implements IPageProvider, 
IClusterable
{
Args.notNull(page, "page");
 
-   provision = new Provision().resolve(page);
+   provision = new Provision().resolveTo(page);
pageId = page.getPageId();
renderCount = page.getRenderCount();
}
@@ -159,7 +159,7 @@ public class PageProvider implements IPageProvider, 
IClusterable
{
if (!provision.wasResolved())
 
-   provision.resolve(pageId, pageClass, pageParameters, 
renderCount);
+   provision.resolve();
 
return provision;
}
@@ -353,6 +353,24 @@ public class PageProvider implements IPageProvider, 
IClusterable
+ ", pageClass=" + pageClass + ", pageParameters=" + 
pageParameters + '}';
}
 
+   /**
+* A provision is the work necessary to provide a page. It includes to 
resolve parameters to a
+* page, to track the resolution metadata and to keep a reference of 
the resolved page.
+* 
+* The logic based on {@link PageProvider}'s parameters:
+* 
+* - having an stored page id, the stored page is provided
+* 
+* - having only a page class, a new instance of it is provided
+* 
+* - having non stored page id plus page class, a new instance of the 
page class is provided
+* 
+* - having non stored page id and no page class, no page is provided
+* 
+* - being a page instance, the instance itself will be the provided 
page
+*
+* @author pedro
+*/
private class Provision
{
transient IRequestablePage page;
@@ -388,7 +406,7 @@ public class PageProvider implements IPageProvider, 
IClusterable
return failedToFindStoredPage;
}
 
-   Provision resolve(IRequestablePage page)
+   Provision resolveTo(IRequestablePage page)
{
this.page = page;
 
@@ -397,8 +415,7 @@ public class PageProvider implements IPageProvider, 
IClusterable
return this;
}
 
-   Provision resolve(Integer pageId, Class pageClass,
-   PageParameters pageParameters, Integer renderCount)
+   Provision resolve()
{
 
if (pageId != null)



[8/9] wicket git commit: WICKET-4201 removing illegal state exception from PageProvider#getPageInstance

2017-03-25 Thread pedro
WICKET-4201 removing illegal state exception from PageProvider#getPageInstance


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

Branch: refs/heads/master
Commit: 5422d5fbdb9b11e08a894ecb007110e36011b662
Parents: 14bffef
Author: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Authored: Sun Feb 5 04:36:12 2017 -0200
Committer: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Committed: Sat Mar 25 14:58:12 2017 -0300

--
 .../request/handler/ListenerRequestHandler.java | 20 +---
 .../core/request/handler/PageProvider.java  |  8 +---
 2 files changed, 6 insertions(+), 22 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/5422d5fb/wicket-core/src/main/java/org/apache/wicket/core/request/handler/ListenerRequestHandler.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/ListenerRequestHandler.java
 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/ListenerRequestHandler.java
index cc4f7fd..d36cce9 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/ListenerRequestHandler.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/ListenerRequestHandler.java
@@ -95,23 +95,13 @@ public class ListenerRequestHandler
@Override
public IRequestablePage getPage()
{
-   try
-   {
-   return pageComponentProvider.getPageInstance();
-   }
-   catch (IllegalStateException e)
+   IRequestablePage page = pageComponentProvider.getPageInstance();
+   if (page == null && pageComponentProvider.wasExpired())
{
-   if (pageComponentProvider.wasExpired())
-   {
-
-   throw new PageExpiredException(
-   "Page with id '" + 
pageComponentProvider.getPageId() + "' has expired.");
-   }
-   else
-   {
-   throw e;// bubbles up
-   }
+   throw new PageExpiredException(
+   "Page with id '" + 
pageComponentProvider.getPageId() + "' has expired.");
}
+   return page;
}
 
@Override

http://git-wip-us.apache.org/repos/asf/wicket/blob/5422d5fb/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
index 261502b..f558a5e 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
@@ -170,13 +170,7 @@ public class PageProvider implements IPageProvider, 
IClusterable
@Override
public IRequestablePage getPageInstance()
{
-   Provision resolvedProvision = getResolvedProvision();
-
-   if (!resolvedProvision.didResolveToPage() && 
!resolvedProvision.doesProvideNewPage())
-   {
-   throw new IllegalStateException("The configured page 
provider can't resolve a page.");
-   }
-   return resolvedProvision.getPage();
+   return getResolvedProvision().getPage();
}
 
/**



[3/9] wicket git commit: WICKET-4201 renaming PageProvider#isPageInstanceFresh to doesProvideNewPage

2017-03-25 Thread pedro
WICKET-4201 renaming PageProvider#isPageInstanceFresh to doesProvideNewPage


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

Branch: refs/heads/master
Commit: 2a922c6880cfea8de105193f07cd9dc1c1a4fb62
Parents: d2a8092
Author: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Authored: Sun Feb 5 01:46:48 2017 -0200
Committer: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Committed: Sat Mar 25 14:58:12 2017 -0300

--
 .../apache/wicket/core/request/handler/IPageProvider.java |  2 +-
 .../core/request/handler/ListenerRequestHandler.java  |  2 +-
 .../apache/wicket/core/request/handler/PageProvider.java  |  2 +-
 .../apache/wicket/request/handler/PageProviderTest.java   | 10 +-
 4 files changed, 8 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/2a922c68/wicket-core/src/main/java/org/apache/wicket/core/request/handler/IPageProvider.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/IPageProvider.java
 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/IPageProvider.java
index 90fdaf8..cb2510a 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/IPageProvider.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/IPageProvider.java
@@ -113,5 +113,5 @@ public interface IPageProvider
 * @return {@code true} iff the page instance held by this provider was 
instantiated by the
 * provider
 */
-   boolean isPageInstanceFresh();
+   boolean doesProvideNewPage();
 }

http://git-wip-us.apache.org/repos/asf/wicket/blob/2a922c68/wicket-core/src/main/java/org/apache/wicket/core/request/handler/ListenerRequestHandler.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/ListenerRequestHandler.java
 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/ListenerRequestHandler.java
index f9b3bbc..cc4f7fd 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/ListenerRequestHandler.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/ListenerRequestHandler.java
@@ -156,7 +156,7 @@ public class ListenerRequestHandler
public void respond(final IRequestCycle requestCycle)
{
final IRequestablePage page = getPage();
-   final boolean freshPage = 
pageComponentProvider.isPageInstanceFresh();
+   final boolean freshPage = 
pageComponentProvider.doesProvideNewPage();
final boolean isAjax = 
((WebRequest)requestCycle.getRequest()).isAjax();
 
IRequestableComponent component;

http://git-wip-us.apache.org/repos/asf/wicket/blob/2a922c68/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
index 2934cf3..261502b 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
@@ -236,7 +236,7 @@ public class PageProvider implements IPageProvider, 
IClusterable
 * provider
 */
@Override
-   public final boolean isPageInstanceFresh()
+   public final boolean doesProvideNewPage()
{
if (!this.provision.wasResolved())
{

http://git-wip-us.apache.org/repos/asf/wicket/blob/2a922c68/wicket-core/src/test/java/org/apache/wicket/request/handler/PageProviderTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/request/handler/PageProviderTest.java
 
b/wicket-core/src/test/java/org/apache/wicket/request/handler/PageProviderTest.java
index eed70cc..09115a6 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/request/handler/PageProviderTest.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/request/handler/PageProviderTest.java
@@ -188,7 +188,7 @@ public class PageProviderTest extends WicketTestCase
{
PageProvider provider = new PageProvider(new 
StatelessPageTest());
assertTrue(provider.hasPageInstance());
-   assertFalse(provider.isPageI

[5/9] wicket git commit: WICKET-4201 removing page expired exception from IPageProvider interface, updated javadoc

2017-03-25 Thread pedro
WICKET-4201 removing page expired exception from IPageProvider interface, 
updated javadoc


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

Branch: refs/heads/master
Commit: 14bffefbb3755e05a51d4d1a987ff07c0565b7be
Parents: 2a922c6
Author: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Authored: Sun Feb 5 02:52:34 2017 -0200
Committer: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Committed: Sat Mar 25 14:58:12 2017 -0300

--
 .../core/request/handler/IPageProvider.java | 20 +---
 1 file changed, 9 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/14bffefb/wicket-core/src/main/java/org/apache/wicket/core/request/handler/IPageProvider.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/IPageProvider.java
 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/IPageProvider.java
index cb2510a..f0843dc 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/IPageProvider.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/IPageProvider.java
@@ -43,7 +43,7 @@ public interface IPageProvider
  *  could not have been found and the constructor used did not 
provide enough information
  *  to create new page instance
 */
-   IRequestablePage getPageInstance() throws PageExpiredException;
+   IRequestablePage getPageInstance();
 
/**
 * Returns {@link PageParameters} of the page.
@@ -53,11 +53,8 @@ public interface IPageProvider
PageParameters getPageParameters();
 
/**
-* Returns whether calling getPageInstance() will result in creating 
new page instance or
-* whether it will be an existing instance (even though it might be 
pulled from page store).
-*
-* @return true if calling {@link #getPageInstance()} will 
create new page
-* instance, false otherwise.
+* @return negates {@link PageProvider#hasPageInstance()}
+* @deprecated use {@link PageProvider#hasPageInstance()} negation 
instead
 */
boolean isNewPageInstance();
 
@@ -95,11 +92,12 @@ public interface IPageProvider
void detach();
 
/**
-* Checks whether or not the provider has a page instance. This page 
instance might have been
-* passed to this page provider directly or it may have been 
instantiated or retrieved from the
-* page store.
-*
-* @return {@code true} iff page instance has been created or retrieved
+* If this provider returns existing page, regardless if it was already 
created by PageProvider
+* itself or is or can be found in the data store. The only guarantee 
is that by calling
+* {@link PageProvider#getPageInstance()} this provider will return an 
existing instance and no
+* page will be created.
+* 
+* @return if provides an existing page
 */
boolean hasPageInstance();
 



[2/9] wicket git commit: WICKET-4201 removing non serializable attributes from serialization

2017-03-25 Thread pedro
WICKET-4201 removing non serializable attributes from serialization


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

Branch: refs/heads/master
Commit: 0a702f070bb7b3598030c906199f81ad832b8b2c
Parents: 88f783d
Author: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Authored: Mon Feb 6 05:07:41 2017 -0200
Committer: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Committed: Sat Mar 25 14:58:12 2017 -0300

--
 .../core/request/handler/PageProvider.java  | 45 +---
 .../request/handler/PageProviderTest.java   | 24 ++-
 2 files changed, 41 insertions(+), 28 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/0a702f07/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
index 6cf6f95..44e51cb 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
@@ -52,13 +52,13 @@ public class PageProvider implements IPageProvider, 
IClusterable
 
private final Integer pageId;
 
-   private IPageSource pageSource;
+   private transient IPageSource pageSource;
 
private Class pageClass;
 
private PageParameters pageParameters;
 
-   private Provision provision = new Provision();
+   private transient Provision provision;
 
/**
 * Creates a new page provider object. Upon calling of {@link 
#getPageInstance()} this provider
@@ -155,12 +155,12 @@ public class PageProvider implements IPageProvider, 
IClusterable
renderCount = page.getRenderCount();
}
 
-   private Provision getResolvedProvision()
+   private Provision getProvision()
{
-   if (!provision.wasResolved())
-
-   provision.resolve();
-
+   if (provision == null)
+   {
+   provision = new Provision().resolve();
+   }
return provision;
}
 
@@ -170,7 +170,7 @@ public class PageProvider implements IPageProvider, 
IClusterable
@Override
public IRequestablePage getPageInstance()
{
-   return getResolvedProvision().getPage();
+   return getProvision().getPage();
}
 
/**
@@ -214,9 +214,9 @@ public class PageProvider implements IPageProvider, 
IClusterable
@Override
public final boolean hasPageInstance()
{
-   if (provision.wasResolved() || pageId != null)
+   if (provision != null || pageId != null)
{
-   return getResolvedProvision().didResolveToPage();
+   return getProvision().didResolveToPage();
}
else
return false;
@@ -232,11 +232,11 @@ public class PageProvider implements IPageProvider, 
IClusterable
@Override
public final boolean doesProvideNewPage()
{
-   if (!this.provision.wasResolved())
+   if (provision == null)
{
throw new IllegalStateException("Page instance not yet 
resolved");
}
-   return getResolvedProvision().doesProvideNewPage();
+   return getProvision().doesProvideNewPage();
}
 
/**
@@ -245,7 +245,7 @@ public class PageProvider implements IPageProvider, 
IClusterable
@Override
public boolean wasExpired()
{
-   return pageId != null && 
getResolvedProvision().didFailToFindStoredPage();
+   return pageId != null && 
getProvision().didFailToFindStoredPage();
}
 
/**
@@ -290,7 +290,11 @@ public class PageProvider implements IPageProvider, 
IClusterable
@Override
public void detach()
{
-   provision.detach();
+   if (provision != null)
+   {
+   provision.detach();
+   provision = null;
+   }
}
 
/**
@@ -302,7 +306,7 @@ public class PageProvider implements IPageProvider, 
IClusterable
 */
public void setPageSource(IPageSource pageSource)
{
-   if (this.provision.wasResolved())

[4/9] wicket git commit: WICKET-4201 moving page resolution code to its own class, removing duplicated code, validating inner state when setting page sources

2017-03-25 Thread pedro
WICKET-4201 moving page resolution code to its own class, removing duplicated 
code, validating inner state when setting page sources


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

Branch: refs/heads/master
Commit: cc0fe992a9fe83f4617079087532542bda188cb4
Parents: b909ea8
Author: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Authored: Sat Feb 4 05:01:53 2017 -0200
Committer: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Committed: Sat Mar 25 14:58:12 2017 -0300

--
 .../core/request/handler/PageProvider.java  | 229 +--
 .../core/request/mapper/MountedMapperTest.java  |   2 +-
 2 files changed, 109 insertions(+), 122 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/cc0fe992/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
index e5e1a01..cda486a 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
@@ -20,7 +20,6 @@ import org.apache.wicket.Application;
 import org.apache.wicket.core.request.mapper.IPageSource;
 import org.apache.wicket.core.request.mapper.StalePageException;
 import org.apache.wicket.page.IPageManager;
-import org.apache.wicket.pageStore.IPageStore;
 import org.apache.wicket.protocol.http.PageExpiredException;
 import org.apache.wicket.request.IRequestHandler;
 import org.apache.wicket.request.IRequestMapper;
@@ -56,13 +55,12 @@ public class PageProvider implements IPageProvider, 
IClusterable
 
private IPageSource pageSource;
 
-   private transient IRequestablePage pageInstance;
-   private boolean pageInstanceIsFresh;
-
private Class pageClass;
 
private PageParameters pageParameters;
 
+   private Provision provision;
+
/**
 * Creates a new page provider object. Upon calling of {@link 
#getPageInstance()} this provider
 * will return page instance with specified id.
@@ -153,27 +151,32 @@ public class PageProvider implements IPageProvider, 
IClusterable
{
Args.notNull(page, "page");
 
-   pageInstance = page;
+   provision = new Provision(page);
pageId = page.getPageId();
renderCount = page.getRenderCount();
}
 
+   private Provision getProvision()
+   {
+   if (provision == null)
+   {
+   provision = new 
Provision(getPageSource()).resolvePageInstance(pageId, pageClass,
+   pageParameters, renderCount);
+   }
+   return provision;
+   }
+
/**
 * @see IPageProvider#getPageInstance()
 */
@Override
public IRequestablePage getPageInstance()
{
-   if (pageInstance == null)
+   if (!getProvision().didResolvePage() && 
!getProvision().doesProvideNewPage())
{
-   resolvePageInstance(pageId, pageClass, pageParameters, 
renderCount);
-
-   if (pageInstance == null)
-   {
-   throw new PageExpiredException("Page with id '" 
+ pageId + "' has expired.");
-   }
+   throw new PageExpiredException("Page with id '" + 
pageId + "' has expired.");
}
-   return pageInstance;
+   return getProvision().get();
}
 
/**
@@ -188,7 +191,7 @@ public class PageProvider implements IPageProvider, 
IClusterable
}
else if (isNewPageInstance() == false)
{
-   return pageInstance.getPageParameters();
+   return getProvision().get().getPageParameters();
}
else
{
@@ -197,26 +200,24 @@ public class PageProvider implements IPageProvider, 
IClusterable
}
 
/**
-* The page instance is new only if there is no cached instance or the 
data stores doesn't have
-* a page with that id with the same {@linkplain #pageClass}.
-* 
-* @see IPageProvider#isNewPageInstance()
+* @return don't resolve a page, but can create a new one

[jira] [Comment Edited] (WICKET-6318) To make PropertyResolver a configurable implementation

2017-02-26 Thread Pedro Santos (JIRA)

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

Pedro Santos edited comment on WICKET-6318 at 2/27/17 6:27 AM:
---

The property expression resolver resolution logic was moved to a configurable 
implementation of IPropertyExpressionResolver. The current resolver is now the 
OGNLPropertyExpressionResolver, and the new one will be implemented using the 
parser described in the ticket WICKET-4008 in PropertyExpressionResolver class.

List of changes:

ApplicationSettings --> holds a IPropertyExpressionResolver

PropertyResolver implementation --> OGNLPropertyExpressionResolver

ParsedPropertyExpressionResolver --> -created to be placeholder for the- new 
property expression resolver that will work using parsed input

PropertyResolver reflection utility code --> moved to ReflectionUtility

PropertyResolver API --> IPropertyExpressionResolver

-IPropertyLocator --> renamed to IPropertyResolver-

PropertyResolver.IGetAndSet --> moved to the reflection package

IPropertyReflectionAwareModel --> removed since it's an unused and untested 
interface that was breaking AbstractPropertyModel coherence by adding methods 
that weren't meant to be an abstraction of the model property, but rather a 
reflection API utility that already exists in Wicket's API

PropertyResolver static API > kept as a faced -for now- 


was (Author: pedrosans):
The property expression resolver resolution logic was moved to a configurable 
implementation of IPropertyExpressionResolver. The current resolver is now the 
OGNLPropertyExpressionResolver, and the new one will be implemented using the 
parser described in the ticket WICKET-4008 in PropertyExpressionResolver class.

List of changes:

ApplicationSettings --> holds a IPropertyExpressionResolver

PropertyResolver implementation --> OGNLPropertyExpressionResolver

ParsedPropertyExpressionResolver --> -created to be placeholder for the- new 
property expression resolver that will work using parsed input

PropertyResolver reflection utility code --> moved to ReflectionUtility

PropertyResolver API --> IPropertyExpressionResolver

-IPropertyLocator --> renamed to IPropertyResolver-

PropertyResolver.IGetAndSet --> moved to the reflection package

IPropertyReflectionAwareModel --> removed since it's an unused and untested 
interface that was breaking AbstractPropertyModel coherence by adding methods 
that weren't meant to be an abstraction of the model property, but rather a 
reflection API utility that already exists in Wicket's API

PropertyResolver static API --> kept as a faced -for now- 

> To make PropertyResolver a configurable implementation
> --
>
> Key: WICKET-6318
> URL: https://issues.apache.org/jira/browse/WICKET-6318
> Project: Wicket
>  Issue Type: Sub-task
>  Components: wicket
>Reporter: Pedro Santos
>
> To enable users to select each property resolver will be used, so if the new 
> implementation shows problematic it can be switched back to the a Wicket's < 
> 7 one.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Comment Edited] (WICKET-6318) To make PropertyResolver a configurable implementation

2017-02-26 Thread Pedro Santos (JIRA)

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

Pedro Santos edited comment on WICKET-6318 at 2/27/17 6:26 AM:
---

The property expression resolver resolution logic was moved to a configurable 
implementation of IPropertyExpressionResolver. The current resolver is now the 
OGNLPropertyExpressionResolver, and the new one will be implemented using the 
parser described in the ticket WICKET-4008 in PropertyExpressionResolver class.

List of changes:

ApplicationSettings --> holds a IPropertyExpressionResolver

PropertyResolver implementation --> OGNLPropertyExpressionResolver

ParsedPropertyExpressionResolver --> -created to be placeholder for the- new 
property expression resolver that will work using parsed input

PropertyResolver reflection utility code --> moved to ReflectionUtility

PropertyResolver API --> IPropertyExpressionResolver

-IPropertyLocator --> renamed to IPropertyResolver-

PropertyResolver.IGetAndSet --> moved to the reflection package

IPropertyReflectionAwareModel --> removed since it's an unused and untested 
interface that was breaking AbstractPropertyModel coherence by adding methods 
that weren't meant to be an abstraction of the model property, but rather a 
reflection API utility that already exists in Wicket's API

PropertyResolver static API --> kept as a faced -for now- 


was (Author: pedrosans):
The property expression resolver resolution logic was moved to a configurable 
implementation of IPropertyExpressionResolver. The current resolver is now the 
OGNLPropertyExpressionResolver, and the new one will be implemented using the 
parser described in the ticket WICKET-4008 in PropertyExpressionResolver class.

List of changes:

ApplicationSettings --> holds a IPropertyExpressionResolver

PropertyResolver implementation --> OGNLPropertyExpressionResolver

PropertyExpressionResolver --> created to be placeholder for the new property 
expression resolver that will work using parsed input

PropertyResolver reflection utility code --> moved to ReflectionUtility

PropertyResolver API --> IPropertyExpressionResolver

IPropertyLocator --> renamed to IPropertyResolver

PropertyResolver.IGetAndSet --> moved to the reflection package

IPropertyReflectionAwareModel --> removed since it's an unused and untested 
interface that was breaking AbstractPropertyModel coherence by adding methods 
that weren't meant to be an abstraction of the model property, but rather a 
reflection API utility that already exists in Wicket's API

PropertyResolver static API --> kept as a faced for now

> To make PropertyResolver a configurable implementation
> --
>
> Key: WICKET-6318
> URL: https://issues.apache.org/jira/browse/WICKET-6318
> Project: Wicket
>  Issue Type: Sub-task
>  Components: wicket
>Reporter: Pedro Santos
>
> To enable users to select each property resolver will be used, so if the new 
> implementation shows problematic it can be switched back to the a Wicket's < 
> 7 one.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[03/11] wicket git commit: WICKET-4008 property expression parser implementation

2017-02-26 Thread pedro
WICKET-4008 property expression parser implementation

Add some weird test cases


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

Branch: refs/heads/WICKET-6318-configurable-property-expression-resolver
Commit: 2f302dbfdc7bd60afca76bccbfac81ccbcbf6af1
Parents: cd96fb1
Author: Martin Tzvetanov Grigorov 
Authored: Tue Sep 20 22:33:13 2016 +0200
Committer: Martin Tzvetanov Grigorov 
Committed: Tue Sep 20 22:33:13 2016 +0200

--
 .../util/lang/PropertyExpressionParser.java |  6 +++---
 .../util/lang/PropertyExpressionParserTest.java | 22 +---
 2 files changed, 22 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/2f302dbf/wicket-core/src/main/java/org/apache/wicket/core/util/lang/PropertyExpressionParser.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/core/util/lang/PropertyExpressionParser.java
 
b/wicket-core/src/main/java/org/apache/wicket/core/util/lang/PropertyExpressionParser.java
index 4588218..08fd061 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/core/util/lang/PropertyExpressionParser.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/core/util/lang/PropertyExpressionParser.java
@@ -98,7 +98,7 @@ public class PropertyExpressionParser
case END_OF_EXPRESSION :
return expression;
default :
-   throw new ParserException("expecting a new 
expression but got: " + currentToken);
+   throw new ParserException("expecting a new 
expression but got: '" + currentToken + "'");
}
}
 
@@ -164,9 +164,9 @@ public class PropertyExpressionParser
{
if (lookaheadToken != ')')
{
-   throw new ParserException("expecting a method sign but 
got: " + currentToken);
+   throw new ParserException("expecting a method sign but 
got: '" + currentToken + "'");
}
advance();// skips right bracket
return true;
}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/2f302dbf/wicket-core/src/test/java/org/apache/wicket/core/util/lang/PropertyExpressionParserTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/core/util/lang/PropertyExpressionParserTest.java
 
b/wicket-core/src/test/java/org/apache/wicket/core/util/lang/PropertyExpressionParserTest.java
index 96d3739..d6c2803 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/core/util/lang/PropertyExpressionParserTest.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/core/util/lang/PropertyExpressionParserTest.java
@@ -3,11 +3,9 @@ package org.apache.wicket.core.util.lang;
 import static org.hamcrest.CoreMatchers.is;
 import static org.junit.Assert.assertThat;
 
-import org.apache.wicket.core.util.lang.ParserException;
-import org.apache.wicket.core.util.lang.PropertyExpression;
-import org.apache.wicket.core.util.lang.PropertyExpressionParser;
 import org.apache.wicket.core.util.lang.PropertyExpression.Property;
 import org.hamcrest.CoreMatchers;
+import org.junit.Ignore;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.ExpectedException;
@@ -35,6 +33,24 @@ public class PropertyExpressionParserTest
assertThat(parse.next, CoreMatchers.nullValue());
}
 
+   // TODO mgrigorov: @pedrosans: I'd expect the error message to complain 
about the space, not 'r'
+   @Test
+   public void shouldFailParsePropertyExpressionsWithSpace()
+   {
+   expectedException.expect(ParserException.class);
+   expectedException
+   .expectMessage("expecting a new expression but 
got: ' '");
+   parser.parse("per son");
+   }
+
+   // TODO mgrigorov: @pedrosans: IMO this should pass. Or otherwise 
should complain about the space, not '('
+   @Test
+   public void shouldParsePropertyExpressionsWithSpaceInMethod()
+   {
+   final PropertyExpression parse = parser.parse("person( )");
+   assertThat(parse.property, is(new Property("person", null, 
true)));
+   }
+
@Test
public void shouldParseIndexedPropertyExpressions()
{



[05/11] wicket git commit: WICKET-4008 parser differentiates java identifiers from bean properties

2017-02-26 Thread pedro
WICKET-4008 parser differentiates java identifiers from bean properties


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

Branch: refs/heads/WICKET-6318-configurable-property-expression-resolver
Commit: 697052f713345484b93f4ef61163587473b7b202
Parents: b0f7da8
Author: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Authored: Tue Sep 20 22:09:36 2016 -0300
Committer: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Committed: Tue Sep 20 22:09:36 2016 -0300

--
 .../core/util/lang/PropertyExpression.java  | 70 ++---
 .../util/lang/PropertyExpressionParser.java | 69 ++--
 .../util/lang/PropertyExpressionParserTest.java | 82 +++-
 .../wicket/util/lang/PropertyResolverTest.java  | 10 ++-
 4 files changed, 160 insertions(+), 71 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/697052f7/wicket-core/src/main/java/org/apache/wicket/core/util/lang/PropertyExpression.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/core/util/lang/PropertyExpression.java
 
b/wicket-core/src/main/java/org/apache/wicket/core/util/lang/PropertyExpression.java
index 635f95e..dab79ec 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/core/util/lang/PropertyExpression.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/core/util/lang/PropertyExpression.java
@@ -18,21 +18,76 @@ package org.apache.wicket.core.util.lang;
 
 public class PropertyExpression
 {
-   Property property;
+   JavaProperty javaProperty;
+   BeanProperty beanProperty;
CharSequence index;
PropertyExpression next;
 
-   static class Property
+   static class BeanProperty
+   {
+   CharSequence propertyName;
+   CharSequence index;
+
+   public BeanProperty()
+   {
+   }
+
+   public BeanProperty(String name, String index)
+   {
+   this.propertyName = name;
+   this.index = index;
+   }
+
+   @Override
+   public int hashCode()
+   {
+   final int prime = 31;
+   int result = 1;
+   result = prime * result + ((index == null) ? 0 : 
index.hashCode());
+   result = prime * result + ((propertyName == null) ? 0 : 
propertyName.hashCode());
+   return result;
+   }
+
+   @Override
+   public boolean equals(Object obj)
+   {
+   if (this == obj)
+   return true;
+   if (obj == null)
+   return false;
+   if (getClass() != obj.getClass())
+   return false;
+   BeanProperty other = (BeanProperty)obj;
+   if (index == null)
+   {
+   if (other.index != null)
+   return false;
+   }
+   else if (!index.equals(other.index))
+   return false;
+   if (propertyName == null)
+   {
+   if (other.propertyName != null)
+   return false;
+   }
+   else if (!propertyName.equals(other.propertyName))
+   return false;
+   return true;
+   }
+
+   }
+
+   static class JavaProperty
{
CharSequence javaIdentifier;
CharSequence index;
public boolean hasMethodSign;
 
-   public Property()
+   public JavaProperty()
{
}
 
-   public Property(String javaIdentifier, String index, boolean 
hasMethodSign)
+   public JavaProperty(String javaIdentifier, String index, 
boolean hasMethodSign)
{
this.javaIdentifier = javaIdentifier;
this.index = index;
@@ -59,7 +114,7 @@ public class PropertyExpression
return false;
if (getClass() != obj.getClass())
return false;
-   Property other = (Property)obj;
+   JavaProperty other = (JavaProperty)obj;
if (h

[04/11] wicket git commit: WICKET-4008 edge test cases plus breaking property into different types in the grammar

2017-02-26 Thread pedro
WICKET-4008 edge test cases plus breaking property into different types in the 
grammar


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

Branch: refs/heads/WICKET-6318-configurable-property-expression-resolver
Commit: b0f7da85e45ea4c798366940ec34cd53528cd549
Parents: 2f302db
Author: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Authored: Tue Sep 20 18:51:37 2016 -0300
Committer: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Committed: Tue Sep 20 19:33:01 2016 -0300

--
 .../core/util/lang/PropertyExpression.java  |   1 +
 .../util/lang/PropertyExpressionParser.java |  60 
 .../util/lang/PropertyExpressionParserTest.java | 138 ---
 .../wicket/util/lang/PropertyResolverTest.java  | 113 ---
 4 files changed, 222 insertions(+), 90 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/b0f7da85/wicket-core/src/main/java/org/apache/wicket/core/util/lang/PropertyExpression.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/core/util/lang/PropertyExpression.java
 
b/wicket-core/src/main/java/org/apache/wicket/core/util/lang/PropertyExpression.java
index 2021c21..635f95e 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/core/util/lang/PropertyExpression.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/core/util/lang/PropertyExpression.java
@@ -19,6 +19,7 @@ package org.apache.wicket.core.util.lang;
 public class PropertyExpression
 {
Property property;
+   CharSequence index;
PropertyExpression next;
 
static class Property

http://git-wip-us.apache.org/repos/asf/wicket/blob/b0f7da85/wicket-core/src/main/java/org/apache/wicket/core/util/lang/PropertyExpressionParser.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/core/util/lang/PropertyExpressionParser.java
 
b/wicket-core/src/main/java/org/apache/wicket/core/util/lang/PropertyExpressionParser.java
index 08fd061..3ecb81e 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/core/util/lang/PropertyExpressionParser.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/core/util/lang/PropertyExpressionParser.java
@@ -31,11 +31,14 @@ import 
org.apache.wicket.core.util.lang.PropertyExpression.Property;
  *  index char = char - "]"
  *  
  *  java identifier= java letter , {java letter or digit}
- *  method sign= "(" , ")"
+ *  property name  = java letter or digit , {java letter 
or digit}
+ *  method sign= "(" , { " " } , ")"
  *  index  = "[" , index char , {index 
char} , "]" ;
  *  
- *  property   = java identifier , [ index | method 
sign ];
- *  property expression= property , { "." , property 
expression } ;
+ *  bean property  = property name, [ index ]
+ *  java property  = java identifier , [ index | method 
sign ]
+ *  map property   = index
+ *  property expression= [ bean property | java property | map 
property ], { "." , property expression } ;
  *  
  * 
  * 
@@ -55,12 +58,17 @@ public class PropertyExpressionParser
{
currentPosition = nextPosition;
currentToken = lookaheadToken;
-
nextPosition += 1;
if (nextPosition >= text.length())
+   {
+
lookaheadToken = END_OF_EXPRESSION;
+   }
else
+   {
+
lookaheadToken = text.charAt(nextPosition);
+   }
return currentToken;
}
 
@@ -71,7 +79,8 @@ public class PropertyExpressionParser
{
throw new ParserException("No expression was given to 
be parsed.");
}
-   else if (text.length() == 1)
+   currentToken = text.charAt(0);
+   if (text.length() == 1)
{
lookaheadToken = END_OF_EXPRESSION;
}
@@ -79,7 +88,6 @@ public class PropertyExpressionParser
{
lookaheadToken = text.charAt(1);
}
-   currentToken = text.charAt(0);
return exp

[08/11] wicket git commit: Merge branch 'WICKET-4008-property-expression-parser' into WICKET-6318-with-parser-resolver

2017-02-26 Thread pedro
Merge branch 'WICKET-4008-property-expression-parser' into 
WICKET-6318-with-parser-resolver


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

Branch: refs/heads/WICKET-6318-configurable-property-expression-resolver
Commit: 1df4300c61fbd5165a0361f6547320927a0451c9
Parents: fa0f126 47ffaab
Author: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Authored: Sat Feb 25 20:45:30 2017 -0300
Committer: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Committed: Sat Feb 25 20:45:30 2017 -0300

--
 .../wicket/core/util/lang/ParserException.java  |  33 +++
 .../core/util/lang/PropertyExpression.java  | 144 
 .../util/lang/PropertyExpressionParser.java | 220 +++
 .../util/lang/PropertyExpressionParserTest.java | 189 
 .../OGNLPropertyExpressionResolverTest.java |  95 
 5 files changed, 681 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/1df4300c/wicket-core/src/test/java/org/apache/wicket/util/lang/OGNLPropertyExpressionResolverTest.java
--
diff --cc 
wicket-core/src/test/java/org/apache/wicket/util/lang/OGNLPropertyExpressionResolverTest.java
index 6168142,000..af87541
mode 100644,00..100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/util/lang/OGNLPropertyExpressionResolverTest.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/util/lang/OGNLPropertyExpressionResolverTest.java
@@@ -1,842 -1,0 +1,937 @@@
 +/*
 + * Licensed to the Apache Software Foundation (ASF) under one or more
 + * contributor license agreements.  See the NOTICE file distributed with
 + * this work for additional information regarding copyright ownership.
 + * The ASF licenses this file to You under the Apache License, Version 2.0
 + * (the "License"); you may not use this file except in compliance with
 + * the License.  You may obtain a copy of the License at
 + *
 + *  http://www.apache.org/licenses/LICENSE-2.0
 + *
 + * Unless required by applicable law or agreed to in writing, software
 + * distributed under the License is distributed on an "AS IS" BASIS,
 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 + * See the License for the specific language governing permissions and
 + * limitations under the License.
 + */
 +package org.apache.wicket.util.lang;
 +
++import static org.hamcrest.CoreMatchers.is;
++
 +import java.lang.reflect.Field;
 +import java.lang.reflect.Method;
 +import java.util.ArrayList;
 +import java.util.Calendar;
 +import java.util.Date;
 +import java.util.HashMap;
 +import java.util.List;
 +import java.util.Locale;
 +import java.util.Map;
 +import java.util.Vector;
 +
 +import org.apache.wicket.ConverterLocator;
 +import org.apache.wicket.IConverterLocator;
 +import org.apache.wicket.WicketRuntimeException;
++import org.apache.wicket.core.util.lang.DefaultPropertyLocator;
 +import org.apache.wicket.core.util.lang.OGNLPropertyExpressionResolver;
++import org.apache.wicket.core.util.lang.PropertyResolver;
 +import org.apache.wicket.core.util.lang.PropertyResolverConverter;
++import org.apache.wicket.core.util.reflection.AbstractGetAndSet;
++import org.apache.wicket.core.util.reflection.CachingPropertyLocator;
++import org.apache.wicket.core.util.reflection.IGetAndSet;
 +import org.apache.wicket.util.convert.ConversionException;
 +import org.apache.wicket.util.convert.IConverter;
 +import org.apache.wicket.util.convert.converter.AbstractConverter;
 +import org.apache.wicket.util.tester.WicketTestCase;
 +import org.junit.After;
 +import org.junit.Before;
 +import org.junit.Test;
 +
 +/**
 + * @author jcompagner
 + * 
 + */
 +public class OGNLPropertyExpressionResolverTest extends WicketTestCase
 +{
 +
 +  private static final PropertyResolverConverter CONVERTER = new 
PropertyResolverConverter(
 +  new ConverterLocator(), Locale.US);
 +  OGNLPropertyExpressionResolver ognlResolver = new 
OGNLPropertyExpressionResolver();
++
++  private static final int AN_INTEGER = 10;
 +  private Person person;
++  private Map<String, Integer> integerMap = new HashMap<String, 
Integer>();
++  private WeirdList integerList = new WeirdList();
 +
 +  /**
 +   * @throws Exception
 +   */
 +  @Before
 +  public void before()
 +  {
 +  person = new Person();
 +  }
 +
 +  /**
 +   * @throws Exception
 +   */
 +  @After
 +  public void after()
 +  {
 +//ognlResolver.destroy(tester.getApplication());
 +  }
 +
 +  /**
 +   *

[07/11] wicket git commit: WICKET-4008 fixing test name

2017-02-26 Thread pedro
WICKET-4008 fixing test name


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

Branch: refs/heads/WICKET-6318-configurable-property-expression-resolver
Commit: 47ffaab01a61b4adcdf53c85c8351d03cb881229
Parents: c61080e
Author: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Authored: Sun Sep 25 03:20:44 2016 -0300
Committer: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Committed: Sun Sep 25 03:20:44 2016 -0300

--
 .../wicket/core/util/lang/PropertyExpressionParserTest.java| 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/47ffaab0/wicket-core/src/test/java/org/apache/wicket/core/util/lang/PropertyExpressionParserTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/core/util/lang/PropertyExpressionParserTest.java
 
b/wicket-core/src/test/java/org/apache/wicket/core/util/lang/PropertyExpressionParserTest.java
index f49d6b5..3651b94 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/core/util/lang/PropertyExpressionParserTest.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/core/util/lang/PropertyExpressionParserTest.java
@@ -169,12 +169,12 @@ public class PropertyExpressionParserTest
}
 
@Test
-   public void shouldFailParseInvalidMethodName()
+   public void shouldFailParseInvalidBeanProperty()
{
expectedException.expect(ParserException.class);
expectedException.expectMessage(
-   "Expecting a new expression but got the invalid 
character '#' at: 'repository.get#<--'");
-   parser.parse("repository.get#name()");
+   "Expecting a new expression but got the invalid 
character '#' at: 'repository.prop#<--'");
+   parser.parse("repository.prop#name");
}
 
@Test



[01/11] wicket git commit: WICKET-4008 property expression parser implementation

2017-02-26 Thread pedro
Repository: wicket
Updated Branches:
  refs/heads/WICKET-6318-configurable-property-expression-resolver fa0f12624 -> 
7fd219c3b


WICKET-4008 property expression parser implementation


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

Branch: refs/heads/WICKET-6318-configurable-property-expression-resolver
Commit: 1e5618f13c396ab6c06cc04d607db276ba67b1fb
Parents: 5b7547f
Author: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Authored: Wed Sep 7 00:45:23 2016 -0300
Committer: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Committed: Thu Sep 15 02:09:51 2016 -0300

--
 .../wicket/core/util/lang/ParserException.java  |  33 
 .../core/util/lang/PropertyExpression.java  |  88 ++
 .../util/lang/PropertyExpressionParser.java | 172 +++
 .../util/lang/PropertyExpressionParserTest.java | 121 +
 .../wicket/util/lang/PropertyResolverTest.java  |  80 ++---
 5 files changed, 473 insertions(+), 21 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/1e5618f1/wicket-core/src/main/java/org/apache/wicket/core/util/lang/ParserException.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/core/util/lang/ParserException.java
 
b/wicket-core/src/main/java/org/apache/wicket/core/util/lang/ParserException.java
new file mode 100644
index 000..62712e8
--- /dev/null
+++ 
b/wicket-core/src/main/java/org/apache/wicket/core/util/lang/ParserException.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.wicket.core.util.lang;
+
+/**
+ * @author Pedro Santos
+ */
+public class ParserException extends RuntimeException
+{
+   private static final long serialVersionUID = 1L;
+
+   /**
+* @param message
+*/
+   public ParserException(String message)
+   {
+   super(message);
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/wicket/blob/1e5618f1/wicket-core/src/main/java/org/apache/wicket/core/util/lang/PropertyExpression.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/core/util/lang/PropertyExpression.java
 
b/wicket-core/src/main/java/org/apache/wicket/core/util/lang/PropertyExpression.java
new file mode 100644
index 000..2021c21
--- /dev/null
+++ 
b/wicket-core/src/main/java/org/apache/wicket/core/util/lang/PropertyExpression.java
@@ -0,0 +1,88 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.wicket.core.util.lang;
+
+public class PropertyExpression
+{
+   Property property;
+   PropertyExpression next;
+
+   static class Property
+   {
+   CharSequence javaIdentifier;
+   CharSequence index;
+   public boolean hasMethodSign;
+
+   public Property()
+   {
+   }
+
+   public Property(String javaIdentifier, String index, boolean 
hasMethodSign)
+ 

[11/11] wicket git commit: WICKET-6318 adding ParsedPropertyExpressionResolver, a resolver that uses parsed property expressions; moving DefaultPropertyLocator, IPropertyResolver, CachingPropertyLocat

2017-02-26 Thread pedro
WICKET-6318 adding ParsedPropertyExpressionResolver, a resolver that uses 
parsed property expressions; moving DefaultPropertyLocator, IPropertyResolver, 
CachingPropertyLocator back to 
OGNLPropertyExpressionResolverOGNLPropertyExpressionResolver; restoring 
IPropertyResolver name back to IPropertyLocator


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

Branch: refs/heads/WICKET-6318-configurable-property-expression-resolver
Commit: 7fd219c3b764f844665c3cff8d5cc719e77c6a99
Parents: 6a895f0
Author: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Authored: Mon Feb 27 03:13:43 2017 -0300
Committer: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Committed: Mon Feb 27 03:15:27 2017 -0300

--
 .../validation/DefaultPropertyResolver.java |   2 +-
 .../core/util/lang/DefaultPropertyLocator.java  | 160 
 .../util/lang/IPropertyExpressionResolver.java  |  22 +-
 .../core/util/lang/IPropertyResolver.java   |  18 -
 .../lang/OGNLPropertyExpressionResolver.java| 393 +---
 .../wicket/core/util/lang/PropertyResolver.java |  97 +-
 .../ParsedPropertyExpressionResolver.java   | 173 
 .../core/util/parser/PropertyExpression.java|  25 +
 .../util/parser/PropertyExpressionResolver.java |  21 -
 .../util/reflection/CachingPropertyLocator.java |  70 --
 .../reflection/IndexedPropertyGetAndSet.java|   2 +-
 .../core/util/reflection/MethodGetAndSet.java   |  51 +-
 .../util/reflection/ObjectWithGetAndSet.java|   8 +-
 .../core/util/reflection/ReflectionUtility.java |  78 +-
 .../wicket/model/AbstractPropertyModel.java |   2 +-
 .../ParsedPropertyExpressionResolverTest.java   | 103 +++
 .../parser/PropertyExpressionParserTest.java|  16 +
 .../OGNLPropertyExpressionResolverTest.java | 916 +--
 .../lang/PropertyExpressionResolverTest.java| 852 +
 .../org/apache/wicket/util/lang/WeirdList.java  |  48 +
 .../org/apache/wicket/util/lang/WeirdMap.java   |  48 +
 21 files changed, 1721 insertions(+), 1384 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/7fd219c3/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/DefaultPropertyResolver.java
--
diff --git 
a/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/DefaultPropertyResolver.java
 
b/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/DefaultPropertyResolver.java
index 174598a..e6a4985 100644
--- 
a/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/DefaultPropertyResolver.java
+++ 
b/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/DefaultPropertyResolver.java
@@ -35,7 +35,7 @@ public class DefaultPropertyResolver implements 
IPropertyResolver

String expression = delegate.getPropertyExpression();
IPropertyExpressionResolver propertyExpressionResolver = 
Application.get().getApplicationSettings().getPropertyExpressionResolver();
-   ObjectWithGetAndSet objectWithGetAndSet = 
propertyExpressionResolver.resolve(expression, target, target.getClass());
+   ObjectWithGetAndSet objectWithGetAndSet = 
propertyExpressionResolver.resolve(expression, target, target.getClass(), 
IPropertyExpressionResolver.RESOLVE_CLASS);
 
Method getter = objectWithGetAndSet.getGetter();
if (getter != null)

http://git-wip-us.apache.org/repos/asf/wicket/blob/7fd219c3/wicket-core/src/main/java/org/apache/wicket/core/util/lang/DefaultPropertyLocator.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/core/util/lang/DefaultPropertyLocator.java
 
b/wicket-core/src/main/java/org/apache/wicket/core/util/lang/DefaultPropertyLocator.java
deleted file mode 100644
index c8803c7..000
--- 
a/wicket-core/src/main/java/org/apache/wicket/core/util/lang/DefaultPropertyLocator.java
+++ /dev/null
@@ -1,160 +0,0 @@
-package org.apache.wicket.core.util.lang;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.wicket.WicketRuntimeException;
-import org.apache.wicket.core.util.reflection.ArrayGetAndSet;
-import org.apache.wicket.core.util.reflection.ArrayLengthGetAndSet;
-import org.apache.wicket.core.util.reflection.FieldGetAndSet;
-import org.apache.wicket.core.util.reflection.IGetAndSet;
-import org.apache.wicket.core.util.reflection.IndexedPropertyGetAndSet;
-import org.apache.wicket.core.util.reflection.L

[09/11] wicket git commit: WICKET-6318 movign parser resolver to its package

2017-02-26 Thread pedro
WICKET-6318 movign parser resolver to its package


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

Branch: refs/heads/WICKET-6318-configurable-property-expression-resolver
Commit: 6a895f00dbf7aa7bea5ce06ebb7f937082ad6d20
Parents: 1df4300
Author: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Authored: Sat Feb 25 20:51:20 2017 -0300
Committer: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Committed: Sun Feb 26 07:18:36 2017 -0300

--
 .../wicket/core/util/lang/ParserException.java  |  33 ---
 .../core/util/lang/PropertyExpression.java  | 144 
 .../util/lang/PropertyExpressionParser.java | 220 ---
 .../core/util/parser/ParserException.java   |  33 +++
 .../core/util/parser/PropertyExpression.java| 144 
 .../util/parser/PropertyExpressionParser.java   | 220 +++
 .../util/lang/PropertyExpressionParserTest.java | 189 
 .../parser/PropertyExpressionParserTest.java| 189 
 8 files changed, 586 insertions(+), 586 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/6a895f00/wicket-core/src/main/java/org/apache/wicket/core/util/lang/ParserException.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/core/util/lang/ParserException.java
 
b/wicket-core/src/main/java/org/apache/wicket/core/util/lang/ParserException.java
deleted file mode 100644
index 62712e8..000
--- 
a/wicket-core/src/main/java/org/apache/wicket/core/util/lang/ParserException.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.wicket.core.util.lang;
-
-/**
- * @author Pedro Santos
- */
-public class ParserException extends RuntimeException
-{
-   private static final long serialVersionUID = 1L;
-
-   /**
-* @param message
-*/
-   public ParserException(String message)
-   {
-   super(message);
-   }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/wicket/blob/6a895f00/wicket-core/src/main/java/org/apache/wicket/core/util/lang/PropertyExpression.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/core/util/lang/PropertyExpression.java
 
b/wicket-core/src/main/java/org/apache/wicket/core/util/lang/PropertyExpression.java
deleted file mode 100644
index 6596651..000
--- 
a/wicket-core/src/main/java/org/apache/wicket/core/util/lang/PropertyExpression.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.wicket.core.util.lang;
-
-/**
- * Abstract syntax tree of a expression property
- *
- * @author Pedro Santos
- */
-public class PropertyExpression
-{
-   JavaProperty javaProperty;
-   BeanProperty beanProperty;
-   String index;
-   PropertyExpression next;
-
-   static class BeanProperty
-   {
-   String propertyName;
-  

[06/11] wicket git commit: WICKET-4008 changing PropertyResolver tokenizer to use parsed input

2017-02-26 Thread pedro
WICKET-4008 changing PropertyResolver tokenizer to use parsed input


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

Branch: refs/heads/WICKET-6318-configurable-property-expression-resolver
Commit: c61080e0a8687d775cee88dd24fbc1dc157c967c
Parents: 697052f
Author: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Authored: Fri Sep 23 00:32:08 2016 -0300
Committer: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Committed: Sun Sep 25 02:51:05 2016 -0300

--
 .../core/util/lang/PropertyExpression.java  |  15 +-
 .../util/lang/PropertyExpressionParser.java |  25 +++-
 .../wicket/core/util/lang/PropertyResolver.java | 136 +
 .../util/lang/PropertyExpressionParserTest.java |   4 +-
 .../wicket/util/lang/PropertyResolverTest.java  | 150 +++
 5 files changed, 224 insertions(+), 106 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/c61080e0/wicket-core/src/main/java/org/apache/wicket/core/util/lang/PropertyExpression.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/core/util/lang/PropertyExpression.java
 
b/wicket-core/src/main/java/org/apache/wicket/core/util/lang/PropertyExpression.java
index dab79ec..6596651 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/core/util/lang/PropertyExpression.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/core/util/lang/PropertyExpression.java
@@ -16,17 +16,22 @@
  */
 package org.apache.wicket.core.util.lang;
 
+/**
+ * Abstract syntax tree of a expression property
+ *
+ * @author Pedro Santos
+ */
 public class PropertyExpression
 {
JavaProperty javaProperty;
BeanProperty beanProperty;
-   CharSequence index;
+   String index;
PropertyExpression next;
 
static class BeanProperty
{
-   CharSequence propertyName;
-   CharSequence index;
+   String propertyName;
+   String index;
 
public BeanProperty()
{
@@ -79,8 +84,8 @@ public class PropertyExpression
 
static class JavaProperty
{
-   CharSequence javaIdentifier;
-   CharSequence index;
+   String javaIdentifier;
+   String index;
public boolean hasMethodSign;
 
public JavaProperty()

http://git-wip-us.apache.org/repos/asf/wicket/blob/c61080e0/wicket-core/src/main/java/org/apache/wicket/core/util/lang/PropertyExpressionParser.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/core/util/lang/PropertyExpressionParser.java
 
b/wicket-core/src/main/java/org/apache/wicket/core/util/lang/PropertyExpressionParser.java
index 2102456..ef05599 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/core/util/lang/PropertyExpressionParser.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/core/util/lang/PropertyExpressionParser.java
@@ -31,9 +31,10 @@ import 
org.apache.wicket.core.util.lang.PropertyExpression.JavaProperty;
  *  char   = java letter or digit | "." | 
"(" | ")" | "[" | "]" | "!" | "@" | "#" | (...);
  *  index char = char - "]";
  *  
+ *  empty space= { " " };
  *  java identifier= java letter , {java letter or digit};
  *  property name  = java letter or digit , {java letter 
or digit};
- *  method sign= "(" , { " " } , ")";
+ *  method sign= "(" , empty space  , ")";
  *  index  = "[" , index char , { index 
char } , "]";
  *  
  *  bean property  = property name, [ index ];
@@ -120,6 +121,9 @@ public class PropertyExpressionParser
return expression;
case END_OF_EXPRESSION :
return expression;
+   case '(' :
+   throw new ParserException(format("Expecting a 
valid method name but got: '%s<--'",
+   text.substring(0, nextPosition + 1)));
default :
throw new ParserException(format(
"Expectin

[10/11] wicket git commit: WICKET-6318 adding ParsedPropertyExpressionResolver, a resolver that uses parsed property expressions; moving DefaultPropertyLocator, IPropertyResolver, CachingPropertyLocat

2017-02-26 Thread pedro
http://git-wip-us.apache.org/repos/asf/wicket/blob/7fd219c3/wicket-core/src/test/java/org/apache/wicket/util/lang/PropertyExpressionResolverTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/util/lang/PropertyExpressionResolverTest.java
 
b/wicket-core/src/test/java/org/apache/wicket/util/lang/PropertyExpressionResolverTest.java
new file mode 100644
index 000..1ab1a37
--- /dev/null
+++ 
b/wicket-core/src/test/java/org/apache/wicket/util/lang/PropertyExpressionResolverTest.java
@@ -0,0 +1,852 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.wicket.util.lang;
+
+import static 
org.apache.wicket.core.util.lang.IPropertyExpressionResolver.RESOLVE_CLASS;
+import static org.hamcrest.CoreMatchers.is;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Calendar;
+import java.util.Collection;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Vector;
+
+import org.apache.wicket.ConverterLocator;
+import org.apache.wicket.IConverterLocator;
+import org.apache.wicket.WicketRuntimeException;
+import org.apache.wicket.core.util.lang.IPropertyExpressionResolver;
+import org.apache.wicket.core.util.lang.OGNLPropertyExpressionResolver;
+import org.apache.wicket.core.util.lang.PropertyResolver;
+import org.apache.wicket.core.util.lang.PropertyResolverConverter;
+import org.apache.wicket.core.util.parser.ParsedPropertyExpressionResolver;
+import org.apache.wicket.util.convert.ConversionException;
+import org.apache.wicket.util.convert.IConverter;
+import org.apache.wicket.util.convert.converter.AbstractConverter;
+import org.apache.wicket.util.tester.WicketTestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.junit.runners.Parameterized.Parameters;
+
+/**
+ * @author jcompagner
+ * 
+ */
+@RunWith(Parameterized.class)
+public class PropertyExpressionResolverTest extends WicketTestCase
+{
+
+@Parameters
+public static Collection configs() {
+   return Arrays.asList(new OGNLPropertyExpressionResolver(), new 
ParsedPropertyExpressionResolver());
+}
+   private static final PropertyResolverConverter CONVERTER = new 
PropertyResolverConverter(
+   new ConverterLocator(), Locale.US);
+   
+   private static final int AN_INTEGER = 10;
+   
+   private IPropertyExpressionResolver resolver;
+   private Person person;
+   private Map integerMap = new HashMap();
+   private WeirdList integerList = new WeirdList();
+   
+   public PropertyExpressionResolverTest(IPropertyExpressionResolver 
resolver)
+   {
+   this.resolver = resolver;
+   }
+   /**
+* @throws Exception
+*/
+   @Before
+   public void before()
+   {
+   
tester.getApplication().getApplicationSettings().setPropertyExpressionResolver(resolver);
+   person = new Person();
+   }
+
+   /**
+* @throws Exception
+*/
+   @After
+   public void after()
+   {
+// ognlResolver.destroy(tester.getApplication());
+   }
+
+   /**
+* @throws Exception
+*/
+   @Test
+   public void simpleExpression() throws Exception
+   {
+   String name = (String)PropertyResolver.getValue("name", person);
+   assertNull(name);
+
+   PropertyResolver.setValue("name", person, "wicket", CONVERTER);
+   name = (String)PropertyResolver.getValue("name", person);
+   assertEquals(name, "wicket");
+   }
+
+   /**
+* @throws Exception
+*/
+   @Test(expected = ConversionException.class)
+   public void primitiveValue() throws Exception
+   {
+   Integer integer = (Integer)PropertyResolver.getValue("age", 
person);
+   assertTrue(integer == 0);
+
+   

[02/11] wicket git commit: restoring PropertyResolverTest.java

2017-02-26 Thread pedro
restoring PropertyResolverTest.java


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

Branch: refs/heads/WICKET-6318-configurable-property-expression-resolver
Commit: cd96fb1c565ca59434900636827729a1f99f717d
Parents: 1e5618f
Author: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Authored: Thu Sep 15 02:15:02 2016 -0300
Committer: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Committed: Thu Sep 15 02:15:02 2016 -0300

--
 .../wicket/util/lang/PropertyResolverTest.java  | 80 +---
 1 file changed, 21 insertions(+), 59 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/cd96fb1c/wicket-core/src/test/java/org/apache/wicket/util/lang/PropertyResolverTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/util/lang/PropertyResolverTest.java
 
b/wicket-core/src/test/java/org/apache/wicket/util/lang/PropertyResolverTest.java
index c2a19e6..1a3278d 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/util/lang/PropertyResolverTest.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/util/lang/PropertyResolverTest.java
@@ -16,8 +16,6 @@
  */
 package org.apache.wicket.util.lang;
 
-import static org.hamcrest.CoreMatchers.is;
-
 import java.lang.reflect.Field;
 import java.lang.reflect.Method;
 import java.util.ArrayList;
@@ -54,13 +52,10 @@ import org.junit.Test;
 public class PropertyResolverTest extends WicketTestCase
 {
 
-   private static final int AN_INTEGER = 10;
-
private static final PropertyResolverConverter CONVERTER = new 
PropertyResolverConverter(
new ConverterLocator(), Locale.US);
 
private Person person;
-   private Map<String, Integer> integerMap = new HashMap<String, 
Integer>();
 
/**
 * @throws Exception
@@ -86,7 +81,7 @@ public class PropertyResolverTest extends WicketTestCase
@Test
public void simpleExpression() throws Exception
{
-   String name = (String)PropertyResolver.getValue("name", person);
+   String name = (String) PropertyResolver.getValue("name", 
person);
assertNull(name);
 
PropertyResolver.setValue("name", person, "wicket", CONVERTER);
@@ -213,28 +208,6 @@ public class PropertyResolverTest extends WicketTestCase
 * @throws Exception
 */
@Test
-   public void shouldAccessConflictingMapEntries() throws Exception
-   {
-   PropertyResolver.setValue("integerMap.class", this, AN_INTEGER, 
CONVERTER);
-   assertThat(PropertyResolver.getValue("integerMap.class", this), 
is(AN_INTEGER));
-   }
-
-   /**
-* @throws Exception
-*/
-   @Test
-   public void mapMethodExpressionasdf() throws Exception
-   {
-   HashMap<String, Integer> map = new HashMap<String, Integer>();
-   PropertyResolver.setValue("class", map, 10, CONVERTER);
-   Integer mySize = (Integer)PropertyResolver.getValue("class", 
map);
-   assertEquals(mySize, new Integer(1));
-   }
-
-   /**
-* @throws Exception
-*/
-   @Test
public void mapWithDotLookup() throws Exception
{
Address address = new Address();
@@ -244,8 +217,7 @@ public class PropertyResolverTest extends WicketTestCase
assertNotNull(hm.get("address.test"));
PropertyResolver.setValue("addressMap[address.test].street", 
person, "wicket-street",
CONVERTER);
-   String street = 
(String)PropertyResolver.getValue("addressMap[address.test].street",
-   person);
+   String street = 
(String)PropertyResolver.getValue("addressMap[address.test].street", person);
assertEquals(street, "wicket-street");
}
 
@@ -774,73 +746,63 @@ public class PropertyResolverTest extends WicketTestCase
Object actual = converter.convert(date, Long.class);
assertEquals(date.getTime(), actual);
}
-
+   
/**
 * WICKET-5623 custom properties
 */
@Test
-   public void custom()
-   {
+   public void custom() {
Document document = new Document();
document.setType("type");
document.setProperty("string", "string

[jira] [Created] (WICKET-6327) PropertyResover doesn't resolve a property expression to its field if it's in a Map object

2017-02-26 Thread Pedro Santos (JIRA)
Pedro Santos created WICKET-6327:


 Summary: PropertyResover doesn't resolve a property expression to 
its field if it's in a Map object
 Key: WICKET-6327
 URL: https://issues.apache.org/jira/browse/WICKET-6327
 Project: Wicket
  Issue Type: Bug
Affects Versions: 6.26.0, 8.0.0-M3, 7.6.0
Reporter: Pedro Santos
Priority: Minor


Property resolver will always resolve a property expression to a map key, even 
if it isn't using the map[key] syntax. e.g.

class MyMap implements Map{
  public Object myProperty;
}

in this case PropertyResolver.getValue("map[myProperty]", this) will work fine, 
but any attempt to access "myProperty" using a property expression will fail 
since PropertyResolver.getValue("map.myProperty", this) will resolve 
"myProperty" to a map key.




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (WICKET-6318) To make PropertyResolver a configurable implementation

2017-02-23 Thread Pedro Santos (JIRA)

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

Pedro Santos commented on WICKET-6318:
--

> For example this won't work with LazyModel any longer

I looked over the the failing tests and they were failing to get a property 
expression resolver because they were running in a thread with no Wicket 
application set to provide one. I fixed it just by extending from WicketTestCase

>>I've just tested the identical setup for LazyModel and it works perfectly. 
>>Why shouldn't it?
>I'm not familiar with LazyModel, will take a better look since the new 
>IPropertyExpressionResolver should enable it work >fine without 
>IPropertyReflectionAwareModel.

I added a test case exemplifying why it shouldn't work at LazyModelTest in the 
branch "lazymodel-without-IPRAM" [1]

> After all as long as a model implements IPropertyReflectionAwareModel, all 
> consumers of this interface should work fine.

LazyModel isn't even testing for IPRAM reflection information, and it's correct 
by ignoring them. A single method can be responsible for multiple bean 
properties, e.g. JSONObject, and both IObjectTypeAwareModel and 
IObjectClassAwareModel should be more than enough to provide LazyModel the 
model type.

1 - 
https://github.com/wicketstuff/core/commit/7c21f93924fd65968c9b655c09bd66e78d940760

> To make PropertyResolver a configurable implementation
> --
>
> Key: WICKET-6318
> URL: https://issues.apache.org/jira/browse/WICKET-6318
> Project: Wicket
>  Issue Type: Sub-task
>  Components: wicket
>Reporter: Pedro Santos
>
> To enable users to select each property resolver will be used, so if the new 
> implementation shows problematic it can be switched back to the a Wicket's < 
> 7 one.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (WICKET-6318) To make PropertyResolver a configurable implementation

2017-02-15 Thread Pedro Santos (JIRA)

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

Pedro Santos commented on WICKET-6318:
--

> Yes, this is what WICKET-5623 is about.

Sure, my point is: if application's IPropertyLocator does return an IGetAndSet 
providing a Field or a Method, it will be wrong given that no Field nor Method 
exists for an unique property expressed in a JSONObject.

> So what? From IPropertyReflectionAwareModel's Javadoc: "It is valid to return 
> null for any method".

In fact *all* IPropertyReflectionAwareModel's methods Javadoc says "I may not 
have reflection information". We can even rename it to maybe/possibleAwareModel

> I don't understand this sentence

I just realized that I misunderstood you. I thought you talking about models 
with lazy loading of their objects.

>I've just tested the identical setup for LazyModel and it works perfectly. Why 
>shouldn't it?

I'm not familiar with LazyModel, will take a better look since the new 
IPropertyExpressionResolver should enable it work fine without 
IPropertyReflectionAwareModel.

> To make PropertyResolver a configurable implementation
> --
>
> Key: WICKET-6318
> URL: https://issues.apache.org/jira/browse/WICKET-6318
> Project: Wicket
>  Issue Type: Sub-task
>  Components: wicket
>Reporter: Pedro Santos
>
> To enable users to select each property resolver will be used, so if the new 
> implementation shows problematic it can be switched back to the a Wicket's < 
> 7 one.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (WICKET-6318) To make PropertyResolver a configurable implementation

2017-02-14 Thread Pedro Santos (JIRA)

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

Pedro Santos commented on WICKET-6318:
--

> And I don't understand the "false promise" either :/.

We can take the example where an AbstractPropertyModel/PropertyModel holds a 
property expression resolving a property inside a JSONObject (Wicket's custom 
IPropertyLocator does enable such scenario). The 
AbstractPropertyModel/PropertyModel name plus javadoc clearly states that *one* 
property of a bean will be modeled/expressed. By also implementing 
IPropertyReflectionAwareModel you add the additional promise that you can 
provide this property's reflection information, which won't live up since there 
is no reflection information you can give about a unique property in this 
example.

> With your change now ValidationModelResolver#resolvePropertyModelFrom() works 
> with AbstractPropertyModel only.

Good point. Any way AbstractPropertyModel is not the place for such interface. 
Plus the annotations from validation api tested in wicket-bean-validation are 
clearly designed for bean properties, so by covering Wicket's property models 
we should be fine imo.

> How is this an improvement to the former IPropertyReflectionAwareModel? For 
> example this won't work with LazyModel any longer :/.

If I understood you right, coherence imo. Without IPRAM, APM clearly says it 
works by solely modeling a property with no need to provide reflection 
information (given it was already not providing it for sure). Plus 
AbstractPropertyModel's IPropertyReflectionAwareModel implementation never 
worked with lazy models, actually this is the only reason why polymorphic bean 
attribute types can get their annotations detected. This feature is even being 
tested at PropertyValidatorRequiredTest where it's able to detect the @NotNull 
constraint at TestContainedBean.

> To make PropertyResolver a configurable implementation
> --
>
> Key: WICKET-6318
> URL: https://issues.apache.org/jira/browse/WICKET-6318
> Project: Wicket
>  Issue Type: Sub-task
>      Components: wicket
>Reporter: Pedro Santos
>
> To enable users to select each property resolver will be used, so if the new 
> implementation shows problematic it can be switched back to the a Wicket's < 
> 7 one.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (WICKET-6318) To make PropertyResolver a configurable implementation

2017-02-13 Thread Pedro Santos (JIRA)

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

Pedro Santos commented on WICKET-6318:
--

Hi Sven, 

ObjectWithGetAndSet is the replacement, it provides the same metadata. 

wicket-bean-validation works by reading *only* reflection metadata, which 
AbstractPropertyModel won't always provide. To implement any reflection API 
will be a plain false promise to wicket-bean-validation.

e.g.: a new IPropertyExpressionResolver that resolve expressions for 
'JSONObject's is set in the application. From this point one, any 
PropertyExpression/AbstractPropertyModel object will start to resolve 
expression to ObjectWithGetAndSet that set/get objects by using a JSON API 
rather than the reflection one.

I gave more reasons for the removal in my first comment as well.

> To make PropertyResolver a configurable implementation
> --
>
> Key: WICKET-6318
> URL: https://issues.apache.org/jira/browse/WICKET-6318
> Project: Wicket
>  Issue Type: Sub-task
>  Components: wicket
>Reporter: Pedro Santos
>
> To enable users to select each property resolver will be used, so if the new 
> implementation shows problematic it can be switched back to the a Wicket's < 
> 7 one.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (WICKET-6313) Missing Images

2017-02-13 Thread Pedro Santos (JIRA)

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

Pedro Santos commented on WICKET-6313:
--

Hi Andera, ignore the last two notifications on this ticket, I mistyped the 
ticket number in the commit message. I meant WICKET-6318

> Missing Images
> --
>
> Key: WICKET-6313
> URL: https://issues.apache.org/jira/browse/WICKET-6313
> Project: Wicket
>  Issue Type: Bug
>  Components: guide
>Affects Versions: 7.6.0, 8.0.0-M4
> Environment: Debian GNU/Linux "Jessie"
>Reporter: Jan Lühr
>Assignee: Andrea Del Bene
> Attachments: pdf_vs_html.png
>
>
> Some Images - some UML class-diagrams - are not included in the PDF-Version 
> when building the guide with mvn -Pguide install. These files are included in 
> the html-Version (see screenshot)
> I noticed some .png-inclusion related warnings during the build:
> asciidoctor: WARNING: could not embed image
> /tmp/wicket/wicket-user-guide/src/main/asciidoc/img/inmethod-grid2.png;
> PNG uses unsupported interlace method



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[2/2] wicket git commit: WICKET-6313 updating wicket-bean-validation project to use the new property resolution api

2017-02-12 Thread pedro
WICKET-6313 updating wicket-bean-validation project to use the new property 
resolution api


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

Branch: refs/heads/WICKET-6318-configurable-property-expression-resolver
Commit: fa0f12624c97e99a37f2fbe0f9b8e41215bedb1f
Parents: ede069b
Author: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Authored: Mon Feb 13 03:15:44 2017 -0200
Committer: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Committed: Mon Feb 13 03:15:44 2017 -0200

--
 .../validation/DefaultPropertyResolver.java | 26 
 .../bean/validation/IPropertyResolver.java  |  1 -
 .../bean/validation/PropertyValidator.java  |  2 +-
 .../validation/ValidationModelResolver.java |  8 ++--
 .../validation/ValidationModelResolverTest.java | 44 
 5 files changed, 23 insertions(+), 58 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/fa0f1262/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/DefaultPropertyResolver.java
--
diff --git 
a/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/DefaultPropertyResolver.java
 
b/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/DefaultPropertyResolver.java
index 527a24f..174598a 100644
--- 
a/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/DefaultPropertyResolver.java
+++ 
b/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/DefaultPropertyResolver.java
@@ -1,13 +1,16 @@
 package org.apache.wicket.bean.validation;
 
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+
+import org.apache.wicket.Application;
 import org.apache.wicket.WicketRuntimeException;
+import org.apache.wicket.core.util.lang.IPropertyExpressionResolver;
+import org.apache.wicket.core.util.reflection.ObjectWithGetAndSet;
 import org.apache.wicket.markup.html.form.FormComponent;
-import org.apache.wicket.model.IPropertyReflectionAwareModel;
+import org.apache.wicket.model.AbstractPropertyModel;
 import org.apache.wicket.model.PropertyModel;
 
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-
 /**
  * Default property resolver. This resolver supports common Wicket models like 
the
  * {@link PropertyModel}, and other implementations of {@link 
IPropertyReflectionAwareModel}
@@ -21,16 +24,23 @@ public class DefaultPropertyResolver implements 
IPropertyResolver
@Override
public Property resolveProperty(FormComponent component)
{
-   IPropertyReflectionAwareModel delegate = 
ValidationModelResolver.resolvePropertyModelFrom(component);
+   AbstractPropertyModel delegate = 
ValidationModelResolver.resolvePropertyModelFrom(component);
if (delegate == null)
{
return null;
}
+   Object target = delegate.getInnermostModelOrObject();
+   if(target == null)
+   return null;

-   String name;
-   Method getter = delegate.getPropertyGetter();
+   String expression = delegate.getPropertyExpression();
+   IPropertyExpressionResolver propertyExpressionResolver = 
Application.get().getApplicationSettings().getPropertyExpressionResolver();
+   ObjectWithGetAndSet objectWithGetAndSet = 
propertyExpressionResolver.resolve(expression, target, target.getClass());
+
+   Method getter = objectWithGetAndSet.getGetter();
if (getter != null)
{
+   String name;
String methodName = getter.getName();
if (methodName.startsWith("get"))
{
@@ -50,7 +60,7 @@ public class DefaultPropertyResolver implements 
IPropertyResolver
return new Property(getter.getDeclaringClass(), name);
}
 
-   Field field = delegate.getPropertyField();
+   Field field = objectWithGetAndSet.getField();
if (field != null)
{
return new Property(field.getDeclaringClass(), 
field.getName());

http://git-wip-us.apache.org/repos/asf/wicket/blob/fa0f1262/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/IPropertyResolver.java
--
diff --git 
a/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/IPropertyResolver.java
 
b/wicket-be

[1/2] wicket git commit: WICKET-6313 simplified IPropertyExpressionResolver, keeping one CachingPropertyLocator per OGNLPropertyExpressionResolver instance, javadoc

2017-02-12 Thread pedro
Repository: wicket
Updated Branches:
  refs/heads/WICKET-6318-configurable-property-expression-resolver 3a6db1bf7 -> 
fa0f12624


WICKET-6313 simplified IPropertyExpressionResolver, keeping one 
CachingPropertyLocator per OGNLPropertyExpressionResolver instance, javadoc


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

Branch: refs/heads/WICKET-6318-configurable-property-expression-resolver
Commit: ede069b9b9617eb96b1705ab3515cc5ebe530279
Parents: 3a6db1b
Author: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Authored: Mon Feb 13 03:13:53 2017 -0200
Committer: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Committed: Mon Feb 13 03:13:53 2017 -0200

--
 .../util/lang/IPropertyExpressionResolver.java  | 31 +-
 .../core/util/lang/IPropertyResolver.java   |  8 +++
 .../lang/OGNLPropertyExpressionResolver.java| 63 +++-
 .../wicket/core/util/lang/PropertyResolver.java | 12 ++--
 .../util/parser/PropertyExpressionResolver.java | 13 +---
 .../OGNLPropertyExpressionResolverTest.java | 14 ++---
 6 files changed, 76 insertions(+), 65 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/ede069b9/wicket-core/src/main/java/org/apache/wicket/core/util/lang/IPropertyExpressionResolver.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/core/util/lang/IPropertyExpressionResolver.java
 
b/wicket-core/src/main/java/org/apache/wicket/core/util/lang/IPropertyExpressionResolver.java
index 18c8141..4574be2 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/core/util/lang/IPropertyExpressionResolver.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/core/util/lang/IPropertyExpressionResolver.java
@@ -1,12 +1,37 @@
 package org.apache.wicket.core.util.lang;
 
+import org.apache.wicket.core.util.reflection.ObjectWithGetAndSet;
+
+/**
+ * Resolves property expression to workable {@link ObjectWithGetAndSet}
+ * 
+ * @author pedro
+ */
 public interface IPropertyExpressionResolver
 {
 
-T getValue(String expression, T object);
-
-Class getPropertyClass(String expression, Object object, 
Class targetClass);
+   /**
+* @param expression
+* @param object
+*Optional, but will enable the resolver to find subclasses 
in polymorphic types
+* @param clz
+* @return {@link ObjectWithGetAndSet}
+*/
+   ObjectWithGetAndSet resolve(String expression, Object object, Class clz);
 
+   /**
+* Creates a new value to each null property in the way to the 
expressed property. So the
+* property expression: "attr1.attr2.attr3" would have "attr1" and 
"attr2" tested for null, in
+* which case they would get new constructed values to guarantee a 
place to set the new value at
+* "attr3"
+* 
+* @param expression
+* @param object
+* @param value
+* @param prc
+*/
+   // TODO find a better name, multiple values are being setting here
+   // TODO if possible, to move to PropertyExpression
void setValue(String expression, Object object, Object value, 
PropertyResolverConverter prc);
 
 }

http://git-wip-us.apache.org/repos/asf/wicket/blob/ede069b9/wicket-core/src/main/java/org/apache/wicket/core/util/lang/IPropertyResolver.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/core/util/lang/IPropertyResolver.java
 
b/wicket-core/src/main/java/org/apache/wicket/core/util/lang/IPropertyResolver.java
index e72a29e..65b7cdb 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/core/util/lang/IPropertyResolver.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/core/util/lang/IPropertyResolver.java
@@ -2,6 +2,14 @@ package org.apache.wicket.core.util.lang;
 
 import org.apache.wicket.core.util.reflection.IGetAndSet;
 
+/**
+ * Resolves a property string to an {@link IGetAndSet}.
+ * 
+ * @see {@link IPropertyExpressionResolver} Property expression are resolved by
+ *  {@link IPropertyExpressionResolver} implementations instead
+ *
+ * @author pedro
+ */
 public interface IPropertyResolver
 {
 

http://git-wip-us.apache.org/repos/asf/wicket/blob/ede069b9/wicket-core/src/main/java/org/apache/wicket/core/util/lang/OGNLPropertyExpressionResolver.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/core/util/lang/OGNLPropertyExpressionResolver.java
 
b/wic

[jira] [Commented] (WICKET-6137) ListenerInterfaceRequestHandler simplification

2017-02-11 Thread Pedro Santos (JIRA)

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

Pedro Santos commented on WICKET-6137:
--

Hi Sven, amazing work, thx. Just some ideas:

- to simplify/reduce IRequestListener#onRequest to  IRequestListener#listen

- to add the request as a method parameter to IRequestListener#onRequest. e.g. 
onRequest(request) or listen(request)

- to move Component#canCallListener to IRequestListener, so this flag can only 
be tested in meaningful places. The component doesn't listen to request, but it 
rather *can* listen to requests by implementing IRequestListener.



> ListenerInterfaceRequestHandler simplification
> --
>
> Key: WICKET-6137
> URL: https://issues.apache.org/jira/browse/WICKET-6137
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket
>Affects Versions: 8.0.0-M1
>Reporter: Sven Meier
>Assignee: Sven Meier
>Priority: Minor
> Fix For: 8.0.0-M1
>
>
> Branch "request_listener_simplification" contains a proposal to simplify 
> ListenerInterfaceRequestHandler.
> By limiting components and behaviors to implement a single callback only, we 
> can remove the identifying part "I*Listener" from URLs.
> For page 0, renderCount 1 and behavior 2 the following componentInfos:
>   0-1.ILinkListener-link
>   0-1.ILinkListener.2-link
>   0-IResourceListener-image
>   0-IResourceListener.2-wmc
> ... become:
>   0-1.-link
>   0-1.2-link
>   0--image
>   0-.2-wmc
> This format could be further improved, suggestions are welcomed.
> This has the following advantages:
> - framework exposure in URLs is minimized
> - URLs get shorter
> - no need to register INTERFACE constants any longer
> - instead using of reflection ListenerInterfaceRequestHandler can call a 
> single method on the component or behavior, which makes debugging easier.
> - a single interface for components or behavior is enough to be targeted by 
> requests:
> {code}
>   public interface IRequestListener extends IClusterable
>   {
>   /**
>* Does invocation of this listener render the page. 
>* 
>* @return default {@code true}, i.e. a {@link 
> RenderPageRequestHandler} is scheduled after invocation 
>*/
>   default boolean rendersPage()
>   {
>   return true;
>   }
>   
>   /**
>* Called when a request is received.
>*/
>   void onRequest();
>   }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (WICKET-6318) To make PropertyResolver a configurable implementation

2017-02-09 Thread Pedro Santos (JIRA)

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

Pedro Santos commented on WICKET-6318:
--

The property expression resolver resolution logic was moved to a configurable 
implementation of IPropertyExpressionResolver. The current resolver is now the 
OGNLPropertyExpressionResolver, and the new one will be implemented using the 
parser described in the ticket WICKET-4008 in PropertyExpressionResolver class.

List of changes:

ApplicationSettings --> holds a IPropertyExpressionResolver

PropertyResolver implementation --> OGNLPropertyExpressionResolver

PropertyExpressionResolver --> created to be placeholder for the new property 
expression resolver that will work using parsed input

PropertyResolver reflection utility code --> moved to ReflectionUtility

PropertyResolver API --> IPropertyExpressionResolver

IPropertyLocator --> renamed to IPropertyResolver

PropertyResolver.IGetAndSet --> moved to the reflection package

IPropertyReflectionAwareModel --> removed since it's an unused and untested 
interface that was breaking AbstractPropertyModel coherence by adding methods 
that weren't meant to be an abstraction of the model property, but rather a 
reflection API utility that already exists in Wicket's API

PropertyResolver static API --> kept as a faced for now

> To make PropertyResolver a configurable implementation
> --
>
> Key: WICKET-6318
> URL: https://issues.apache.org/jira/browse/WICKET-6318
> Project: Wicket
>  Issue Type: Sub-task
>  Components: wicket
>Reporter: Pedro Santos
>
> To enable users to select each property resolver will be used, so if the new 
> implementation shows problematic it can be switched back to the a Wicket's < 
> 7 one.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[1/2] wicket git commit: WICKET-6318 making property expression resolver implementation a configurable option in the application

2017-02-09 Thread pedro
nSettings.java
index 3dc699d..a86e4ff 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/settings/ApplicationSettings.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/settings/ApplicationSettings.java
@@ -21,6 +21,8 @@ import java.lang.ref.WeakReference;
 import org.apache.wicket.Page;
 import org.apache.wicket.application.DefaultClassResolver;
 import org.apache.wicket.application.IClassResolver;
+import org.apache.wicket.core.util.lang.IPropertyExpressionResolver;
+import org.apache.wicket.core.util.lang.OGNLPropertyExpressionResolver;
 import org.apache.wicket.feedback.DefaultCleanupFeedbackMessageFilter;
 import org.apache.wicket.feedback.IFeedbackMessageFilter;
 import org.apache.wicket.request.cycle.RequestCycle;
@@ -55,6 +57,8 @@ public class ApplicationSettings
 
private IClassResolver classResolver = new DefaultClassResolver();
 
+   private IPropertyExpressionResolver propertyExpressionResolver = new 
OGNLPropertyExpressionResolver();
+
private WeakReference<Class> internalErrorPage;
 
private WeakReference<Class> pageExpiredErrorPage;
@@ -85,6 +89,11 @@ public class ApplicationSettings
return classResolver;
}
 
+   public IPropertyExpressionResolver getPropertyExpressionResolver()
+   {
+   return propertyExpressionResolver;
+   }
+
/**
 * Gets the default maximum size for uploads. This is used by {@link 
org.apache.wicket.markup.html.form.Form#getMaxSize()} if no
 * value is explicitly set through {@link 
org.apache.wicket.markup.html.form.Form#setMaxSize(Bytes)}.
@@ -158,6 +167,12 @@ public class ApplicationSettings
return this;
}
 
+   public void setPropertyExpressionResolver(
+   IPropertyExpressionResolver propertyExpressionResolver)
+   {
+   this.propertyExpressionResolver = propertyExpressionResolver;
+   }
+
/**
 * Sets the default maximum size for uploads. This is used by {@link 
org.apache.wicket.markup.html.form.Form#getMaxSize()} if no
 * value is explicitly set through {@link 
org.apache.wicket.markup.html.form.Form#setMaxSize(Bytes)}.

http://git-wip-us.apache.org/repos/asf/wicket/blob/3a6db1bf/wicket-core/src/test/java/org/apache/wicket/model/AbstractPropertyModelObjectClassTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/model/AbstractPropertyModelObjectClassTest.java
 
b/wicket-core/src/test/java/org/apache/wicket/model/AbstractPropertyModelObjectClassTest.java
index 1d141fc..1d613e1 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/model/AbstractPropertyModelObjectClassTest.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/model/AbstractPropertyModelObjectClassTest.java
@@ -18,8 +18,7 @@ package org.apache.wicket.model;
 
 import java.io.Serializable;
 
-import junit.framework.TestCase;
-import org.junit.Assert;
+import org.apache.wicket.util.tester.WicketTestCase;
 import org.junit.Test;
 
 /**
@@ -31,7 +30,7 @@ import org.junit.Test;
  * @see https://issues.apache.org/jira/browse/WICKET-2937;>WICKET-2937
  * @author Pedro Santos
  */
-public class AbstractPropertyModelObjectClassTest extends Assert
+public class AbstractPropertyModelObjectClassTest extends WicketTestCase
 {
 
/**

http://git-wip-us.apache.org/repos/asf/wicket/blob/3a6db1bf/wicket-core/src/test/java/org/apache/wicket/model/PropertyModelWithListTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/model/PropertyModelWithListTest.java
 
b/wicket-core/src/test/java/org/apache/wicket/model/PropertyModelWithListTest.java
index c0ee2da..ea2343f 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/model/PropertyModelWithListTest.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/model/PropertyModelWithListTest.java
@@ -19,7 +19,7 @@ package org.apache.wicket.model;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.junit.Assert;
+import org.apache.wicket.util.tester.WicketTestCase;
 import org.junit.Test;
 
 /**
@@ -27,7 +27,7 @@ import org.junit.Test;
  * 
  * @author Carl-Eric Menzel
  */
-public class PropertyModelWithListTest extends Assert
+public class PropertyModelWithListTest extends WicketTestCase
 {
/** */
public static class BeansContainer

http://git-wip-us.apache.org/repos/asf/wicket/blob/3a6db1bf/wicket-core/src/test/java/org/apache/wicket/util/lang/OGNLPropertyExpressionResolverTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/util/lang/OGNLPropertyExpressionResolverTest.java
 
b/wicket-core/src/test/java/org/apache/wicket/util/lang/OGNLPropertyExpressionResolverTest.java
new file mode 100644
index 000..f371496
--- /dev/null
+++ 
b/wicket-core/src/test/java/org/apache/wicket/util/lang/OGNLProp

[2/2] wicket git commit: WICKET-6318 making property expression resolver implementation a configurable option in the application

2017-02-09 Thread pedro
WICKET-6318 making property expression resolver implementation a configurable 
option in the application


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

Branch: refs/heads/WICKET-6318-configurable-property-expression-resolver
Commit: 3a6db1bf7bd5de41299532cc1a6b73b3ff582516
Parents: a4a2ac6
Author: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Authored: Thu Feb 9 23:54:48 2017 -0200
Committer: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Committed: Thu Feb 9 23:54:48 2017 -0200

--
 .../java/org/apache/wicket/Application.java |2 +-
 .../core/util/lang/DefaultPropertyLocator.java  |  160 ++
 .../util/lang/IPropertyExpressionResolver.java  |   12 +
 .../core/util/lang/IPropertyResolver.java   |   10 +
 .../lang/OGNLPropertyExpressionResolver.java|  393 +
 .../wicket/core/util/lang/PropertyResolver.java | 1563 +-
 .../util/parser/PropertyExpressionResolver.java |   28 +
 .../core/util/reflection/AbstractGetAndSet.java |   43 +
 .../core/util/reflection/ArrayGetAndSet.java|   72 +
 .../util/reflection/ArrayLengthGetAndSet.java   |   51 +
 .../util/reflection/CachingPropertyLocator.java |   70 +
 .../util/reflection/ClassMetadataIndex.java |   22 +
 .../core/util/reflection/FieldGetAndSet.java|  103 ++
 .../wicket/core/util/reflection/IGetAndSet.java |   58 +
 .../reflection/IndexedPropertyGetAndSet.java|  149 ++
 .../core/util/reflection/ListGetAndSet.java |   67 +
 .../core/util/reflection/MapGetAndSet.java  |   46 +
 .../core/util/reflection/MethodGetAndSet.java   |  243 +++
 .../util/reflection/ObjectWithGetAndSet.java|   75 +
 .../core/util/reflection/ReflectionUtility.java |   92 ++
 .../wicket/markup/html/form/FormComponent.java  |1 -
 .../wicket/model/AbstractPropertyModel.java |   74 +-
 .../model/IPropertyReflectionAwareModel.java|   54 -
 .../wicket/settings/ApplicationSettings.java|   15 +
 .../AbstractPropertyModelObjectClassTest.java   |5 +-
 .../wicket/model/PropertyModelWithListTest.java |4 +-
 .../OGNLPropertyExpressionResolverTest.java |  842 ++
 .../wicket/util/lang/PropertyResolverTest.java  |  809 -
 .../PropertyVariableInterpolatorTest.java   |4 +-
 29 files changed, 2574 insertions(+), 2493 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/3a6db1bf/wicket-core/src/main/java/org/apache/wicket/Application.java
--
diff --git a/wicket-core/src/main/java/org/apache/wicket/Application.java 
b/wicket-core/src/main/java/org/apache/wicket/Application.java
index d6d4bb5..c879700 100644
--- a/wicket-core/src/main/java/org/apache/wicket/Application.java
+++ b/wicket-core/src/main/java/org/apache/wicket/Application.java
@@ -609,7 +609,7 @@ public abstract class Application implements 
UnboundListener, IEventSink
 
// Clear caches of Class keys so the classloader can be garbage
// collected (WICKET-625)
-   PropertyResolver.destroy(this);
+// getApplicationSettings()..destroy(this);
MarkupFactory markupFactory = 
getMarkupSettings().getMarkupFactory();
 
if (markupFactory.hasMarkupCache())

http://git-wip-us.apache.org/repos/asf/wicket/blob/3a6db1bf/wicket-core/src/main/java/org/apache/wicket/core/util/lang/DefaultPropertyLocator.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/core/util/lang/DefaultPropertyLocator.java
 
b/wicket-core/src/main/java/org/apache/wicket/core/util/lang/DefaultPropertyLocator.java
new file mode 100644
index 000..c8803c7
--- /dev/null
+++ 
b/wicket-core/src/main/java/org/apache/wicket/core/util/lang/DefaultPropertyLocator.java
@@ -0,0 +1,160 @@
+package org.apache.wicket.core.util.lang;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.wicket.WicketRuntimeException;
+import org.apache.wicket.core.util.reflection.ArrayGetAndSet;
+import org.apache.wicket.core.util.reflection.ArrayLengthGetAndSet;
+import org.apache.wicket.core.util.reflection.FieldGetAndSet;
+import org.apache.wicket.core.util.reflection.IGetAndSet;
+import org.apache.wicket.core.util.reflection.IndexedPropertyGetAndSet;
+import org.apache.wicket.core.util.reflection.ListGetAndSet;
+import org.apache.wicket.core.util.reflection.MapGetAndSet;
+import org.apache.wicket.core.util.reflection.MethodGetAndSet;
+import org.apache.wicket.core.util.reflection.ReflectionUtil

[jira] [Created] (WICKET-6318) To make PropertyResolver a configurable implementation

2017-02-08 Thread Pedro Santos (JIRA)
Pedro Santos created WICKET-6318:


 Summary: To make PropertyResolver a configurable implementation
 Key: WICKET-6318
 URL: https://issues.apache.org/jira/browse/WICKET-6318
 Project: Wicket
  Issue Type: Sub-task
Reporter: Pedro Santos


To enable users to select each property resolver will be used, so if the new 
implementation shows problematic it can be switched back to the a Wicket's < 7 
one.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


wicket git commit: WICKET-4201 removing unnecessary runtime exception from PageProvider#doesProvideNewPage()

2017-02-07 Thread pedro
Repository: wicket
Updated Branches:
  refs/heads/WICKET-4201-improved-page-provider 1ec36a2e7 -> 0afd78c43


WICKET-4201 removing unnecessary runtime exception from 
PageProvider#doesProvideNewPage()


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

Branch: refs/heads/WICKET-4201-improved-page-provider
Commit: 0afd78c43409ec38428b4ab100547ac018913804
Parents: 1ec36a2
Author: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Authored: Tue Feb 7 21:29:09 2017 -0200
Committer: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Committed: Tue Feb 7 21:29:09 2017 -0200

--
 .../wicket/core/request/handler/PageProvider.java   |  4 
 .../apache/wicket/request/handler/PageProviderTest.java | 12 ++--
 2 files changed, 2 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/0afd78c4/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
index 5728628..dccd699 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
@@ -232,10 +232,6 @@ public class PageProvider implements IPageProvider, 
IClusterable
@Override
public final boolean doesProvideNewPage()
{
-   if (provision == null)
-   {
-   throw new IllegalStateException("Page instance not yet 
resolved");
-   }
return getProvision().doesProvideNewPage();
}
 

http://git-wip-us.apache.org/repos/asf/wicket/blob/0afd78c4/wicket-core/src/test/java/org/apache/wicket/request/handler/PageProviderTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/request/handler/PageProviderTest.java
 
b/wicket-core/src/test/java/org/apache/wicket/request/handler/PageProviderTest.java
index f5af25a..622b48b 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/request/handler/PageProviderTest.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/request/handler/PageProviderTest.java
@@ -198,21 +198,13 @@ public class PageProviderTest extends WicketTestCase
public void testPageProperties_bookmarkable()
{
PageProvider provider = new 
PageProvider(StatelessPageTest.class);
+   assertTrue(provider.doesProvideNewPage());
assertFalse(provider.hasPageInstance());
-   try
-   {
-   provider.doesProvideNewPage();
-   fail("expected illegal state exception");
-   }
-   catch (IllegalStateException e)
-   {
-   // expected
-   }
 
provider.getPageInstance();
 
-   assertTrue(provider.hasPageInstance());
assertTrue(provider.doesProvideNewPage());
+   assertTrue(provider.hasPageInstance());
}
 
@Test



wicket git commit: WICKET-4201 better exception message

2017-02-07 Thread pedro
Repository: wicket
Updated Branches:
  refs/heads/WICKET-4201-improved-page-provider f7f5fb890 -> 1ec36a2e7


WICKET-4201 better exception message


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

Branch: refs/heads/WICKET-4201-improved-page-provider
Commit: 1ec36a2e7efcd87655aedcffbc98d364960db0d9
Parents: f7f5fb8
Author: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Authored: Tue Feb 7 20:43:46 2017 -0200
Committer: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Committed: Tue Feb 7 20:43:46 2017 -0200

--
 .../java/org/apache/wicket/core/request/handler/PageProvider.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/1ec36a2e/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
index 44e51cb..5728628 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
@@ -308,8 +308,7 @@ public class PageProvider implements IPageProvider, 
IClusterable
{
if (provision != null)
{
-   throw new IllegalStateException(
-   "A provision was already been done. The 
provider can be forcefully detached or a new one needs to be used to provide 
using this page source.");
+   throw new IllegalStateException("A page was already 
provided.");
}
this.pageSource = pageSource;
}



wicket git commit: WICKET-4201 removing non serializable attributes from serialization

2017-02-05 Thread pedro
Repository: wicket
Updated Branches:
  refs/heads/WICKET-4201-improved-page-provider aa98a67ee -> f7f5fb890


WICKET-4201 removing non serializable attributes from serialization


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

Branch: refs/heads/WICKET-4201-improved-page-provider
Commit: f7f5fb8903452270185b7461ca83c56a87a87abd
Parents: aa98a67
Author: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Authored: Mon Feb 6 05:07:41 2017 -0200
Committer: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Committed: Mon Feb 6 05:07:41 2017 -0200

--
 .../core/request/handler/PageProvider.java  | 45 +---
 .../request/handler/PageProviderTest.java   | 24 ++-
 2 files changed, 41 insertions(+), 28 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/f7f5fb89/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
index 6cf6f95..44e51cb 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
@@ -52,13 +52,13 @@ public class PageProvider implements IPageProvider, 
IClusterable
 
private final Integer pageId;
 
-   private IPageSource pageSource;
+   private transient IPageSource pageSource;
 
private Class pageClass;
 
private PageParameters pageParameters;
 
-   private Provision provision = new Provision();
+   private transient Provision provision;
 
/**
 * Creates a new page provider object. Upon calling of {@link 
#getPageInstance()} this provider
@@ -155,12 +155,12 @@ public class PageProvider implements IPageProvider, 
IClusterable
renderCount = page.getRenderCount();
}
 
-   private Provision getResolvedProvision()
+   private Provision getProvision()
{
-   if (!provision.wasResolved())
-
-   provision.resolve();
-
+   if (provision == null)
+   {
+   provision = new Provision().resolve();
+   }
return provision;
}
 
@@ -170,7 +170,7 @@ public class PageProvider implements IPageProvider, 
IClusterable
@Override
public IRequestablePage getPageInstance()
{
-   return getResolvedProvision().getPage();
+   return getProvision().getPage();
}
 
/**
@@ -214,9 +214,9 @@ public class PageProvider implements IPageProvider, 
IClusterable
@Override
public final boolean hasPageInstance()
{
-   if (provision.wasResolved() || pageId != null)
+   if (provision != null || pageId != null)
{
-   return getResolvedProvision().didResolveToPage();
+   return getProvision().didResolveToPage();
}
else
return false;
@@ -232,11 +232,11 @@ public class PageProvider implements IPageProvider, 
IClusterable
@Override
public final boolean doesProvideNewPage()
{
-   if (!this.provision.wasResolved())
+   if (provision == null)
{
throw new IllegalStateException("Page instance not yet 
resolved");
}
-   return getResolvedProvision().doesProvideNewPage();
+   return getProvision().doesProvideNewPage();
}
 
/**
@@ -245,7 +245,7 @@ public class PageProvider implements IPageProvider, 
IClusterable
@Override
public boolean wasExpired()
{
-   return pageId != null && 
getResolvedProvision().didFailToFindStoredPage();
+   return pageId != null && 
getProvision().didFailToFindStoredPage();
}
 
/**
@@ -290,7 +290,11 @@ public class PageProvider implements IPageProvider, 
IClusterable
@Override
public void detach()
{
-   provision.detach();
+   if (provision != null)
+   {
+   provision.detach();
+   provision = null;
+   }
}
 
/**
@@ -302,7 +306,7 @@ public class PageProvider implements IPageProvider, 
IClusterable
 */
public 

wicket git commit: WICKET-4201 removing unnecessary parameters plus javadoc for PageProvider#Provision class

2017-02-05 Thread pedro
Repository: wicket
Updated Branches:
  refs/heads/WICKET-4201-improved-page-provider b64f2b4b2 -> aa98a67ee


WICKET-4201 removing unnecessary parameters plus javadoc for 
PageProvider#Provision class


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

Branch: refs/heads/WICKET-4201-improved-page-provider
Commit: aa98a67ee8379f5a45b4af44e793f196a1a007ff
Parents: b64f2b4
Author: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Authored: Sun Feb 5 19:13:03 2017 -0200
Committer: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Committed: Sun Feb 5 19:13:03 2017 -0200

--
 .../core/request/handler/PageProvider.java  | 27 
 1 file changed, 22 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/aa98a67e/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
index f558a5e..6cf6f95 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
@@ -150,7 +150,7 @@ public class PageProvider implements IPageProvider, 
IClusterable
{
Args.notNull(page, "page");
 
-   provision = new Provision().resolve(page);
+   provision = new Provision().resolveTo(page);
pageId = page.getPageId();
renderCount = page.getRenderCount();
}
@@ -159,7 +159,7 @@ public class PageProvider implements IPageProvider, 
IClusterable
{
if (!provision.wasResolved())
 
-   provision.resolve(pageId, pageClass, pageParameters, 
renderCount);
+   provision.resolve();
 
return provision;
}
@@ -353,6 +353,24 @@ public class PageProvider implements IPageProvider, 
IClusterable
+ ", pageClass=" + pageClass + ", pageParameters=" + 
pageParameters + '}';
}
 
+   /**
+* A provision is the work necessary to provide a page. It includes to 
resolve parameters to a
+* page, to track the resolution metadata and to keep a reference of 
the resolved page.
+* 
+* The logic based on {@link PageProvider}'s parameters:
+* 
+* - having an stored page id, the stored page is provided
+* 
+* - having only a page class, a new instance of it is provided
+* 
+* - having non stored page id plus page class, a new instance of the 
page class is provided
+* 
+* - having non stored page id and no page class, no page is provided
+* 
+* - being a page instance, the instance itself will be the provided 
page
+*
+* @author pedro
+*/
private class Provision
{
transient IRequestablePage page;
@@ -388,7 +406,7 @@ public class PageProvider implements IPageProvider, 
IClusterable
return failedToFindStoredPage;
}
 
-   Provision resolve(IRequestablePage page)
+   Provision resolveTo(IRequestablePage page)
{
this.page = page;
 
@@ -397,8 +415,7 @@ public class PageProvider implements IPageProvider, 
IClusterable
return this;
}
 
-   Provision resolve(Integer pageId, Class pageClass,
-   PageParameters pageParameters, Integer renderCount)
+   Provision resolve()
{
 
if (pageId != null)



wicket git commit: WICKET-4201 removing illegal state exception from PageProvider#getPageInstance

2017-02-04 Thread pedro
Repository: wicket
Updated Branches:
  refs/heads/WICKET-4201-improved-page-provider fe68c817a -> b64f2b4b2


WICKET-4201 removing illegal state exception from PageProvider#getPageInstance


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

Branch: refs/heads/WICKET-4201-improved-page-provider
Commit: b64f2b4b2cb50a594cabb50a0c1eeca43485f6b9
Parents: fe68c81
Author: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Authored: Sun Feb 5 04:36:12 2017 -0200
Committer: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Committed: Sun Feb 5 04:36:12 2017 -0200

--
 .../request/handler/ListenerRequestHandler.java | 20 +---
 .../core/request/handler/PageProvider.java  |  8 +---
 2 files changed, 6 insertions(+), 22 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/b64f2b4b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/ListenerRequestHandler.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/ListenerRequestHandler.java
 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/ListenerRequestHandler.java
index cc4f7fd..d36cce9 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/ListenerRequestHandler.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/ListenerRequestHandler.java
@@ -95,23 +95,13 @@ public class ListenerRequestHandler
@Override
public IRequestablePage getPage()
{
-   try
-   {
-   return pageComponentProvider.getPageInstance();
-   }
-   catch (IllegalStateException e)
+   IRequestablePage page = pageComponentProvider.getPageInstance();
+   if (page == null && pageComponentProvider.wasExpired())
{
-   if (pageComponentProvider.wasExpired())
-   {
-
-   throw new PageExpiredException(
-   "Page with id '" + 
pageComponentProvider.getPageId() + "' has expired.");
-   }
-   else
-   {
-   throw e;// bubbles up
-   }
+   throw new PageExpiredException(
+   "Page with id '" + 
pageComponentProvider.getPageId() + "' has expired.");
}
+   return page;
}
 
@Override

http://git-wip-us.apache.org/repos/asf/wicket/blob/b64f2b4b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
index 261502b..f558a5e 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
@@ -170,13 +170,7 @@ public class PageProvider implements IPageProvider, 
IClusterable
@Override
public IRequestablePage getPageInstance()
{
-   Provision resolvedProvision = getResolvedProvision();
-
-   if (!resolvedProvision.didResolveToPage() && 
!resolvedProvision.doesProvideNewPage())
-   {
-   throw new IllegalStateException("The configured page 
provider can't resolve a page.");
-   }
-   return resolvedProvision.getPage();
+   return getResolvedProvision().getPage();
}
 
/**



wicket git commit: WICKET-4201 removing page expired exception from IPageProvider interface, updated javadoc

2017-02-04 Thread pedro
Repository: wicket
Updated Branches:
  refs/heads/WICKET-4201-improved-page-provider f3a3aa524 -> fe68c817a


WICKET-4201 removing page expired exception from IPageProvider interface, 
updated javadoc


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

Branch: refs/heads/WICKET-4201-improved-page-provider
Commit: fe68c817a1856cd292a3fcced88de730a48e5ebd
Parents: f3a3aa5
Author: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Authored: Sun Feb 5 02:52:34 2017 -0200
Committer: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Committed: Sun Feb 5 02:52:34 2017 -0200

--
 .../core/request/handler/IPageProvider.java | 20 +---
 1 file changed, 9 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/fe68c817/wicket-core/src/main/java/org/apache/wicket/core/request/handler/IPageProvider.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/IPageProvider.java
 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/IPageProvider.java
index cb2510a..f0843dc 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/IPageProvider.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/IPageProvider.java
@@ -43,7 +43,7 @@ public interface IPageProvider
  *  could not have been found and the constructor used did not 
provide enough information
  *  to create new page instance
 */
-   IRequestablePage getPageInstance() throws PageExpiredException;
+   IRequestablePage getPageInstance();
 
/**
 * Returns {@link PageParameters} of the page.
@@ -53,11 +53,8 @@ public interface IPageProvider
PageParameters getPageParameters();
 
/**
-* Returns whether calling getPageInstance() will result in creating 
new page instance or
-* whether it will be an existing instance (even though it might be 
pulled from page store).
-*
-* @return true if calling {@link #getPageInstance()} will 
create new page
-* instance, false otherwise.
+* @return negates {@link PageProvider#hasPageInstance()}
+* @deprecated use {@link PageProvider#hasPageInstance()} negation 
instead
 */
boolean isNewPageInstance();
 
@@ -95,11 +92,12 @@ public interface IPageProvider
void detach();
 
/**
-* Checks whether or not the provider has a page instance. This page 
instance might have been
-* passed to this page provider directly or it may have been 
instantiated or retrieved from the
-* page store.
-*
-* @return {@code true} iff page instance has been created or retrieved
+* If this provider returns existing page, regardless if it was already 
created by PageProvider
+* itself or is or can be found in the data store. The only guarantee 
is that by calling
+* {@link PageProvider#getPageInstance()} this provider will return an 
existing instance and no
+* page will be created.
+* 
+* @return if provides an existing page
 */
boolean hasPageInstance();
 



[jira] [Commented] (WICKET-4201) IPageProvider and its implementations need to be improved

2017-02-04 Thread Pedro Santos (JIRA)

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

Pedro Santos commented on WICKET-4201:
--

@Emond

The code implementation had a few problems like unnecessary variables, e.g. 
'freshCreated' and 'page'; some duplicated code like 
isNewPageInstance/hasPageInstance implementations; plus a spreaded page 
resolution logic.

I removed the PageExpiredException from PageProvider since it breaks the class 
coherence. It's designed to provide pages and related metadata (such as if the 
page was expired included), not to change the application flow on application 
exceptions.

After cleaning it up, I have a few suggestions: 
- to rename isPageInstanceFresh to doesProvideNewPage (as in the improvement 
branch)
- to remove isNewPageInstance since it's just a mirror of hasPageInstance

[~bitstorm]

If IPageSource/IPageManager did offer an API allowing a to get pages without to 
touch them (we can work on it), it would enable the PageProvider to bypass the 
touch. It doesn't sound an PageProvider limitation to me.

@team

I pushed the improvement to WICKET-4201-improved-page-provider branch, you can 
check it out at [1]

1 - https://github.com/apache/wicket/tree/WICKET-4201-improved-page-provider

> IPageProvider and its implementations need to be improved
> -
>
> Key: WICKET-4201
> URL: https://issues.apache.org/jira/browse/WICKET-4201
> Project: Wicket
>  Issue Type: Task
>  Components: wicket
>Affects Versions: 1.5.0, 1.5.1, 1.5.2
>Reporter: Emond Papegaaij
>Assignee: Pedro Santos
>
> During the development op 1.5, IPageProvider and its implementations have 
> become a bit of a mess. The interface is not clearly defined. One of the 
> biggest problems is that several methods can throw exceptions and there is no 
> way of knowing which method will throw which exception and when. It should 
> always be clear what exceptions to expect. For example, getPage can throw a 
> PageExpiredException, but getPageClass cannot, it should return null if no 
> page class is set. Perhaps, it's even better to never throw exceptions at 
> all. Also, the various introspection methods are not very well defined and 
> make it almost impossible to come up with an alternative implementation of 
> the interface (which, IMHO is a sign of a broken API).
> Changing this interface is not an option for 1.5, but looking at the number 
> of subtle bugs that came from this part of the code, it should really be 
> considered for wicket.next.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


wicket git commit: WICKET-4201 renaming PageProvider#isPageInstanceFresh to doesProvideNewPage

2017-02-04 Thread pedro
Repository: wicket
Updated Branches:
  refs/heads/WICKET-4201-improved-page-provider e1fa342ab -> f3a3aa524


WICKET-4201 renaming PageProvider#isPageInstanceFresh to doesProvideNewPage


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

Branch: refs/heads/WICKET-4201-improved-page-provider
Commit: f3a3aa5240008069a2b5caa67e32d04ec5d8e6ce
Parents: e1fa342
Author: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Authored: Sun Feb 5 01:46:48 2017 -0200
Committer: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Committed: Sun Feb 5 01:46:48 2017 -0200

--
 .../apache/wicket/core/request/handler/IPageProvider.java |  2 +-
 .../core/request/handler/ListenerRequestHandler.java  |  2 +-
 .../apache/wicket/core/request/handler/PageProvider.java  |  2 +-
 .../apache/wicket/request/handler/PageProviderTest.java   | 10 +-
 4 files changed, 8 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/f3a3aa52/wicket-core/src/main/java/org/apache/wicket/core/request/handler/IPageProvider.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/IPageProvider.java
 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/IPageProvider.java
index 90fdaf8..cb2510a 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/IPageProvider.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/IPageProvider.java
@@ -113,5 +113,5 @@ public interface IPageProvider
 * @return {@code true} iff the page instance held by this provider was 
instantiated by the
 * provider
 */
-   boolean isPageInstanceFresh();
+   boolean doesProvideNewPage();
 }

http://git-wip-us.apache.org/repos/asf/wicket/blob/f3a3aa52/wicket-core/src/main/java/org/apache/wicket/core/request/handler/ListenerRequestHandler.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/ListenerRequestHandler.java
 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/ListenerRequestHandler.java
index f9b3bbc..cc4f7fd 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/ListenerRequestHandler.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/ListenerRequestHandler.java
@@ -156,7 +156,7 @@ public class ListenerRequestHandler
public void respond(final IRequestCycle requestCycle)
{
final IRequestablePage page = getPage();
-   final boolean freshPage = 
pageComponentProvider.isPageInstanceFresh();
+   final boolean freshPage = 
pageComponentProvider.doesProvideNewPage();
final boolean isAjax = 
((WebRequest)requestCycle.getRequest()).isAjax();
 
IRequestableComponent component;

http://git-wip-us.apache.org/repos/asf/wicket/blob/f3a3aa52/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
index 2934cf3..261502b 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
@@ -236,7 +236,7 @@ public class PageProvider implements IPageProvider, 
IClusterable
 * provider
 */
@Override
-   public final boolean isPageInstanceFresh()
+   public final boolean doesProvideNewPage()
{
if (!this.provision.wasResolved())
{

http://git-wip-us.apache.org/repos/asf/wicket/blob/f3a3aa52/wicket-core/src/test/java/org/apache/wicket/request/handler/PageProviderTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/request/handler/PageProviderTest.java
 
b/wicket-core/src/test/java/org/apache/wicket/request/handler/PageProviderTest.java
index eed70cc..09115a6 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/request/handler/PageProviderTest.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/request/handler/PageProviderTest.java
@@ -188,7 +188,7 @@ public class PageProviderTest extends WicketTestCase
{
PageProvider provider = new PageProvider(new 
St

wicket git commit: WICKET-4201 removing the page expired exception from page provider and using its API to determine such state throughout the code

2017-02-04 Thread pedro
Repository: wicket
Updated Branches:
  refs/heads/WICKET-4201-improved-page-provider 32259ca91 -> e1fa342ab


WICKET-4201 removing the page expired exception from page provider and using 
its API to determine such state throughout the code


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

Branch: refs/heads/WICKET-4201-improved-page-provider
Commit: e1fa342ab24d22748a44df4acbbf4e65a18a5f34
Parents: 32259ca
Author: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Authored: Sun Feb 5 01:36:23 2017 -0200
Committer: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Committed: Sun Feb 5 01:36:23 2017 -0200

--
 .../request/handler/ListenerRequestHandler.java |  19 ++-
 .../core/request/handler/PageProvider.java  | 141 +++
 .../mapper/AbstractBookmarkableMapper.java  |   2 +-
 3 files changed, 98 insertions(+), 64 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/e1fa342a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/ListenerRequestHandler.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/ListenerRequestHandler.java
 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/ListenerRequestHandler.java
index 400feb2..f9b3bbc 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/ListenerRequestHandler.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/ListenerRequestHandler.java
@@ -23,6 +23,7 @@ import org.apache.wicket.WicketRuntimeException;
 import org.apache.wicket.behavior.Behavior;
 import 
org.apache.wicket.core.request.handler.RenderPageRequestHandler.RedirectPolicy;
 import org.apache.wicket.core.request.handler.logger.ListenerLogData;
+import org.apache.wicket.protocol.http.PageExpiredException;
 import org.apache.wicket.request.ILoggableRequestHandler;
 import org.apache.wicket.request.IRequestCycle;
 import org.apache.wicket.request.component.IRequestableComponent;
@@ -94,7 +95,23 @@ public class ListenerRequestHandler
@Override
public IRequestablePage getPage()
{
-   return pageComponentProvider.getPageInstance();
+   try
+   {
+   return pageComponentProvider.getPageInstance();
+   }
+   catch (IllegalStateException e)
+   {
+   if (pageComponentProvider.wasExpired())
+   {
+
+   throw new PageExpiredException(
+   "Page with id '" + 
pageComponentProvider.getPageId() + "' has expired.");
+   }
+   else
+   {
+   throw e;// bubbles up
+   }
+   }
}
 
@Override

http://git-wip-us.apache.org/repos/asf/wicket/blob/e1fa342a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
index cda486a..2934cf3 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
@@ -20,7 +20,6 @@ import org.apache.wicket.Application;
 import org.apache.wicket.core.request.mapper.IPageSource;
 import org.apache.wicket.core.request.mapper.StalePageException;
 import org.apache.wicket.page.IPageManager;
-import org.apache.wicket.protocol.http.PageExpiredException;
 import org.apache.wicket.request.IRequestHandler;
 import org.apache.wicket.request.IRequestMapper;
 import org.apache.wicket.request.component.IRequestablePage;
@@ -59,7 +58,7 @@ public class PageProvider implements IPageProvider, 
IClusterable
 
private PageParameters pageParameters;
 
-   private Provision provision;
+   private Provision provision = new Provision();
 
/**
 * Creates a new page provider object. Upon calling of {@link 
#getPageInstance()} this provider
@@ -151,18 +150,17 @@ public class PageProvider implements IPageProvider, 
IClusterable
{
Args.notNull(page, "page");
 
-   provision = new Provision(page);
+   provision = new Provision().resolve(page);
pageId = 

[jira] [Resolved] (WICKET-6316) Wicket tester encodes page id for stateless links in stateless pages

2017-02-04 Thread Pedro Santos (JIRA)

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

Pedro Santos resolved WICKET-6316.
--
   Resolution: Fixed
Fix Version/s: 8.0.0-M4
   7.7.0
   6.27.0

> Wicket tester encodes page id for stateless links in stateless pages
> 
>
> Key: WICKET-6316
> URL: https://issues.apache.org/jira/browse/WICKET-6316
> Project: Wicket
>  Issue Type: Bug
>Affects Versions: 7.6.0, 8.0.0-M3, 6.26.0
>Reporter: Pedro Santos
>Assignee: Pedro Santos
>Priority: Minor
> Fix For: 6.27.0, 7.7.0, 8.0.0-M4
>
>
> The stateless link URL encoded for the request at tester#executeListener 
> contains the page id even in a stateless page.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


wicket git commit: WICKET-6316 encoding bookmarkable URLs for stateless pages in wicket tester

2017-02-04 Thread pedro
Repository: wicket
Updated Branches:
  refs/heads/wicket-7.x c21b09bc8 -> da4f51fba


WICKET-6316 encoding bookmarkable URLs for stateless pages in wicket tester


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

Branch: refs/heads/wicket-7.x
Commit: da4f51fba485fde0ed82ced19fe6ae0ac02513f8
Parents: c21b09b
Author: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Authored: Sat Feb 4 19:11:51 2017 -0200
Committer: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Committed: Sat Feb 4 19:11:51 2017 -0200

--
 .../wicket/util/tester/BaseWicketTester.java| 18 -
 .../ListenerInterfaceRequestHandlerTest.java| 73 ++--
 2 files changed, 67 insertions(+), 24 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/da4f51fb/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java
--
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 10c99ae..726ebe1 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
@@ -61,6 +61,7 @@ import org.apache.wicket.ajax.markup.html.AjaxLink;
 import org.apache.wicket.ajax.markup.html.IAjaxLink;
 import org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink;
 import org.apache.wicket.behavior.AbstractAjaxBehavior;
+import 
org.apache.wicket.core.request.handler.BookmarkableListenerInterfaceRequestHandler;
 import org.apache.wicket.core.request.handler.BookmarkablePageRequestHandler;
 import org.apache.wicket.core.request.handler.IPageProvider;
 import org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler;
@@ -1108,8 +1109,21 @@ public class BaseWicketTester
 
// there are two ways to do this. RequestCycle could be forced 
to call the handler
// directly but constructing and parsing the URL increases the 
chance of triggering bugs
-   IRequestHandler handler = new 
ListenerInterfaceRequestHandler(new PageAndComponentProvider(
-   component.getPage(), component), listener);
+
+   Page page = component.getPage();
+   PageAndComponentProvider pageAndComponentProvider = new 
PageAndComponentProvider(page,
+   component);
+
+   IRequestHandler handler = null;
+   if (page.isPageStateless() || (page.isBookmarkable() && 
page.wasCreatedBookmarkable()))
+   {
+   handler = new 
BookmarkableListenerInterfaceRequestHandler(pageAndComponentProvider,
+   listener);
+   }
+   else
+   {
+   handler = new 
ListenerInterfaceRequestHandler(pageAndComponentProvider, listener);
+   }
 
Url url = urlFor(handler);
request.setUrl(url);

http://git-wip-us.apache.org/repos/asf/wicket/blob/da4f51fb/wicket-core/src/test/java/org/apache/wicket/core/request/handler/ListenerInterfaceRequestHandlerTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/core/request/handler/ListenerInterfaceRequestHandlerTest.java
 
b/wicket-core/src/test/java/org/apache/wicket/core/request/handler/ListenerInterfaceRequestHandlerTest.java
index 5bb53ee..b034396 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/core/request/handler/ListenerInterfaceRequestHandlerTest.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/core/request/handler/ListenerInterfaceRequestHandlerTest.java
@@ -35,9 +35,7 @@ import org.apache.wicket.markup.Markup;
 import org.apache.wicket.markup.html.WebPage;
 import org.apache.wicket.markup.html.form.IOnChangeListener;
 import org.apache.wicket.markup.html.link.ILinkListener;
-import org.apache.wicket.markup.html.link.Link;
 import org.apache.wicket.markup.html.link.StatelessLink;
-import org.apache.wicket.request.IRequestCycle;
 import org.apache.wicket.request.Url;
 import org.apache.wicket.request.mapper.parameter.PageParameters;
 import org.apache.wicket.resource.DummyPage;
@@ -45,9 +43,7 @@ import org.apache.wicket.util.resource.IResourceStream;
 import org.apache.wicket.util.resource.ResourceStreamNotFoundException;
 import org.apache.wicket.util.resource.StringResourceStream;
 import org.apache.wicket.util.tester.WicketTestCase;
-import org.hamcres

wicket git commit: WICKET-6316 encoding bookmarkable URLs for stateless pages in wicket tester

2017-02-04 Thread pedro
Repository: wicket
Updated Branches:
  refs/heads/wicket-6.x 3ac7cfcc9 -> dc6b2f4f5


WICKET-6316 encoding bookmarkable URLs for stateless pages in wicket tester


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

Branch: refs/heads/wicket-6.x
Commit: dc6b2f4f5dbfb262a52f5ff403ec04e2c73ba82f
Parents: 3ac7cfc
Author: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Authored: Sat Feb 4 19:04:09 2017 -0200
Committer: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Committed: Sat Feb 4 19:04:09 2017 -0200

--
 .../wicket/util/tester/BaseWicketTester.java| 20 -
 .../ListenerInterfaceRequestHandlerTest.java| 90 +---
 2 files changed, 76 insertions(+), 34 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/dc6b2f4f/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java
--
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 4e4332b..7c58bcf 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
@@ -39,8 +39,6 @@ import javax.servlet.ServletContext;
 import javax.servlet.http.Cookie;
 import javax.servlet.http.HttpSession;
 
-import junit.framework.AssertionFailedError;
-
 import org.apache.wicket.Application;
 import org.apache.wicket.Component;
 import org.apache.wicket.IPageManagerProvider;
@@ -62,6 +60,7 @@ import org.apache.wicket.ajax.markup.html.AjaxLink;
 import org.apache.wicket.ajax.markup.html.IAjaxLink;
 import org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink;
 import org.apache.wicket.behavior.AbstractAjaxBehavior;
+import 
org.apache.wicket.core.request.handler.BookmarkableListenerInterfaceRequestHandler;
 import org.apache.wicket.core.request.handler.BookmarkablePageRequestHandler;
 import org.apache.wicket.core.request.handler.IPageProvider;
 import org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler;
@@ -138,6 +137,8 @@ import org.apache.wicket.util.visit.IVisitor;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import junit.framework.AssertionFailedError;
+
 /**
  * A helper class to ease unit testing of Wicket applications without the need 
for a servlet
  * container. See javadoc of WicketTester for example usage. This 
class can be used as
@@ -1092,8 +1093,19 @@ public class BaseWicketTester
 
// there are two ways to do this. RequestCycle could be forced 
to call the handler
// directly but constructing and parsing the URL increases the 
chance of triggering bugs
-   IRequestHandler handler = new 
ListenerInterfaceRequestHandler(new PageAndComponentProvider(
-   component.getPage(), component), listener);
+   Page page = component.getPage();
+   PageAndComponentProvider pageAndComponentProvider = new 
PageAndComponentProvider(page,
+   component);
+
+   IRequestHandler handler = null;
+   if (page.isPageStateless() || (page.isBookmarkable() && 
page.wasCreatedBookmarkable()))
+   {
+   handler = new 
BookmarkableListenerInterfaceRequestHandler(pageAndComponentProvider, listener);
+   }
+   else
+   {
+   handler = new 
ListenerInterfaceRequestHandler(pageAndComponentProvider, listener);
+   }
 
Url url = urlFor(handler);
request.setUrl(url);

http://git-wip-us.apache.org/repos/asf/wicket/blob/dc6b2f4f/wicket-core/src/test/java/org/apache/wicket/core/request/handler/ListenerInterfaceRequestHandlerTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/core/request/handler/ListenerInterfaceRequestHandlerTest.java
 
b/wicket-core/src/test/java/org/apache/wicket/core/request/handler/ListenerInterfaceRequestHandlerTest.java
index 306d65e..ce54361 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/core/request/handler/ListenerInterfaceRequestHandlerTest.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/core/request/handler/ListenerInterfaceRequestHandlerTest.java
@@ -36,18 +36,14 @@ import org.apache.wicket.markup.Markup;
 import org.apache.wicket.markup.html.WebPage;
 import org.apache.wicket.markup.html.form.IOn

wicket git commit: WICKET-4201 moving page resolution code to its own class, removing duplicated code, validating inner state when setting page sources

2017-02-04 Thread pedro
Repository: wicket
Updated Branches:
  refs/heads/WICKET-4201-improved-page-provider [created] 32259ca91


WICKET-4201 moving page resolution code to its own class, removing duplicated 
code, validating inner state when setting page sources


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

Branch: refs/heads/WICKET-4201-improved-page-provider
Commit: 32259ca910f844716d8d4e056fec21b3199982e7
Parents: 5c9e27c
Author: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Authored: Sat Feb 4 05:01:53 2017 -0200
Committer: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Committed: Sat Feb 4 10:46:51 2017 -0200

--
 .../core/request/handler/PageProvider.java  | 229 +--
 .../core/request/mapper/MountedMapperTest.java  |   2 +-
 2 files changed, 109 insertions(+), 122 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/32259ca9/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
index e5e1a01..cda486a 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java
@@ -20,7 +20,6 @@ import org.apache.wicket.Application;
 import org.apache.wicket.core.request.mapper.IPageSource;
 import org.apache.wicket.core.request.mapper.StalePageException;
 import org.apache.wicket.page.IPageManager;
-import org.apache.wicket.pageStore.IPageStore;
 import org.apache.wicket.protocol.http.PageExpiredException;
 import org.apache.wicket.request.IRequestHandler;
 import org.apache.wicket.request.IRequestMapper;
@@ -56,13 +55,12 @@ public class PageProvider implements IPageProvider, 
IClusterable
 
private IPageSource pageSource;
 
-   private transient IRequestablePage pageInstance;
-   private boolean pageInstanceIsFresh;
-
private Class pageClass;
 
private PageParameters pageParameters;
 
+   private Provision provision;
+
/**
 * Creates a new page provider object. Upon calling of {@link 
#getPageInstance()} this provider
 * will return page instance with specified id.
@@ -153,27 +151,32 @@ public class PageProvider implements IPageProvider, 
IClusterable
{
Args.notNull(page, "page");
 
-   pageInstance = page;
+   provision = new Provision(page);
pageId = page.getPageId();
renderCount = page.getRenderCount();
}
 
+   private Provision getProvision()
+   {
+   if (provision == null)
+   {
+   provision = new 
Provision(getPageSource()).resolvePageInstance(pageId, pageClass,
+   pageParameters, renderCount);
+   }
+   return provision;
+   }
+
/**
 * @see IPageProvider#getPageInstance()
 */
@Override
public IRequestablePage getPageInstance()
{
-   if (pageInstance == null)
+   if (!getProvision().didResolvePage() && 
!getProvision().doesProvideNewPage())
{
-   resolvePageInstance(pageId, pageClass, pageParameters, 
renderCount);
-
-   if (pageInstance == null)
-   {
-   throw new PageExpiredException("Page with id '" 
+ pageId + "' has expired.");
-   }
+   throw new PageExpiredException("Page with id '" + 
pageId + "' has expired.");
}
-   return pageInstance;
+   return getProvision().get();
}
 
/**
@@ -188,7 +191,7 @@ public class PageProvider implements IPageProvider, 
IClusterable
}
else if (isNewPageInstance() == false)
{
-   return pageInstance.getPageParameters();
+   return getProvision().get().getPageParameters();
}
else
{
@@ -197,26 +200,24 @@ public class PageProvider implements IPageProvider, 
IClusterable
}
 
/**
-* The page instance is new only if there is no cached instance or the 
data stores doesn't have
-* a page with that id with the same {@linkplain #p

wicket git commit: WICKET-6316 encoding bookmarkable URLs for stateless pages in wicket tester

2017-02-03 Thread pedro
Repository: wicket
Updated Branches:
  refs/heads/master ec1b7129e -> 5c9e27c6e


WICKET-6316 encoding bookmarkable URLs for stateless pages in wicket tester


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

Branch: refs/heads/master
Commit: 5c9e27c6ec262d9ec4a0878bc74c594f12303558
Parents: ec1b712
Author: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Authored: Sat Feb 4 03:57:47 2017 -0200
Committer: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Committed: Sat Feb 4 03:57:47 2017 -0200

--
 .../wicket/util/tester/BaseWicketTester.java| 16 +-
 .../handler/ListenerRequestHandlerTest.java | 58 +++-
 2 files changed, 58 insertions(+), 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/5c9e27c6/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java
--
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 0b30c92..d7cdf4e 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
@@ -60,6 +60,7 @@ import org.apache.wicket.ajax.markup.html.AjaxLink;
 import org.apache.wicket.ajax.markup.html.IAjaxLink;
 import org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink;
 import org.apache.wicket.behavior.AbstractAjaxBehavior;
+import 
org.apache.wicket.core.request.handler.BookmarkableListenerRequestHandler;
 import org.apache.wicket.core.request.handler.BookmarkablePageRequestHandler;
 import org.apache.wicket.core.request.handler.IPageProvider;
 import org.apache.wicket.core.request.handler.ListenerRequestHandler;
@@ -1093,8 +1094,19 @@ public class BaseWicketTester
 
// there are two ways to do this. RequestCycle could be forced 
to call the handler
// directly but constructing and parsing the URL increases the 
chance of triggering bugs
-   IRequestHandler handler = new ListenerRequestHandler(new 
PageAndComponentProvider(
-   component.getPage(), component));
+   Page page = component.getPage();
+   PageAndComponentProvider pageAndComponentProvider = new 
PageAndComponentProvider(page,
+   component);
+
+   IRequestHandler handler = null;
+   if (page.isPageStateless() || (page.isBookmarkable() && 
page.wasCreatedBookmarkable()))
+   {
+   handler = new 
BookmarkableListenerRequestHandler(pageAndComponentProvider);
+   }
+   else
+   {
+   handler = new 
ListenerRequestHandler(pageAndComponentProvider);
+   }
 
Url url = urlFor(handler);
request.setUrl(url);

http://git-wip-us.apache.org/repos/asf/wicket/blob/5c9e27c6/wicket-core/src/test/java/org/apache/wicket/core/request/handler/ListenerRequestHandlerTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/core/request/handler/ListenerRequestHandlerTest.java
 
b/wicket-core/src/test/java/org/apache/wicket/core/request/handler/ListenerRequestHandlerTest.java
index b212c9c..b8bd401 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/core/request/handler/ListenerRequestHandlerTest.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/core/request/handler/ListenerRequestHandlerTest.java
@@ -160,20 +160,37 @@ public class ListenerRequestHandlerTest extends 
WicketTestCase
}
 
@Test
-   public void skipListenerIfExpiredPage()
+   public void executeStatelessLinkInAFreshPage()
{
-   tester.getApplication().getRootRequestMapperAsCompound() 
.add(new MountedMapper("/segment", NotExpiredPage.class));
-   tester.startPage(NotExpiredPage.class);
+   tester.startPage(StatelessPage.class);
+
tester.clickLink("statelessLink");
-   NotExpiredPage page = 
(NotExpiredPage)tester.getLastRenderedPage();
+
+   StatelessPage page = 
(StatelessPage)tester.getLastRenderedPage();
assertThat(page.invoked, is(true));
+   assertThat(page.executedInAnFreshPage, is(true));
}
 
-   public static class NotExpiredPage extends WebPage
+   @Test
+   public void executeStatelessLinkInAFreshPageAtASegment()
+   

[jira] [Updated] (WICKET-6316) Wicket tester encodes page id for stateless links in stateless pages

2017-02-03 Thread Pedro Santos (JIRA)

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

Pedro Santos updated WICKET-6316:
-
Description: The stateless link URL encoded for the request at 
tester#executeListener contains the page id even in a stateless page.  (was: A 
stateless link URL is encoded with the page id even in a stateless page by 
default.

Stateless link URL in a stateful page mapped by Wicket's default mapper:
wicket/page?0-1.-statelessLink

and the same link encoded by AbstractBookmarkableMapper:
segment?-1.-statelessLink

It causes an inconsistent behavior where the the stateless link will be execute 
on a fresh page or not based on how the page got mapped.)

> Wicket tester encodes page id for stateless links in stateless pages
> 
>
> Key: WICKET-6316
> URL: https://issues.apache.org/jira/browse/WICKET-6316
> Project: Wicket
>  Issue Type: Bug
>Affects Versions: 7.6.0, 8.0.0-M3, 6.26.0
>Reporter: Pedro Santos
>Assignee: Pedro Santos
>Priority: Minor
>
> The stateless link URL encoded for the request at tester#executeListener 
> contains the page id even in a stateless page.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (WICKET-6316) Wicket tester encodes page id for stateless links in stateless pages

2017-02-03 Thread Pedro Santos (JIRA)

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

Pedro Santos updated WICKET-6316:
-
Summary: Wicket tester encodes page id for stateless links in stateless 
pages  (was: Stateless link does not execute in a fresh page if its URL got 
encoded by Wicket's default request mapper)

> Wicket tester encodes page id for stateless links in stateless pages
> 
>
> Key: WICKET-6316
> URL: https://issues.apache.org/jira/browse/WICKET-6316
> Project: Wicket
>  Issue Type: Bug
>Affects Versions: 7.6.0, 8.0.0-M3, 6.26.0
>Reporter: Pedro Santos
>Assignee: Pedro Santos
>Priority: Minor
>
> A stateless link URL is encoded with the page id even in a stateless page by 
> default.
> Stateless link URL in a stateful page mapped by Wicket's default mapper:
> wicket/page?0-1.-statelessLink
> and the same link encoded by AbstractBookmarkableMapper:
> segment?-1.-statelessLink
> It causes an inconsistent behavior where the the stateless link will be 
> execute on a fresh page or not based on how the page got mapped.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (WICKET-6316) Stateless link does not execute in a fresh page if its URL got encoded by Wicket's default request mapper

2017-02-03 Thread Pedro Santos (JIRA)

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

Pedro Santos updated WICKET-6316:
-
Priority: Minor  (was: Major)

> Stateless link does not execute in a fresh page if its URL got encoded by 
> Wicket's default request mapper
> -
>
> Key: WICKET-6316
> URL: https://issues.apache.org/jira/browse/WICKET-6316
> Project: Wicket
>  Issue Type: Bug
>Affects Versions: 7.6.0, 8.0.0-M3, 6.26.0
>Reporter: Pedro Santos
>Assignee: Pedro Santos
>Priority: Minor
>
> A stateless link URL is encoded with the page id even in a stateless page by 
> default.
> Stateless link URL in a stateful page mapped by Wicket's default mapper:
> wicket/page?0-1.-statelessLink
> and the same link encoded by AbstractBookmarkableMapper:
> segment?-1.-statelessLink
> It causes an inconsistent behavior where the the stateless link will be 
> execute on a fresh page or not based on how the page got mapped.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (WICKET-6316) Stateless link does not execute in a fresh page if its URL got encoded by Wicket's default request mapper

2017-02-03 Thread Pedro Santos (JIRA)

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

Pedro Santos updated WICKET-6316:
-
Description: 
A stateless link URL is encoded with the page id even in a stateless page by 
default.

Stateless link URL in a stateful page mapped by Wicket's default mapper:
wicket/page?0-1.-statelessLink

and the same link encoded by AbstractBookmarkableMapper:
segment?-1.-statelessLink

It causes an inconsistent behavior where the the stateless link will be execute 
on a fresh page or not based on how the page got mapped.

  was:
A stateless link URL is encoded with the page id even in a stateless page by 
default.

Stateless link URL in a stateful page mapped by Wicket's default mapper:
wicket/page?0-1.-statelessLink

and the same link encoded by AbstractBookmarkableMapper:
segment?-1.-statelessLink

This bug was also the cause of WICKET-6288, but in that case the stateless link 
worked fine because it wasn't depending on the page's fresh state.


> Stateless link does not execute in a fresh page if its URL got encoded by 
> Wicket's default request mapper
> -
>
> Key: WICKET-6316
> URL: https://issues.apache.org/jira/browse/WICKET-6316
> Project: Wicket
>  Issue Type: Bug
>Affects Versions: 7.6.0, 8.0.0-M3, 6.26.0
>Reporter: Pedro Santos
>Assignee: Pedro Santos
>
> A stateless link URL is encoded with the page id even in a stateless page by 
> default.
> Stateless link URL in a stateful page mapped by Wicket's default mapper:
> wicket/page?0-1.-statelessLink
> and the same link encoded by AbstractBookmarkableMapper:
> segment?-1.-statelessLink
> It causes an inconsistent behavior where the the stateless link will be 
> execute on a fresh page or not based on how the page got mapped.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (WICKET-6316) Stateless link does not execute in a fresh page if its URL got encoded by Wicket's default request mapper

2017-02-03 Thread Pedro Santos (JIRA)

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

Pedro Santos updated WICKET-6316:
-
Description: 
A stateless link URL is encoded with the page id even in a stateless page by 
default.

Stateless link URL in a stateful page mapped by Wicket's default mapper:
wicket/page?0-1.-statelessLink

and the same link encoded by AbstractBookmarkableMapper:
segment?-1.-statelessLink

This bug was also the cause of WICKET-6288, but in that case the stateless link 
worked fine because it wasn't depending on the page's fresh state.

  was:
If a stateless link is added to a stateful page, its URL will be encoded with 
the stateful page id on it, causing it to be executed in an old version of the 
page.

If the link URL gets encoded by an instance of an AbstractBookmarkableMapper, 
it will correctly get not stateful date encoded in its URL.

Stateless link URL in an stateful page mapped by Wicket's default mapper:
wicket/page?0-1.-statelessLink

and the same link mapped in a paged mounted in an segment:
segment?-1.-statelessLink

This bug was also the cause of WICKET-6288, but in that case the stateless link 
worked fine because it wasn't depending on the page's fresh state, which is a 
bug that could happen in the future.


> Stateless link does not execute in a fresh page if its URL got encoded by 
> Wicket's default request mapper
> -
>
> Key: WICKET-6316
> URL: https://issues.apache.org/jira/browse/WICKET-6316
> Project: Wicket
>  Issue Type: Bug
>Affects Versions: 7.6.0, 8.0.0-M3, 6.26.0
>Reporter: Pedro Santos
>Assignee: Pedro Santos
>
> A stateless link URL is encoded with the page id even in a stateless page by 
> default.
> Stateless link URL in a stateful page mapped by Wicket's default mapper:
> wicket/page?0-1.-statelessLink
> and the same link encoded by AbstractBookmarkableMapper:
> segment?-1.-statelessLink
> This bug was also the cause of WICKET-6288, but in that case the stateless 
> link worked fine because it wasn't depending on the page's fresh state.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Created] (WICKET-6316) Stateless link does not execute in a fresh page if its URL got encoded by Wicket's default request mapper

2017-02-03 Thread Pedro Santos (JIRA)
Pedro Santos created WICKET-6316:


 Summary: Stateless link does not execute in a fresh page if its 
URL got encoded by Wicket's default request mapper
 Key: WICKET-6316
 URL: https://issues.apache.org/jira/browse/WICKET-6316
 Project: Wicket
  Issue Type: Bug
Affects Versions: 6.26.0, 8.0.0-M3, 7.6.0
Reporter: Pedro Santos
Assignee: Pedro Santos


If a stateless link is added to a stateful page, its URL will be encoded with 
the stateful page id on it, causing it to be executed in an old version of the 
page.

If the link URL gets encoded by an instance of an AbstractBookmarkableMapper, 
it will correctly get not stateful date encoded in its URL.

Stateless link URL in an stateful page mapped by Wicket's default mapper:
wicket/page?0-1.-statelessLink

and the same link mapped in a paged mounted in an segment:
segment?-1.-statelessLink

This bug was also the cause of WICKET-6288, but in that case the stateless link 
worked fine because it wasn't depending on the page's fresh state, which is a 
bug that could happen in the future.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Resolved] (WICKET-6165) Inconsistent behavior of Markupstream.hasMore vs. MarkupStream.next.

2017-02-02 Thread Pedro Santos (JIRA)

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

Pedro Santos resolved WICKET-6165.
--
   Resolution: Fixed
Fix Version/s: (was: 8.0.0)
   8.0.0-M4
   7.7.0
   6.27.0

> Inconsistent behavior of Markupstream.hasMore vs. MarkupStream.next.
> 
>
> Key: WICKET-6165
> URL: https://issues.apache.org/jira/browse/WICKET-6165
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 7.3.0
>Reporter: Thorsten Schöning
>Assignee: Pedro Santos
>Priority: Minor
> Fix For: 6.27.0, 7.7.0, 8.0.0-M4
>
> Attachments: HtmlHandler.java.patch, MarkupStream.java.patch, 
> MarkupStream.java.patch
>
>
> {CODE}
> hasMore: return currentIndex < markup.size();
> next:if (++currentIndex < markup.size()) {...}
> me:  while (markupStream.hasMore()) {...}
> {CODE}
> I get a null element within the while loop which I wouldn't expect to get. 
> markup.size() is 73, currentIndex 72, so "hasMore" returns true, while "next" 
> returns null, because it already advanced the index during its check. 
> "hasMore" saying "yes" while "next" saying "no" seems inconsistent to me, 
> even though one can check the return value of "next" against "null".
> Shouldn't "next" use
> {CODE}
> if (currentIndex++ < markup.size()) {...}
> {CODE}
> to be in line with "hasMore"? Or more better directly call "hasMore" for the 
> check itself to have only one single consistent implementation of the check?



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


wicket git commit: WICKET-6165 addind and using MarkupStream#isCurrentIndexInsideTheStream instead of MarkupStream#hasMore

2017-02-02 Thread pedro
Repository: wicket
Updated Branches:
  refs/heads/wicket-6.x 258f93d59 -> 3ac7cfcc9


WICKET-6165 addind and using MarkupStream#isCurrentIndexInsideTheStream instead 
of MarkupStream#hasMore


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

Branch: refs/heads/wicket-6.x
Commit: 3ac7cfcc9842c80caf9683a02efafd8a2732ec4b
Parents: 258f93d
Author: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Authored: Mon Sep 5 02:00:29 2016 -0300
Committer: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Committed: Fri Feb 3 00:45:28 2017 -0200

--
 .../java/org/apache/wicket/MarkupContainer.java   |  2 +-
 .../org/apache/wicket/markup/MarkupStream.java| 18 ++
 .../java/org/apache/wicket/markup/TagUtils.java   |  2 +-
 .../html/TransparentWebMarkupContainer.java   |  4 ++--
 .../wicket/markup/html/border/BorderBehavior.java |  6 +++---
 .../wicket/markup/html/internal/Enclosure.java|  2 +-
 .../markup/resolver/WicketMessageResolver.java|  4 ++--
 7 files changed, 24 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/3ac7cfcc/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
--
diff --git a/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java 
b/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
index d101fed..4ba140c 100644
--- a/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
+++ b/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
@@ -1544,7 +1544,7 @@ public abstract class MarkupContainer extends Component 
implements Iterablehttp://git-wip-us.apache.org/repos/asf/wicket/blob/3ac7cfcc/wicket-core/src/main/java/org/apache/wicket/markup/MarkupStream.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/MarkupStream.java 
b/wicket-core/src/main/java/org/apache/wicket/markup/MarkupStream.java
index 99a5165..ae6642f 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/MarkupStream.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/MarkupStream.java
@@ -134,7 +134,7 @@ public class MarkupStream
public boolean equalTo(final MarkupStream that)
{
// While a has more markup elements
-   while (hasMore())
+   while (isCurrentIndexInsideTheStream())
{
// Get an element from each
final MarkupElement thisElement = this.get();
@@ -163,7 +163,7 @@ public class MarkupStream
}
 
// If we've run out of markup elements in b
-   if (!that.hasMore())
+   if (!that.isCurrentIndexInsideTheStream())
{
// then the two streams match perfectly
return true;
@@ -271,8 +271,18 @@ public class MarkupStream
}
 
/**
+* @return True if this markup stream is moved to a MarkupElement 
element
+*/
+   public boolean isCurrentIndexInsideTheStream()
+   {
+   return currentIndex < markup.size();
+   }
+
+   /**
 * @return True if this markup stream has more MarkupElement elements
+* @deprecated use {@link MarkupStream#isCurrentIndexInsideTheStream()} 
instead
 */
+   @Deprecated
public boolean hasMore()
{
return currentIndex < markup.size();
@@ -417,7 +427,7 @@ public class MarkupStream
 */
public boolean skipUntil(final Class clazz)
{
-   while (hasMore())
+   while (isCurrentIndexInsideTheStream())
{
if (clazz.isInstance(current))
{
@@ -462,7 +472,7 @@ public class MarkupStream
public void skipToMatchingCloseTag(final ComponentTag openTag)
{
// Loop through the markup in this container
-   while (hasMore())
+   while (isCurrentIndexInsideTheStream())
{
// If the current markup tag closes the openTag
if (get().closes(openTag))

http://git-wip-us.apache.org/repos/asf/wicket/blob/3ac7cfcc/wicket-core/src/main/java/org/apache/wicket/markup/TagUtils.java
--
diff --git a/wicket-core/src/main/java/org/apache/wicket/markup/TagUtils.java 
b/wicket-core/src/main/java/org/apache/wicket/markup/TagUtils.java
index 740303e..b52f638 100

wicket git commit: WICKET-6165 addind and using MarkupStream#isCurrentIndexInsideTheStream instead of MarkupStream#hasMore

2017-02-02 Thread pedro
Repository: wicket
Updated Branches:
  refs/heads/wicket-7.x 86f7cb040 -> c21b09bc8


WICKET-6165 addind and using MarkupStream#isCurrentIndexInsideTheStream instead 
of MarkupStream#hasMore


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

Branch: refs/heads/wicket-7.x
Commit: c21b09bc83e31311f06e23d4871f48f19c57a7e0
Parents: 86f7cb0
Author: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Authored: Mon Sep 5 02:00:29 2016 -0300
Committer: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Committed: Thu Feb 2 18:13:18 2017 -0200

--
 .../java/org/apache/wicket/MarkupContainer.java   |  2 +-
 .../org/apache/wicket/markup/MarkupStream.java| 18 ++
 .../java/org/apache/wicket/markup/TagUtils.java   |  2 +-
 .../html/TransparentWebMarkupContainer.java   |  2 +-
 .../wicket/markup/html/border/BorderBehavior.java |  6 +++---
 .../wicket/markup/html/internal/Enclosure.java|  2 +-
 .../markup/resolver/WicketMessageResolver.java|  4 ++--
 7 files changed, 23 insertions(+), 13 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/c21b09bc/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
--
diff --git a/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java 
b/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
index c38433a..bb85007 100644
--- a/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
+++ b/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
@@ -1713,7 +1713,7 @@ public abstract class MarkupContainer extends Component 
implements Iterablehttp://git-wip-us.apache.org/repos/asf/wicket/blob/c21b09bc/wicket-core/src/main/java/org/apache/wicket/markup/MarkupStream.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/MarkupStream.java 
b/wicket-core/src/main/java/org/apache/wicket/markup/MarkupStream.java
index 99a5165..ae6642f 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/MarkupStream.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/MarkupStream.java
@@ -134,7 +134,7 @@ public class MarkupStream
public boolean equalTo(final MarkupStream that)
{
// While a has more markup elements
-   while (hasMore())
+   while (isCurrentIndexInsideTheStream())
{
// Get an element from each
final MarkupElement thisElement = this.get();
@@ -163,7 +163,7 @@ public class MarkupStream
}
 
// If we've run out of markup elements in b
-   if (!that.hasMore())
+   if (!that.isCurrentIndexInsideTheStream())
{
// then the two streams match perfectly
return true;
@@ -271,8 +271,18 @@ public class MarkupStream
}
 
/**
+* @return True if this markup stream is moved to a MarkupElement 
element
+*/
+   public boolean isCurrentIndexInsideTheStream()
+   {
+   return currentIndex < markup.size();
+   }
+
+   /**
 * @return True if this markup stream has more MarkupElement elements
+* @deprecated use {@link MarkupStream#isCurrentIndexInsideTheStream()} 
instead
 */
+   @Deprecated
public boolean hasMore()
{
return currentIndex < markup.size();
@@ -417,7 +427,7 @@ public class MarkupStream
 */
public boolean skipUntil(final Class clazz)
{
-   while (hasMore())
+   while (isCurrentIndexInsideTheStream())
{
if (clazz.isInstance(current))
{
@@ -462,7 +472,7 @@ public class MarkupStream
public void skipToMatchingCloseTag(final ComponentTag openTag)
{
// Loop through the markup in this container
-   while (hasMore())
+   while (isCurrentIndexInsideTheStream())
{
// If the current markup tag closes the openTag
if (get().closes(openTag))

http://git-wip-us.apache.org/repos/asf/wicket/blob/c21b09bc/wicket-core/src/main/java/org/apache/wicket/markup/TagUtils.java
--
diff --git a/wicket-core/src/main/java/org/apache/wicket/markup/TagUtils.java 
b/wicket-core/src/main/java/org/apache/wicket/markup/TagUtils.java
index abee1bd..98ce77c 100

[jira] (WICKET-6288) StatelessLink not working

2017-01-31 Thread Pedro Santos (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Pedro Santos resolved as Fixed 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Wicket /  WICKET-6288 
 
 
 
  StatelessLink not working  
 
 
 
 
 
 
 
 
 

Change By:
 
 Pedro Santos 
 
 
 

Resolution:
 
 Fixed 
 
 
 

Fix Version/s:
 
 7.6.0 
 
 
 

Fix Version/s:
 
 6.26.0 
 
 
 

Fix Version/s:
 
 8.0.0-M4 
 
 
 

Status:
 
 Open Resolved 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.3.15#6346-sha1:dbc023d) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   



wicket git commit: WICKET-6288 testing if the page if expired using IPageProvider API

2017-01-24 Thread pedro
Repository: wicket
Updated Branches:
  refs/heads/master f7a669086 -> c4805d870


WICKET-6288 testing if the page if expired using IPageProvider API


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

Branch: refs/heads/master
Commit: c4805d87012c2f0c2e80418453d0c60f3a5db7c7
Parents: f7a6690
Author: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Authored: Wed Jan 25 04:03:19 2017 -0200
Committer: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Committed: Wed Jan 25 04:03:19 2017 -0200

--
 .../core/request/handler/IPageProvider.java |  7 +++
 .../ListenerInterfaceRequestHandler.java| 21 
 .../core/request/handler/PageProvider.java  |  9 
 .../ListenerInterfaceRequestHandlerTest.java| 55 
 4 files changed, 80 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/c4805d87/wicket-core/src/main/java/org/apache/wicket/core/request/handler/IPageProvider.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/IPageProvider.java
 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/IPageProvider.java
index 617eb81..90fdaf8 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/IPageProvider.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/IPageProvider.java
@@ -62,6 +62,13 @@ public interface IPageProvider
boolean isNewPageInstance();
 
/**
+* Returns whether the provided page was expired prior to this access.
+*
+* @return true> if the page was created after its 
original instance expired.
+*/
+   boolean wasExpired();
+
+   /**
 * Returns class of the page.
 *
 * @return page class

http://git-wip-us.apache.org/repos/asf/wicket/blob/c4805d87/wicket-core/src/main/java/org/apache/wicket/core/request/handler/ListenerInterfaceRequestHandler.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/ListenerInterfaceRequestHandler.java
 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/ListenerInterfaceRequestHandler.java
index 4cb54ee..c976a42 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/ListenerInterfaceRequestHandler.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/ListenerInterfaceRequestHandler.java
@@ -167,28 +167,25 @@ public class ListenerInterfaceRequestHandler
// initialize the page to be able to check whether it 
is stateless
((Page)page).internalInitialize();
}
-   final boolean isStateless = page.isPageStateless();
 
-   RedirectPolicy policy = isStateless
+   RedirectPolicy policy = page.isPageStateless()
? RedirectPolicy.NEVER_REDIRECT
: RedirectPolicy.AUTO_REDIRECT;
 
-   final boolean canCallListenerInterfaceAfterExpiry = component 
!= null && component.canCallListenerInterfaceAfterExpiry();
+   boolean blockIfExpired = component != null && 
!component.canCallListenerInterfaceAfterExpiry();
 
-   if (!canCallListenerInterfaceAfterExpiry && freshPage && 
(isStateless == false || component == null))
-   {
-   // A request listener is invoked on an expired page.
+   boolean lateComponent = component == null && freshPage;
 
-   // If the page is stateful then we cannot assume that 
the listener is
-   // invoked on its initial state (right after page 
initialization) and that its
-   // component and/or behavior will be available. That's 
why the listener
-   // should be ignored and the best we can do is to 
re-paint the newly constructed
-   // page.
+   if ((pageComponentProvider.wasExpired() && blockIfExpired) || 
lateComponent)
+   {
+   // A request listener is invoked on an expired page or 
the component couldn't be
+   // determined. The best we can do is to re-paint the 
newly constructed page.
+   // Reference: WICKET-4454, WICKET-6288
 
if (LOG.isDebugEnabled())
{
LOG.debug(
-  

[2/2] wicket-site git commit: Adding missing files modified by Jekyll

2016-12-30 Thread pedro
Adding missing files modified by Jekyll


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

Branch: refs/heads/asf-site
Commit: 178bb54b26edc5ba9743966696da42759429de68
Parents: c202a1f
Author: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Authored: Sat Dec 31 06:57:49 2016 +
Committer: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Committed: Sat Dec 31 06:57:49 2016 +

--
 content/atom.xml| 213 ---
 content/contribute/index.html   |   2 +-
 content/contribute/patch.html   |   4 +-
 content/contribute/release.html |  22 +-
 content/help/email.html |  24 +--
 content/help/reportabug.html|  25 +--
 content/index.html  |  58 +++--
 content/learn/books/iaw6.html   |   4 +-
 content/learn/index.html|   6 +-
 content/news/2009/07/index.html |   1 +
 content/news/2009/08/index.html |   1 +
 content/news/2009/10/index.html |   1 +
 content/news/2009/12/index.html |   1 +
 content/news/2009/index.html|   1 +
 content/news/2010/02/index.html |   1 +
 content/news/2010/03/index.html |   1 +
 content/news/2010/05/index.html |   1 +
 .../news/2010/08/11/wicket-1.4.10-released.html |   8 +-
 content/news/2010/08/index.html |   3 +-
 content/news/2010/09/index.html |   1 +
 content/news/2010/11/index.html |   1 +
 content/news/2010/12/index.html |   1 +
 content/news/2010/index.html|   1 +
 .../2011/01/22/wicket-1.5-RC1-released.html |  24 ++-
 content/news/2011/01/index.html |   6 +-
 .../2011/02/25/wicket-1.5-rc2-released.html |  10 +-
 content/news/2011/02/index.html |   1 +
 content/news/2011/03/index.html |   1 +
 .../2011/04/02/wicket-1.5-RC3-released.html |  10 +-
 content/news/2011/04/index.html |   1 +
 .../2011/05/11/wicket-1.5-RC4.2-released.html   |  10 +-
 content/news/2011/05/index.html |   1 +
 .../2011/06/25/wicket-1.5-RC5.1-released.html   |  10 +-
 content/news/2011/06/index.html |   1 +
 content/news/2011/08/28/1.5-RC7-released.html   |  12 +-
 content/news/2011/08/index.html |   1 +
 content/news/2011/09/index.html |   1 +
 content/news/2011/10/index.html |   1 +
 content/news/2011/11/index.html |   1 +
 content/news/2011/index.html|   3 +-
 content/news/2012/01/index.html |   1 +
 content/news/2012/03/index.html |   1 +
 content/news/2012/05/index.html |   1 +
 content/news/2012/06/index.html |   1 +
 content/news/2012/07/index.html |   1 +
 content/news/2012/08/index.html |   1 +
 content/news/2012/09/index.html |   1 +
 content/news/2012/10/index.html |   1 +
 content/news/2012/11/index.html |   1 +
 content/news/2012/12/index.html |   1 +
 content/news/2012/index.html|   1 +
 content/news/2013/01/index.html |   1 +
 content/news/2013/02/index.html |   1 +
 content/news/2013/03/index.html |   1 +
 content/news/2013/04/index.html |   1 +
 content/news/2013/05/index.html |   1 +
 content/news/2013/06/index.html |   1 +
 content/news/2013/07/index.html |   1 +
 content/news/2013/08/index.html |   1 +
 content/news/2013/09/index.html |   1 +
 content/news/2013/11/index.html |   1 +
 content/news/2013/index.html|   1 +
 content/news/2014/01/index.html |   1 +
 content/news/2014/02/06/cve-2013-2055.html  |  10 +-
 content/news/2014/02/21/cve-2014-0043.html  |   8 +-
 content/news/2014/02/index.html |   1 +
 content/news/2014/04/index.html |   1 +
 content/news/2014/06/index.html |   1 +
 content/news/2014/08/index.html |   1 +
 content/news/2014/09/22/cve-2014-3526.html  |  10 +-
 content/news/2014/09/index.html |   1 +
 content/news/2014/11/index.html |   1 +
 content/news/2014/index.html|   1 +
 content/news/2015/02/index.html |   1 +
 content/news/2015/0

[1/2] wicket-site git commit: Adding missing files modified by Jekyll

2016-12-30 Thread pedro
6/08/index.html
@@ -78,6 +78,7 @@ using the Apache Commons Fileupload library to bec...
 2016
 
 All of 2016
+December
 November
 October
 August

http://git-wip-us.apache.org/repos/asf/wicket-site/blob/178bb54b/content/news/2016/10/index.html
--
diff --git a/content/news/2016/10/index.html b/content/news/2016/10/index.html
index f507efb..a8327b7 100644
--- a/content/news/2016/10/index.html
+++ b/content/news/2016/10/index.html
@@ -78,6 +78,7 @@ governments, ...
 2016
 
 All of 2016
+December
 November
 October
 August

http://git-wip-us.apache.org/repos/asf/wicket-site/blob/178bb54b/content/news/2016/11/index.html
--
diff --git a/content/news/2016/11/index.html b/content/news/2016/11/index.html
index 14ddcd0..83e17f4 100644
--- a/content/news/2016/11/index.html
+++ b/content/news/2016/11/index.html
@@ -65,6 +65,7 @@ side targets were subjected to the CSRF check. This was also 
f...
 2016
 
 All of 2016
+December
 November
 October
 August

http://git-wip-us.apache.org/repos/asf/wicket-site/blob/178bb54b/content/news/2016/12/31/cve-2016-6793.html
--
diff --git a/content/news/2016/12/31/cve-2016-6793.html 
b/content/news/2016/12/31/cve-2016-6793.html
new file mode 100644
index 000..e1ae5ff
--- /dev/null
+++ b/content/news/2016/12/31/cve-2016-6793.html
@@ -0,0 +1,78 @@
+
+
+
+
+
+CVE-2016-6793 Apache Wicket deserialization vulnerability | 
Apache Wicket
+
+
+
+
+
+
+   
+
+
+
+
+
+
+
+
+   
+   Quick Start
+   
+   Download
+   
+   Documentation
+   
+   Support
+   
+   Contribute
+   
+   Community
+   
+   Apache
+
+
+
+
+
+
+
+
+
+
+CVE-2016-6793 Apache Wicket deserialization vulnerability
+
+
+
+
+
+31 Dec 2016
+Severity: Low
+Vendor: The Apache Software Foundation
+Versions Affected: Apache Wicket 6.x and 1.5.x
+Description: Depending on the ISerializer set in the Wicket 
application, 
+it’s possible that a Wicket’s object deserialized from an untrusted source 
+and utilized by the application to causes the code to enter in an infinite 
+loop. Specifically, Wicket’s DiskFileItem class, serialized by Kryo, allows 
+an attacker to hack its serialized form to put a client on an infinite loop 
+if the client attempts to write on the DeferredFileOutputStream attribute.
+Mitigation: Upgrade to Apache Wicket 6.25.0 or 1.5.17
+Credit: This issue was discovered 
+by Jacob Baines, Tenable Network Security and Pedro Santos
+References: https://wicket.apache.org/news
+
+
+
+
+
+
+   
+Copyright © 2016 — The Apache Software 
Foundation. Apache Wicket, Wicket, Apache, the Apache feather logo, and the 
Apache Wicket project logo are trademarks of The Apache Software Foundation. 
All other marks mentioned may be trademarks or registered trademarks of their 
respective owners.
+
+
+
+
+

http://git-wip-us.apache.org/repos/asf/wicket-site/blob/178bb54b/content/news/2016/12/index.html
--
diff --git a/content/news/2016/12/index.html b/content/news/2016/12/index.html
new file mode 100644
index 000..29d8c0c
--- /dev/null
+++ b/content/news/2016/12/index.html
@@ -0,0 +1,169 @@
+
+
+
+
+
+Monthly archive for December 2016 | Apache Wicket
+
+
+
+
+
+
+   
+
+
+
+
+
+
+
+
+   
+   Quick Start
+   
+   Download
+   
+   Documentation
+   
+   Support
+   
+   Contribute
+   
+   Community
+   
+   Apache
+
+
+
+
+
+
+
+
+
+
+Monthly archive for December 2016
+
+
+
+   CVE-2016-6793 Apache Wicket deserialization vulnerability
+  31 Dec 2016
+   Severity: Low
+Vendor: The Apache Software Foundation
+Versions Affected: Apache Wicket 6.x and 1.5.x
+Description: Depending on the ISerializer set in the Wicket 
application, 
+it’s possible that a Wicket’s object deserialized from an untrusted source 
+and utilized by the application to causes the code to enter in an infinite 
+loop. Specifically, Wicket’s DiskFileItem class, serialized by Kryo, allows 
+an attacker to hack its 

wicket-site git commit: Announcing CVE-2016-6793: Apache Wicket deserialization vulnerability

2016-12-30 Thread pedro
Repository: wicket-site
Updated Branches:
  refs/heads/asf-site 43935ae59 -> c202a1f61


Announcing CVE-2016-6793: Apache Wicket deserialization vulnerability


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

Branch: refs/heads/asf-site
Commit: c202a1f616f460643bf82441480946e3f689f884
Parents: 43935ae
Author: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Authored: Sat Dec 31 06:47:08 2016 +
Committer: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Committed: Sat Dec 31 06:47:08 2016 +

--
 2016/_posts/2016-12-31-cve-2016-6793.md | 24 
 1 file changed, 24 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/wicket-site/blob/c202a1f6/2016/_posts/2016-12-31-cve-2016-6793.md
--
diff --git a/2016/_posts/2016-12-31-cve-2016-6793.md 
b/2016/_posts/2016-12-31-cve-2016-6793.md
new file mode 100644
index 000..15a63f9
--- /dev/null
+++ b/2016/_posts/2016-12-31-cve-2016-6793.md
@@ -0,0 +1,24 @@
+---
+layout: post
+title: CVE-2016-6793 Apache Wicket deserialization vulnerability
+---
+
+*Severity*: Low
+
+*Vendor*: The Apache Software Foundation
+
+*Versions Affected*: Apache Wicket 6.x and 1.5.x
+
+*Description*: Depending on the ISerializer set in the Wicket application, 
+it's possible that a Wicket's object deserialized from an untrusted source 
+and utilized by the application to causes the code to enter in an infinite 
+loop. Specifically, Wicket's DiskFileItem class, serialized by Kryo, allows 
+an attacker to hack its serialized form to put a client on an infinite loop 
+if the client attempts to write on the DeferredFileOutputStream attribute.
+
+*Mitigation*: Upgrade to Apache Wicket 6.25.0 or 1.5.17
+
+*Credit*: This issue was discovered 
+by Jacob Baines, Tenable Network Security and Pedro Santos
+
+References: https://wicket.apache.org/news



[jira] [Commented] (WICKET-6288) StatelessLink not working

2016-12-01 Thread Pedro Santos (JIRA)

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

Pedro Santos commented on WICKET-6288:
--

The fix in the 8.x branch will use a new pageprovider API, I'm working on
it.




> StatelessLink not working
> -
>
> Key: WICKET-6288
> URL: https://issues.apache.org/jira/browse/WICKET-6288
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 6.25.0
>Reporter: Dmitry Malyshev
>Assignee: Pedro Santos
> Attachments: wicketerror.zip
>
>
> Example:
> {code:title=TestPage.html|borderStyle=solid}
> 
> http://wicket.apache.org/;>
> 
> statelessLink
> statefullLink
> 
> 
> {code}
> {code:title=TestPage.java|borderStyle=solid}
> public class TestPage extends WebPage {
> public TestPage(PageParameters pageParameters) {
> super(pageParameters);
> add(new StatelessLink("statelessLink") {
> @Override
> public void onClick() {
> System.err.println("statelessLink.onClick()");
> }
> });
> add(new Link("statefullLink") {
> @Override
> public void onClick() {
> System.err.println("statefullLink.onClick()");
> }
> });
> }
> @Override
> protected void onBeforeRender() {
> get("statefullLink").setVisible(false);
> super.onBeforeRender();
> }
> }
> {code}
> So, StatelessLink not working in this case.
> And if i remove the row get("statefullLink").setVisible(false); it works 
> succesfull.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


wicket git commit: WICKET-6288 testing if the page is expired assuming both component and the stateless state can't be correctly determined in a fresh page

2016-11-27 Thread pedro
Repository: wicket
Updated Branches:
  refs/heads/wicket-7.x 95d64446a -> 8d78d00ca


WICKET-6288 testing if the page is expired assuming both component and the 
stateless state can't be correctly determined in a fresh page


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

Branch: refs/heads/wicket-7.x
Commit: 8d78d00caca97fa42db8670afec05a6c66152f42
Parents: 95d6444
Author: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Authored: Mon Nov 28 04:24:58 2016 -0200
Committer: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Committed: Mon Nov 28 04:24:58 2016 -0200

--
 .../ListenerInterfaceRequestHandler.java|  2 +-
 .../ListenerInterfaceRequestHandlerTest.java| 54 
 2 files changed, 55 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/8d78d00c/wicket-core/src/main/java/org/apache/wicket/core/request/handler/ListenerInterfaceRequestHandler.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/ListenerInterfaceRequestHandler.java
 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/ListenerInterfaceRequestHandler.java
index ce3286f..5860c67 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/ListenerInterfaceRequestHandler.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/ListenerInterfaceRequestHandler.java
@@ -194,7 +194,7 @@ public class ListenerInterfaceRequestHandler
? 
component.canCallListenerInterfaceAfterExpiry()
: false;
 
-   if (!canCallListenerInterfaceAfterExpiry && freshPage && 
(isStateless == false || component == null))
+   if (!canCallListenerInterfaceAfterExpiry && freshPage && 
(pageComponentProvider.getPageId() != null || component == null))
{
// A listener interface is invoked on an expired page.
 

http://git-wip-us.apache.org/repos/asf/wicket/blob/8d78d00c/wicket-core/src/test/java/org/apache/wicket/core/request/handler/ListenerInterfaceRequestHandlerTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/core/request/handler/ListenerInterfaceRequestHandlerTest.java
 
b/wicket-core/src/test/java/org/apache/wicket/core/request/handler/ListenerInterfaceRequestHandlerTest.java
index 62a84ff..5bb53ee 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/core/request/handler/ListenerInterfaceRequestHandlerTest.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/core/request/handler/ListenerInterfaceRequestHandlerTest.java
@@ -16,6 +16,8 @@
  */
 package org.apache.wicket.core.request.handler;
 
+import static org.hamcrest.CoreMatchers.is;
+
 import java.io.IOException;
 import java.text.ParseException;
 
@@ -26,17 +28,26 @@ import org.apache.wicket.Session;
 import org.apache.wicket.WicketRuntimeException;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.markup.html.AjaxLink;
+import org.apache.wicket.core.request.mapper.MountedMapper;
+import org.apache.wicket.markup.IMarkupFragment;
 import org.apache.wicket.markup.IMarkupResourceStreamProvider;
+import org.apache.wicket.markup.Markup;
 import org.apache.wicket.markup.html.WebPage;
 import org.apache.wicket.markup.html.form.IOnChangeListener;
 import org.apache.wicket.markup.html.link.ILinkListener;
+import org.apache.wicket.markup.html.link.Link;
+import org.apache.wicket.markup.html.link.StatelessLink;
+import org.apache.wicket.request.IRequestCycle;
 import org.apache.wicket.request.Url;
+import org.apache.wicket.request.mapper.parameter.PageParameters;
 import org.apache.wicket.resource.DummyPage;
 import org.apache.wicket.util.resource.IResourceStream;
 import org.apache.wicket.util.resource.ResourceStreamNotFoundException;
 import org.apache.wicket.util.resource.StringResourceStream;
 import org.apache.wicket.util.tester.WicketTestCase;
+import org.hamcrest.CoreMatchers;
 import org.junit.Test;
+import org.mockito.Mockito;
 
 /**
  * Tests for {@link ListenerInterfaceRequestHandler}
@@ -154,4 +165,47 @@ public class ListenerInterfaceRequestHandlerTest extends 
WicketTestCase
assertFalse("Handler should not report a page instance is 
available ",
handler.isPageInstanceCreated());
}
+
+   @Test
+   public void skipListenerIfExpiredPage()
+   {
+   
tester.getApplication(

wicket git commit: WICKET-6288 assuming both component and the stateless state can't be correctly determined in a fresh page

2016-11-27 Thread pedro
Repository: wicket
Updated Branches:
  refs/heads/wicket-6.x bc88aca39 -> b29055db8


WICKET-6288 assuming both component and the stateless state can't be correctly 
determined in a fresh page


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

Branch: refs/heads/wicket-6.x
Commit: b29055db8afff1fbbb5f83c92ea8148212ce7478
Parents: bc88aca
Author: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Authored: Mon Nov 28 04:04:25 2016 -0200
Committer: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Committed: Mon Nov 28 04:04:25 2016 -0200

--
 .../core/request/handler/ListenerInterfaceRequestHandler.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/b29055db/wicket-core/src/main/java/org/apache/wicket/core/request/handler/ListenerInterfaceRequestHandler.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/ListenerInterfaceRequestHandler.java
 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/ListenerInterfaceRequestHandler.java
index e97ed76..14e7cd0 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/ListenerInterfaceRequestHandler.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/ListenerInterfaceRequestHandler.java
@@ -191,7 +191,7 @@ public class ListenerInterfaceRequestHandler
: RedirectPolicy.AUTO_REDIRECT;
final IPageProvider pageProvider = new PageProvider(page);
 
-   if (freshPage && pageComponentProvider.getPageId() != null && 
(isStateless == false || component == null))
+   if (freshPage && (pageComponentProvider.getPageId() != null || 
component == null))
{
// A listener interface is invoked on an expired page.
 



wicket git commit: WICKET-6288 using the page_id to check if the page was expired

2016-11-27 Thread pedro
Repository: wicket
Updated Branches:
  refs/heads/wicket-6.x ac369b16e -> bc88aca39


WICKET-6288 using the page_id to check if the page was expired


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

Branch: refs/heads/wicket-6.x
Commit: bc88aca39f514ea9b166d339a9f8821a6d480f4a
Parents: ac369b1
Author: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Authored: Mon Nov 28 03:23:37 2016 -0200
Committer: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Committed: Mon Nov 28 03:23:37 2016 -0200

--
 .../ListenerInterfaceRequestHandler.java|  2 +-
 .../ListenerInterfaceRequestHandlerTest.java| 54 
 2 files changed, 55 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/bc88aca3/wicket-core/src/main/java/org/apache/wicket/core/request/handler/ListenerInterfaceRequestHandler.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/ListenerInterfaceRequestHandler.java
 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/ListenerInterfaceRequestHandler.java
index 360a55d..e97ed76 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/ListenerInterfaceRequestHandler.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/ListenerInterfaceRequestHandler.java
@@ -191,7 +191,7 @@ public class ListenerInterfaceRequestHandler
: RedirectPolicy.AUTO_REDIRECT;
final IPageProvider pageProvider = new PageProvider(page);
 
-   if (freshPage && (isStateless == false || component == null))
+   if (freshPage && pageComponentProvider.getPageId() != null && 
(isStateless == false || component == null))
{
// A listener interface is invoked on an expired page.
 

http://git-wip-us.apache.org/repos/asf/wicket/blob/bc88aca3/wicket-core/src/test/java/org/apache/wicket/core/request/handler/ListenerInterfaceRequestHandlerTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/core/request/handler/ListenerInterfaceRequestHandlerTest.java
 
b/wicket-core/src/test/java/org/apache/wicket/core/request/handler/ListenerInterfaceRequestHandlerTest.java
index 30416c8..306d65e 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/core/request/handler/ListenerInterfaceRequestHandlerTest.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/core/request/handler/ListenerInterfaceRequestHandlerTest.java
@@ -16,6 +16,8 @@
  */
 package org.apache.wicket.core.request.handler;
 
+import static org.hamcrest.CoreMatchers.is;
+
 import java.io.IOException;
 import java.text.ParseException;
 
@@ -27,16 +29,25 @@ import org.apache.wicket.WicketRuntimeException;
 import org.apache.wicket.WicketTestCase;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.markup.html.AjaxLink;
+import org.apache.wicket.core.request.mapper.MountedMapper;
+import org.apache.wicket.markup.IMarkupFragment;
 import org.apache.wicket.markup.IMarkupResourceStreamProvider;
+import org.apache.wicket.markup.Markup;
 import org.apache.wicket.markup.html.WebPage;
 import org.apache.wicket.markup.html.form.IOnChangeListener;
 import org.apache.wicket.markup.html.link.ILinkListener;
+import org.apache.wicket.markup.html.link.Link;
+import org.apache.wicket.markup.html.link.StatelessLink;
+import org.apache.wicket.request.IRequestCycle;
 import org.apache.wicket.request.Url;
+import org.apache.wicket.request.mapper.parameter.PageParameters;
 import org.apache.wicket.resource.DummyPage;
 import org.apache.wicket.util.resource.IResourceStream;
 import org.apache.wicket.util.resource.ResourceStreamNotFoundException;
 import org.apache.wicket.util.resource.StringResourceStream;
+import org.hamcrest.CoreMatchers;
 import org.junit.Test;
+import org.mockito.Mockito;
 
 /**
  * Tests for {@link ListenerInterfaceRequestHandler}
@@ -154,4 +165,47 @@ public class ListenerInterfaceRequestHandlerTest extends 
WicketTestCase
assertFalse("Handler should not report a page instance is 
available ",
handler.isPageInstanceCreated());
}
+
+   @Test
+   public void skipListenerIfExpiredPage()
+   {
+   
tester.getApplication().getRootRequestMapperAsCompound().add(new 
MountedMapper("/segment", NotExpiredPage.class));
+   tester.startPage(NotExpiredP

[jira] [Assigned] (WICKET-6288) StatelessLink not working

2016-11-27 Thread Pedro Santos (JIRA)

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

Pedro Santos reassigned WICKET-6288:


Assignee: Pedro Santos

> StatelessLink not working
> -
>
> Key: WICKET-6288
> URL: https://issues.apache.org/jira/browse/WICKET-6288
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 6.25.0
>Reporter: Dmitry Malyshev
>Assignee: Pedro Santos
> Attachments: wicketerror.zip
>
>
> Example:
> {code:title=TestPage.html|borderStyle=solid}
> 
> http://wicket.apache.org/;>
> 
> statelessLink
> statefullLink
> 
> 
> {code}
> {code:title=TestPage.java|borderStyle=solid}
> public class TestPage extends WebPage {
> public TestPage(PageParameters pageParameters) {
> super(pageParameters);
> add(new StatelessLink("statelessLink") {
> @Override
> public void onClick() {
> System.err.println("statelessLink.onClick()");
> }
> });
> add(new Link("statefullLink") {
> @Override
> public void onClick() {
> System.err.println("statefullLink.onClick()");
> }
> });
> }
> @Override
> protected void onBeforeRender() {
> get("statefullLink").setVisible(false);
> super.onBeforeRender();
> }
> }
> {code}
> So, StatelessLink not working in this case.
> And if i remove the row get("statefullLink").setVisible(false); it works 
> succesfull.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


wicket git commit: documentation fix

2016-11-20 Thread pedro
Repository: wicket
Updated Branches:
  refs/heads/wicket-7.x 6e8808cc1 -> f5a774318


documentation fix


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

Branch: refs/heads/wicket-7.x
Commit: f5a774318f98bc35e2a2e884d6b200d7c799c544
Parents: 6e8808c
Author: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Authored: Mon Nov 21 01:44:44 2016 -0200
Committer: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Committed: Mon Nov 21 01:44:44 2016 -0200

--
 .../apache/wicket/request/mapper/parameter/PageParametersTest.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/f5a77431/wicket-request/src/test/java/org/apache/wicket/request/mapper/parameter/PageParametersTest.java
--
diff --git 
a/wicket-request/src/test/java/org/apache/wicket/request/mapper/parameter/PageParametersTest.java
 
b/wicket-request/src/test/java/org/apache/wicket/request/mapper/parameter/PageParametersTest.java
index d4fb2ad..27b44af 100644
--- 
a/wicket-request/src/test/java/org/apache/wicket/request/mapper/parameter/PageParametersTest.java
+++ 
b/wicket-request/src/test/java/org/apache/wicket/request/mapper/parameter/PageParametersTest.java
@@ -295,7 +295,7 @@ public class PageParametersTest extends Assert
}
 
/**
-* NamedPairs equality should not depend on the type
+* NamedPairs equality should not depend on the order
 *
 * https://issues.apache.org/jira/browse/WICKET-6283
 */



[jira] [Resolved] (WICKET-6283) Page parameter equality should not depend on named parameters order

2016-11-20 Thread Pedro Santos (JIRA)

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

Pedro Santos resolved WICKET-6283.
--
   Resolution: Fixed
Fix Version/s: 8.0.0-M3
   7.6.0

> Page parameter equality should not depend on named parameters order
> ---
>
> Key: WICKET-6283
> URL: https://issues.apache.org/jira/browse/WICKET-6283
> Project: Wicket
>  Issue Type: Bug
>Affects Versions: 8.0.0-M2, 7.5.0
>Reporter: Pedro Santos
>Assignee: Pedro Santos
> Fix For: 7.6.0, 8.0.0-M3
>
>
> Wicket is falling to find the page instance for its request when the named 
> parameters order differs from page's PagePamameter#namedParameter.
> MountMapper, for instance first, decodes query parameters after the ? sign 
> before the named parameters encoded in the URL segments. So:
> the URL: segument/example?cid=0
> decoded by: new MountMapper(MyPage.class, "segment/${my_name}");
> is decoded as: cid=0, my_name=example
> While there is no guarantee, nor documented requirement, that the page should 
> set named parameters in an specific order, Wicket should ignore it and map 
> the request to the page instance regardless of the named parameters order.
> Wicket 6 is not affected since this order test was add during WICKET-4441 to 
> versions 7+



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (WICKET-6257) Page instance isn't mapped to an URL just after the 'cid' parameter is add

2016-11-20 Thread Pedro Santos (JIRA)

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

Pedro Santos resolved WICKET-6257.
--
   Resolution: Fixed
Fix Version/s: 8.0.0-M3
   7.6.0

> Page instance isn't mapped to an URL just after the 'cid' parameter is add
> --
>
> Key: WICKET-6257
> URL: https://issues.apache.org/jira/browse/WICKET-6257
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-cdi
>Reporter: Pedro Santos
>Assignee: Pedro Santos
> Fix For: 7.6.0, 8.0.0-M3
>
>
> CDI module redirects users to an URL containing the cid parameter as soon as 
> a conversation is marked as long running. The problem is that this parameter 
> isn't add to the page instance as soon it is redirected and causes the server 
> to fail to find it since Wicket 7 (after WICKET-4441) checks if the request 
> parameters matches with the parameters in the requested page.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[2/2] wicket git commit: WICKET-6283 ignoring named parameters order when testing PageParameter equality

2016-11-20 Thread pedro
WICKET-6283 ignoring named parameters order when testing PageParameter equality


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

Branch: refs/heads/master
Commit: d4347f2074cbe2b7e7496132429736f73666f672
Parents: dedc55c
Author: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Authored: Mon Nov 21 01:26:17 2016 -0200
Committer: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Committed: Mon Nov 21 01:40:30 2016 -0200

--
 wicket-request/pom.xml   |  4 
 .../request/mapper/parameter/PageParameters.java |  3 ++-
 .../mapper/parameter/PageParametersTest.java | 19 +++
 3 files changed, 25 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/d4347f20/wicket-request/pom.xml
--
diff --git a/wicket-request/pom.xml b/wicket-request/pom.xml
index 5d60da7..af460ff 100755
--- a/wicket-request/pom.xml
+++ b/wicket-request/pom.xml
@@ -30,5 +30,9 @@
   org.apache.wicket
   wicket-util
 
+
+  org.apache.commons
+  commons-collections4
+
   
 

http://git-wip-us.apache.org/repos/asf/wicket/blob/d4347f20/wicket-request/src/main/java/org/apache/wicket/request/mapper/parameter/PageParameters.java
--
diff --git 
a/wicket-request/src/main/java/org/apache/wicket/request/mapper/parameter/PageParameters.java
 
b/wicket-request/src/main/java/org/apache/wicket/request/mapper/parameter/PageParameters.java
index f283a80..2df4a9e 100644
--- 
a/wicket-request/src/main/java/org/apache/wicket/request/mapper/parameter/PageParameters.java
+++ 
b/wicket-request/src/main/java/org/apache/wicket/request/mapper/parameter/PageParameters.java
@@ -24,6 +24,7 @@ import java.util.List;
 import java.util.Set;
 import java.util.TreeSet;
 
+import org.apache.commons.collections4.CollectionUtils;
 import org.apache.wicket.request.IRequestMapper;
 import org.apache.wicket.util.io.IClusterable;
 import org.apache.wicket.util.lang.Args;
@@ -466,7 +467,7 @@ public class PageParameters implements IClusterable, 
IIndexedParameters, INamedP
if (other.namedParameters != null)
return false;
}
-   else if (!namedParameters.equals(other.namedParameters))
+   else if (!CollectionUtils.isEqualCollection(namedParameters, 
other.namedParameters))
return false;
return true;
}

http://git-wip-us.apache.org/repos/asf/wicket/blob/d4347f20/wicket-request/src/test/java/org/apache/wicket/request/mapper/parameter/PageParametersTest.java
--
diff --git 
a/wicket-request/src/test/java/org/apache/wicket/request/mapper/parameter/PageParametersTest.java
 
b/wicket-request/src/test/java/org/apache/wicket/request/mapper/parameter/PageParametersTest.java
index 155ecbe..27b44af 100644
--- 
a/wicket-request/src/test/java/org/apache/wicket/request/mapper/parameter/PageParametersTest.java
+++ 
b/wicket-request/src/test/java/org/apache/wicket/request/mapper/parameter/PageParametersTest.java
@@ -295,6 +295,25 @@ public class PageParametersTest extends Assert
}
 
/**
+* NamedPairs equality should not depend on the order
+*
+* https://issues.apache.org/jira/browse/WICKET-6283
+*/
+   @Test
+   public void equalityOfDiferenteNamedParametersOrder()
+   {
+   PageParameters p1 = new PageParameters()
+   .add("a", "b")
+   .add("c", "d");
+
+   PageParameters p2 = new PageParameters()
+   .add("c", "d")
+   .add("a", "b");
+
+   assertThat(p1, is(equalTo(p2)));
+   }
+
+   /**
 * NamedPairs hashCode should not depend on the type
 *
 * https://issues.apache.org/jira/browse/WICKET-5669



[1/2] wicket git commit: WICKET-6257 adding the cid parameter to a page as soon as ConversationPropagator detects it

2016-11-20 Thread pedro
Repository: wicket
Updated Branches:
  refs/heads/master 4dc4fa92c -> d4347f207


WICKET-6257 adding the cid parameter to a page as soon as 
ConversationPropagator detects it


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

Branch: refs/heads/master
Commit: dedc55c6c153e4e830b75a38176433900f7f9f4b
Parents: 4dc4fa9
Author: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Authored: Mon Nov 21 00:57:46 2016 -0200
Committer: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Committed: Mon Nov 21 01:28:25 2016 -0200

--
 .../wicket/cdi/ConversationPropagator.java  |  2 +-
 .../wicket/cdi/ConversationPropagatorTest.java  | 50 
 .../cdi/testapp/TestConversationPage.java   |  2 +
 3 files changed, 53 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/dedc55c6/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/ConversationPropagator.java
--
diff --git 
a/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/ConversationPropagator.java
 
b/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/ConversationPropagator.java
index 8c57e87..a366c8c 100644
--- 
a/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/ConversationPropagator.java
+++ 
b/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/ConversationPropagator.java
@@ -123,7 +123,7 @@ public class ConversationPropagator implements 
IRequestCycleListener
}
 
@Override
-   public void onRequestHandlerScheduled(RequestCycle cycle, 
IRequestHandler handler)
+   public void onRequestHandlerExecuted(RequestCycle cycle, 
IRequestHandler handler)
{
// propagate current non-transient conversation to the newly 
scheduled
// page

http://git-wip-us.apache.org/repos/asf/wicket/blob/dedc55c6/wicket-cdi-1.1/src/test/java/org/apache/wicket/cdi/ConversationPropagatorTest.java
--
diff --git 
a/wicket-cdi-1.1/src/test/java/org/apache/wicket/cdi/ConversationPropagatorTest.java
 
b/wicket-cdi-1.1/src/test/java/org/apache/wicket/cdi/ConversationPropagatorTest.java
index eefebde..945c9cf 100644
--- 
a/wicket-cdi-1.1/src/test/java/org/apache/wicket/cdi/ConversationPropagatorTest.java
+++ 
b/wicket-cdi-1.1/src/test/java/org/apache/wicket/cdi/ConversationPropagatorTest.java
@@ -16,9 +16,14 @@
  */
 package org.apache.wicket.cdi;
 
+import javax.enterprise.context.Conversation;
+import javax.inject.Inject;
+
 import org.apache.wicket.cdi.testapp.TestConversationPage;
 import org.apache.wicket.cdi.testapp.TestConversationalPage;
+import org.apache.wicket.core.request.mapper.MountedMapper;
 import org.apache.wicket.request.mapper.parameter.PageParameters;
+import org.hamcrest.CoreMatchers;
 import org.junit.Test;
 
 /**
@@ -26,6 +31,9 @@ import org.junit.Test;
  */
 public class ConversationPropagatorTest extends WicketCdiTestCase
 {
+   @Inject
+   Conversation conversation;
+
@Test
public void testAutoConversationNonBookmarkable()
{
@@ -89,6 +97,47 @@ public class ConversationPropagatorTest extends 
WicketCdiTestCase
}
 
@Test
+   public void testPropagationAllHybrid()
+   {
+   configure(new 
CdiConfiguration().setPropagation(ConversationPropagation.ALL));
+   
tester.getApplication().getRootRequestMapperAsCompound().add(new 
MountedMapper("segment/${pageType}", TestConversationPage.class));
+
+   tester.startPage(TestConversationPage.class, new 
PageParameters().add("pageType", "hybrid"));
+
+   int i;
+   for (i = 0; i < 3; i++)
+   {
+   tester.assertCount(i);
+   tester.clickLink("increment");
+   }
+   tester.clickLink("next");
+   for (; i < 6; i++)
+   {
+   tester.assertCount(i);
+   tester.clickLink("increment");
+   }
+   }
+
+   /**
+* https://issues.apache.org/jira/browse/WICKET-6257
+*/
+   @Test
+   public void testPropagationAllHybridRefresh()
+   {
+   configure(new 
CdiConfiguration().setPropagation(ConversationPropagation.ALL));
+   
tester.getApplication().getRootRequestMapperAsCompound().add(new 
MountedMapper("segment/${pageType}", TestConversationPage.class));
+
+   tester.startPage(TestConversationPage.class, new 
PageParameters().add(&

[1/2] wicket git commit: WICKET-6257 adding the cid parameter to a page as soon as ConversationPropagator detects it

2016-11-20 Thread pedro
Repository: wicket
Updated Branches:
  refs/heads/wicket-7.x a1fd7ec53 -> 6e8808cc1


WICKET-6257 adding the cid parameter to a page as soon as 
ConversationPropagator detects it


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

Branch: refs/heads/wicket-7.x
Commit: fac2d71c0bbbf478e4da9ea9e629b46d9ba05b31
Parents: a1fd7ec
Author: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Authored: Mon Nov 21 00:57:46 2016 -0200
Committer: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Committed: Mon Nov 21 00:57:46 2016 -0200

--
 .../wicket/cdi/ConversationPropagator.java  |  2 +-
 .../wicket/cdi/ConversationPropagatorTest.java  | 50 
 .../cdi/testapp/TestConversationPage.java   |  2 +
 3 files changed, 53 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/fac2d71c/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/ConversationPropagator.java
--
diff --git 
a/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/ConversationPropagator.java
 
b/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/ConversationPropagator.java
index 4ff61eb..bdffc18 100644
--- 
a/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/ConversationPropagator.java
+++ 
b/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/ConversationPropagator.java
@@ -124,7 +124,7 @@ public class ConversationPropagator extends 
AbstractRequestCycleListener
}
 
@Override
-   public void onRequestHandlerScheduled(RequestCycle cycle, 
IRequestHandler handler)
+   public void onRequestHandlerExecuted(RequestCycle cycle, 
IRequestHandler handler)
{
// propagate current non-transient conversation to the newly 
scheduled
// page

http://git-wip-us.apache.org/repos/asf/wicket/blob/fac2d71c/wicket-cdi-1.1/src/test/java/org/apache/wicket/cdi/ConversationPropagatorTest.java
--
diff --git 
a/wicket-cdi-1.1/src/test/java/org/apache/wicket/cdi/ConversationPropagatorTest.java
 
b/wicket-cdi-1.1/src/test/java/org/apache/wicket/cdi/ConversationPropagatorTest.java
index eefebde..945c9cf 100644
--- 
a/wicket-cdi-1.1/src/test/java/org/apache/wicket/cdi/ConversationPropagatorTest.java
+++ 
b/wicket-cdi-1.1/src/test/java/org/apache/wicket/cdi/ConversationPropagatorTest.java
@@ -16,9 +16,14 @@
  */
 package org.apache.wicket.cdi;
 
+import javax.enterprise.context.Conversation;
+import javax.inject.Inject;
+
 import org.apache.wicket.cdi.testapp.TestConversationPage;
 import org.apache.wicket.cdi.testapp.TestConversationalPage;
+import org.apache.wicket.core.request.mapper.MountedMapper;
 import org.apache.wicket.request.mapper.parameter.PageParameters;
+import org.hamcrest.CoreMatchers;
 import org.junit.Test;
 
 /**
@@ -26,6 +31,9 @@ import org.junit.Test;
  */
 public class ConversationPropagatorTest extends WicketCdiTestCase
 {
+   @Inject
+   Conversation conversation;
+
@Test
public void testAutoConversationNonBookmarkable()
{
@@ -89,6 +97,47 @@ public class ConversationPropagatorTest extends 
WicketCdiTestCase
}
 
@Test
+   public void testPropagationAllHybrid()
+   {
+   configure(new 
CdiConfiguration().setPropagation(ConversationPropagation.ALL));
+   
tester.getApplication().getRootRequestMapperAsCompound().add(new 
MountedMapper("segment/${pageType}", TestConversationPage.class));
+
+   tester.startPage(TestConversationPage.class, new 
PageParameters().add("pageType", "hybrid"));
+
+   int i;
+   for (i = 0; i < 3; i++)
+   {
+   tester.assertCount(i);
+   tester.clickLink("increment");
+   }
+   tester.clickLink("next");
+   for (; i < 6; i++)
+   {
+   tester.assertCount(i);
+   tester.clickLink("increment");
+   }
+   }
+
+   /**
+* https://issues.apache.org/jira/browse/WICKET-6257
+*/
+   @Test
+   public void testPropagationAllHybridRefresh()
+   {
+   configure(new 
CdiConfiguration().setPropagation(ConversationPropagation.ALL));
+   
tester.getApplication().getRootRequestMapperAsCompound().add(new 
MountedMapper("segment/${pageType}", TestConversationPage.class));
+
+   tester.startPage(TestConversationPa

[2/2] wicket git commit: WICKET-6283 ignoring named parameters order when testing PageParameter equality

2016-11-20 Thread pedro
WICKET-6283 ignoring named parameters order when testing PageParameter equality


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

Branch: refs/heads/wicket-7.x
Commit: 6e8808cc199d1804326be3d84f061b5232779513
Parents: fac2d71
Author: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Authored: Mon Nov 21 01:26:17 2016 -0200
Committer: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Committed: Mon Nov 21 01:26:17 2016 -0200

--
 wicket-request/pom.xml   |  4 
 .../request/mapper/parameter/PageParameters.java |  3 ++-
 .../mapper/parameter/PageParametersTest.java | 19 +++
 3 files changed, 25 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/6e8808cc/wicket-request/pom.xml
--
diff --git a/wicket-request/pom.xml b/wicket-request/pom.xml
index 780bb04..af5a117 100755
--- a/wicket-request/pom.xml
+++ b/wicket-request/pom.xml
@@ -30,5 +30,9 @@
   org.apache.wicket
   wicket-util
 
+
+  org.apache.commons
+  commons-collections4
+
   
 

http://git-wip-us.apache.org/repos/asf/wicket/blob/6e8808cc/wicket-request/src/main/java/org/apache/wicket/request/mapper/parameter/PageParameters.java
--
diff --git 
a/wicket-request/src/main/java/org/apache/wicket/request/mapper/parameter/PageParameters.java
 
b/wicket-request/src/main/java/org/apache/wicket/request/mapper/parameter/PageParameters.java
index f283a80..2df4a9e 100644
--- 
a/wicket-request/src/main/java/org/apache/wicket/request/mapper/parameter/PageParameters.java
+++ 
b/wicket-request/src/main/java/org/apache/wicket/request/mapper/parameter/PageParameters.java
@@ -24,6 +24,7 @@ import java.util.List;
 import java.util.Set;
 import java.util.TreeSet;
 
+import org.apache.commons.collections4.CollectionUtils;
 import org.apache.wicket.request.IRequestMapper;
 import org.apache.wicket.util.io.IClusterable;
 import org.apache.wicket.util.lang.Args;
@@ -466,7 +467,7 @@ public class PageParameters implements IClusterable, 
IIndexedParameters, INamedP
if (other.namedParameters != null)
return false;
}
-   else if (!namedParameters.equals(other.namedParameters))
+   else if (!CollectionUtils.isEqualCollection(namedParameters, 
other.namedParameters))
return false;
return true;
}

http://git-wip-us.apache.org/repos/asf/wicket/blob/6e8808cc/wicket-request/src/test/java/org/apache/wicket/request/mapper/parameter/PageParametersTest.java
--
diff --git 
a/wicket-request/src/test/java/org/apache/wicket/request/mapper/parameter/PageParametersTest.java
 
b/wicket-request/src/test/java/org/apache/wicket/request/mapper/parameter/PageParametersTest.java
index 155ecbe..d4fb2ad 100644
--- 
a/wicket-request/src/test/java/org/apache/wicket/request/mapper/parameter/PageParametersTest.java
+++ 
b/wicket-request/src/test/java/org/apache/wicket/request/mapper/parameter/PageParametersTest.java
@@ -295,6 +295,25 @@ public class PageParametersTest extends Assert
}
 
/**
+* NamedPairs equality should not depend on the type
+*
+* https://issues.apache.org/jira/browse/WICKET-6283
+*/
+   @Test
+   public void equalityOfDiferenteNamedParametersOrder()
+   {
+   PageParameters p1 = new PageParameters()
+   .add("a", "b")
+   .add("c", "d");
+
+   PageParameters p2 = new PageParameters()
+   .add("c", "d")
+   .add("a", "b");
+
+   assertThat(p1, is(equalTo(p2)));
+   }
+
+   /**
 * NamedPairs hashCode should not depend on the type
 *
 * https://issues.apache.org/jira/browse/WICKET-5669



[jira] [Created] (WICKET-6283) Page parameter equality should not depend on named parameters order

2016-11-20 Thread Pedro Santos (JIRA)
Pedro Santos created WICKET-6283:


 Summary: Page parameter equality should not depend on named 
parameters order
 Key: WICKET-6283
 URL: https://issues.apache.org/jira/browse/WICKET-6283
 Project: Wicket
  Issue Type: Bug
Affects Versions: 7.5.0, 8.0.0-M2
Reporter: Pedro Santos
Assignee: Pedro Santos


Wicket is falling to find the page instance for its request when the named 
parameters order differs from page's PagePamameter#namedParameter.

MountMapper, for instance first, decodes query parameters after the ? sign 
before the named parameters encoded in the URL segments. So:

the URL: segument/example?cid=0

decoded by: new MountMapper(MyPage.class, "segment/${my_name}");

is decoded as: cid=0, my_name=example

While there is no guarantee, nor documented requirement, that the page should 
set named parameters in an specific order, Wicket should ignore it and map the 
request to the page instance regardless of the named parameters order.

Wicket 6 is not affected since this order test was add during WICKET-4441 to 
versions 7+



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[1/2] wicket git commit: changes to notice files

2016-11-09 Thread pedro
Repository: wicket
Updated Branches:
  refs/heads/build/wicket-1.5.17 [created] 68df4483c


changes to notice files


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

Branch: refs/heads/build/wicket-1.5.17
Commit: 68df4483c9fe427ce0ceb38c1f72cd9d65abfab0
Parents: 59594f7
Author: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Authored: Wed Oct 26 03:51:02 2016 +
Committer: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Committed: Wed Oct 26 03:51:02 2016 +

--
 NOTICE | 78 ++---
 1 file changed, 39 insertions(+), 39 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/68df4483/NOTICE
--
diff --git a/NOTICE b/NOTICE
index 61a0b9b..aa43a21 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,5 +1,5 @@
 Apache Wicket
-Copyright 2006-2012 The Apache Software Foundation
+Copyright 2006-2016 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).
@@ -12,10 +12,45 @@ NB: DO NOT ADD LICENSES/NOTICES/ATTRIBUTIONS TO THIS FILE, 
BUT IN THE
 AUTOMATICALLY INCLUDE THE NOTICE IN THIS FILE.
 
 ---
+src/./wicket-core
+---
+   Apache Wicket
+   Copyright 2006-2011 Apache Software Foundation
+
+   This product includes software developed at
+   The Apache Software Foundation (http://www.apache.org/).
+
+   This product includes software from QOS.ch (http://slf4j.org) licensed 
under the X11 license
+   Copyright (c) 2004-2008 QOS.ch
+   
+   Contains Diff library from Mavens JRCS, released under
+   The Apache Software License, Version 1.1.
+   (c) 1999-2003
+
+   org.apache.wicket.markup.html.form.upload.MultiFileUploadField.js is taken 
from [1]
+   and has the following notice:
+  "Licence:
+   Use this however/wherever you like, just don't blame me if it breaks
+   anything.
+
+   Credit:
+   If you're nice, you'll leave this bit:
+
+   Class by Stickman -- http://www.the-stickman.com
+   with thanks to:
+   [for Safari fixes]
+  Luis Torrefranca -- http://www.law.pitt.edu
+  and
+  Shawn Parker & John Pennypacker -- http://www.fuzzycoconut.com
+   [for duplicate name bug]
+  'neal'"
+   [1]: 
http://the-stickman.com/web-development/javascript/upload-multiple-files-with-a-single-file-element/
+
+---
 src/./wicket-guice
 ---
Apache Wicket
-   Copyright 2006-2012 Apache Software Foundation
+   Copyright 2006-2011 Apache Software Foundation
 
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
@@ -26,7 +61,7 @@ src/./wicket-guice
 src/./wicket-examples
 ---
Apache Wicket Examples
-   Copyright 2006-2012 Apache Software Foundation
+   Copyright 2006-2011 Apache Software Foundation
 
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
@@ -66,45 +101,10 @@ src/./wicket-examples
which is released under CDDL 1.0 license 
(http://www.opensource.org/licenses/cddl1.php).
 
 ---
-src/./wicket-core

-   Apache Wicket
-   Copyright 2006-2012 Apache Software Foundation
-
-   This product includes software developed at
-   The Apache Software Foundation (http://www.apache.org/).
-
-   This product includes software from QOS.ch (http://slf4j.org) licensed 
under the X11 license
-   Copyright (c) 2004-2008 QOS.ch
-   
-   Contains Diff library from Mavens JRCS, released under
-   The Apache Software License, Version 1.1.
-   (c) 1999-2003
-
-   org.apache.wicket.markup.html.form.upload.MultiFileUploadField.js is taken 
from [1]
-   and has the following notice:
-  "Licence:
-   Use this however/wherever you like, just don't blame me if it breaks
-   anything.
-
-   Credit:
-   If you're nice, you'll leave this bit:
-
-   Class by Stickman -- http://www.the-stickman.com
-   with thanks to:
-   [for Safari fixes]
-  Luis Torrefranca -- http://www.law.pitt.edu
-  and
-  Shawn Pa

[2/2] wicket git commit: modified poms for release 1.5.17

2016-11-09 Thread pedro
modified poms for release 1.5.17


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

Branch: refs/heads/build/wicket-1.5.17
Commit: 59594f71c9ebe750587960b778af3d20d8735812
Parents: 485404a
Author: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Authored: Wed Oct 26 03:51:02 2016 +
Committer: Pedro Henrique Oliveira dos Santos <pe...@apache.org>
Committed: Wed Oct 26 03:51:02 2016 +

--
 archetypes/quickstart/pom.xml| 2 +-
 .../quickstart/src/main/resources/archetype-resources/pom.xml| 2 +-
 pom.xml  | 2 +-
 testing/wicket-threadtest/pom.xml| 2 +-
 wicket-auth-roles/pom.xml| 2 +-
 wicket-core/pom.xml  | 2 +-
 wicket-datetime/pom.xml  | 2 +-
 wicket-devutils/pom.xml  | 2 +-
 wicket-examples/pom.xml  | 2 +-
 wicket-extensions/pom.xml| 2 +-
 wicket-guice/pom.xml | 2 +-
 wicket-ioc/pom.xml   | 2 +-
 wicket-jmx/pom.xml   | 2 +-
 wicket-objectssizeof-agent/pom.xml   | 2 +-
 wicket-request/pom.xml   | 4 ++--
 wicket-spring/pom.xml| 2 +-
 wicket-util/pom.xml  | 4 ++--
 wicket-velocity/pom.xml  | 2 +-
 wicket/pom.xml   | 2 +-
 19 files changed, 21 insertions(+), 21 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/59594f71/archetypes/quickstart/pom.xml
--
diff --git a/archetypes/quickstart/pom.xml b/archetypes/quickstart/pom.xml
index 727c107..53183fa 100644
--- a/archetypes/quickstart/pom.xml
+++ b/archetypes/quickstart/pom.xml
@@ -3,7 +3,7 @@
   
org.apache.wicket
wicket-parent
-   1.5-SNAPSHOT
+   1.5.17
../../pom.xml
   
   

http://git-wip-us.apache.org/repos/asf/wicket/blob/59594f71/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml
--
diff --git 
a/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml 
b/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml
index 839b1ec..68fdc45 100644
--- a/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml
+++ b/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml
@@ -20,7 +20,7 @@



-   1.5-SNAPSHOT
+   1.5.17
7.5.0.v20110901



http://git-wip-us.apache.org/repos/asf/wicket/blob/59594f71/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 6c86b23..d6f3041 100644
--- a/pom.xml
+++ b/pom.xml
@@ -25,7 +25,7 @@
 
org.apache.wicket
wicket-parent
-   1.5-SNAPSHOT
+   1.5.17
pom
Wicket Parent
Wicket is a Java-based open source component web 
application framework.

http://git-wip-us.apache.org/repos/asf/wicket/blob/59594f71/testing/wicket-threadtest/pom.xml
--
diff --git a/testing/wicket-threadtest/pom.xml 
b/testing/wicket-threadtest/pom.xml
index f2ca2e3..cc26232 100644
--- a/testing/wicket-threadtest/pom.xml
+++ b/testing/wicket-threadtest/pom.xml
@@ -23,7 +23,7 @@

org.apache.wicket
wicket-parent
-   1.5-SNAPSHOT
+   1.5.17
../../pom.xml

 

http://git-wip-us.apache.org/repos/asf/wicket/blob/59594f71/wicket-auth-roles/pom.xml
--
diff --git a/wicket-auth-roles/pom.xml b/wicket-auth-roles/pom.xml
index 9f5631e..abacffa 100644
--- a/wicket-auth-roles/pom.xml
+++ b/wicket-auth-roles/pom.xml
@@ -23,7 +23,7 @@

org.apache.wicket
wicket-parent
-   1.5-SNAPSHOT
+   1.5.17
../pom.xml

 

http://git-wip-us.apache.org/repos/asf/wicket/blob/59594f71/wicket-

svn commit: r16728 - in /dev/wicket/1.5.17: apache-wicket-1.5.17-source.tgz apache-wicket-1.5.17-source.tgz.asc apache-wicket-1.5.17-source.tgz.md5 apache-wicket-1.5.17-source.tgz.sha

2016-10-27 Thread pedro
Author: pedro
Date: Fri Oct 28 02:46:48 2016
New Revision: 16728

Log:
Upload wicket-1.5.17 source to staging area

Added:
dev/wicket/1.5.17/apache-wicket-1.5.17-source.tgz   (with props)
dev/wicket/1.5.17/apache-wicket-1.5.17-source.tgz.asc
dev/wicket/1.5.17/apache-wicket-1.5.17-source.tgz.md5
dev/wicket/1.5.17/apache-wicket-1.5.17-source.tgz.sha

Added: dev/wicket/1.5.17/apache-wicket-1.5.17-source.tgz
==
Binary file - no diff available.

Propchange: dev/wicket/1.5.17/apache-wicket-1.5.17-source.tgz
--
svn:mime-type = application/octet-stream

Added: dev/wicket/1.5.17/apache-wicket-1.5.17-source.tgz.asc
==
--- dev/wicket/1.5.17/apache-wicket-1.5.17-source.tgz.asc (added)
+++ dev/wicket/1.5.17/apache-wicket-1.5.17-source.tgz.asc Fri Oct 28 02:46:48 
2016
@@ -0,0 +1,17 @@
+-BEGIN PGP SIGNATURE-
+Version: GnuPG v1
+
+iQIcBAABCAAGBQJYECyzAAoJEE1Ddki0pKiKed8P/iRMZ/ugjUKW2dUQ2AJqz5dS
+pGrlp/pRtj1aapMme8uV35dMKH2odFCXD6caX9z2FUSpo2f+RXnRfJAQktvaAsXe
+DqkF7R7hMJwaBN0OEVJEOTYoBIsx2pdhY28M8oJcYP0XI1TjMoTPbUlelBhg4zCV
+456g9KN2Kh4j0X7ZgOyV8BF8U/w3V0cfy5iZzCnmW2DSNnSlE5Nv9ETRFKPVVXz8
+JP7qvjVeKx09XSyNypedfV3NUjXdm/3t6x1seEW3Y6nMC+tIRkJh86IpYBMF4ebw
+tBj0+7mC0pQgELncJQZvoGPPREdlMxO9kezVgzTV4inDQYI8eb0X5orxhD1BpbvK
+4yNpOlJDaT03mMfgbEQeDJl5Nscdgvc11i4lthwsEhbxvRMEmNHzQikwuSIJxqTz
+CcD0uUVrSgfjxzUPdeY88WUGIJ1TsbERcdopvCwrN5p/cHysAiyIfzw+1/JBq6CM
+TiHog2YXq5Z4R+5js72bOGZ37Nbz7C1WMjErr06c0gaAERhCz2X+4OOoPTRbFWhN
+5FVDrBZ6c2l2ZiY3JlAPUE+d/hlUR1H7UsbOxudqcStYLyvvp1PS2/vV/APC3zaf
+o/+paR3dSS3PpePJS4d8CstYItohOKMA2SitYQB4WHPFXEl3WiYi0YVUFQdiPIQZ
+TmCMpJGEjPo6qlR5cmEv
+=Jm62
+-END PGP SIGNATURE-

Added: dev/wicket/1.5.17/apache-wicket-1.5.17-source.tgz.md5
==
--- dev/wicket/1.5.17/apache-wicket-1.5.17-source.tgz.md5 (added)
+++ dev/wicket/1.5.17/apache-wicket-1.5.17-source.tgz.md5 Fri Oct 28 02:46:48 
2016
@@ -0,0 +1,2 @@
+target/git/apache-wicket-1.5.17-source.tgz: 
+50 F8 88 7A 35 53 DC 8D  3C 02 18 2F CF E1 DB 5D

Added: dev/wicket/1.5.17/apache-wicket-1.5.17-source.tgz.sha
==
--- dev/wicket/1.5.17/apache-wicket-1.5.17-source.tgz.sha (added)
+++ dev/wicket/1.5.17/apache-wicket-1.5.17-source.tgz.sha Fri Oct 28 02:46:48 
2016
@@ -0,0 +1,2 @@
+target/git/apache-wicket-1.5.17-source.tgz: 
+28B4 C867 EE74 C4D3 3007  45BB 0269 906F 78FA B223




svn commit: r16727 - in /dev/wicket: 1.5.17/CHANGELOG-1.5 CHANGELOG-1.5

2016-10-27 Thread pedro
Author: pedro
Date: Fri Oct 28 02:39:07 2016
New Revision: 16727

Log:
moving CHANGELOG to the release directory (send by mistake to Wicket root)

Added:
dev/wicket/1.5.17/CHANGELOG-1.5
  - copied unchanged from r16726, dev/wicket/CHANGELOG-1.5
Removed:
dev/wicket/CHANGELOG-1.5



svn commit: r16726 - in /dev/wicket: LICENSE NOTICE README pom.xml release-igor.sh release-martin.sh release.sh wicket-assembly-all.xml

2016-10-27 Thread pedro
Author: pedro
Date: Fri Oct 28 02:38:32 2016
New Revision: 16726

Log:
removing files sent by mistake to the staging area

Removed:
dev/wicket/LICENSE
dev/wicket/NOTICE
dev/wicket/README
dev/wicket/pom.xml
dev/wicket/release-igor.sh
dev/wicket/release-martin.sh
dev/wicket/release.sh
dev/wicket/wicket-assembly-all.xml



svn commit: r16725 - in /dev/wicket: 1.5.17/binaries/ binaries/

2016-10-27 Thread pedro
Author: pedro
Date: Fri Oct 28 02:37:41 2016
New Revision: 16725

Log:
moving binaries to the release directory (send by mistake to Wicket root)

Added:
dev/wicket/1.5.17/binaries/
  - copied from r16724, dev/wicket/binaries/
Removed:
dev/wicket/binaries/



svn commit: r16724 - /dev/wicket/1.5.17/

2016-10-27 Thread pedro
Author: pedro
Date: Fri Oct 28 02:29:51 2016
New Revision: 16724

Log:
Create 1.5.17 release staging area for sources

Added:
dev/wicket/1.5.17/



svn commit: r16723 - /release/wicket/KEYS

2016-10-27 Thread pedro
Author: pedro
Date: Fri Oct 28 02:07:13 2016
New Revision: 16723

Log:
pedro's public key used for release signing

Modified:
release/wicket/KEYS

Modified: release/wicket/KEYS
==
--- release/wicket/KEYS (original)
+++ release/wicket/KEYS Fri Oct 28 02:07:13 2016
@@ -350,3 +350,62 @@ RsbKjcu3wZtaEu1Y3BiA1FIbcDBFS4blwR44pYJj
 5bBSOP6RDv4s6UwfvfA3
 =cnE6
 -END PGP PUBLIC KEY BLOCK-
+
+pub   4096R/B4A4A88A 2016-10-26
+uid  Pedro Henrique Oliveira dos Santos (RELEASE SIGNING KEY) 
<pe...@apache.org>
+sig 3B4A4A88A 2016-10-26  Pedro Henrique Oliveira dos Santos (RELEASE 
SIGNING KEY) <pe...@apache.org>
+sub   4096R/27C3B61C 2016-10-26
+sig  B4A4A88A 2016-10-26  Pedro Henrique Oliveira dos Santos (RELEASE 
SIGNING KEY) <pe...@apache.org>
+
+-BEGIN PGP PUBLIC KEY BLOCK-
+Version: GnuPG v1
+
+mQINBFgQIaYBEADOGgmSvwdsEqrZu63F/MkXnYPTjzUuFM37mcQIrlFWHS60Ckry
+VJtDsKMcy+WrZVanMFz7FDHsWFbL1Eu5bNY8sxO/e6MGmNBoc8p6faBEmbLpeW0a
+YzMqtMJZiFjSUV5m14KrLMwITZc3u9543rkOPYG7RcLqGlagEcRZbSL/prA6oFbR
+YmMFJId4HKpTjSQ1cP5KmGwj0Z2WavFg6ugyoXR9E7vs35o2B0d1e76+EyLUyeo2
+wehAA0g31d/lSC3XjfcBb9TzIVJxMfD9Xv0uioAIA0adPznaOfiUtf4MeuKFQYTw
+H1M0GHTWtFpPTY2l3z35EGdMnR3Uy2YjHTwbibPuSQUbm/MQVz67u+9WKxPZOsf1
+x2ZikbzOQ9OUySuXwZj5Vem1uG2XhX7xCn69PG8SiNMnXT3BX6Je+3tqAkbOinKA
+0somlYx+yt5YGkUywCvRGUiw5plQI50v+kTYV13hyXgLAKZWDiNYA8bd15N0XAAA
+TXPalj5/LR2SlDygDXQGNfSvvc/pZ4AxKfAr1gvDsK1M7D3f5iHI3VxJTwcN4cS0
++rhRnmwD2Uw85mAewVojVMHcvZb/e+I6DIWScElJwx5yN/NpH+VQI67B0xlRl5Pz
+jjL6PsX5rgyfCFkciRTb4BkZwAd+YoMzGUJZMHXRfwqyHVYryzPnv7PrmwARAQAB
+tEtQZWRybyBIZW5yaXF1ZSBPbGl2ZWlyYSBkb3MgU2FudG9zIChSRUxFQVNFIFNJ
+R05JTkcgS0VZKSA8cGVkcm9AYXBhY2hlLm9yZz6JAjcEEwEIACEFAlgQIaYCGwMF
+CwkIBwMFFQoJCAsFFgIDAQACHgECF4AACgkQTUN2SLSkqIr5TQ//blCkVDoV5kCt
+CEUQV2QoC4uIfUe5xmQLQl76xi8yqZn69G500gCf1Mx9SzRZK3s6+4QV9VFoLzuT
+H9FuaM5GtMSdxfVwx4ZMcZFAapWUDQCXfxS6ror7B4pXCmzEkqM/TwoBXwB5hWzx
++6fiohWooelsI8HKVNdSdTM74HXDTMdOoYfOHbrV7EexSL8ZkZuR+zz68v9rfo5t
+MT086Qcbl0IvWLFueT03RRZ7SjiXjX3DwrK5Vzhy+sfodCl2njUWj3/Bzen3qoG1
+0mPER/aebLP/Li/mDRCf3GeZ9FcalWyVJ5ofPfy6xhxc0jkevBVJGzGq/DlRsscx
+cNbF9AYR5cJ/84kLGTRLk/vOBEFId0JaZz2j7PDLgzNw4yQbziASiY7td/6SwXis
+KXm3gF42Ug1pXrPo46/koTq9TOZzzkOJj6ZBJ1mquYJc04arA3Nrm4iIVZhcY397
+l5LbbYQ00RoddtrGe/EbcgOuLqk2UsMZ6DfLuH+Je/OWeDRyB2mkptwSM0r3St9U
+HMLSoLImqH6nNHOtgIBxeNJndUYWnP3vQu0MZbsy0UEXzBiGb+1ddpZCbR9rxjWJ
+jz3bXMkShca8aRii7uA8X2MD/tP7UiGwFz0KkxPKIYZE2F1PWvzMIiCGfxiDbgN8
+ur/OX6W7CDIl8PBWKQVSqo/ZP+aGghO5Ag0EWBAhpgEQAMNW0JZVRfH9SbywvACk
+L2roTZ7k4KJ6McgfMKsckQ7kMCPpqJqFCoXYjy9oeqDDyrUcwpN9RIXl82vAV+7H
+u0lSoc0LL4RPhmke4x5maVUf8s9vA2gJ4jTMdwKo3vSI7xcLPnGRlBPKYpFDtmIU
+I5mOUDtVhpAMWDZ5lt1LwtaNvR89CqtVQs40LQAO3M47hFnmHHNkaOS7rPV2rHpl
+cwWDWMXD54XStRZp3SyWLnlFG99FqaTgLBbdxKO5xabRe5J3Z7snCvzo4n7Rm71w
+HqoGguGheI1cenV7kC3DPlFahTpmSBQzjVod7CVt2bVlidzWfqOsIFbs2+r0APjt
+y4D/3VU0dbek+hkFaTgCsZY8b26lWBjrN+OZYj891lrTR5DjkWKHZCTBNn7Uomnd
+1fhGPY/7/kWefGz727GyYWSFs4BdVNeL+XhNbbjjjJ9wWkYTJGRMw+JZ/F0d8KwW
+teZJS6Z0jNfBS5hbbOX7s08ACbf6+sqg5ELFTJJs7Vs/N3I014ZO4OxGqJHhAmxV
+U/7S9AqFUuOOrwFOW+H5tr1KzGME6XgjGtZ8+RssipBbBWCFq7hzNas9j4tuCR3j
+NvOF8tpTQ1QmJqfWVqKyY/XqPI1brySaVp/yD+Rxl1F5t/GQoEbPQO8I70znPfDP
+RsZg8lz9+/LS59H9SLR6fviNABEBAAGJAh8EGAEIAAkFAlgQIaYCGwwACgkQTUN2
+SLSkqIo65g/+IoGt1bpERSlEKYD1XVruWG9StSSV/jEEscWmVFS82+XtCEU9Vtlb
+5Odk8502mNaoYC32qwjlruA02gpXOiRHC/wNGoQkl8ltQITwD1t65rzpKQd2SbM7
+UoxyzAo1LYfhuT1sC3S2xTEkzc602OC9QPKf7L5KO8sOSApKiKVj1PEbzzrUSkq9
+HOJZh63rCsfuqTvfB0D+z6JSOnkeaM56Cwdd8XOBoUBxabDVFcnkFJ+iTdl2Gscl
+D9MylrokLO0Lc13jg1dAOWXVLvE5yLm6XIMAJOEvxXp5scP+i2uwVT7rlpI4gAZZ
+TQxn+1AREipXBLrtaQf6G1IS7nUeTnTeyEUR0E7/dofSElSOYJMV06DVxw9BSEbe
+6V9vLPZ6+TxlfPQ12+VH6lzxc2+dslDwj7ATEsha0O5SwF44whiP8GzPeCB3yX1z
+BPyS0bk/egypcWPaY822xsy1JP2a5KPERtbZCNrij9n7T4qnS47xTKwMsPXihEiU
+NSFtW7oPBfkP60gOdq7F6lNgcjRHjo8+7iJ1jHzMQ9cq/3gDTruoOkPrtEbws9u6
+lVw/shxEHmjfkXHibehGQv/hRlzvJa32DdH+c9/Pjgby2Z6eQA8njdF7To8tzgxL
+8qDWRvqu+0vDZq1kNiI+4TUDlb8lVb8D5Gg53xgfCX/4O2OugS7PW+M=
+=YLuq
+-END PGP PUBLIC KEY BLOCK-




svn commit: r16694 [2/3] - in /dev/wicket: ./ binaries/

2016-10-25 Thread pedro

Added: dev/wicket/CHANGELOG-1.5
==
--- dev/wicket/CHANGELOG-1.5 (added)
+++ dev/wicket/CHANGELOG-1.5 Wed Oct 26 04:30:46 2016
@@ -0,0 +1,1598 @@
+This file contains all changes done on the 1.5 version.
+
+Release Notes - Wicket - Version 1.5.14
+
+** Bug
+* [WICKET-5838] - Last-modified header of external markup is ignored
+* [WICKET-5927] - Velocity remote code execution
+* [WICKET-6000] - Wicket 1.5 DTD link on website does not point to valid 
location
+* [WICKET-6005] - WicketRuntimeException from 
AjaxPagingNavigator#onAjaxEvent
+
+** Improvement
+* [WICKET-5974] - Change AjaxPagingNavigator#onAjaxEvent() to only 
consider parent components that have setOutputMarkupId(true)
+
+
+Release Notes - Wicket - Version 1.5.13
+
+** Bug
+* [WICKET-5714] - MockHttpServletRequest.buildRequest() should work for 
parameters with multiple values with multipart content type
+
+** Improvement
+* [WICKET-5756] - Allow to use custom ciphers when using SunJceCrypt class
+
+
+Release Notes - Wicket - Version 1.5.12
+
+** Bug
+* [WICKET-5491] - Wicket.DateTime.getViewportHeight() returning undefined 
on IE8, positions calendar out of viewport
+* [WICKET-5492] - WebApplication ignores a SecurityException when reading 
the configuration type
+* [WICKET-5502] - Patch FileUploadBase to fix CVE-2014-0050
+* [WICKET-5643] - WebPageRenderer should bind a Session if redirect is 
required and the session is temporary.
+
+** Improvement
+* [WICKET-5668] - StringResourceModel with custom locale 
+
+
+Release Notes - Wicket - Version 1.5.11
+
+** Sub-task
+* [WICKET-5162] - InlineEnclosure markup id could collide in the final 
page markup
+
+** Bug
+* [WICKET-5049] - Wicket Session may be null in SessionBindingListener 
after deserialization
+* [WICKET-5052] - @SpringBean fails to invoke methods on bean with 
non-public methods
+* [WICKET-5054] - Possible bug in org.apache.wicket.util.lang.Packages 
when building path with repeating names
+* [WICKET-5072] - Cookies#isEqual(Cookie, Cookie) may fail with 
NullPointerException
+* [WICKET-5073] - UrlRenderer#removeCommonPrefixes() fails when 
contextPath+filterPrefix has more segments than the argument
+* [WICKET-5076] - form#onSubmit() is called on just replaced nested forms
+* [WICKET-5078] - RestartResponseException broken with page instance and 
bookmarkable page
+* [WICKET-5085] - InlineEnclosure are piling up on each render
+* [WICKET-5094] - ISecuritySettings#getEnforceMounts(true) prevents access 
to *all* non-mounted bookmarkable pages
+* [WICKET-5112] - Parantheses problem with UrlValidator
+* [WICKET-5114] - Url#toString(StringMode.FULL) throws exception if a 
segment contains two dots
+* [WICKET-5119] - PopupSettings IE8 - dosen't work second time a link is 
clicked.
+* [WICKET-5123] - Component.continueToOriginalDestination() can redirect 
to ./.
+* [WICKET-5131] - Problems with cookies disabled when using 301/302 and 
also 303 (even with cookies)
+* [WICKET-5140] - InterceptData never gets cleared from session after 
continueToOriginalDestination is called and another page is requested afterwards
+* [WICKET-5146] - Application not destroyed if WicketFilter#init() fails
+* [WICKET-5149] - PageRequestHandlerTracker doesn't track resolves of 
handlers caused by Exception 
+* [WICKET-5157] - URL query parameter values containing equals sign get 
cut off
+* [WICKET-5191] - Session is created unnecessarily
+* [WICKET-5202] - Page redirects can fail when using url encoding
+* [WICKET-5203] - Base url is incorrect for error dispatched pages
+* [WICKET-5204] - The DateTimeField.onBeforeRender() method does not 
format the fields correctly.
+* [WICKET-5218] - EnclosureContainer calls child#configure() way before 
rendering
+* [WICKET-5230] - AjaxFormChoiceComponentUpdatingBehavior fails for 
choices containing other invalid FormComponents
+* [WICKET-5234] - OnEventHeaderItem can't be applied via AJAX
+* [WICKET-5247] - Broken Link in Tomcat because of Page Mount
+* [WICKET-5256] - Allow configuring the resource used by 
ResourceStreamRequestHandler
+* [WICKET-5259] - Url can't parse urls with username and password
+* [WICKET-5351] - ResourceStreamResource should use #getResourceStream() 
instead of directly using the 'stream' field
+* [WICKET-5416] - BOM in UTF markup file breaks encoding detection
+
+** Improvement
+* [WICKET-5150] - Log additional info when FormComponent fails in 
updateCollectionModel
+* [WICKET-5158] - Ignore missing Page in StatelessForm#process()
+* [WICKET-5219] - ServletWebResponse should call #setHeader() to set 
Ajax-Location for redirect
+
+
+Release Notes - Wicket - Version 1.5.10
+
+** Sub-task
+* [WICKET-4976] - WicketTester#startComponent(Component) doesn't detach 
the component and request 

svn commit: r16694 [3/3] - in /dev/wicket: ./ binaries/

2016-10-25 Thread pedro
Added: dev/wicket/LICENSE
==
--- dev/wicket/LICENSE (added)
+++ dev/wicket/LICENSE Wed Oct 26 04:30:46 2016
@@ -0,0 +1,202 @@
+
+ Apache License
+   Version 2.0, January 2004
+http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+  "License" shall mean the terms and conditions for use, reproduction,
+  and distribution as defined by Sections 1 through 9 of this document.
+
+  "Licensor" shall mean the copyright owner or entity authorized by
+  the copyright owner that is granting the License.
+
+  "Legal Entity" shall mean the union of the acting entity and all
+  other entities that control, are controlled by, or are under common
+  control with that entity. For the purposes of this definition,
+  "control" means (i) the power, direct or indirect, to cause the
+  direction or management of such entity, whether by contract or
+  otherwise, or (ii) ownership of fifty percent (50%) or more of the
+  outstanding shares, or (iii) beneficial ownership of such entity.
+
+  "You" (or "Your") shall mean an individual or Legal Entity
+  exercising permissions granted by this License.
+
+  "Source" form shall mean the preferred form for making modifications,
+  including but not limited to software source code, documentation
+  source, and configuration files.
+
+  "Object" form shall mean any form resulting from mechanical
+  transformation or translation of a Source form, including but
+  not limited to compiled object code, generated documentation,
+  and conversions to other media types.
+
+  "Work" shall mean the work of authorship, whether in Source or
+  Object form, made available under the License, as indicated by a
+  copyright notice that is included in or attached to the work
+  (an example is provided in the Appendix below).
+
+  "Derivative Works" shall mean any work, whether in Source or Object
+  form, that is based on (or derived from) the Work and for which the
+  editorial revisions, annotations, elaborations, or other modifications
+  represent, as a whole, an original work of authorship. For the purposes
+  of this License, Derivative Works shall not include works that remain
+  separable from, or merely link (or bind by name) to the interfaces of,
+  the Work and Derivative Works thereof.
+
+  "Contribution" shall mean any work of authorship, including
+  the original version of the Work and any modifications or additions
+  to that Work or Derivative Works thereof, that is intentionally
+  submitted to Licensor for inclusion in the Work by the copyright owner
+  or by an individual or Legal Entity authorized to submit on behalf of
+  the copyright owner. For the purposes of this definition, "submitted"
+  means any form of electronic, verbal, or written communication sent
+  to the Licensor or its representatives, including but not limited to
+  communication on electronic mailing lists, source code control systems,
+  and issue tracking systems that are managed by, or on behalf of, the
+  Licensor for the purpose of discussing and improving the Work, but
+  excluding communication that is conspicuously marked or otherwise
+  designated in writing by the copyright owner as "Not a Contribution."
+
+  "Contributor" shall mean Licensor and any individual or Legal Entity
+  on behalf of whom a Contribution has been received by Licensor and
+  subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+  this License, each Contributor hereby grants to You a perpetual,
+  worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+  copyright license to reproduce, prepare Derivative Works of,
+  publicly display, publicly perform, sublicense, and distribute the
+  Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+  this License, each Contributor hereby grants to You a perpetual,
+  worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+  (except as stated in this section) patent license to make, have made,
+  use, offer to sell, sell, import, and otherwise transfer the Work,
+  where such license applies only to those patent claims licensable
+  by such Contributor that are necessarily infringed by their
+  Contribution(s) alone or by combination of their Contribution(s)
+  with the Work to which such Contribution(s) was submitted. If You
+  institute patent litigation against any entity (including a
+  cross-claim or counterclaim in a lawsuit) alleging that the Work
+  or a 

svn commit: r16694 [1/3] - in /dev/wicket: ./ binaries/

2016-10-25 Thread pedro
Author: pedro
Date: Wed Oct 26 04:30:46 2016
New Revision: 16694

Log:
Upload wicket- to staging area

Added:
dev/wicket/CHANGELOG-1.5
dev/wicket/LICENSE
dev/wicket/NOTICE
dev/wicket/README
dev/wicket/binaries/
dev/wicket/binaries/apache-wicket-1.5.17.tar.gz   (with props)
dev/wicket/binaries/apache-wicket-1.5.17.tar.gz.asc
dev/wicket/binaries/apache-wicket-1.5.17.tar.gz.md5
dev/wicket/binaries/apache-wicket-1.5.17.tar.gz.sha
dev/wicket/binaries/apache-wicket-1.5.17.zip   (with props)
dev/wicket/binaries/apache-wicket-1.5.17.zip.asc
dev/wicket/binaries/apache-wicket-1.5.17.zip.md5
dev/wicket/binaries/apache-wicket-1.5.17.zip.sha
dev/wicket/pom.xml
dev/wicket/release-igor.sh   (with props)
dev/wicket/release-martin.sh   (with props)
dev/wicket/release.sh   (with props)
dev/wicket/wicket-assembly-all.xml



[jira] [Created] (WICKET-6258) Repeater example page show the back button with the enable link style when disabled

2016-10-24 Thread Pedro Santos (JIRA)
Pedro Santos created WICKET-6258:


 Summary: Repeater example page show the back button with the 
enable link style when disabled
 Key: WICKET-6258
 URL: https://issues.apache.org/jira/browse/WICKET-6258
 Project: Wicket
  Issue Type: Improvement
  Components: wicket-examples
Reporter: Pedro Santos
Assignee: Pedro Santos
Priority: Trivial


Seen at http://localhost:8080/repeater/



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


  1   2   3   4   5   6   7   8   9   >