[jira] [Commented] (TAMAYA-326) ServiceContextManager picks second available service provider even if the ordinal is lower

2018-02-05 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/TAMAYA-326?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16352919#comment-16352919
 ] 

ASF subversion and git services commented on TAMAYA-326:


Commit 135792e9f649693684d85d68b83a6a258e782a10 in incubator-tamaya's branch 
refs/heads/master from [~wlieurance]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-tamaya.git;h=135792e ]

TAMAYA-326: Fix bug in ordinal comparison in ServiceContextManager

While adding some test coverage on the api, I found that
org.apache.tamaya.spi.ServiceContextManager has a bug as it searches for
the default service provider in loadDefaultServiceProvider.  Namely, the
"highestOrdinal" is not set after the first service provider is found,
so any following service provider with an ordinal higher than 0 will be
used, even if that ordinal is lower than the first one's.  This patch
fixes the logic, and adds tests to cover the case.


> ServiceContextManager picks second available service provider even if the 
> ordinal is lower
> --
>
> Key: TAMAYA-326
> URL: https://issues.apache.org/jira/browse/TAMAYA-326
> Project: Tamaya
>  Issue Type: Bug
>Reporter: William Lieurance
>Priority: Major
>
> While adding some test coverage on the api, I found that 
> org.apache.tamaya.spi.ServiceContextManager has a bug as it searches for the 
> default service provider in loadDefaultServiceProvider.  Namely, the 
> "highestOrdinal" is not set after the first service provider is found, so any 
> following service provider with an ordinal higher than 0 will be used, even 
> if that ordinal is lower than the first one's.
> I modified the test ServiceContext to demonstrate the bug, as well as fixed 
> the logic on my branch in github.  Note that if you run the tests against the 
> ServiceContextManager as-is, they will fail.
> https://github.com/peculater/incubator-tamaya/commit/320d018566b5f32afecb79d33109e3c4606ba782
>  is the commit
> [https://github.com/peculater/incubator-tamaya/tree/TAMAYA-326] is the branch
>  



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


[jira] [Commented] (TAMAYA-326) ServiceContextManager picks second available service provider even if the ordinal is lower

2018-02-05 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TAMAYA-326?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16352920#comment-16352920
 ] 

ASF GitHub Bot commented on TAMAYA-326:
---

Github user asfgit closed the pull request at:

https://github.com/apache/incubator-tamaya/pull/10


> ServiceContextManager picks second available service provider even if the 
> ordinal is lower
> --
>
> Key: TAMAYA-326
> URL: https://issues.apache.org/jira/browse/TAMAYA-326
> Project: Tamaya
>  Issue Type: Bug
>Reporter: William Lieurance
>Priority: Major
>
> While adding some test coverage on the api, I found that 
> org.apache.tamaya.spi.ServiceContextManager has a bug as it searches for the 
> default service provider in loadDefaultServiceProvider.  Namely, the 
> "highestOrdinal" is not set after the first service provider is found, so any 
> following service provider with an ordinal higher than 0 will be used, even 
> if that ordinal is lower than the first one's.
> I modified the test ServiceContext to demonstrate the bug, as well as fixed 
> the logic on my branch in github.  Note that if you run the tests against the 
> ServiceContextManager as-is, they will fail.
> https://github.com/peculater/incubator-tamaya/commit/320d018566b5f32afecb79d33109e3c4606ba782
>  is the commit
> [https://github.com/peculater/incubator-tamaya/tree/TAMAYA-326] is the branch
>  



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


[jira] [Commented] (TAMAYA-326) ServiceContextManager picks second available service provider even if the ordinal is lower

2018-01-31 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TAMAYA-326?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16347962#comment-16347962
 ] 

ASF GitHub Bot commented on TAMAYA-326:
---

GitHub user peculater opened a pull request:

https://github.com/apache/incubator-tamaya/pull/10

TAMAYA-326: Fix bug in ordinal comparison in ServiceContextManager

While adding some test coverage on the api, I found that
org.apache.tamaya.spi.ServiceContextManager has a bug as it searches for
the default service provider in loadDefaultServiceProvider.  Namely, the
"highestOrdinal" is not set after the first service provider is found,
so any following service provider with an ordinal higher than 0 will be
used, even if that ordinal is lower than the first one's.  This patch
fixes the logic, and adds tests to cover the case.

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

$ git pull https://github.com/peculater/incubator-tamaya TAMAYA-326

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

https://github.com/apache/incubator-tamaya/pull/10.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 #10


commit 135792e9f649693684d85d68b83a6a258e782a10
Author: William Lieurance 
Date:   2018-02-01T03:36:41Z

TAMAYA-326: Fix bug in ordinal comparison in ServiceContextManager

While adding some test coverage on the api, I found that
org.apache.tamaya.spi.ServiceContextManager has a bug as it searches for
the default service provider in loadDefaultServiceProvider.  Namely, the
"highestOrdinal" is not set after the first service provider is found,
so any following service provider with an ordinal higher than 0 will be
used, even if that ordinal is lower than the first one's.  This patch
fixes the logic, and adds tests to cover the case.




> ServiceContextManager picks second available service provider even if the 
> ordinal is lower
> --
>
> Key: TAMAYA-326
> URL: https://issues.apache.org/jira/browse/TAMAYA-326
> Project: Tamaya
>  Issue Type: Bug
>Reporter: William Lieurance
>Priority: Major
>
> While adding some test coverage on the api, I found that 
> org.apache.tamaya.spi.ServiceContextManager has a bug as it searches for the 
> default service provider in loadDefaultServiceProvider.  Namely, the 
> "highestOrdinal" is not set after the first service provider is found, so any 
> following service provider with an ordinal higher than 0 will be used, even 
> if that ordinal is lower than the first one's.
> I modified the test ServiceContext to demonstrate the bug, as well as fixed 
> the logic on my branch in github.  Note that if you run the tests against the 
> ServiceContextManager as-is, they will fail.
> https://github.com/peculater/incubator-tamaya/commit/320d018566b5f32afecb79d33109e3c4606ba782
>  is the commit
> [https://github.com/peculater/incubator-tamaya/tree/TAMAYA-326] is the branch
>  



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