You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by kaching88 <gi...@git.apache.org> on 2015/07/01 22:20:43 UTC

[GitHub] commons-collections pull request: Added global counter for Abstrac...

GitHub user kaching88 opened a pull request:

    https://github.com/apache/commons-collections/pull/11

    Added global counter for AbstractMultiValuedMap and his subclasses.

    This commit add new field called globalCounter which represents runtime global counter for class es which extending AbstractMultiValuedMap. It improves current method size() time complexity from O(n) to O(1), But there are some problems with tests. Current version passes 355 on 358 tests. Two of failed tests are based on concept that value collection which we get from getMap() method is binded with size() method. In other words if you put value to that collection a global counter should be increased. For being honest this is completely unintelligibly. Why separate collection with own counter should increase size of mother map? Third failed test is a problem with serialization. Map with counter don't deserialize properly - changes type of inner class from GlobalCounterBindedMap to HashMap. I have no hope that this commit will be merged due to failed tests but honestly i have no idea how can i solve this problems. Maybe someone from community find a way to fix it.   

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/kaching88/commons-collections trunk

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/commons-collections/pull/11.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #11
    
----
commit a323371af732f4e0c13b6bfd5dbce4c32af48afa
Author: kaching88 <wa...@o2.pl>
Date:   2015-07-01T19:43:44Z

    Added global counter for AbstractMultiValuedMap and his subclasses.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


[GitHub] commons-collections pull request: Added global counter for Abstrac...

Posted by kaching88 <gi...@git.apache.org>.
Github user kaching88 closed the pull request at:

    https://github.com/apache/commons-collections/pull/11


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org