[jira] [Created] (CHAIN-58) Update Chain Context interface to use K,V generics

classic Classic list List threaded Threaded
34 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (CHAIN-58) Update Chain Context interface to use K,V generics

Gary D. Gregory (Jira)
Update Chain Context interface to use K,V generics
--------------------------------------------------

                 Key: CHAIN-58
                 URL: https://issues.apache.org/jira/browse/CHAIN-58
             Project: Commons Chain
          Issue Type: Improvement
    Affects Versions: 2.0
            Reporter: Elijah Zupancic
             Fix For: 2.0


As discussed in the mailing list, I am suggesting that we change the definition of Context from:

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Updated] (CHAIN-58) Update Chain Context interface to use K,V generics

Gary D. Gregory (Jira)

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

Elijah Zupancic updated CHAIN-58:
---------------------------------

    Description:
As discussed in the mailing list, I am suggesting that we change the definition of Context from:

{noformat}
public interface Context extends Map<String, Object> {
{noformat}

to:

{noformat}
public interface Context<K, V> extends Map<K, V> {
{noformat}

  was:As discussed in the mailing list, I am suggesting that we change the definition of Context from:


> Update Chain Context interface to use K,V generics
> --------------------------------------------------
>
>                 Key: CHAIN-58
>                 URL: https://issues.apache.org/jira/browse/CHAIN-58
>             Project: Commons Chain
>          Issue Type: Improvement
>    Affects Versions: 2.0
>            Reporter: Elijah Zupancic
>             Fix For: 2.0
>
>
> As discussed in the mailing list, I am suggesting that we change the definition of Context from:
> {noformat}
> public interface Context extends Map<String, Object> {
> {noformat}
> to:
> {noformat}
> public interface Context<K, V> extends Map<K, V> {
> {noformat}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Updated] (CHAIN-58) Update Chain Context interface to use K,V generics

Gary D. Gregory (Jira)
In reply to this post by Gary D. Gregory (Jira)

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

Elijah Zupancic updated CHAIN-58:
---------------------------------

    Attachment: chain-58.diff

> Update Chain Context interface to use K,V generics
> --------------------------------------------------
>
>                 Key: CHAIN-58
>                 URL: https://issues.apache.org/jira/browse/CHAIN-58
>             Project: Commons Chain
>          Issue Type: Improvement
>    Affects Versions: 2.0
>            Reporter: Elijah Zupancic
>             Fix For: 2.0
>
>         Attachments: chain-58.diff
>
>
> As discussed in the mailing list, I am suggesting that we change the definition of Context from:
> {noformat}
> public interface Context extends Map<String, Object> {
> {noformat}
> to:
> {noformat}
> public interface Context<K, V> extends Map<K, V> {
> {noformat}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (CHAIN-58) Update Chain Context interface to use K,V generics

Gary D. Gregory (Jira)
In reply to this post by Gary D. Gregory (Jira)

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

Simone Tripodi commented on CHAIN-58:
-------------------------------------

hi Elijah,
I like the approach, sounds to be the candidate to be applied.
After added generics type to {{Context}}, I'd say that {{Context#retrieve(String K)}} is absolutely useless.
Can you provide a new patch dropping that method? Many thanks in advance!

> Update Chain Context interface to use K,V generics
> --------------------------------------------------
>
>                 Key: CHAIN-58
>                 URL: https://issues.apache.org/jira/browse/CHAIN-58
>             Project: Commons Chain
>          Issue Type: Improvement
>    Affects Versions: 2.0
>            Reporter: Elijah Zupancic
>             Fix For: 2.0
>
>         Attachments: chain-58.diff
>
>
> As discussed in the mailing list, I am suggesting that we change the definition of Context from:
> {noformat}
> public interface Context extends Map<String, Object> {
> {noformat}
> to:
> {noformat}
> public interface Context<K, V> extends Map<K, V> {
> {noformat}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (CHAIN-58) Update Chain Context interface to use K,V generics

Gary D. Gregory (Jira)
In reply to this post by Gary D. Gregory (Jira)

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

Simone Tripodi commented on CHAIN-58:
-------------------------------------

Errata corrige: please ignore my previous message, I need to have a look to your patch more deeply :)

> Update Chain Context interface to use K,V generics
> --------------------------------------------------
>
>                 Key: CHAIN-58
>                 URL: https://issues.apache.org/jira/browse/CHAIN-58
>             Project: Commons Chain
>          Issue Type: Improvement
>    Affects Versions: 2.0
>            Reporter: Elijah Zupancic
>             Fix For: 2.0
>
>         Attachments: chain-58.diff
>
>
> As discussed in the mailing list, I am suggesting that we change the definition of Context from:
> {noformat}
> public interface Context extends Map<String, Object> {
> {noformat}
> to:
> {noformat}
> public interface Context<K, V> extends Map<K, V> {
> {noformat}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (CHAIN-58) Update Chain Context interface to use K,V generics

Gary D. Gregory (Jira)
In reply to this post by Gary D. Gregory (Jira)

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

Simone Tripodi commented on CHAIN-58:
-------------------------------------

I convinced myself the comment n#1 is not wrong, having such {{retrieve}} method is absolutely useless having typed the {{Context}} - let's drop it :)
Thanks!

> Update Chain Context interface to use K,V generics
> --------------------------------------------------
>
>                 Key: CHAIN-58
>                 URL: https://issues.apache.org/jira/browse/CHAIN-58
>             Project: Commons Chain
>          Issue Type: Improvement
>    Affects Versions: 2.0
>            Reporter: Elijah Zupancic
>             Fix For: 2.0
>
>         Attachments: chain-58.diff
>
>
> As discussed in the mailing list, I am suggesting that we change the definition of Context from:
> {noformat}
> public interface Context extends Map<String, Object> {
> {noformat}
> to:
> {noformat}
> public interface Context<K, V> extends Map<K, V> {
> {noformat}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Updated] (CHAIN-58) Update Chain Context interface to use K,V generics

Gary D. Gregory (Jira)
In reply to this post by Gary D. Gregory (Jira)

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

Elijah Zupancic updated CHAIN-58:
---------------------------------

    Attachment: chain-58.diff

Patch for suggested changes to doing a <K,V> style generics for chain.
               

> Update Chain Context interface to use K,V generics
> --------------------------------------------------
>
>                 Key: CHAIN-58
>                 URL: https://issues.apache.org/jira/browse/CHAIN-58
>             Project: Commons Chain
>          Issue Type: Improvement
>    Affects Versions: 2.0
>            Reporter: Elijah Zupancic
>             Fix For: 2.0
>
>         Attachments: chain-58.diff, chain-58.diff
>
>
> As discussed in the mailing list, I am suggesting that we change the definition of Context from:
> {noformat}
> public interface Context extends Map<String, Object> {
> {noformat}
> to:
> {noformat}
> public interface Context<K, V> extends Map<K, V> {
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Updated] (CHAIN-58) Update Chain Context interface to use K,V generics

Gary D. Gregory (Jira)
In reply to this post by Gary D. Gregory (Jira)

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

Elijah Zupancic updated CHAIN-58:
---------------------------------

    Attachment:     (was: chain-58.diff)
   

> Update Chain Context interface to use K,V generics
> --------------------------------------------------
>
>                 Key: CHAIN-58
>                 URL: https://issues.apache.org/jira/browse/CHAIN-58
>             Project: Commons Chain
>          Issue Type: Improvement
>    Affects Versions: 2.0
>            Reporter: Elijah Zupancic
>             Fix For: 2.0
>
>         Attachments: chain-58.diff
>
>
> As discussed in the mailing list, I am suggesting that we change the definition of Context from:
> {noformat}
> public interface Context extends Map<String, Object> {
> {noformat}
> to:
> {noformat}
> public interface Context<K, V> extends Map<K, V> {
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (CHAIN-58) Update Chain Context interface to use K,V generics

Gary D. Gregory (Jira)
In reply to this post by Gary D. Gregory (Jira)

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

Simone Tripodi commented on CHAIN-58:
-------------------------------------

Hi Elijah,
I think that we are on the right path but there are still some limitations, having a {{Context<String, Object>}}, as we discussed in the ML, wouldn't fit all the use cases.
I suggest moving on an implementation with generified key/value, having a {{Context<K, V>}}, would be more adaptable, as suggested also by Niall in the ML.
WDYT?
               

> Update Chain Context interface to use K,V generics
> --------------------------------------------------
>
>                 Key: CHAIN-58
>                 URL: https://issues.apache.org/jira/browse/CHAIN-58
>             Project: Commons Chain
>          Issue Type: Improvement
>    Affects Versions: 2.0
>            Reporter: Elijah Zupancic
>             Fix For: 2.0
>
>         Attachments: chain-58.diff
>
>
> As discussed in the mailing list, I am suggesting that we change the definition of Context from:
> {noformat}
> public interface Context extends Map<String, Object> {
> {noformat}
> to:
> {noformat}
> public interface Context<K, V> extends Map<K, V> {
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (CHAIN-58) Update Chain Context interface to use K,V generics

Gary D. Gregory (Jira)
In reply to this post by Gary D. Gregory (Jira)

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

Elijah Zupancic commented on CHAIN-58:
--------------------------------------

Hi Simo,

In the uploaded changeset, Context is defined as <K,V>. However, Catalogs and all of the other supporting libraries use <String, Object>. So, if a consumer wanted to use chain in a custom manner where they have another class instead of String, they could only as long as they did not use ContextBase, Catalogs, Servlet / Portlet add-ons. I believe that is what we discussed in the mailing list.

I'm having difficulty finding the email by Naill with his suggestion. I've only found a single message from him and google has too much noise to be useful.

Thanks,
-Elijah
               

> Update Chain Context interface to use K,V generics
> --------------------------------------------------
>
>                 Key: CHAIN-58
>                 URL: https://issues.apache.org/jira/browse/CHAIN-58
>             Project: Commons Chain
>          Issue Type: Improvement
>    Affects Versions: 2.0
>            Reporter: Elijah Zupancic
>             Fix For: 2.0
>
>         Attachments: chain-58.diff
>
>
> As discussed in the mailing list, I am suggesting that we change the definition of Context from:
> {noformat}
> public interface Context extends Map<String, Object> {
> {noformat}
> to:
> {noformat}
> public interface Context<K, V> extends Map<K, V> {
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (CHAIN-58) Update Chain Context interface to use K,V generics

Gary D. Gregory (Jira)
In reply to this post by Gary D. Gregory (Jira)

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

Simone Tripodi commented on CHAIN-58:
-------------------------------------

Apologize Elijah,
I am doing a deep review tonight, I should stop replying in the issue tracker when I am tired :P
Many thanks for your patience, I'll let you know ASAP!

-Simo
               

> Update Chain Context interface to use K,V generics
> --------------------------------------------------
>
>                 Key: CHAIN-58
>                 URL: https://issues.apache.org/jira/browse/CHAIN-58
>             Project: Commons Chain
>          Issue Type: Improvement
>    Affects Versions: 2.0
>            Reporter: Elijah Zupancic
>             Fix For: 2.0
>
>         Attachments: chain-58.diff
>
>
> As discussed in the mailing list, I am suggesting that we change the definition of Context from:
> {noformat}
> public interface Context extends Map<String, Object> {
> {noformat}
> to:
> {noformat}
> public interface Context<K, V> extends Map<K, V> {
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (CHAIN-58) Update Chain Context interface to use K,V generics

Gary D. Gregory (Jira)
In reply to this post by Gary D. Gregory (Jira)

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

Simone Tripodi commented on CHAIN-58:
-------------------------------------

Hi Elijah,
unfortunately once again, while applying the patch, I got a

{code}
Hunk #1 succeeded at XX with fuzz 1
{code}

how did you produce the patch? Many thanks in advance!
               

> Update Chain Context interface to use K,V generics
> --------------------------------------------------
>
>                 Key: CHAIN-58
>                 URL: https://issues.apache.org/jira/browse/CHAIN-58
>             Project: Commons Chain
>          Issue Type: Improvement
>    Affects Versions: 2.0
>            Reporter: Elijah Zupancic
>             Fix For: 2.0
>
>         Attachments: chain-58.diff
>
>
> As discussed in the mailing list, I am suggesting that we change the definition of Context from:
> {noformat}
> public interface Context extends Map<String, Object> {
> {noformat}
> to:
> {noformat}
> public interface Context<K, V> extends Map<K, V> {
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (CHAIN-58) Update Chain Context interface to use K,V generics

Gary D. Gregory (Jira)
In reply to this post by Gary D. Gregory (Jira)

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

Elijah Zupancic commented on CHAIN-58:
--------------------------------------

Hi Simo, I produce it using svn diff. I believe that the message above implies success. There may have been a mismatch between some whitespace characters.
               

> Update Chain Context interface to use K,V generics
> --------------------------------------------------
>
>                 Key: CHAIN-58
>                 URL: https://issues.apache.org/jira/browse/CHAIN-58
>             Project: Commons Chain
>          Issue Type: Improvement
>    Affects Versions: 2.0
>            Reporter: Elijah Zupancic
>             Fix For: 2.0
>
>         Attachments: chain-58.diff
>
>
> As discussed in the mailing list, I am suggesting that we change the definition of Context from:
> {noformat}
> public interface Context extends Map<String, Object> {
> {noformat}
> to:
> {noformat}
> public interface Context<K, V> extends Map<K, V> {
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (CHAIN-58) Update Chain Context interface to use K,V generics

Gary D. Gregory (Jira)
In reply to this post by Gary D. Gregory (Jira)

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

Simone Tripodi commented on CHAIN-58:
-------------------------------------

Hi Elijah, unfortunately there are a lot of {{{.rej}}} files :(
Do you remember how do we managed that situation in the past? TIA!
               

> Update Chain Context interface to use K,V generics
> --------------------------------------------------
>
>                 Key: CHAIN-58
>                 URL: https://issues.apache.org/jira/browse/CHAIN-58
>             Project: Commons Chain
>          Issue Type: Improvement
>    Affects Versions: 2.0
>            Reporter: Elijah Zupancic
>             Fix For: 2.0
>
>         Attachments: chain-58.diff
>
>
> As discussed in the mailing list, I am suggesting that we change the definition of Context from:
> {noformat}
> public interface Context extends Map<String, Object> {
> {noformat}
> to:
> {noformat}
> public interface Context<K, V> extends Map<K, V> {
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (CHAIN-58) Update Chain Context interface to use K,V generics

Gary D. Gregory (Jira)
In reply to this post by Gary D. Gregory (Jira)

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

Elijah Zupancic commented on CHAIN-58:
--------------------------------------

Ack. I will take a look at it again. I had to recheck out the repo last
time and make the changes using a merging tool to it. Then run a svn diff
again.

-Elijah

On Wed, Nov 30, 2011 at 1:11 AM, Simone Tripodi (Commented) (JIRA) <


               

> Update Chain Context interface to use K,V generics
> --------------------------------------------------
>
>                 Key: CHAIN-58
>                 URL: https://issues.apache.org/jira/browse/CHAIN-58
>             Project: Commons Chain
>          Issue Type: Improvement
>    Affects Versions: 2.0
>            Reporter: Elijah Zupancic
>             Fix For: 2.0
>
>         Attachments: chain-58.diff
>
>
> As discussed in the mailing list, I am suggesting that we change the definition of Context from:
> {noformat}
> public interface Context extends Map<String, Object> {
> {noformat}
> to:
> {noformat}
> public interface Context<K, V> extends Map<K, V> {
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (CHAIN-58) Update Chain Context interface to use K,V generics

Gary D. Gregory (Jira)
In reply to this post by Gary D. Gregory (Jira)

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

Elijah Zupancic commented on CHAIN-58:
--------------------------------------

Hi Simo,
I just tried to apply the patch to a clean check out and it completed with no problems. Here is the output of how I applied the patch.

{noformat}
elijah@kirin:~/dev$ svn co "http://svn.apache.org/repos/asf/commons/proper/chain/trunk" chain-clean
... Lots of output
elijah@kirin:~/dev$ cd chain-clean
elijah@kirin:~/dev/chain-clean$ patch -p0 < ../chain-trunk/chain-58.diff
patching file src/test/java/org/apache/commons/chain/impl/NonDelegatingFilter.java
Hunk #1 succeeded at 29 with fuzz 1.
patching file src/test/java/org/apache/commons/chain/impl/DelegatingFilter.java
Hunk #1 succeeded at 29 with fuzz 1.
patching file src/test/java/org/apache/commons/chain/impl/NonDelegatingCommand.java
Hunk #1 succeeded at 29 with fuzz 1.
patching file src/test/java/org/apache/commons/chain/generic/DispatchLookupCommandTestCase.java
patching file src/test/java/org/apache/commons/chain/generic/LookupCommandTestCase.java
patching file src/test/java/org/apache/commons/chain/generic/DispatchCommandTestCase.java
patching file src/main/java/org/apache/commons/chain/impl/ContextBase.java
patching file src/main/java/org/apache/commons/chain/impl/CatalogBase.java
Hunk #1 succeeded at 37 with fuzz 1.
patching file src/main/java/org/apache/commons/chain/impl/CatalogFactoryBase.java
Hunk #2 succeeded at 31 with fuzz 1.
patching file src/main/java/org/apache/commons/chain/impl/ChainBase.java
Hunk #1 succeeded at 36 with fuzz 1.
patching file src/main/java/org/apache/commons/chain/CatalogFactory.java
Hunk #1 succeeded at 38 with fuzz 1.
patching file src/main/java/org/apache/commons/chain/Chain.java
Hunk #1 succeeded at 53 with fuzz 1.
patching file src/main/java/org/apache/commons/chain/Context.java
Hunk #1 succeeded at 60 with fuzz 1.
patching file src/main/java/org/apache/commons/chain/Filter.java
Hunk #1 succeeded at 43 with fuzz 1.
patching file src/main/java/org/apache/commons/chain/config/ConfigRegisterRule.java
patching file src/main/java/org/apache/commons/chain/config/ConfigCatalogRule.java
patching file src/main/java/org/apache/commons/chain/Catalog.java
Hunk #1 succeeded at 31 with fuzz 1.
patching file src/main/java/org/apache/commons/chain/generic/DispatchLookupCommand.java
patching file src/main/java/org/apache/commons/chain/generic/LookupCommand.java
Hunk #1 succeeded at 46 with fuzz 1.
patching file src/main/java/org/apache/commons/chain/generic/CopyCommand.java
Hunk #1 succeeded at 31 with fuzz 1.
patching file src/main/java/org/apache/commons/chain/generic/RemoveCommand.java
Hunk #1 succeeded at 30 with fuzz 1.
patching file src/main/java/org/apache/commons/chain/generic/DispatchCommand.java
patching file src/main/java/org/apache/commons/chain/web/faces/FacesGetLocaleCommand.java
patching file src/main/java/org/apache/commons/chain/web/faces/FacesSetLocaleCommand.java
patching file src/main/java/org/apache/commons/chain/web/AbstractGetLocaleCommand.java
Hunk #1 succeeded at 33 with fuzz 1.
patching file src/main/java/org/apache/commons/chain/web/servlet/ServletGetLocaleCommand.java
patching file src/main/java/org/apache/commons/chain/web/servlet/ServletPathMapper.java
patching file src/main/java/org/apache/commons/chain/web/servlet/PathInfoMapper.java
patching file src/main/java/org/apache/commons/chain/web/servlet/ServletSetLocaleCommand.java
patching file src/main/java/org/apache/commons/chain/web/servlet/ChainProcessor.java
patching file src/main/java/org/apache/commons/chain/web/servlet/RequestParameterMapper.java
patching file src/main/java/org/apache/commons/chain/web/portlet/PortletSetLocaleCommand.java
patching file src/main/java/org/apache/commons/chain/web/portlet/PortletGetLocaleCommand.java
patching file src/main/java/org/apache/commons/chain/web/AbstractSetLocaleCommand.java
Hunk #1 succeeded at 34 with fuzz 1.
patching file src/main/java/org/apache/commons/chain/Command.java
Hunk #1 succeeded at 79 with fuzz 1.
patching file pom.xml
{noformat}
               

> Update Chain Context interface to use K,V generics
> --------------------------------------------------
>
>                 Key: CHAIN-58
>                 URL: https://issues.apache.org/jira/browse/CHAIN-58
>             Project: Commons Chain
>          Issue Type: Improvement
>    Affects Versions: 2.0
>            Reporter: Elijah Zupancic
>             Fix For: 2.0
>
>         Attachments: chain-58.diff
>
>
> As discussed in the mailing list, I am suggesting that we change the definition of Context from:
> {noformat}
> public interface Context extends Map<String, Object> {
> {noformat}
> to:
> {noformat}
> public interface Context<K, V> extends Map<K, V> {
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (CHAIN-58) Update Chain Context interface to use K,V generics

Gary D. Gregory (Jira)
In reply to this post by Gary D. Gregory (Jira)

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

Simone Tripodi commented on CHAIN-58:
-------------------------------------

Hi Elijah,
with a fresh checkout I finally have your patch applied :) Thanks for the hint!

I need 1-2 days before committing it because I have few minor observations/modifications to apply, thanks for submitting this great contribution!
               

> Update Chain Context interface to use K,V generics
> --------------------------------------------------
>
>                 Key: CHAIN-58
>                 URL: https://issues.apache.org/jira/browse/CHAIN-58
>             Project: Commons Chain
>          Issue Type: Improvement
>    Affects Versions: 2.0
>            Reporter: Elijah Zupancic
>             Fix For: 2.0
>
>         Attachments: chain-58.diff
>
>
> As discussed in the mailing list, I am suggesting that we change the definition of Context from:
> {noformat}
> public interface Context extends Map<String, Object> {
> {noformat}
> to:
> {noformat}
> public interface Context<K, V> extends Map<K, V> {
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (CHAIN-58) Update Chain Context interface to use K,V generics

Gary D. Gregory (Jira)
In reply to this post by Gary D. Gregory (Jira)

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

Simone Tripodi commented on CHAIN-58:
-------------------------------------

Hi Elijah!

just to keep you updated how I am reviewing the patch: the main point IMHO is that the signature {{interface Command<C extends Context<?, ?>>}} circumvents the benefit of having Generics in the {{Context}}, I think that as user we have to get benefits inside the {{Command}} instances since we don't have to know which key/value type while performing the {{execute()}} method.

So, I would like to move to a less type agnostic {{Command}} implementation: what's your opinion about that?
Many thanks in advance!
               

> Update Chain Context interface to use K,V generics
> --------------------------------------------------
>
>                 Key: CHAIN-58
>                 URL: https://issues.apache.org/jira/browse/CHAIN-58
>             Project: Commons Chain
>          Issue Type: Improvement
>    Affects Versions: 2.0
>            Reporter: Elijah Zupancic
>             Fix For: 2.0
>
>         Attachments: chain-58.diff
>
>
> As discussed in the mailing list, I am suggesting that we change the definition of Context from:
> {noformat}
> public interface Context extends Map<String, Object> {
> {noformat}
> to:
> {noformat}
> public interface Context<K, V> extends Map<K, V> {
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (CHAIN-58) Update Chain Context interface to use K,V generics

Gary D. Gregory (Jira)
In reply to this post by Gary D. Gregory (Jira)

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

Elijah Zupancic commented on CHAIN-58:
--------------------------------------

What type signature are you suggesting? Originally, that is what I wanted to do as well. Could you post an example on how you would like to do this?
               

> Update Chain Context interface to use K,V generics
> --------------------------------------------------
>
>                 Key: CHAIN-58
>                 URL: https://issues.apache.org/jira/browse/CHAIN-58
>             Project: Commons Chain
>          Issue Type: Improvement
>    Affects Versions: 2.0
>            Reporter: Elijah Zupancic
>             Fix For: 2.0
>
>         Attachments: chain-58.diff
>
>
> As discussed in the mailing list, I am suggesting that we change the definition of Context from:
> {noformat}
> public interface Context extends Map<String, Object> {
> {noformat}
> to:
> {noformat}
> public interface Context<K, V> extends Map<K, V> {
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (CHAIN-58) Update Chain Context interface to use K,V generics

Gary D. Gregory (Jira)
In reply to this post by Gary D. Gregory (Jira)

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

Simone Tripodi commented on CHAIN-58:
-------------------------------------

Hi Elijah!

I am prototyping on my local repo, after applied your patch, something like:

{code}
interface Command<K, V, C extends Context<K, V>>
{code}

In this way, commands already know wich kind of keys/values and context they manipulate - of course it implies a lot of modifications in the current code.

If it sounds reasonable to you and you have cycles to provide a patch, it would be wonderful - I don't have a lot of time to develop it myself during these months, but I can review patches. Moreover I would like you continue leadering that idea ;)

Last recommendation: please turn off tabs in your IDE and use spaces instead :P

Many thanks in advance for your hard work!
-Simo
               

> Update Chain Context interface to use K,V generics
> --------------------------------------------------
>
>                 Key: CHAIN-58
>                 URL: https://issues.apache.org/jira/browse/CHAIN-58
>             Project: Commons Chain
>          Issue Type: Improvement
>    Affects Versions: 2.0
>            Reporter: Elijah Zupancic
>             Fix For: 2.0
>
>         Attachments: chain-58.diff
>
>
> As discussed in the mailing list, I am suggesting that we change the definition of Context from:
> {noformat}
> public interface Context extends Map<String, Object> {
> {noformat}
> to:
> {noformat}
> public interface Context<K, V> extends Map<K, V> {
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
12