You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Esteban (JIRA)" <ji...@apache.org> on 2009/09/15 19:35:57 UTC
[jira] Created: (WICKET-2469) Allow using a different
FileItemFactory by extracting a method in MultipartServletWebRequest class
Allow using a different FileItemFactory by extracting a method in MultipartServletWebRequest class
--------------------------------------------------------------------------------------------------
Key: WICKET-2469
URL: https://issues.apache.org/jira/browse/WICKET-2469
Project: Wicket
Issue Type: Improvement
Components: wicket
Affects Versions: 1.4.1
Environment: Anyone
Reporter: Esteban
Priority: Minor
Hi there:
In MultipartServletWebRequest constructor we have:
...
(line 93) DiskFileItemFactory factory = new DiskFileItemFactory();
...
which inhibits anyone from reusing MultipartServletWebRequest with a different factory. The only solution is generate a new class that is a copy of this one, with that line changed.
The suggestion is to extract this code into a protected method, so we could just extend this class when there's a need to use a different factory (as in GAE applications).
A diff file is added.
Thanks in advance,
Esteban
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WICKET-2469) Allow using a different
FileItemFactory by extracting a method in MultipartServletWebRequest class
Posted by "Esteban Masoero (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-2469?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Esteban Masoero updated WICKET-2469:
------------------------------------
Attachment: refactor.diff
> Allow using a different FileItemFactory by extracting a method in MultipartServletWebRequest class
> --------------------------------------------------------------------------------------------------
>
> Key: WICKET-2469
> URL: https://issues.apache.org/jira/browse/WICKET-2469
> Project: Wicket
> Issue Type: Improvement
> Components: wicket
> Affects Versions: 1.4.1
> Environment: Anyone
> Reporter: Esteban Masoero
> Priority: Minor
> Attachments: refactor.diff
>
>
> Hi there:
> In MultipartServletWebRequest constructor we have:
> ...
> (line 93) DiskFileItemFactory factory = new DiskFileItemFactory();
> ...
> which inhibits anyone from reusing MultipartServletWebRequest with a different factory. The only solution is generate a new class that is a copy of this one, with that line changed.
> The suggestion is to extract this code into a protected method, so we could just extend this class when there's a need to use a different factory (as in GAE applications).
> A diff file is added.
> Thanks in advance,
> Esteban
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (WICKET-2469) Allow using a different
FileItemFactory by extracting a method in MultipartServletWebRequest class
Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-2469?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Igor Vaynberg resolved WICKET-2469.
-----------------------------------
Resolution: Fixed
Fix Version/s: 1.5-M1
1.4.2
Assignee: Igor Vaynberg
there is now a new constructor in MultipartServletWebRequest that takes the factory. btw, its not a good idea to create overridable methods that are called from constructors.
> Allow using a different FileItemFactory by extracting a method in MultipartServletWebRequest class
> --------------------------------------------------------------------------------------------------
>
> Key: WICKET-2469
> URL: https://issues.apache.org/jira/browse/WICKET-2469
> Project: Wicket
> Issue Type: Improvement
> Components: wicket
> Affects Versions: 1.4.1
> Environment: Anyone
> Reporter: Esteban Masoero
> Assignee: Igor Vaynberg
> Priority: Minor
> Fix For: 1.4.2, 1.5-M1
>
> Attachments: refactor.diff
>
>
> Hi there:
> In MultipartServletWebRequest constructor we have:
> ...
> (line 93) DiskFileItemFactory factory = new DiskFileItemFactory();
> ...
> which inhibits anyone from reusing MultipartServletWebRequest with a different factory. The only solution is generate a new class that is a copy of this one, with that line changed.
> The suggestion is to extract this code into a protected method, so we could just extend this class when there's a need to use a different factory (as in GAE applications).
> A diff file is added.
> Thanks in advance,
> Esteban
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-2469) Allow using a different
FileItemFactory by extracting a method in MultipartServletWebRequest class
Posted by "Esteban Masoero (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-2469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12756040#action_12756040 ]
Esteban Masoero commented on WICKET-2469:
-----------------------------------------
Thanks a lot Igor. I'm curious, why it's a bad idea to create overridable methods that are called from constructors? Is it because a subclass method could create objects with references to the not-yet-completely created object?
> Allow using a different FileItemFactory by extracting a method in MultipartServletWebRequest class
> --------------------------------------------------------------------------------------------------
>
> Key: WICKET-2469
> URL: https://issues.apache.org/jira/browse/WICKET-2469
> Project: Wicket
> Issue Type: Improvement
> Components: wicket
> Affects Versions: 1.4.1
> Environment: Anyone
> Reporter: Esteban Masoero
> Assignee: Igor Vaynberg
> Priority: Minor
> Fix For: 1.4.2, 1.5-M1
>
> Attachments: refactor.diff
>
>
> Hi there:
> In MultipartServletWebRequest constructor we have:
> ...
> (line 93) DiskFileItemFactory factory = new DiskFileItemFactory();
> ...
> which inhibits anyone from reusing MultipartServletWebRequest with a different factory. The only solution is generate a new class that is a copy of this one, with that line changed.
> The suggestion is to extract this code into a protected method, so we could just extend this class when there's a need to use a different factory (as in GAE applications).
> A diff file is added.
> Thanks in advance,
> Esteban
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-2469) Allow using a different
FileItemFactory by extracting a method in MultipartServletWebRequest class
Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-2469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12756061#action_12756061 ]
Igor Vaynberg commented on WICKET-2469:
---------------------------------------
http://www.javapractices.com/topic/TopicAction.do?Id=215
> Allow using a different FileItemFactory by extracting a method in MultipartServletWebRequest class
> --------------------------------------------------------------------------------------------------
>
> Key: WICKET-2469
> URL: https://issues.apache.org/jira/browse/WICKET-2469
> Project: Wicket
> Issue Type: Improvement
> Components: wicket
> Affects Versions: 1.4.1
> Environment: Anyone
> Reporter: Esteban Masoero
> Assignee: Igor Vaynberg
> Priority: Minor
> Fix For: 1.4.2, 1.5-M1
>
> Attachments: refactor.diff
>
>
> Hi there:
> In MultipartServletWebRequest constructor we have:
> ...
> (line 93) DiskFileItemFactory factory = new DiskFileItemFactory();
> ...
> which inhibits anyone from reusing MultipartServletWebRequest with a different factory. The only solution is generate a new class that is a copy of this one, with that line changed.
> The suggestion is to extract this code into a protected method, so we could just extend this class when there's a need to use a different factory (as in GAE applications).
> A diff file is added.
> Thanks in advance,
> Esteban
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.