You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Yasuhiro Kawame (JIRA)" <ji...@apache.org> on 2011/08/25 15:32:29 UTC
[jira] [Created] (FELIX-3087) Given invalid value, but the property
isn't invalid.
Given invalid value, but the property isn't invalid.
----------------------------------------------------
Key: FELIX-3087
URL: https://issues.apache.org/jira/browse/FELIX-3087
Project: Felix
Issue Type: Bug
Components: Declarative Services (SCR)
Affects Versions: scr-1.6.0
Reporter: Yasuhiro Kawame
Given the following XML, the value of the property will be invalid.
But this property is a valid property, with a value of char 'a'.
<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0">
<implementation class="DummyClass" />
<property name="test.property.Character" type="Character" value="ab" />
</scr:component>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (FELIX-3087) Given invalid value, but the
property isn't invalid.
Posted by "Felix Meschberger (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-3087?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Felix Meschberger resolved FELIX-3087.
--------------------------------------
Resolution: Fixed
Fix Version/s: scr-1.6.2
This works and the issue can be resolved.
> Given invalid value, but the property isn't invalid.
> ----------------------------------------------------
>
> Key: FELIX-3087
> URL: https://issues.apache.org/jira/browse/FELIX-3087
> Project: Felix
> Issue Type: Bug
> Components: Declarative Services (SCR)
> Affects Versions: scr-1.6.0
> Reporter: Yasuhiro Kawame
> Assignee: Felix Meschberger
> Fix For: scr-1.6.2
>
>
> Given the following XML, the value of the property will be invalid.
> But this property is a valid property, with a value of char 'a'.
> <?xml version="1.0" encoding="UTF-8"?>
> <scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0">
> <implementation class="DummyClass" />
> <property name="test.property.Character" type="Character" value="ab" />
> </scr:component>
--
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
[jira] [Commented] (FELIX-3087) Given invalid value, but the
property isn't invalid.
Posted by "Felix Meschberger (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-3087?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13123689#comment-13123689 ]
Felix Meschberger commented on FELIX-3087:
------------------------------------------
In Rev. 1180605:
* Fix wrong Character/Char type conversion
* add unit tests
* refactor value conversion to do it during validation, which allows to fail value conversion on a component-level instead of a descriptor file level
> Given invalid value, but the property isn't invalid.
> ----------------------------------------------------
>
> Key: FELIX-3087
> URL: https://issues.apache.org/jira/browse/FELIX-3087
> Project: Felix
> Issue Type: Bug
> Components: Declarative Services (SCR)
> Affects Versions: scr-1.6.0
> Reporter: Yasuhiro Kawame
> Assignee: Felix Meschberger
>
> Given the following XML, the value of the property will be invalid.
> But this property is a valid property, with a value of char 'a'.
> <?xml version="1.0" encoding="UTF-8"?>
> <scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0">
> <implementation class="DummyClass" />
> <property name="test.property.Character" type="Character" value="ab" />
> </scr:component>
--
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
[jira] [Commented] (FELIX-3087) Given invalid value, but the
property isn't invalid.
Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-3087?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13098797#comment-13098797 ]
Felix Meschberger commented on FELIX-3087:
------------------------------------------
According to the spec, the string value must be converted to a Character using Integer.parseInt() which is expected to fail in this context -- the current implementation is of course wrong by (a) not using Integer.parseInt() and (b) not failing.
References:
- https://mail.osgi.org/pipermail/osgi-dev/2011-September/003226.html
- https://www.osgi.org/members/bugzilla/show_bug.cgi?id=2104
> Given invalid value, but the property isn't invalid.
> ----------------------------------------------------
>
> Key: FELIX-3087
> URL: https://issues.apache.org/jira/browse/FELIX-3087
> Project: Felix
> Issue Type: Bug
> Components: Declarative Services (SCR)
> Affects Versions: scr-1.6.0
> Reporter: Yasuhiro Kawame
>
> Given the following XML, the value of the property will be invalid.
> But this property is a valid property, with a value of char 'a'.
> <?xml version="1.0" encoding="UTF-8"?>
> <scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0">
> <implementation class="DummyClass" />
> <property name="test.property.Character" type="Character" value="ab" />
> </scr:component>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (FELIX-3087) Given invalid value, but the
property isn't invalid.
Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-3087?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13095892#comment-13095892 ]
Felix Meschberger commented on FELIX-3087:
------------------------------------------
I am unclear here, what the correct result would actually be ...
The spec states for the value attribute, that the Integer.valueOf method should be used to convert the string to a character. The implementation currently just takes the first character in the string as the character value... maybe we should bring this to the OSGi Dev List
> Given invalid value, but the property isn't invalid.
> ----------------------------------------------------
>
> Key: FELIX-3087
> URL: https://issues.apache.org/jira/browse/FELIX-3087
> Project: Felix
> Issue Type: Bug
> Components: Declarative Services (SCR)
> Affects Versions: scr-1.6.0
> Reporter: Yasuhiro Kawame
>
> Given the following XML, the value of the property will be invalid.
> But this property is a valid property, with a value of char 'a'.
> <?xml version="1.0" encoding="UTF-8"?>
> <scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0">
> <implementation class="DummyClass" />
> <property name="test.property.Character" type="Character" value="ab" />
> </scr:component>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (FELIX-3087) Given invalid value, but the
property isn't invalid.
Posted by "Felix Meschberger (Assigned) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-3087?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Felix Meschberger reassigned FELIX-3087:
----------------------------------------
Assignee: Felix Meschberger
> Given invalid value, but the property isn't invalid.
> ----------------------------------------------------
>
> Key: FELIX-3087
> URL: https://issues.apache.org/jira/browse/FELIX-3087
> Project: Felix
> Issue Type: Bug
> Components: Declarative Services (SCR)
> Affects Versions: scr-1.6.0
> Reporter: Yasuhiro Kawame
> Assignee: Felix Meschberger
>
> Given the following XML, the value of the property will be invalid.
> But this property is a valid property, with a value of char 'a'.
> <?xml version="1.0" encoding="UTF-8"?>
> <scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0">
> <implementation class="DummyClass" />
> <property name="test.property.Character" type="Character" value="ab" />
> </scr:component>
--
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
[jira] [Closed] (FELIX-3087) Given invalid value, but the property
isn't invalid.
Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-3087?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Felix Meschberger closed FELIX-3087.
------------------------------------
Close after release
> Given invalid value, but the property isn't invalid.
> ----------------------------------------------------
>
> Key: FELIX-3087
> URL: https://issues.apache.org/jira/browse/FELIX-3087
> Project: Felix
> Issue Type: Bug
> Components: Declarative Services (SCR)
> Affects Versions: scr-1.6.0
> Reporter: Yasuhiro Kawame
> Assignee: Felix Meschberger
> Fix For: scr-1.6.2
>
>
> Given the following XML, the value of the property will be invalid.
> But this property is a valid property, with a value of char 'a'.
> <?xml version="1.0" encoding="UTF-8"?>
> <scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0">
> <implementation class="DummyClass" />
> <property name="test.property.Character" type="Character" value="ab" />
> </scr:component>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (FELIX-3087) Given invalid value, but the
property isn't invalid.
Posted by "Yasuhiro Kawame (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-3087?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13125645#comment-13125645 ]
Yasuhiro Kawame commented on FELIX-3087:
----------------------------------------
Thanks a lot. But Boolean.parseBoolean() is used in PropertyMetadata.java.
I think this method should not be used. (see FELIX-2749)
> Given invalid value, but the property isn't invalid.
> ----------------------------------------------------
>
> Key: FELIX-3087
> URL: https://issues.apache.org/jira/browse/FELIX-3087
> Project: Felix
> Issue Type: Bug
> Components: Declarative Services (SCR)
> Affects Versions: scr-1.6.0
> Reporter: Yasuhiro Kawame
> Assignee: Felix Meschberger
> Fix For: scr-1.6.2
>
>
> Given the following XML, the value of the property will be invalid.
> But this property is a valid property, with a value of char 'a'.
> <?xml version="1.0" encoding="UTF-8"?>
> <scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0">
> <implementation class="DummyClass" />
> <property name="test.property.Character" type="Character" value="ab" />
> </scr:component>
--
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
[jira] [Commented] (FELIX-3087) Given invalid value, but the
property isn't invalid.
Posted by "Yasuhiro Kawame (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-3087?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13098679#comment-13098679 ]
Yasuhiro Kawame commented on FELIX-3087:
----------------------------------------
Thank you for your reply and posting this to the OSGi-Dev List.
"ab" is a String , not a Character. So I thought that this is invalid.
But check the spec again, this may not be a bug.
I will follow a decision of the developers.
> Given invalid value, but the property isn't invalid.
> ----------------------------------------------------
>
> Key: FELIX-3087
> URL: https://issues.apache.org/jira/browse/FELIX-3087
> Project: Felix
> Issue Type: Bug
> Components: Declarative Services (SCR)
> Affects Versions: scr-1.6.0
> Reporter: Yasuhiro Kawame
>
> Given the following XML, the value of the property will be invalid.
> But this property is a valid property, with a value of char 'a'.
> <?xml version="1.0" encoding="UTF-8"?>
> <scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0">
> <implementation class="DummyClass" />
> <property name="test.property.Character" type="Character" value="ab" />
> </scr:component>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira