[jira] [Closed] (FELIX-6554) Exception while starting Felix Configurator

2022-09-23 Thread A. J. David Bosschaert (Jira)


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

A. J. David Bosschaert closed FELIX-6554.
-

> Exception while starting Felix Configurator
> ---
>
> Key: FELIX-6554
> URL: https://issues.apache.org/jira/browse/FELIX-6554
> Project: Felix
>  Issue Type: Bug
>  Components: Configurator
>Affects Versions: configurator-1.0.14
>Reporter: Amit Mondal
>Assignee: Carsten Ziegeler
>Priority: Minor
>  Labels: pull-request-available
> Fix For: configurator-1.0.16
>
>
> On startup when the set of current bundles with configurations is missing a 
> bundle that was there on last shutdown, the configurator processes this 
> bundle as a removed bundle but then might run into below concurrent 
> modification exception:
> {code:java}
> java.util.ConcurrentModificationException
> at java.util.HashMap$HashIterator.nextNode(HashMap.java:1469)
> at java.util.HashMap$KeyIterator.next(HashMap.java:1493)
> at 
> org.apache.felix.configurator.impl.Configurator.start(Configurator.java:291)
> at 
> org.apache.felix.configurator.impl.ServicesListener.notifyChange(ServicesListener.java:117)
> at 
> org.apache.felix.configurator.impl.ServicesListener$1.addingService(ServicesListener.java:73)
> at 
> org.apache.felix.configurator.impl.ServicesListener$1.addingService(ServicesListener.java:65)
> at 
> org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:944)
> at 
> org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:872)
> at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
> at 
> org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:183)
> at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:322)
> at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:265)
> at 
> org.apache.felix.configurator.impl.ServicesListener.(ServicesListener.java:93)
> at org.apache.felix.configurator.impl.Activator.start(Activator.java:36)
> at 
> org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:849)
> at org.apache.felix.framework.Felix.activateBundle(Felix.java:2429){code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (FELIX-6470) ConfigAdmin/Coordinator handling not Spec-complient

2022-09-22 Thread A. J. David Bosschaert (Jira)


[ 
https://issues.apache.org/jira/browse/FELIX-6470?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17608315#comment-17608315
 ] 

A. J. David Bosschaert commented on FELIX-6470:
---

Thanks [~bisch...@jena.de] I added the failing test here: 
https://github.com/apache/felix-dev/pull/174

> ConfigAdmin/Coordinator handling not Spec-complient
> ---
>
> Key: FELIX-6470
> URL: https://issues.apache.org/jira/browse/FELIX-6470
> Project: Felix
>  Issue Type: Bug
>  Components: Configuration Admin
>Affects Versions: configadmin-1.9.22
>Reporter: Stefan Bischof
>Priority: Major
>
> The ConfigAdmin in combination with the Coordinator does not correctly 
> deliver existing Configuration to later registered ManagedService.
> A Test could be found here.
> https://github.com/osgi/osgi/pull/343



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Closed] (FELIX-6560) Interpolation of embedded arrays does not work

2022-09-01 Thread A. J. David Bosschaert (Jira)


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

A. J. David Bosschaert closed FELIX-6560.
-

> Interpolation of embedded arrays does not work
> --
>
> Key: FELIX-6560
> URL: https://issues.apache.org/jira/browse/FELIX-6560
> Project: Felix
>  Issue Type: Bug
>  Components: Configuration Admin
>Affects Versions: configadmin-interpolation-plugin-1.2.4
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
>Priority: Major
> Fix For: configadmin-interpolation-plugin-1.2.6
>
>
> If a configuration property is already a string array, and at least one of 
> the values contains a placeholder which gets replaced with an array, then the 
> resulting array should contain these array values as separate values.
> Right now, the array value will be a string array.
> For example:
> property=[ "1000", "$[prop:foo;type=String[];delimiter=,]", "4000"]
> with foo="2000,3000"
> should result in ["1000", "2000", "3000", "4000"]
> Right now it results in
> ["1000", ["2000", "3000"], "4000"]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Resolved] (FELIX-6444) Contribute a compatible implementation of OSGi Features

2021-08-18 Thread A. J. David Bosschaert (Jira)


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

A. J. David Bosschaert resolved FELIX-6444.
---
Resolution: Fixed

> Contribute a compatible implementation of OSGi Features
> ---
>
> Key: FELIX-6444
> URL: https://issues.apache.org/jira/browse/FELIX-6444
> Project: Felix
>  Issue Type: New Feature
>Reporter: A. J. David Bosschaert
>Assignee: A. J. David Bosschaert
>Priority: Major
>
> As discussed on the Felix Dev mailing list 
> (https://www.mail-archive.com/dev%40felix.apache.org/msg52338.html) a 
> compatible implementation of the OSGi Feature Service should be added.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work started] (FELIX-6444) Contribute a compatible implementation of OSGi Features

2021-08-12 Thread A. J. David Bosschaert (Jira)


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

Work on FELIX-6444 started by A. J. David Bosschaert.
-
> Contribute a compatible implementation of OSGi Features
> ---
>
> Key: FELIX-6444
> URL: https://issues.apache.org/jira/browse/FELIX-6444
> Project: Felix
>  Issue Type: New Feature
>Reporter: A. J. David Bosschaert
>Assignee: A. J. David Bosschaert
>Priority: Major
>
> As discussed on the Felix Dev mailing list 
> (https://www.mail-archive.com/dev%40felix.apache.org/msg52338.html) a 
> compatible implementation of the OSGi Feature Service should be added.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (FELIX-6444) Contribute a compatible implementation of OSGi Features

2021-08-12 Thread A. J. David Bosschaert (Jira)


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

A. J. David Bosschaert updated FELIX-6444:
--
Description: As discussed on the Felix Dev mailing list 
(https://www.mail-archive.com/dev%40felix.apache.org/msg52338.html) a 
compatible implementation of the OSGi Feature Service should be added.  (was: 
As discussed on the Felix Dev mailing list a compatible implementation of the 
OSGi Feature Service should be added.)

> Contribute a compatible implementation of OSGi Features
> ---
>
> Key: FELIX-6444
> URL: https://issues.apache.org/jira/browse/FELIX-6444
> Project: Felix
>  Issue Type: New Feature
>Reporter: A. J. David Bosschaert
>Assignee: A. J. David Bosschaert
>Priority: Major
>
> As discussed on the Felix Dev mailing list 
> (https://www.mail-archive.com/dev%40felix.apache.org/msg52338.html) a 
> compatible implementation of the OSGi Feature Service should be added.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (FELIX-6444) Contribute a compatible implementation of OSGi Features

2021-08-12 Thread A. J. David Bosschaert (Jira)
A. J. David Bosschaert created FELIX-6444:
-

 Summary: Contribute a compatible implementation of OSGi Features
 Key: FELIX-6444
 URL: https://issues.apache.org/jira/browse/FELIX-6444
 Project: Felix
  Issue Type: New Feature
Reporter: A. J. David Bosschaert
Assignee: A. J. David Bosschaert


As discussed on the Felix Dev mailing list a compatible implementation of the 
OSGi Feature Service should be added.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Closed] (FELIX-6441) Make it possible to run the Configuration Interpolation independently of Configuration Admin

2021-08-06 Thread A. J. David Bosschaert (Jira)


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

A. J. David Bosschaert closed FELIX-6441.
-

> Make it possible to run the Configuration Interpolation independently of 
> Configuration Admin
> 
>
> Key: FELIX-6441
> URL: https://issues.apache.org/jira/browse/FELIX-6441
> Project: Felix
>  Issue Type: Improvement
>  Components: Configuration Admin
>Affects Versions: configadmin-interpolation-plugin-1.1.2
>Reporter: A. J. David Bosschaert
>Assignee: A. J. David Bosschaert
>Priority: Major
> Fix For: configadmin-interpolation-plugin-1.2.0
>
>
> The configadmin interpolation plugin is currently always run as a plugin to 
> the Configuration Admin service.
> However, it can be very useful to be able to run this plugin outside of 
> Config Admin , for example for static analysis and validation of the 
> configuration before it's applied to a running system.
> Therefore we should provide an entrypoint to the interpolation provided by 
> this plugin that can run outside of the OSGi Configuration Admin Service.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Resolved] (FELIX-6441) Make it possible to run the Configuration Interpolation independently of Configuration Admin

2021-08-03 Thread A. J. David Bosschaert (Jira)


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

A. J. David Bosschaert resolved FELIX-6441.
---
Resolution: Fixed

> Make it possible to run the Configuration Interpolation independently of 
> Configuration Admin
> 
>
> Key: FELIX-6441
> URL: https://issues.apache.org/jira/browse/FELIX-6441
> Project: Felix
>  Issue Type: Improvement
>  Components: Configuration Admin
>Affects Versions: configadmin-interpolation-plugin-1.1.2
>Reporter: A. J. David Bosschaert
>Assignee: A. J. David Bosschaert
>Priority: Major
> Fix For: configadmin-interpolation-plugin-1.2.0
>
>
> The configadmin interpolation plugin is currently always run as a plugin to 
> the Configuration Admin service.
> However, it can be very useful to be able to run this plugin outside of 
> Config Admin , for example for static analysis and validation of the 
> configuration before it's applied to a running system.
> Therefore we should provide an entrypoint to the interpolation provided by 
> this plugin that can run outside of the OSGi Configuration Admin Service.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (FELIX-6273) Improve behaviour when delimiter is set but the type is not

2021-08-03 Thread A. J. David Bosschaert (Jira)


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

A. J. David Bosschaert updated FELIX-6273:
--
Fix Version/s: (was: configadmin-interpolation-plugin-1.2.0)
   configadmin-interpolation-plugin-1.2.2

> Improve behaviour when delimiter is set but the type is not
> ---
>
> Key: FELIX-6273
> URL: https://issues.apache.org/jira/browse/FELIX-6273
> Project: Felix
>  Issue Type: Improvement
>  Components: Configuration Admin
>Affects Versions: configadmin-interpolation-plugin-1.1.0
>Reporter: Robert Munteanu
>Priority: Major
> Fix For: configadmin-interpolation-plugin-1.2.2
>
>
> When configuring property values with a delimiter, it is expected that the 
> property is an array. Otherwise, the delimited does not make sense IMO.
> Assuming I have exporter {{PROP=foo,bar}}.
> If I configure interpolation for a property value as
> prop="$[env:PROP;delimiter=,]"
> At runtime it get interpolated to {{prop = foo,bar}}, which is 
> clearly not what I expected. The correct syntax is
> prop="$[env:PROP;type=String[];delimiter=,]"
> after which the interpolation result is indeed {{ prop = [foo, bar] 
> }}.
> There are a number of ways this could be improved
> - fail interpolation with an exception
> - log a WARN/ERROR message
> - assume that if a delimiter is present but the type is not, the type is 
> {{String[]}}, and not {{String}}.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (FELIX-6441) Make it possible to run the Configuration Interpolation independently of Configuration Admin

2021-08-03 Thread A. J. David Bosschaert (Jira)


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

A. J. David Bosschaert updated FELIX-6441:
--
Fix Version/s: configadmin-interpolation-plugin-1.2.0

> Make it possible to run the Configuration Interpolation independently of 
> Configuration Admin
> 
>
> Key: FELIX-6441
> URL: https://issues.apache.org/jira/browse/FELIX-6441
> Project: Felix
>  Issue Type: Improvement
>  Components: Configuration Admin
>Affects Versions: configadmin-interpolation-plugin-1.1.2
>Reporter: A. J. David Bosschaert
>Assignee: A. J. David Bosschaert
>Priority: Major
> Fix For: configadmin-interpolation-plugin-1.2.0
>
>
> The configadmin interpolation plugin is currently always run as a plugin to 
> the Configuration Admin service.
> However, it can be very useful to be able to run this plugin outside of 
> Config Admin , for example for static analysis and validation of the 
> configuration before it's applied to a running system.
> Therefore we should provide an entrypoint to the interpolation provided by 
> this plugin that can run outside of the OSGi Configuration Admin Service.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work started] (FELIX-6441) Make it possible to run the Configuration Interpolation independently of Configuration Admin

2021-07-30 Thread A. J. David Bosschaert (Jira)


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

Work on FELIX-6441 started by A. J. David Bosschaert.
-
> Make it possible to run the Configuration Interpolation independently of 
> Configuration Admin
> 
>
> Key: FELIX-6441
> URL: https://issues.apache.org/jira/browse/FELIX-6441
> Project: Felix
>  Issue Type: Improvement
>  Components: Configuration Admin
>Affects Versions: configadmin-interpolation-plugin-1.1.2
>Reporter: A. J. David Bosschaert
>Assignee: A. J. David Bosschaert
>Priority: Major
>
> The configadmin interpolation plugin is currently always run as a plugin to 
> the Configuration Admin service.
> However, it can be very useful to be able to run this plugin outside of 
> Config Admin , for example for static analysis and validation of the 
> configuration before it's applied to a running system.
> Therefore we should provide an entrypoint to the interpolation provided by 
> this plugin that can run outside of the OSGi Configuration Admin Service.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (FELIX-6441) Make it possible to run the Configuration Interpolation independently of Configuration Admin

2021-07-30 Thread A. J. David Bosschaert (Jira)
A. J. David Bosschaert created FELIX-6441:
-

 Summary: Make it possible to run the Configuration Interpolation 
independently of Configuration Admin
 Key: FELIX-6441
 URL: https://issues.apache.org/jira/browse/FELIX-6441
 Project: Felix
  Issue Type: Improvement
  Components: Configuration Admin
Affects Versions: configadmin-interpolation-plugin-1.1.2
Reporter: A. J. David Bosschaert
Assignee: A. J. David Bosschaert


The configadmin interpolation plugin is currently always run as a plugin to the 
Configuration Admin service.

However, it can be very useful to be able to run this plugin outside of Config 
Admin , for example for static analysis and validation of the configuration 
before it's applied to a running system.

Therefore we should provide an entrypoint to the interpolation provided by this 
plugin that can run outside of the OSGi Configuration Admin Service.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Closed] (FELIX-6402) ConcurrentModificationException results in null value while converting to an array

2021-06-08 Thread A. J. David Bosschaert (Jira)


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

A. J. David Bosschaert closed FELIX-6402.
-

> ConcurrentModificationException results in null value while converting to an 
> array
> --
>
> Key: FELIX-6402
> URL: https://issues.apache.org/jira/browse/FELIX-6402
> Project: Felix
>  Issue Type: Bug
>  Components: Converter
>Affects Versions: converter-1.0.14
>Reporter: Carsten Ziegeler
>Priority: Minor
> Fix For: converter-1.0.18
>
>
> As reported in SLING-10273 it sometimes happens that a conversion to a 
> String[] results in "null" to be returned by the converter. According to the 
> spec, a converter will always return a String array (might be empty).
> This got traced down in the issue to a ConcurrentModificationException (see 
> below) which is catched at [1] and then null is returned.
> It is probably better to raise a ConversionException in this case to make the 
> problem known to the caller - and also avoiding the unexpected null return 
> value
> [1] 
> https://github.com/apache/felix-dev/blob/master/converter/converter/src/main/java/org/osgi/util/converter/ConvertingImpl.java#L312
> {noformat}
> java.util.ConcurrentModificationException
> at 
> java.base/java.util.HashMap$HashIterator.nextNode(HashMap.java:1493)
> at java.base/java.util.HashMap$KeyIterator.next(HashMap.java:1516)
> at 
> org.osgi.util.converter.ConvertingImpl.convertToArray(ConvertingImpl.java:306)
> at org.osgi.util.converter.ConvertingImpl.to(ConvertingImpl.java:207)
> at 
> org.osgi.util.converter.CustomConverterImpl$ConvertingWrapper.to(CustomConverterImpl.java:183)
> at 
> org.osgi.util.converter.CustomConverterImpl$ConvertingWrapper.to(CustomConverterImpl.java:151)
> at 
> org.osgi.util.converter.CustomConverterImpl$ConvertingWrapper.to(CustomConverterImpl.java:139)
> at 
> org.apache.sling.auth.core.impl.SlingAuthenticatorServiceListener.modifiedService(SlingAuthenticatorServiceListener.java:369)
> at 
> org.apache.sling.auth.core.impl.SlingAuthenticatorServiceListener.process(SlingAuthenticatorServiceListener.java:280)
> at 
> org.apache.sling.auth.core.impl.SlingAuthenticatorServiceListener.processQueue(SlingAuthenticatorServiceListener.java:257)
> at 
> org.apache.sling.auth.core.impl.SlingAuthenticatorServiceListener.lambda$schedule$0(SlingAuthenticatorServiceListener.java:166)
> at 
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
> at 
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
> at java.base/java.lang.Thread.run(Thread.java:834)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Resolved] (FELIX-6402) ConcurrentModificationException results in null value while converting to an array

2021-06-04 Thread A. J. David Bosschaert (Jira)


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

A. J. David Bosschaert resolved FELIX-6402.
---
Resolution: Fixed

> ConcurrentModificationException results in null value while converting to an 
> array
> --
>
> Key: FELIX-6402
> URL: https://issues.apache.org/jira/browse/FELIX-6402
> Project: Felix
>  Issue Type: Bug
>  Components: Converter
>Affects Versions: converter-1.0.14
>Reporter: Carsten Ziegeler
>Priority: Minor
> Fix For: converter-1.0.18
>
>
> As reported in SLING-10273 it sometimes happens that a conversion to a 
> String[] results in "null" to be returned by the converter. According to the 
> spec, a converter will always return a String array (might be empty).
> This got traced down in the issue to a ConcurrentModificationException (see 
> below) which is catched at [1] and then null is returned.
> It is probably better to raise a ConversionException in this case to make the 
> problem known to the caller - and also avoiding the unexpected null return 
> value
> [1] 
> https://github.com/apache/felix-dev/blob/master/converter/converter/src/main/java/org/osgi/util/converter/ConvertingImpl.java#L312
> {noformat}
> java.util.ConcurrentModificationException
> at 
> java.base/java.util.HashMap$HashIterator.nextNode(HashMap.java:1493)
> at java.base/java.util.HashMap$KeyIterator.next(HashMap.java:1516)
> at 
> org.osgi.util.converter.ConvertingImpl.convertToArray(ConvertingImpl.java:306)
> at org.osgi.util.converter.ConvertingImpl.to(ConvertingImpl.java:207)
> at 
> org.osgi.util.converter.CustomConverterImpl$ConvertingWrapper.to(CustomConverterImpl.java:183)
> at 
> org.osgi.util.converter.CustomConverterImpl$ConvertingWrapper.to(CustomConverterImpl.java:151)
> at 
> org.osgi.util.converter.CustomConverterImpl$ConvertingWrapper.to(CustomConverterImpl.java:139)
> at 
> org.apache.sling.auth.core.impl.SlingAuthenticatorServiceListener.modifiedService(SlingAuthenticatorServiceListener.java:369)
> at 
> org.apache.sling.auth.core.impl.SlingAuthenticatorServiceListener.process(SlingAuthenticatorServiceListener.java:280)
> at 
> org.apache.sling.auth.core.impl.SlingAuthenticatorServiceListener.processQueue(SlingAuthenticatorServiceListener.java:257)
> at 
> org.apache.sling.auth.core.impl.SlingAuthenticatorServiceListener.lambda$schedule$0(SlingAuthenticatorServiceListener.java:166)
> at 
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
> at 
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
> at java.base/java.lang.Thread.run(Thread.java:834)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (FELIX-6402) ConcurrentModificationException results in null value while converting to an array

2021-06-04 Thread A. J. David Bosschaert (Jira)


[ 
https://issues.apache.org/jira/browse/FELIX-6402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17357190#comment-17357190
 ] 

A. J. David Bosschaert commented on FELIX-6402:
---

The PR https://github.com/apache/felix-dev/pull/74 was merged so I'm closing 
the issue.

> ConcurrentModificationException results in null value while converting to an 
> array
> --
>
> Key: FELIX-6402
> URL: https://issues.apache.org/jira/browse/FELIX-6402
> Project: Felix
>  Issue Type: Bug
>  Components: Converter
>Affects Versions: converter-1.0.14
>Reporter: Carsten Ziegeler
>Priority: Minor
> Fix For: converter-1.0.18
>
>
> As reported in SLING-10273 it sometimes happens that a conversion to a 
> String[] results in "null" to be returned by the converter. According to the 
> spec, a converter will always return a String array (might be empty).
> This got traced down in the issue to a ConcurrentModificationException (see 
> below) which is catched at [1] and then null is returned.
> It is probably better to raise a ConversionException in this case to make the 
> problem known to the caller - and also avoiding the unexpected null return 
> value
> [1] 
> https://github.com/apache/felix-dev/blob/master/converter/converter/src/main/java/org/osgi/util/converter/ConvertingImpl.java#L312
> {noformat}
> java.util.ConcurrentModificationException
> at 
> java.base/java.util.HashMap$HashIterator.nextNode(HashMap.java:1493)
> at java.base/java.util.HashMap$KeyIterator.next(HashMap.java:1516)
> at 
> org.osgi.util.converter.ConvertingImpl.convertToArray(ConvertingImpl.java:306)
> at org.osgi.util.converter.ConvertingImpl.to(ConvertingImpl.java:207)
> at 
> org.osgi.util.converter.CustomConverterImpl$ConvertingWrapper.to(CustomConverterImpl.java:183)
> at 
> org.osgi.util.converter.CustomConverterImpl$ConvertingWrapper.to(CustomConverterImpl.java:151)
> at 
> org.osgi.util.converter.CustomConverterImpl$ConvertingWrapper.to(CustomConverterImpl.java:139)
> at 
> org.apache.sling.auth.core.impl.SlingAuthenticatorServiceListener.modifiedService(SlingAuthenticatorServiceListener.java:369)
> at 
> org.apache.sling.auth.core.impl.SlingAuthenticatorServiceListener.process(SlingAuthenticatorServiceListener.java:280)
> at 
> org.apache.sling.auth.core.impl.SlingAuthenticatorServiceListener.processQueue(SlingAuthenticatorServiceListener.java:257)
> at 
> org.apache.sling.auth.core.impl.SlingAuthenticatorServiceListener.lambda$schedule$0(SlingAuthenticatorServiceListener.java:166)
> at 
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
> at 
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
> at java.base/java.lang.Thread.run(Thread.java:834)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (FELIX-6402) ConcurrentModificationException results in null value while converting to an array

2021-06-04 Thread A. J. David Bosschaert (Jira)


[ 
https://issues.apache.org/jira/browse/FELIX-6402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17357189#comment-17357189
 ] 

A. J. David Bosschaert commented on FELIX-6402:
---

Actually, I thought this issue was fixed? Wasn't a fix merged for it at 
https://github.com/apache/felix-dev/commit/18aa59f1e05a25ef510a29f20f96922dfb6ebd94
 ?

So can the issue be closed?

> ConcurrentModificationException results in null value while converting to an 
> array
> --
>
> Key: FELIX-6402
> URL: https://issues.apache.org/jira/browse/FELIX-6402
> Project: Felix
>  Issue Type: Bug
>  Components: Converter
>Affects Versions: converter-1.0.14
>Reporter: Carsten Ziegeler
>Priority: Minor
> Fix For: converter-1.0.18
>
>
> As reported in SLING-10273 it sometimes happens that a conversion to a 
> String[] results in "null" to be returned by the converter. According to the 
> spec, a converter will always return a String array (might be empty).
> This got traced down in the issue to a ConcurrentModificationException (see 
> below) which is catched at [1] and then null is returned.
> It is probably better to raise a ConversionException in this case to make the 
> problem known to the caller - and also avoiding the unexpected null return 
> value
> [1] 
> https://github.com/apache/felix-dev/blob/master/converter/converter/src/main/java/org/osgi/util/converter/ConvertingImpl.java#L312
> {noformat}
> java.util.ConcurrentModificationException
> at 
> java.base/java.util.HashMap$HashIterator.nextNode(HashMap.java:1493)
> at java.base/java.util.HashMap$KeyIterator.next(HashMap.java:1516)
> at 
> org.osgi.util.converter.ConvertingImpl.convertToArray(ConvertingImpl.java:306)
> at org.osgi.util.converter.ConvertingImpl.to(ConvertingImpl.java:207)
> at 
> org.osgi.util.converter.CustomConverterImpl$ConvertingWrapper.to(CustomConverterImpl.java:183)
> at 
> org.osgi.util.converter.CustomConverterImpl$ConvertingWrapper.to(CustomConverterImpl.java:151)
> at 
> org.osgi.util.converter.CustomConverterImpl$ConvertingWrapper.to(CustomConverterImpl.java:139)
> at 
> org.apache.sling.auth.core.impl.SlingAuthenticatorServiceListener.modifiedService(SlingAuthenticatorServiceListener.java:369)
> at 
> org.apache.sling.auth.core.impl.SlingAuthenticatorServiceListener.process(SlingAuthenticatorServiceListener.java:280)
> at 
> org.apache.sling.auth.core.impl.SlingAuthenticatorServiceListener.processQueue(SlingAuthenticatorServiceListener.java:257)
> at 
> org.apache.sling.auth.core.impl.SlingAuthenticatorServiceListener.lambda$schedule$0(SlingAuthenticatorServiceListener.java:166)
> at 
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
> at 
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
> at java.base/java.lang.Thread.run(Thread.java:834)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Closed] (FELIX-6384) Felix Configadmin Interpolator: Support default directive with empty value

2021-02-21 Thread A. J. David Bosschaert (Jira)


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

A. J. David Bosschaert closed FELIX-6384.
-

> Felix Configadmin Interpolator: Support default directive with empty value
> --
>
> Key: FELIX-6384
> URL: https://issues.apache.org/jira/browse/FELIX-6384
> Project: Felix
>  Issue Type: Improvement
>  Components: Configuration Admin
>Affects Versions: configadmin-interpolation-plugin-1.1.0
>Reporter: Konrad Windszus
>Priority: Major
> Fix For: configadmin-interpolation-plugin-1.1.2
>
>
> Currently in 
> https://github.com/apache/felix-dev/tree/master/configadmin-plugins/interpolation#default-values
>  it is not stated that an empty value is not supported as default value. 
> Still the following code is not replaced as expected
> {code}
> $[env:NON_EXISTING_VAR;default=]
> {code}
> This is due to the parsing logic in 
> https://github.com/apache/felix-dev/blob/0aa232a4ff8f95e92d947027ac7d8010e2a0e142/configadmin-plugins/interpolation/src/main/java/org/apache/felix/configadmin/plugin/interpolation/Interpolator.java#L118
>  which detects the directive (in this case {{default}}) only in case there is 
> at least one character after the {{=}}.
> This limitation should be lifted to also allow empty values as default 
> values. At the same time values containing the character {{=}} should be 
> allowed as well.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (FELIX-6273) Improve behaviour when delimiter is set but the type is not

2021-02-17 Thread A. J. David Bosschaert (Jira)


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

A. J. David Bosschaert updated FELIX-6273:
--
Fix Version/s: (was: configadmin-interpolation-plugin-1.1.2)
   configadmin-interpolation-plugin-1.1.4

> Improve behaviour when delimiter is set but the type is not
> ---
>
> Key: FELIX-6273
> URL: https://issues.apache.org/jira/browse/FELIX-6273
> Project: Felix
>  Issue Type: Improvement
>  Components: Configuration Admin
>Affects Versions: configadmin-interpolation-plugin-1.1.0
>Reporter: Robert Munteanu
>Priority: Major
> Fix For: configadmin-interpolation-plugin-1.1.4
>
>
> When configuring property values with a delimiter, it is expected that the 
> property is an array. Otherwise, the delimited does not make sense IMO.
> Assuming I have exporter {{PROP=foo,bar}}.
> If I configure interpolation for a property value as
> prop="$[env:PROP;delimiter=,]"
> At runtime it get interpolated to {{prop = foo,bar}}, which is 
> clearly not what I expected. The correct syntax is
> prop="$[env:PROP;type=String[];delimiter=,]"
> after which the interpolation result is indeed {{ prop = [foo, bar] 
> }}.
> There are a number of ways this could be improved
> - fail interpolation with an exception
> - log a WARN/ERROR message
> - assume that if a delimiter is present but the type is not, the type is 
> {{String[]}}, and not {{String}}.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (FELIX-6384) Felix Configadmin Interpolator: Support default directive with empty value

2021-02-16 Thread A. J. David Bosschaert (Jira)


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

A. J. David Bosschaert updated FELIX-6384:
--
Fix Version/s: configadmin-interpolation-plugin-1.1.2

> Felix Configadmin Interpolator: Support default directive with empty value
> --
>
> Key: FELIX-6384
> URL: https://issues.apache.org/jira/browse/FELIX-6384
> Project: Felix
>  Issue Type: Improvement
>  Components: Configuration Admin
>Affects Versions: configadmin-interpolation-plugin-1.1.0
>Reporter: Konrad Windszus
>Priority: Major
> Fix For: configadmin-interpolation-plugin-1.1.2
>
>
> Currently in 
> https://github.com/apache/felix-dev/tree/master/configadmin-plugins/interpolation#default-values
>  it is not stated that an empty value is not supported as default value. 
> Still the following code is not replaced as expected
> {code}
> $[env:NON_EXISTING_VAR;default=]
> {code}
> This is due to the parsing logic in 
> https://github.com/apache/felix-dev/blob/0aa232a4ff8f95e92d947027ac7d8010e2a0e142/configadmin-plugins/interpolation/src/main/java/org/apache/felix/configadmin/plugin/interpolation/Interpolator.java#L118
>  which detects the directive (in this case {{default}}) only in case there is 
> at least one character after the {{=}}.
> This limitation should be lifted to also allow empty values as default 
> values. At the same time values containing the character {{=}} should be 
> allowed as well.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (FELIX-6384) Felix Configadmin Interpolator: Support default directive with empty value

2021-02-16 Thread A. J. David Bosschaert (Jira)


[ 
https://issues.apache.org/jira/browse/FELIX-6384?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17285210#comment-17285210
 ] 

A. J. David Bosschaert commented on FELIX-6384:
---

Merged with many thanks [~kwin]!

> Felix Configadmin Interpolator: Support default directive with empty value
> --
>
> Key: FELIX-6384
> URL: https://issues.apache.org/jira/browse/FELIX-6384
> Project: Felix
>  Issue Type: Improvement
>  Components: Configuration Admin
>Affects Versions: configadmin-interpolation-plugin-1.1.0
>Reporter: Konrad Windszus
>Priority: Major
>
> Currently in 
> https://github.com/apache/felix-dev/tree/master/configadmin-plugins/interpolation#default-values
>  it is not stated that an empty value is not supported as default value. 
> Still the following code is not replaced as expected
> {code}
> $[env:NON_EXISTING_VAR;default=]
> {code}
> This is due to the parsing logic in 
> https://github.com/apache/felix-dev/blob/0aa232a4ff8f95e92d947027ac7d8010e2a0e142/configadmin-plugins/interpolation/src/main/java/org/apache/felix/configadmin/plugin/interpolation/Interpolator.java#L118
>  which detects the directive (in this case {{default}}) only in case there is 
> at least one character after the {{=}}.
> This limitation should be lifted to also allow empty values as default 
> values. At the same time values containing the character {{=}} should be 
> allowed as well.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Resolved] (FELIX-6384) Felix Configadmin Interpolator: Support default directive with empty value

2021-02-16 Thread A. J. David Bosschaert (Jira)


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

A. J. David Bosschaert resolved FELIX-6384.
---
Resolution: Fixed

> Felix Configadmin Interpolator: Support default directive with empty value
> --
>
> Key: FELIX-6384
> URL: https://issues.apache.org/jira/browse/FELIX-6384
> Project: Felix
>  Issue Type: Improvement
>  Components: Configuration Admin
>Affects Versions: configadmin-interpolation-plugin-1.1.0
>Reporter: Konrad Windszus
>Priority: Major
> Fix For: configadmin-interpolation-plugin-1.1.2
>
>
> Currently in 
> https://github.com/apache/felix-dev/tree/master/configadmin-plugins/interpolation#default-values
>  it is not stated that an empty value is not supported as default value. 
> Still the following code is not replaced as expected
> {code}
> $[env:NON_EXISTING_VAR;default=]
> {code}
> This is due to the parsing logic in 
> https://github.com/apache/felix-dev/blob/0aa232a4ff8f95e92d947027ac7d8010e2a0e142/configadmin-plugins/interpolation/src/main/java/org/apache/felix/configadmin/plugin/interpolation/Interpolator.java#L118
>  which detects the directive (in this case {{default}}) only in case there is 
> at least one character after the {{=}}.
> This limitation should be lifted to also allow empty values as default 
> values. At the same time values containing the character {{=}} should be 
> allowed as well.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Closed] (FELIX-6362) Utils ResourceBuilder does not allow java.* imports

2020-11-27 Thread A. J. David Bosschaert (Jira)


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

A. J. David Bosschaert closed FELIX-6362.
-

> Utils ResourceBuilder does not allow java.* imports
> ---
>
> Key: FELIX-6362
> URL: https://issues.apache.org/jira/browse/FELIX-6362
> Project: Felix
>  Issue Type: Bug
>  Components: Utils
>Affects Versions: utils-1.11.4
>Reporter: A. J. David Bosschaert
>Assignee: A. J. David Bosschaert
>Priority: Major
> Fix For: utils-1.11.6
>
>
> As of OSGi R7 java.* imports are allowed. The ResourceBuilder still throws an 
> exception it it sees them though.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Resolved] (FELIX-6362) Utils ResourceBuilder does not allow java.* imports

2020-11-24 Thread A. J. David Bosschaert (Jira)


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

A. J. David Bosschaert resolved FELIX-6362.
---
Resolution: Fixed

> Utils ResourceBuilder does not allow java.* imports
> ---
>
> Key: FELIX-6362
> URL: https://issues.apache.org/jira/browse/FELIX-6362
> Project: Felix
>  Issue Type: Bug
>  Components: Utils
>Affects Versions: utils-1.11.4
>Reporter: A. J. David Bosschaert
>Assignee: A. J. David Bosschaert
>Priority: Major
> Fix For: utils-1.11.6
>
>
> As of OSGi R7 java.* imports are allowed. The ResourceBuilder still throws an 
> exception it it sees them though.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (FELIX-6174) org.apache.felix.utils.properties.TypedProperties does not parse arrays correctly

2020-11-24 Thread A. J. David Bosschaert (Jira)


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

A. J. David Bosschaert updated FELIX-6174:
--
Fix Version/s: (was: utils-1.11.6)
   utils-1.11.8

> org.apache.felix.utils.properties.TypedProperties does not parse arrays 
> correctly
> -
>
> Key: FELIX-6174
> URL: https://issues.apache.org/jira/browse/FELIX-6174
> Project: Felix
>  Issue Type: Bug
>  Components: Utils
>Affects Versions: utils-1.10.4
> Environment: Windows 7 / tested with 
> org.apache.felix.org.apache.felix.utils_1.11.2.jar
>Reporter: Mike Rumpf
>Assignee: Jean-Baptiste Onofré
>Priority: Critical
> Fix For: utils-1.11.8
>
> Attachments: TypedPropertiesTest.java
>
>
> org.apache.felix.utils.properties.TypedProperties does not parse arrays in 
> OSGi configurations correctly.
> While a single line config with
> key=["val1","val2"] works fine
> just adding a standard key value pair
> key2=val2
> has the consequence that the value for "key" is not parsed as an array 
> anymore.
> (see attached JUnit test to demonstrate the problem)
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work started] (FELIX-6362) Utils ResourceBuilder does not allow java.* imports

2020-11-23 Thread A. J. David Bosschaert (Jira)


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

Work on FELIX-6362 started by A. J. David Bosschaert.
-
> Utils ResourceBuilder does not allow java.* imports
> ---
>
> Key: FELIX-6362
> URL: https://issues.apache.org/jira/browse/FELIX-6362
> Project: Felix
>  Issue Type: Bug
>  Components: Utils
>Affects Versions: utils-1.11.4
>Reporter: A. J. David Bosschaert
>Assignee: A. J. David Bosschaert
>Priority: Major
> Fix For: utils-1.11.5
>
>
> As of OSGi R7 java.* imports are allowed. The ResourceBuilder still throws an 
> exception it it sees them though.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (FELIX-6362) Utils ResourceBuilder does not allow java.* imports

2020-11-23 Thread A. J. David Bosschaert (Jira)
A. J. David Bosschaert created FELIX-6362:
-

 Summary: Utils ResourceBuilder does not allow java.* imports
 Key: FELIX-6362
 URL: https://issues.apache.org/jira/browse/FELIX-6362
 Project: Felix
  Issue Type: Bug
  Components: Utils
Affects Versions: utils-1.11.4
Reporter: A. J. David Bosschaert
Assignee: A. J. David Bosschaert
 Fix For: utils-1.11.5


As of OSGi R7 java.* imports are allowed. The ResourceBuilder still throws an 
exception it it sees them though.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (FELIX-6048) Could not obtain lock

2020-05-12 Thread A. J. David Bosschaert (Jira)


[ 
https://issues.apache.org/jira/browse/FELIX-6048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17105424#comment-17105424
 ] 

A. J. David Bosschaert commented on FELIX-6048:
---

It would be really good if someone could post a testcase for this, if it's 
still reproducable...

> Could not obtain lock
> -
>
> Key: FELIX-6048
> URL: https://issues.apache.org/jira/browse/FELIX-6048
> Project: Felix
>  Issue Type: Bug
>  Components: Declarative Services (SCR)
>Affects Versions: scr-2.1.14
>Reporter: Alain Picard
>Priority: Minor
> Attachments: Felix no lock.png
>
>
> I regularly get this exception when starting our app, w/o having ever seen 
> any impact.
>  
> {code:java}
> !ENTRY org.eclipse.equinox.cm 4 0 2019-02-02 14:31:46.715
> !MESSAGE Could not obtain lock
> !STACK 0
> java.lang.IllegalStateException: Could not obtain lock
>     at 
> org.apache.felix.scr.impl.manager.AbstractComponentManager.obtainLock(AbstractComponentManager.java:231)
>     at 
> org.apache.felix.scr.impl.manager.AbstractComponentManager.obtainActivationWriteLock(AbstractComponentManager.java:266)
>     at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.reconfigure(SingleComponentManager.java:633)
>     at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.reconfigure(SingleComponentManager.java:609)
>     at 
> org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.configurationUpdated(ConfigurableComponentHolder.java:426)
>     at 
> org.apache.felix.scr.impl.manager.RegionConfigurationSupport.configurationEvent(RegionConfigurationSupport.java:284)
>     at 
> org.apache.felix.scr.impl.manager.RegionConfigurationSupport$1.configurationEvent(RegionConfigurationSupport.java:89)
>     at 
> org.eclipse.equinox.internal.cm.EventDispatcher$1.run(EventDispatcher.java:89)
>     at 
> org.eclipse.equinox.internal.cm.SerializedTaskQueue$1.run(SerializedTaskQueue.java:36)
> After reporting on OSGI forum, was suggested to report here.{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Comment Edited] (FELIX-6234) Update Snakeyaml

2020-04-17 Thread A. J. David Bosschaert (Jira)


[ 
https://issues.apache.org/jira/browse/FELIX-6234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17085528#comment-17085528
 ] 

A. J. David Bosschaert edited comment on FELIX-6234 at 4/17/20, 8:10 AM:
-

Removed the fix release version as the Serializer is not part of the Converter 
releases.


was (Author: davidb):
Removed the fix release version as the Schematizer is not part of the Converter 
releases.

> Update Snakeyaml
> 
>
> Key: FELIX-6234
> URL: https://issues.apache.org/jira/browse/FELIX-6234
> Project: Felix
>  Issue Type: Improvement
>  Components: Converter
>Reporter: Colm O hEigeartaigh
>Priority: Major
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Please update Snakeyaml to 1.26, as it fixes some potential security issues 
> regarding denial of service attacks. I will submit a PR.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (FELIX-6234) Update Snakeyaml

2020-04-17 Thread A. J. David Bosschaert (Jira)


[ 
https://issues.apache.org/jira/browse/FELIX-6234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17085528#comment-17085528
 ] 

A. J. David Bosschaert commented on FELIX-6234:
---

Removed the fix release version as the Schematizer is not part of the Converter 
releases.

> Update Snakeyaml
> 
>
> Key: FELIX-6234
> URL: https://issues.apache.org/jira/browse/FELIX-6234
> Project: Felix
>  Issue Type: Improvement
>  Components: Converter
>Reporter: Colm O hEigeartaigh
>Priority: Major
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Please update Snakeyaml to 1.26, as it fixes some potential security issues 
> regarding denial of service attacks. I will submit a PR.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (FELIX-6234) Update Snakeyaml

2020-04-17 Thread A. J. David Bosschaert (Jira)


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

A. J. David Bosschaert updated FELIX-6234:
--
Fix Version/s: (was: converter-1.0.14)

> Update Snakeyaml
> 
>
> Key: FELIX-6234
> URL: https://issues.apache.org/jira/browse/FELIX-6234
> Project: Felix
>  Issue Type: Improvement
>  Components: Converter
>Reporter: Colm O hEigeartaigh
>Priority: Major
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Please update Snakeyaml to 1.26, as it fixes some potential security issues 
> regarding denial of service attacks. I will submit a PR.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Resolved] (FELIX-6242) Conversion of boolean to Long results in Integer

2020-04-17 Thread A. J. David Bosschaert (Jira)


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

A. J. David Bosschaert resolved FELIX-6242.
---
Resolution: Fixed

> Conversion of boolean to Long results in Integer
> 
>
> Key: FELIX-6242
> URL: https://issues.apache.org/jira/browse/FELIX-6242
> Project: Felix
>  Issue Type: Bug
>  Components: Converter
>Affects Versions: converter-1.0.12
>Reporter: Carsten Ziegeler
>Assignee: A. J. David Bosschaert
>Priority: Major
> Fix For: converter-1.0.14
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> When converting a boolean to a Long, an Integer is returned. the following 
> test fails:
> assertEquals(Long.valueOf(1), 
> converter.convert(Boolean.TRUE).to(Long.class));



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Resolved] (FELIX-6239) Converter should be able to invoke default methods in Interfaces

2020-04-17 Thread A. J. David Bosschaert (Jira)


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

A. J. David Bosschaert resolved FELIX-6239.
---
Resolution: Fixed

> Converter should be able to invoke default methods in Interfaces
> 
>
> Key: FELIX-6239
> URL: https://issues.apache.org/jira/browse/FELIX-6239
> Project: Felix
>  Issue Type: New Feature
>  Components: Converter
>Affects Versions: converter-1.0.12
>Reporter: Stefan Bischof
>Priority: Minor
> Fix For: converter-1.0.14
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Would be nice if Converter could invoke default methods in Interfaces.
> https://github.com/apache/felix-dev/blob/f4304bdea3fb9280ccc0b75dc97275125bc5cbfb/converter/converter/src/main/java/org/osgi/util/converter/ConvertingImpl.java#L807-L820
> I didn't found a proper way to invoke default methods <= and > Java 8.
> Test: 
> {code:java}
>  interface InterfaceWithDefault
>  {
>default String s()
>{
>  return "s";
> }
>  }
> @Test()
> public void testInterfaceWithDefault() throws Exception
> {
>InterfaceWithDefault i = Converters.standardConverter().convert(new 
> HashMap()).to(InterfaceWithDefault.class);
>assertEquals("s", i.s());
> }
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (FELIX-6242) Conversion of boolean to Long results in Integer

2020-04-16 Thread A. J. David Bosschaert (Jira)


[ 
https://issues.apache.org/jira/browse/FELIX-6242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17084853#comment-17084853
 ] 

A. J. David Bosschaert commented on FELIX-6242:
---

Fix in PR https://github.com/apache/felix-dev/pull/18

> Conversion of boolean to Long results in Integer
> 
>
> Key: FELIX-6242
> URL: https://issues.apache.org/jira/browse/FELIX-6242
> Project: Felix
>  Issue Type: Bug
>  Components: Converter
>Affects Versions: converter-1.0.12
>Reporter: Carsten Ziegeler
>Assignee: A. J. David Bosschaert
>Priority: Major
> Fix For: converter-1.0.14
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> When converting a boolean to a Long, an Integer is returned. the following 
> test fails:
> assertEquals(Long.valueOf(1), 
> converter.convert(Boolean.TRUE).to(Long.class));



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work started] (FELIX-6242) Conversion of boolean to Long results in Integer

2020-04-16 Thread A. J. David Bosschaert (Jira)


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

Work on FELIX-6242 started by A. J. David Bosschaert.
-
> Conversion of boolean to Long results in Integer
> 
>
> Key: FELIX-6242
> URL: https://issues.apache.org/jira/browse/FELIX-6242
> Project: Felix
>  Issue Type: Bug
>  Components: Converter
>Affects Versions: converter-1.0.12
>Reporter: Carsten Ziegeler
>Assignee: A. J. David Bosschaert
>Priority: Major
> Fix For: converter-1.0.14
>
>
> When converting a boolean to a Long, an Integer is returned. the following 
> test fails:
> assertEquals(Long.valueOf(1), 
> converter.convert(Boolean.TRUE).to(Long.class));



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (FELIX-6242) Conversion of boolean to Long results in Integer

2020-04-15 Thread A. J. David Bosschaert (Jira)


[ 
https://issues.apache.org/jira/browse/FELIX-6242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17083889#comment-17083889
 ] 

A. J. David Bosschaert commented on FELIX-6242:
---

Thanks for the additional tests [~cziegeler]! I hope to look at fixing this 
soon.

> Conversion of boolean to Long results in Integer
> 
>
> Key: FELIX-6242
> URL: https://issues.apache.org/jira/browse/FELIX-6242
> Project: Felix
>  Issue Type: Bug
>  Components: Converter
>Affects Versions: converter-1.0.12
>Reporter: Carsten Ziegeler
>Assignee: A. J. David Bosschaert
>Priority: Major
> Fix For: converter-1.0.14
>
>
> When converting a boolean to a Long, an Integer is returned. the following 
> test fails:
> assertEquals(Long.valueOf(1), 
> converter.convert(Boolean.TRUE).to(Long.class));



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (FELIX-6239) Converter should be able to invoke default methods in Interfaces

2020-04-14 Thread A. J. David Bosschaert (Jira)


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

A. J. David Bosschaert updated FELIX-6239:
--
Fix Version/s: converter-1.0.14

> Converter should be able to invoke default methods in Interfaces
> 
>
> Key: FELIX-6239
> URL: https://issues.apache.org/jira/browse/FELIX-6239
> Project: Felix
>  Issue Type: New Feature
>  Components: Converter
>Reporter: Stefan Bischof
>Priority: Minor
> Fix For: converter-1.0.14
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Would be nice if Converter could invoke default methods in Interfaces.
> https://github.com/apache/felix-dev/blob/f4304bdea3fb9280ccc0b75dc97275125bc5cbfb/converter/converter/src/main/java/org/osgi/util/converter/ConvertingImpl.java#L807-L820
> I didn't found a proper way to invoke default methods <= and > Java 8.
> Test: 
> {code:java}
>  interface InterfaceWithDefault
>  {
>default String s()
>{
>  return "s";
> }
>  }
> @Test()
> public void testInterfaceWithDefault() throws Exception
> {
>InterfaceWithDefault i = Converters.standardConverter().convert(new 
> HashMap()).to(InterfaceWithDefault.class);
>assertEquals("s", i.s());
> }
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (FELIX-6239) Converter should be able to invoke default methods in Interfaces

2020-04-14 Thread A. J. David Bosschaert (Jira)


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

A. J. David Bosschaert updated FELIX-6239:
--
Affects Version/s: converter-1.0.12

> Converter should be able to invoke default methods in Interfaces
> 
>
> Key: FELIX-6239
> URL: https://issues.apache.org/jira/browse/FELIX-6239
> Project: Felix
>  Issue Type: New Feature
>  Components: Converter
>Affects Versions: converter-1.0.12
>Reporter: Stefan Bischof
>Priority: Minor
> Fix For: converter-1.0.14
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Would be nice if Converter could invoke default methods in Interfaces.
> https://github.com/apache/felix-dev/blob/f4304bdea3fb9280ccc0b75dc97275125bc5cbfb/converter/converter/src/main/java/org/osgi/util/converter/ConvertingImpl.java#L807-L820
> I didn't found a proper way to invoke default methods <= and > Java 8.
> Test: 
> {code:java}
>  interface InterfaceWithDefault
>  {
>default String s()
>{
>  return "s";
> }
>  }
> @Test()
> public void testInterfaceWithDefault() throws Exception
> {
>InterfaceWithDefault i = Converters.standardConverter().convert(new 
> HashMap()).to(InterfaceWithDefault.class);
>assertEquals("s", i.s());
> }
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (FELIX-6239) Converter should be able to invoke default methods in Interfaces

2020-04-14 Thread A. J. David Bosschaert (Jira)


[ 
https://issues.apache.org/jira/browse/FELIX-6239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17083189#comment-17083189
 ] 

A. J. David Bosschaert commented on FELIX-6239:
---

The PR is merged. [~bisch...@jena.de] is there anything else to do or can we 
resolve this issue?

> Converter should be able to invoke default methods in Interfaces
> 
>
> Key: FELIX-6239
> URL: https://issues.apache.org/jira/browse/FELIX-6239
> Project: Felix
>  Issue Type: New Feature
>  Components: Converter
>Reporter: Stefan Bischof
>Priority: Minor
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Would be nice if Converter could invoke default methods in Interfaces.
> https://github.com/apache/felix-dev/blob/f4304bdea3fb9280ccc0b75dc97275125bc5cbfb/converter/converter/src/main/java/org/osgi/util/converter/ConvertingImpl.java#L807-L820
> I didn't found a proper way to invoke default methods <= and > Java 8.
> Test: 
> {code:java}
>  interface InterfaceWithDefault
>  {
>default String s()
>{
>  return "s";
> }
>  }
> @Test()
> public void testInterfaceWithDefault() throws Exception
> {
>InterfaceWithDefault i = Converters.standardConverter().convert(new 
> HashMap()).to(InterfaceWithDefault.class);
>assertEquals("s", i.s());
> }
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (FELIX-6242) Conversion of boolean to Long results in Integer

2020-03-30 Thread A. J. David Bosschaert (Jira)


[ 
https://issues.apache.org/jira/browse/FELIX-6242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17070803#comment-17070803
 ] 

A. J. David Bosschaert commented on FELIX-6242:
---

Thanks for the details, [~cziegeler] - I plan to look into this soon.

> Conversion of boolean to Long results in Integer
> 
>
> Key: FELIX-6242
> URL: https://issues.apache.org/jira/browse/FELIX-6242
> Project: Felix
>  Issue Type: Bug
>  Components: Converter
>Affects Versions: converter-1.0.12
>Reporter: Carsten Ziegeler
>Assignee: A. J. David Bosschaert
>Priority: Major
> Fix For: converter-1.0.14
>
>
> When converting a boolean to a Long, an Integer is returned. the following 
> test fails:
> assertEquals(Long.valueOf(1), 
> converter.convert(Boolean.TRUE).to(Long.class));



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (FELIX-6239) Converter should be able to invoke default methods in Interfaces

2020-03-18 Thread A. J. David Bosschaert (Jira)


[ 
https://issues.apache.org/jira/browse/FELIX-6239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17061879#comment-17061879
 ] 

A. J. David Bosschaert commented on FELIX-6239:
---

[~bisch...@jena.de] wrote:

bq. I didn't found a proper way to invoke default methods <= and > Java 8.

Well they are only there after Java 8, so before Java 8 we don't need to do 
anything.
I guess this can be done via Java 8 reflection somehow...

> Converter should be able to invoke default methods in Interfaces
> 
>
> Key: FELIX-6239
> URL: https://issues.apache.org/jira/browse/FELIX-6239
> Project: Felix
>  Issue Type: New Feature
>  Components: Converter
>Reporter: Stefan Bischof
>Priority: Minor
>
> Would be nice if Converter could invoke default methods in Interfaces.
> https://github.com/apache/felix-dev/blob/f4304bdea3fb9280ccc0b75dc97275125bc5cbfb/converter/converter/src/main/java/org/osgi/util/converter/ConvertingImpl.java#L807-L820
> I didn't found a proper way to invoke default methods <= and > Java 8.
> Test: 
> {code:java}
>  interface InterfaceWithDefault
>  {
>default String s()
>{
>  return "s";
> }
>  }
> @Test()
> public void testInterfaceWithDefault() throws Exception
> {
>InterfaceWithDefault i = Converters.standardConverter().convert(new 
> HashMap()).to(InterfaceWithDefault.class);
>assertEquals("s", i.s());
> }
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Resolved] (FELIX-6238) Convert to Interface without methods without Exception

2020-03-18 Thread A. J. David Bosschaert (Jira)


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

A. J. David Bosschaert resolved FELIX-6238.
---
Resolution: Fixed

> Convert to Interface without methods without Exception
> --
>
> Key: FELIX-6238
> URL: https://issues.apache.org/jira/browse/FELIX-6238
> Project: Felix
>  Issue Type: Bug
>  Components: Converter
>Reporter: Stefan Bischof
>Assignee: Stefan Bischof
>Priority: Critical
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
>  
> Converter should Convert to an Interface without methods without Exception
> Example
> {code:java}
> public interface I
> {
> }{code}
>  
> {code:java}
>  I i = Converters.standardConverter()
>  .convert(Map.of("a", "b"))
>  .to(I.class);{code}
> throws Exception:
> {code:java}
> org.osgi.util.converter.ConversionException: Cannot convert a to interface 
> org.apache.felix.atomos.substrate.core.I
>  at 
> org.osgi.util.converter@1.0.1/org.osgi.util.converter.ConvertingImpl.to(ConvertingImpl.java:212)
>  at 
> org.osgi.util.converter@1.0.1/org.osgi.util.converter.CustomConverterImpl$ConvertingWrapper.to(CustomConverterImpl.java:176)
>  at 
> org.osgi.util.converter@1.0.1/org.osgi.util.converter.CustomConverterImpl$ConvertingWrapper.to(CustomConverterImpl.java:139)
>  at 
> org.osgi.util.converter@1.0.1/org.osgi.util.converter.ConvertingImpl.convertMapEntryToSingleValue(ConvertingImpl.java:260)
>  at 
> org.osgi.util.converter@1.0.1/org.osgi.util.converter.ConvertingImpl.to(ConvertingImpl.java:197)
>  at 
> org.osgi.util.converter@1.0.1/org.osgi.util.converter.CustomConverterImpl$ConvertingWrapper.to(CustomConverterImpl.java:176)
>  at 
> org.osgi.util.converter@1.0.1/org.osgi.util.converter.CustomConverterImpl$ConvertingWrapper.to(CustomConverterImpl.java:139)
>  
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Assigned] (FELIX-6238) Convert to Interface without methods without Exception

2020-03-18 Thread A. J. David Bosschaert (Jira)


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

A. J. David Bosschaert reassigned FELIX-6238:
-

Assignee: Stefan Bischof

> Convert to Interface without methods without Exception
> --
>
> Key: FELIX-6238
> URL: https://issues.apache.org/jira/browse/FELIX-6238
> Project: Felix
>  Issue Type: Bug
>  Components: Converter
>Reporter: Stefan Bischof
>Assignee: Stefan Bischof
>Priority: Critical
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
>  
> Converter should Convert to an Interface without methods without Exception
> Example
> {code:java}
> public interface I
> {
> }{code}
>  
> {code:java}
>  I i = Converters.standardConverter()
>  .convert(Map.of("a", "b"))
>  .to(I.class);{code}
> throws Exception:
> {code:java}
> org.osgi.util.converter.ConversionException: Cannot convert a to interface 
> org.apache.felix.atomos.substrate.core.I
>  at 
> org.osgi.util.converter@1.0.1/org.osgi.util.converter.ConvertingImpl.to(ConvertingImpl.java:212)
>  at 
> org.osgi.util.converter@1.0.1/org.osgi.util.converter.CustomConverterImpl$ConvertingWrapper.to(CustomConverterImpl.java:176)
>  at 
> org.osgi.util.converter@1.0.1/org.osgi.util.converter.CustomConverterImpl$ConvertingWrapper.to(CustomConverterImpl.java:139)
>  at 
> org.osgi.util.converter@1.0.1/org.osgi.util.converter.ConvertingImpl.convertMapEntryToSingleValue(ConvertingImpl.java:260)
>  at 
> org.osgi.util.converter@1.0.1/org.osgi.util.converter.ConvertingImpl.to(ConvertingImpl.java:197)
>  at 
> org.osgi.util.converter@1.0.1/org.osgi.util.converter.CustomConverterImpl$ConvertingWrapper.to(CustomConverterImpl.java:176)
>  at 
> org.osgi.util.converter@1.0.1/org.osgi.util.converter.CustomConverterImpl$ConvertingWrapper.to(CustomConverterImpl.java:139)
>  
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Assigned] (FELIX-6242) Conversion of boolean to Long results in Integer

2020-03-18 Thread A. J. David Bosschaert (Jira)


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

A. J. David Bosschaert reassigned FELIX-6242:
-

Assignee: A. J. David Bosschaert

> Conversion of boolean to Long results in Integer
> 
>
> Key: FELIX-6242
> URL: https://issues.apache.org/jira/browse/FELIX-6242
> Project: Felix
>  Issue Type: Bug
>  Components: Converter
>Affects Versions: converter-1.0.12
>Reporter: Carsten Ziegeler
>Assignee: A. J. David Bosschaert
>Priority: Major
> Fix For: converter-1.0.14
>
>
> When converting a boolean to a Long, an Integer is returned. the following 
> test fails:
> assertEquals(Long.valueOf(1), 
> converter.convert(Boolean.TRUE).to(Long.class));



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (FELIX-6165) Rename org.apache.felix.configadmin.plugin.interpolation.dir

2019-11-11 Thread David Bosschaert (Jira)


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

David Bosschaert updated FELIX-6165:

Fix Version/s: (was: configadmin-interpolation-plugin-0.0.4)
   configadmin-interpolation-plugin-0.0.6

> Rename org.apache.felix.configadmin.plugin.interpolation.dir
> 
>
> Key: FELIX-6165
> URL: https://issues.apache.org/jira/browse/FELIX-6165
> Project: Felix
>  Issue Type: Bug
>  Components: Configuration Admin
>Affects Versions: configadmin-interpolation-plugin-0.0.2
>Reporter: David Bosschaert
>Priority: Major
> Fix For: configadmin-interpolation-plugin-0.0.6
>
>
> As discused on the devlist: we need to rename the property 
> org.apache.felix.configadmin.plugin.interpolation.dir to
> org.apache.felix.configadmin.plugin.interpolation.secretsdir



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (FELIX-6166) Support encoding while reading properties from external file

2019-11-11 Thread David Bosschaert (Jira)


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

David Bosschaert updated FELIX-6166:

Fix Version/s: (was: configadmin-interpolation-plugin-0.0.4)
   configadmin-interpolation-plugin-0.0.6

> Support encoding while reading properties from external file
> 
>
> Key: FELIX-6166
> URL: https://issues.apache.org/jira/browse/FELIX-6166
> Project: Felix
>  Issue Type: Improvement
>  Components: Configuration Admin
>Affects Versions: configadmin-interpolation-plugin-0.0.2
>Reporter: Benjamin Graf
>Priority: Major
> Fix For: configadmin-interpolation-plugin-0.0.6
>
>
> Actually external property file is read as {{byte[]}} and converted to 
> {{String}} without considering file encoding. Maybe another global or local 
> variable should be definable with {{Charset.defaultCharset()}} as default if 
> not set.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (FELIX-6164) Support escaping to for interpolation syntax

2019-11-11 Thread David Bosschaert (Jira)


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

David Bosschaert updated FELIX-6164:

Fix Version/s: (was: configadmin-interpolation-plugin-0.0.4)
   configadmin-interpolation-plugin-0.0.6

> Support escaping to for interpolation syntax
> 
>
> Key: FELIX-6164
> URL: https://issues.apache.org/jira/browse/FELIX-6164
> Project: Felix
>  Issue Type: Improvement
>  Components: Configuration Admin
>Affects Versions: configadmin-interpolation-plugin-0.0.2
>Reporter: Georg Henzler
>Priority: Major
> Fix For: configadmin-interpolation-plugin-0.0.6
>
>
> Although this is an edge case, it should be possible to escape sequences like 
> {code}
> $[env:test]
> {code}
> as is. Suggested syntax is to use a backslash:
> {code}
> \$[env:test]
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (FELIX-6192) Support default values and type conversion

2019-11-11 Thread David Bosschaert (Jira)


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

David Bosschaert updated FELIX-6192:

Component/s: Configuration Interpolation Plugin

> Support default values and type conversion
> --
>
> Key: FELIX-6192
> URL: https://issues.apache.org/jira/browse/FELIX-6192
> Project: Felix
>  Issue Type: New Feature
>  Components: Configuration Admin, Configuration Interpolation Plugin
>Affects Versions: configadmin-interpolation-plugin-0.0.2
>Reporter: Carsten Ziegeler
>Assignee: David Bosschaert
>Priority: Major
> Fix For: configadmin-interpolation-plugin-0.0.4
>
>
> It would be nice if the interpolation plugin could support default values as 
> well as type conversion, especially supporting arrays.
> The format could be
> [:;type=;default=]
> where type and default are optional, type defaulting to String.
> We should support primitive types and arrays of primitive types. The usual 
> separator for values could be a comma (providing to support escaping a comma 
> in a value)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Resolved] (FELIX-6192) Support default values and type conversion

2019-11-09 Thread David Bosschaert (Jira)


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

David Bosschaert resolved FELIX-6192.
-
Resolution: Fixed

Fixed in r1869604

It adds a dependency on the Felix Converter. Hope this is acceptable.

> Support default values and type conversion
> --
>
> Key: FELIX-6192
> URL: https://issues.apache.org/jira/browse/FELIX-6192
> Project: Felix
>  Issue Type: New Feature
>  Components: Configuration Admin
>Affects Versions: configadmin-interpolation-plugin-0.0.2
>Reporter: Carsten Ziegeler
>Assignee: David Bosschaert
>Priority: Major
> Fix For: configadmin-interpolation-plugin-0.0.4
>
>
> It would be nice if the interpolation plugin could support default values as 
> well as type conversion, especially supporting arrays.
> The format could be
> [:;type=;default=]
> where type and default are optional, type defaulting to String.
> We should support primitive types and arrays of primitive types. The usual 
> separator for values could be a comma (providing to support escaping a comma 
> in a value)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (FELIX-6192) Support default values and type conversion

2019-11-09 Thread David Bosschaert (Jira)


[ 
https://issues.apache.org/jira/browse/FELIX-6192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16970851#comment-16970851
 ] 

David Bosschaert commented on FELIX-6192:
-

I've implemented the defaulting (committed) and at least an initial version of 
the type conversion code.

SVN is acting up so I can't commit the type conversion code right now. Will try 
again soon.

> Support default values and type conversion
> --
>
> Key: FELIX-6192
> URL: https://issues.apache.org/jira/browse/FELIX-6192
> Project: Felix
>  Issue Type: New Feature
>  Components: Configuration Admin
>Affects Versions: configadmin-interpolation-plugin-0.0.2
>Reporter: Carsten Ziegeler
>Assignee: David Bosschaert
>Priority: Major
> Fix For: configadmin-interpolation-plugin-0.0.4
>
>
> It would be nice if the interpolation plugin could support default values as 
> well as type conversion, especially supporting arrays.
> The format could be
> [:;type=;default=]
> where type and default are optional, type defaulting to String.
> We should support primitive types and arrays of primitive types. The usual 
> separator for values could be a comma (providing to support escaping a comma 
> in a value)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work started] (FELIX-6192) Support default values and type conversion

2019-11-09 Thread David Bosschaert (Jira)


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

Work on FELIX-6192 started by David Bosschaert.
---
> Support default values and type conversion
> --
>
> Key: FELIX-6192
> URL: https://issues.apache.org/jira/browse/FELIX-6192
> Project: Felix
>  Issue Type: New Feature
>  Components: Configuration Admin
>Affects Versions: configadmin-interpolation-plugin-0.0.2
>Reporter: Carsten Ziegeler
>Assignee: David Bosschaert
>Priority: Major
> Fix For: configadmin-interpolation-plugin-0.0.4
>
>
> It would be nice if the interpolation plugin could support default values as 
> well as type conversion, especially supporting arrays.
> The format could be
> [:;type=;default=]
> where type and default are optional, type defaulting to String.
> We should support primitive types and arrays of primitive types. The usual 
> separator for values could be a comma (providing to support escaping a comma 
> in a value)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Assigned] (FELIX-6192) Support default values and type conversion

2019-11-09 Thread David Bosschaert (Jira)


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

David Bosschaert reassigned FELIX-6192:
---

Assignee: David Bosschaert

> Support default values and type conversion
> --
>
> Key: FELIX-6192
> URL: https://issues.apache.org/jira/browse/FELIX-6192
> Project: Felix
>  Issue Type: New Feature
>  Components: Configuration Admin
>Affects Versions: configadmin-interpolation-plugin-0.0.2
>Reporter: Carsten Ziegeler
>Assignee: David Bosschaert
>Priority: Major
> Fix For: configadmin-interpolation-plugin-0.0.4
>
>
> It would be nice if the interpolation plugin could support default values as 
> well as type conversion, especially supporting arrays.
> The format could be
> [:;type=;default=]
> where type and default are optional, type defaulting to String.
> We should support primitive types and arrays of primitive types. The usual 
> separator for values could be a comma (providing to support escaping a comma 
> in a value)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Resolved] (FELIX-6150) Converter bundle should not embed osgi functions

2019-10-23 Thread David Bosschaert (Jira)


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

David Bosschaert resolved FELIX-6150.
-
Resolution: Fixed

Fixed in http://svn.apache.org/viewvc?view=revision=1868805

> Converter bundle should not embed osgi functions
> 
>
> Key: FELIX-6150
> URL: https://issues.apache.org/jira/browse/FELIX-6150
> Project: Felix
>  Issue Type: Improvement
>  Components: Converter
>Affects Versions: converter-1.0.8
>Reporter: Carsten Ziegeler
>Assignee: David Bosschaert
>Priority: Major
> Fix For: converter-1.0.12
>
>
> The converter bundle is currently also containing a copy of the OSGi function 
> bundle. While this works exporting a package like functions is not a good 
> idea anyway. It is only a convenience, functions have nothing to do with the 
> converter in itself and that will always back fire in the end. It causes 
> unnecessary version constraints since the order of resolving cannot be 
> controlled. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work started] (FELIX-6150) Converter bundle should not embed osgi functions

2019-10-21 Thread David Bosschaert (Jira)


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

Work on FELIX-6150 started by David Bosschaert.
---
> Converter bundle should not embed osgi functions
> 
>
> Key: FELIX-6150
> URL: https://issues.apache.org/jira/browse/FELIX-6150
> Project: Felix
>  Issue Type: Improvement
>  Components: Converter
>Affects Versions: converter-1.0.8
>Reporter: Carsten Ziegeler
>Assignee: David Bosschaert
>Priority: Major
> Fix For: converter-1.0.12
>
>
> The converter bundle is currently also containing a copy of the OSGi function 
> bundle. While this works exporting a package like functions is not a good 
> idea anyway. It is only a convenience, functions have nothing to do with the 
> converter in itself and that will always back fire in the end. It causes 
> unnecessary version constraints since the order of resolving cannot be 
> controlled. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (FELIX-6150) Converter bundle should not embed osgi functions

2019-10-14 Thread David Bosschaert (Jira)


[ 
https://issues.apache.org/jira/browse/FELIX-6150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16950820#comment-16950820
 ] 

David Bosschaert commented on FELIX-6150:
-

In order to not cause too many problems for people who depend on this, we 
should create 2 different release artifacts, one that has the osgi functions 
removed, and one that still has them as before. I would suggest calling them:
 * without the osgi function interfaces: 
org.apache.felix:org.apache.felix.converter
 * with the osgi function interfaces: 
org.apache.felix:org.apache.felix.converter.all

> Converter bundle should not embed osgi functions
> 
>
> Key: FELIX-6150
> URL: https://issues.apache.org/jira/browse/FELIX-6150
> Project: Felix
>  Issue Type: Improvement
>  Components: Converter
>Affects Versions: converter-1.0.8
>Reporter: Carsten Ziegeler
>Assignee: David Bosschaert
>Priority: Major
> Fix For: converter-1.0.12
>
>
> The converter bundle is currently also containing a copy of the OSGi function 
> bundle. While this works exporting a package like functions is not a good 
> idea anyway. It is only a convenience, functions have nothing to do with the 
> converter in itself and that will always back fire in the end. It causes 
> unnecessary version constraints since the order of resolving cannot be 
> controlled. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Assigned] (FELIX-6150) Converter bundle should not embed osgi functions

2019-10-14 Thread David Bosschaert (Jira)


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

David Bosschaert reassigned FELIX-6150:
---

Assignee: David Bosschaert

> Converter bundle should not embed osgi functions
> 
>
> Key: FELIX-6150
> URL: https://issues.apache.org/jira/browse/FELIX-6150
> Project: Felix
>  Issue Type: Improvement
>  Components: Converter
>Affects Versions: converter-1.0.8
>Reporter: Carsten Ziegeler
>Assignee: David Bosschaert
>Priority: Major
> Fix For: converter-1.0.12
>
>
> The converter bundle is currently also containing a copy of the OSGi function 
> bundle. While this works exporting a package like functions is not a good 
> idea anyway. It is only a convenience, functions have nothing to do with the 
> converter in itself and that will always back fire in the end. It causes 
> unnecessary version constraints since the order of resolving cannot be 
> controlled. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Resolved] (FELIX-5772) Some converter projects do not have svn:ignore set

2019-09-02 Thread David Bosschaert (Jira)


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

David Bosschaert resolved FELIX-5772.
-
Resolution: Fixed

Thanks for your patch [~rombert]! It's applied in 
http://svn.apache.org/viewvc?view=revision=1866285

> Some converter projects do not have svn:ignore set
> --
>
> Key: FELIX-5772
> URL: https://issues.apache.org/jira/browse/FELIX-5772
> Project: Felix
>  Issue Type: Bug
>  Components: Converter
>Reporter: Robert Munteanu
>Assignee: David Bosschaert
>Priority: Minor
> Attachments: FELIX-5772.patch
>
>
> After building the converter project some I get 'target' folders that are not 
> ignored by subversion:
> {noformat}$ svn status
>  M  converter/persister
>  M  converter/schematizer
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.2#803003)


[jira] [Work started] (FELIX-5772) Some converter projects do not have svn:ignore set

2019-09-02 Thread David Bosschaert (Jira)


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

Work on FELIX-5772 started by David Bosschaert.
---
> Some converter projects do not have svn:ignore set
> --
>
> Key: FELIX-5772
> URL: https://issues.apache.org/jira/browse/FELIX-5772
> Project: Felix
>  Issue Type: Bug
>  Components: Converter
>Reporter: Robert Munteanu
>Assignee: David Bosschaert
>Priority: Minor
> Attachments: FELIX-5772.patch
>
>
> After building the converter project some I get 'target' folders that are not 
> ignored by subversion:
> {noformat}$ svn status
>  M  converter/persister
>  M  converter/schematizer
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.2#803003)


[jira] [Assigned] (FELIX-5772) Some converter projects do not have svn:ignore set

2019-09-02 Thread David Bosschaert (Jira)


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

David Bosschaert reassigned FELIX-5772:
---

Assignee: David Bosschaert

> Some converter projects do not have svn:ignore set
> --
>
> Key: FELIX-5772
> URL: https://issues.apache.org/jira/browse/FELIX-5772
> Project: Felix
>  Issue Type: Bug
>  Components: Converter
>Reporter: Robert Munteanu
>Assignee: David Bosschaert
>Priority: Minor
> Attachments: FELIX-5772.patch
>
>
> After building the converter project some I get 'target' folders that are not 
> ignored by subversion:
> {noformat}$ svn status
>  M  converter/persister
>  M  converter/schematizer
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.2#803003)


[jira] [Updated] (FELIX-6150) Converter bundle should not embed osgi functions

2019-08-22 Thread David Bosschaert (Jira)


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

David Bosschaert updated FELIX-6150:

Fix Version/s: (was: converter-1.0.10)
   converter-1.0.12

> Converter bundle should not embed osgi functions
> 
>
> Key: FELIX-6150
> URL: https://issues.apache.org/jira/browse/FELIX-6150
> Project: Felix
>  Issue Type: Improvement
>  Components: Converter
>Affects Versions: converter-1.0.8
>Reporter: Carsten Ziegeler
>Priority: Major
> Fix For: converter-1.0.12
>
>
> The converter bundle is currently also containing a copy of the OSGi function 
> bundle. While this works exporting a package like functions is not a good 
> idea anyway. It is only a convenience, functions have nothing to do with the 
> converter in itself and that will always back fire in the end. It causes 
> unnecessary version constraints since the order of resolving cannot be 
> controlled. 



--
This message was sent by Atlassian Jira
(v8.3.2#803003)


[jira] [Resolved] (FELIX-6172) Already Registered Servlet Exception with WebConsole

2019-08-20 Thread David Bosschaert (Jira)


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

David Bosschaert resolved FELIX-6172.
-
Resolution: Fixed

Fixed with http://svn.apache.org/viewvc?view=revision=1865526

> Already Registered Servlet Exception with WebConsole
> 
>
> Key: FELIX-6172
> URL: https://issues.apache.org/jira/browse/FELIX-6172
> Project: Felix
>  Issue Type: Bug
>Affects Versions: webconsole-4.3.14
>Reporter: David Bosschaert
>Assignee: David Bosschaert
>Priority: Major
> Fix For: webconsole-4.3.16
>
>
> The fix for FELIX-6168 introduced an occasional Exception:
> {code}
> javax.servlet.ServletException: Servlet instance 
> org.apache.felix.webconsole.internal.servlet.OsgiManager@140f6b0f already 
> registered
>   at 
> org.apache.felix.http.base.internal.service.PerBundleHttpServiceImpl.registerServlet(PerBundleHttpServiceImpl.java:141)
>  [org.apache.felix.http.jetty:4.0.8]
>   at 
> org.apache.felix.webconsole.internal.servlet.OsgiManager.registerHttpService(OsgiManager.java:980)
>  [org.apache.felix.webconsole:4.3.14]
>   at 
> org.apache.felix.webconsole.internal.servlet.OsgiManager.updateRegistrationState(OsgiManager.java:403)
>  [org.apache.felix.webconsole:4.3.14]
>   at 
> org.apache.felix.webconsole.internal.servlet.OsgiManager$UpdateDependenciesStateCustomizer.addingService(OsgiManager.java:1236)
>  [org.apache.felix.webconsole:4.3.14]
>   at 
> org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:943)
> {code}



--
This message was sent by Atlassian Jira
(v8.3.2#803003)


[jira] [Updated] (FELIX-6172) Already Registered Servlet Exception with WebConsole

2019-08-20 Thread David Bosschaert (Jira)


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

David Bosschaert updated FELIX-6172:

Summary: Already Registered Servlet Exception with WebConsole  (was: 
Occasional Exception with WebConsole)

> Already Registered Servlet Exception with WebConsole
> 
>
> Key: FELIX-6172
> URL: https://issues.apache.org/jira/browse/FELIX-6172
> Project: Felix
>  Issue Type: Bug
>Affects Versions: webconsole-4.3.14
>Reporter: David Bosschaert
>Assignee: David Bosschaert
>Priority: Major
> Fix For: webconsole-4.3.16
>
>
> The fix for FELIX-6168 introduced an occasional Exception:
> {code}
> javax.servlet.ServletException: Servlet instance 
> org.apache.felix.webconsole.internal.servlet.OsgiManager@140f6b0f already 
> registered
>   at 
> org.apache.felix.http.base.internal.service.PerBundleHttpServiceImpl.registerServlet(PerBundleHttpServiceImpl.java:141)
>  [org.apache.felix.http.jetty:4.0.8]
>   at 
> org.apache.felix.webconsole.internal.servlet.OsgiManager.registerHttpService(OsgiManager.java:980)
>  [org.apache.felix.webconsole:4.3.14]
>   at 
> org.apache.felix.webconsole.internal.servlet.OsgiManager.updateRegistrationState(OsgiManager.java:403)
>  [org.apache.felix.webconsole:4.3.14]
>   at 
> org.apache.felix.webconsole.internal.servlet.OsgiManager$UpdateDependenciesStateCustomizer.addingService(OsgiManager.java:1236)
>  [org.apache.felix.webconsole:4.3.14]
>   at 
> org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:943)
> {code}



--
This message was sent by Atlassian Jira
(v8.3.2#803003)


[jira] [Work started] (FELIX-6172) Occasional Exception with WebConsole

2019-08-20 Thread David Bosschaert (Jira)


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

Work on FELIX-6172 started by David Bosschaert.
---
> Occasional Exception with WebConsole
> 
>
> Key: FELIX-6172
> URL: https://issues.apache.org/jira/browse/FELIX-6172
> Project: Felix
>  Issue Type: Bug
>Affects Versions: webconsole-4.3.14
>Reporter: David Bosschaert
>Assignee: David Bosschaert
>Priority: Major
> Fix For: webconsole-4.3.16
>
>
> The fix for FELIX-6168 introduced an occasional Exception:
> {code}
> javax.servlet.ServletException: Servlet instance 
> org.apache.felix.webconsole.internal.servlet.OsgiManager@140f6b0f already 
> registered
>   at 
> org.apache.felix.http.base.internal.service.PerBundleHttpServiceImpl.registerServlet(PerBundleHttpServiceImpl.java:141)
>  [org.apache.felix.http.jetty:4.0.8]
>   at 
> org.apache.felix.webconsole.internal.servlet.OsgiManager.registerHttpService(OsgiManager.java:980)
>  [org.apache.felix.webconsole:4.3.14]
>   at 
> org.apache.felix.webconsole.internal.servlet.OsgiManager.updateRegistrationState(OsgiManager.java:403)
>  [org.apache.felix.webconsole:4.3.14]
>   at 
> org.apache.felix.webconsole.internal.servlet.OsgiManager$UpdateDependenciesStateCustomizer.addingService(OsgiManager.java:1236)
>  [org.apache.felix.webconsole:4.3.14]
>   at 
> org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:943)
> {code}



--
This message was sent by Atlassian Jira
(v8.3.2#803003)


[jira] [Created] (FELIX-6172) Occasional Exception with WebConsole

2019-08-20 Thread David Bosschaert (Jira)
David Bosschaert created FELIX-6172:
---

 Summary: Occasional Exception with WebConsole
 Key: FELIX-6172
 URL: https://issues.apache.org/jira/browse/FELIX-6172
 Project: Felix
  Issue Type: Bug
Affects Versions: webconsole-4.3.14
Reporter: David Bosschaert
Assignee: David Bosschaert
 Fix For: webconsole-4.3.16


The fix for FELIX-6168 introduced an occasional Exception:

{code}
javax.servlet.ServletException: Servlet instance 
org.apache.felix.webconsole.internal.servlet.OsgiManager@140f6b0f already 
registered
at 
org.apache.felix.http.base.internal.service.PerBundleHttpServiceImpl.registerServlet(PerBundleHttpServiceImpl.java:141)
 [org.apache.felix.http.jetty:4.0.8]
at 
org.apache.felix.webconsole.internal.servlet.OsgiManager.registerHttpService(OsgiManager.java:980)
 [org.apache.felix.webconsole:4.3.14]
at 
org.apache.felix.webconsole.internal.servlet.OsgiManager.updateRegistrationState(OsgiManager.java:403)
 [org.apache.felix.webconsole:4.3.14]
at 
org.apache.felix.webconsole.internal.servlet.OsgiManager$UpdateDependenciesStateCustomizer.addingService(OsgiManager.java:1236)
 [org.apache.felix.webconsole:4.3.14]
at 
org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:943)
{code}



--
This message was sent by Atlassian Jira
(v8.3.2#803003)


[jira] [Resolved] (FELIX-6157) Converter build fails with Java 12

2019-08-16 Thread David Bosschaert (JIRA)


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

David Bosschaert resolved FELIX-6157.
-
Resolution: Fixed

Fixed with [http://svn.apache.org/viewvc?view=revision=1865310]

> Converter build fails with Java 12
> --
>
> Key: FELIX-6157
> URL: https://issues.apache.org/jira/browse/FELIX-6157
> Project: Felix
>  Issue Type: Improvement
>  Components: Converter
>Affects Versions: converter-1.0.8
>Reporter: David Bosschaert
>Assignee: David Bosschaert
>Priority: Major
> Fix For: converter-1.0.10
>
>
> When I build the converter project with Java 12 I get a lot of failures, see 
> below.
> These problems don't exist with Java 11. This needs to be investigated and 
> fixed.
>  
> {code:java}
> [INFO] ---
> [INFO]  T E S T S
> [INFO] ---
> [INFO] Running org.osgi.util.converter.UtilTest
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.028 
> s - in org.osgi.util.converter.UtilTest
> [INFO] Running org.osgi.util.converter.ConverterBuilderTest
> [ERROR] Tests run: 9, Failures: 1, Errors: 0, Skipped: 3, Time elapsed: 0.046 
> s <<< FAILURE! - in org.osgi.util.converter.ConverterBuilderTest
> [ERROR] testWildcardAdapter1(org.osgi.util.converter.ConverterBuilderTest)  
> Time elapsed: 0.041 s  <<< FAILURE!
> org.junit.ComparisonFailure: expected:<[1]> but was:<[describeConstable]>
>   at 
> org.osgi.util.converter.ConverterBuilderTest.testWildcardAdapter1(ConverterBuilderTest.java:192)
> [INFO] Running org.osgi.util.converter.ConverterTest
> [ERROR] Tests run: 77, Failures: 6, Errors: 13, Skipped: 0, Time elapsed: 
> 0.104 s <<< FAILURE! - in org.osgi.util.converter.ConverterTest
> [ERROR] testCustomErrorHandling(org.osgi.util.converter.ConverterTest)  Time 
> elapsed: 0.001 s  <<< ERROR!
> org.osgi.util.converter.ConversionException: Cannot convert 12 to class 
> java.lang.Integer
>   at 
> org.osgi.util.converter.ConverterTest.testCustomErrorHandling(ConverterTest.java:495)
> [ERROR] 
> testFromArrayToGenericOrderPreservingSet(org.osgi.util.converter.ConverterTest)
>   Time elapsed: 0.001 s  <<< ERROR!
> java.lang.ClassCastException: class java.lang.String cannot be cast to class 
> java.lang.Long (java.lang.String and java.lang.Long are in module java.base 
> of loader 'bootstrap')
>   at 
> org.osgi.util.converter.ConverterTest.testFromArrayToGenericOrderPreservingSet(ConverterTest.java:313)
> [ERROR] testDTOFieldShadowing(org.osgi.util.converter.ConverterTest)  Time 
> elapsed: 0.006 s  <<< FAILURE!
> java.lang.AssertionError: expected:<{ping=test, count=THREE, pong=0, 
> embedded=null}> but was:<{count=describeConstable, pong=describeConstable, 
> embedded=null, ping=test}>
>   at 
> org.osgi.util.converter.ConverterTest.testDTOFieldShadowing(ConverterTest.java:874)
> [ERROR] testEnums(org.osgi.util.converter.ConverterTest)  Time elapsed: 0.001 
> s  <<< ERROR!
> org.osgi.util.converter.ConversionException: Cannot convert [] to class 
> org.osgi.util.converter.ConverterTest$TestEnum
>   at 
> org.osgi.util.converter.ConverterTest.testEnums(ConverterTest.java:212)
> [ERROR] 
> testFromUnknownDataTypeViaString(org.osgi.util.converter.ConverterTest)  Time 
> elapsed: 0 s  <<< ERROR!
> org.osgi.util.converter.ConversionException: Cannot convert 1234 to class 
> java.lang.Integer
>   at 
> org.osgi.util.converter.ConverterTest.testFromUnknownDataTypeViaString(ConverterTest.java:246)
> [ERROR] testCharArrayConversion(org.osgi.util.converter.ConverterTest)  Time 
> elapsed: 0.001 s  <<< FAILURE!
> org.junit.internal.ArrayComparisonFailure: arrays first differed at element 
> [0]; expected:<> but was:
>   at 
> org.osgi.util.converter.ConverterTest.testCharArrayConversion(ConverterTest.java:342)
> Caused by: java.lang.AssertionError: expected:<> but was:
>   at 
> org.osgi.util.converter.ConverterTest.testCharArrayConversion(ConverterTest.java:342)
> [ERROR] testPrefixDTO(org.osgi.util.converter.ConverterTest)  Time elapsed: 
> 0.001 s  <<< ERROR!
> org.osgi.util.converter.ConversionException: Cannot create DTO class 
> org.osgi.util.converter.PrefixDTO
>   at 
> org.osgi.util.converter.ConverterTest.testPrefixDTO(ConverterTest.java:1288)
> Caused by: org.osgi.util.converter.ConversionException: Cannot convert 327 to 
> class java.lang.Long
>   at 
> org.osgi.util.converter.ConverterTest.testPrefixDTO(ConverterTest.java:1288)
> [ERROR] testFromGenericSetToLinkedList(org.osgi.util.converter.ConverterTest) 
>  Time elapsed: 0.001 s  <<< FAILURE!
> java.lang.AssertionError: expected:<[123, 456]> but was:<[describeConstable, 
> describeConstable]>
>   at 
> 

[jira] [Updated] (FELIX-6157) Converter build fails with Java 12

2019-08-16 Thread David Bosschaert (JIRA)


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

David Bosschaert updated FELIX-6157:

Fix Version/s: converter-1.0.10

> Converter build fails with Java 12
> --
>
> Key: FELIX-6157
> URL: https://issues.apache.org/jira/browse/FELIX-6157
> Project: Felix
>  Issue Type: Improvement
>  Components: Converter
>Affects Versions: converter-1.0.8
>Reporter: David Bosschaert
>Assignee: David Bosschaert
>Priority: Major
> Fix For: converter-1.0.10
>
>
> When I build the converter project with Java 12 I get a lot of failures, see 
> below.
> These problems don't exist with Java 11. This needs to be investigated and 
> fixed.
>  
> {code:java}
> [INFO] ---
> [INFO]  T E S T S
> [INFO] ---
> [INFO] Running org.osgi.util.converter.UtilTest
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.028 
> s - in org.osgi.util.converter.UtilTest
> [INFO] Running org.osgi.util.converter.ConverterBuilderTest
> [ERROR] Tests run: 9, Failures: 1, Errors: 0, Skipped: 3, Time elapsed: 0.046 
> s <<< FAILURE! - in org.osgi.util.converter.ConverterBuilderTest
> [ERROR] testWildcardAdapter1(org.osgi.util.converter.ConverterBuilderTest)  
> Time elapsed: 0.041 s  <<< FAILURE!
> org.junit.ComparisonFailure: expected:<[1]> but was:<[describeConstable]>
>   at 
> org.osgi.util.converter.ConverterBuilderTest.testWildcardAdapter1(ConverterBuilderTest.java:192)
> [INFO] Running org.osgi.util.converter.ConverterTest
> [ERROR] Tests run: 77, Failures: 6, Errors: 13, Skipped: 0, Time elapsed: 
> 0.104 s <<< FAILURE! - in org.osgi.util.converter.ConverterTest
> [ERROR] testCustomErrorHandling(org.osgi.util.converter.ConverterTest)  Time 
> elapsed: 0.001 s  <<< ERROR!
> org.osgi.util.converter.ConversionException: Cannot convert 12 to class 
> java.lang.Integer
>   at 
> org.osgi.util.converter.ConverterTest.testCustomErrorHandling(ConverterTest.java:495)
> [ERROR] 
> testFromArrayToGenericOrderPreservingSet(org.osgi.util.converter.ConverterTest)
>   Time elapsed: 0.001 s  <<< ERROR!
> java.lang.ClassCastException: class java.lang.String cannot be cast to class 
> java.lang.Long (java.lang.String and java.lang.Long are in module java.base 
> of loader 'bootstrap')
>   at 
> org.osgi.util.converter.ConverterTest.testFromArrayToGenericOrderPreservingSet(ConverterTest.java:313)
> [ERROR] testDTOFieldShadowing(org.osgi.util.converter.ConverterTest)  Time 
> elapsed: 0.006 s  <<< FAILURE!
> java.lang.AssertionError: expected:<{ping=test, count=THREE, pong=0, 
> embedded=null}> but was:<{count=describeConstable, pong=describeConstable, 
> embedded=null, ping=test}>
>   at 
> org.osgi.util.converter.ConverterTest.testDTOFieldShadowing(ConverterTest.java:874)
> [ERROR] testEnums(org.osgi.util.converter.ConverterTest)  Time elapsed: 0.001 
> s  <<< ERROR!
> org.osgi.util.converter.ConversionException: Cannot convert [] to class 
> org.osgi.util.converter.ConverterTest$TestEnum
>   at 
> org.osgi.util.converter.ConverterTest.testEnums(ConverterTest.java:212)
> [ERROR] 
> testFromUnknownDataTypeViaString(org.osgi.util.converter.ConverterTest)  Time 
> elapsed: 0 s  <<< ERROR!
> org.osgi.util.converter.ConversionException: Cannot convert 1234 to class 
> java.lang.Integer
>   at 
> org.osgi.util.converter.ConverterTest.testFromUnknownDataTypeViaString(ConverterTest.java:246)
> [ERROR] testCharArrayConversion(org.osgi.util.converter.ConverterTest)  Time 
> elapsed: 0.001 s  <<< FAILURE!
> org.junit.internal.ArrayComparisonFailure: arrays first differed at element 
> [0]; expected:<> but was:
>   at 
> org.osgi.util.converter.ConverterTest.testCharArrayConversion(ConverterTest.java:342)
> Caused by: java.lang.AssertionError: expected:<> but was:
>   at 
> org.osgi.util.converter.ConverterTest.testCharArrayConversion(ConverterTest.java:342)
> [ERROR] testPrefixDTO(org.osgi.util.converter.ConverterTest)  Time elapsed: 
> 0.001 s  <<< ERROR!
> org.osgi.util.converter.ConversionException: Cannot create DTO class 
> org.osgi.util.converter.PrefixDTO
>   at 
> org.osgi.util.converter.ConverterTest.testPrefixDTO(ConverterTest.java:1288)
> Caused by: org.osgi.util.converter.ConversionException: Cannot convert 327 to 
> class java.lang.Long
>   at 
> org.osgi.util.converter.ConverterTest.testPrefixDTO(ConverterTest.java:1288)
> [ERROR] testFromGenericSetToLinkedList(org.osgi.util.converter.ConverterTest) 
>  Time elapsed: 0.001 s  <<< FAILURE!
> java.lang.AssertionError: expected:<[123, 456]> but was:<[describeConstable, 
> describeConstable]>
>   at 
> 

[jira] [Work started] (FELIX-6157) Converter build fails with Java 12

2019-08-16 Thread David Bosschaert (JIRA)


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

Work on FELIX-6157 started by David Bosschaert.
---
> Converter build fails with Java 12
> --
>
> Key: FELIX-6157
> URL: https://issues.apache.org/jira/browse/FELIX-6157
> Project: Felix
>  Issue Type: Improvement
>  Components: Converter
>Affects Versions: converter-1.0.8
>Reporter: David Bosschaert
>Assignee: David Bosschaert
>Priority: Major
> Fix For: converter-1.0.10
>
>
> When I build the converter project with Java 12 I get a lot of failures, see 
> below.
> These problems don't exist with Java 11. This needs to be investigated and 
> fixed.
>  
> {code:java}
> [INFO] ---
> [INFO]  T E S T S
> [INFO] ---
> [INFO] Running org.osgi.util.converter.UtilTest
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.028 
> s - in org.osgi.util.converter.UtilTest
> [INFO] Running org.osgi.util.converter.ConverterBuilderTest
> [ERROR] Tests run: 9, Failures: 1, Errors: 0, Skipped: 3, Time elapsed: 0.046 
> s <<< FAILURE! - in org.osgi.util.converter.ConverterBuilderTest
> [ERROR] testWildcardAdapter1(org.osgi.util.converter.ConverterBuilderTest)  
> Time elapsed: 0.041 s  <<< FAILURE!
> org.junit.ComparisonFailure: expected:<[1]> but was:<[describeConstable]>
>   at 
> org.osgi.util.converter.ConverterBuilderTest.testWildcardAdapter1(ConverterBuilderTest.java:192)
> [INFO] Running org.osgi.util.converter.ConverterTest
> [ERROR] Tests run: 77, Failures: 6, Errors: 13, Skipped: 0, Time elapsed: 
> 0.104 s <<< FAILURE! - in org.osgi.util.converter.ConverterTest
> [ERROR] testCustomErrorHandling(org.osgi.util.converter.ConverterTest)  Time 
> elapsed: 0.001 s  <<< ERROR!
> org.osgi.util.converter.ConversionException: Cannot convert 12 to class 
> java.lang.Integer
>   at 
> org.osgi.util.converter.ConverterTest.testCustomErrorHandling(ConverterTest.java:495)
> [ERROR] 
> testFromArrayToGenericOrderPreservingSet(org.osgi.util.converter.ConverterTest)
>   Time elapsed: 0.001 s  <<< ERROR!
> java.lang.ClassCastException: class java.lang.String cannot be cast to class 
> java.lang.Long (java.lang.String and java.lang.Long are in module java.base 
> of loader 'bootstrap')
>   at 
> org.osgi.util.converter.ConverterTest.testFromArrayToGenericOrderPreservingSet(ConverterTest.java:313)
> [ERROR] testDTOFieldShadowing(org.osgi.util.converter.ConverterTest)  Time 
> elapsed: 0.006 s  <<< FAILURE!
> java.lang.AssertionError: expected:<{ping=test, count=THREE, pong=0, 
> embedded=null}> but was:<{count=describeConstable, pong=describeConstable, 
> embedded=null, ping=test}>
>   at 
> org.osgi.util.converter.ConverterTest.testDTOFieldShadowing(ConverterTest.java:874)
> [ERROR] testEnums(org.osgi.util.converter.ConverterTest)  Time elapsed: 0.001 
> s  <<< ERROR!
> org.osgi.util.converter.ConversionException: Cannot convert [] to class 
> org.osgi.util.converter.ConverterTest$TestEnum
>   at 
> org.osgi.util.converter.ConverterTest.testEnums(ConverterTest.java:212)
> [ERROR] 
> testFromUnknownDataTypeViaString(org.osgi.util.converter.ConverterTest)  Time 
> elapsed: 0 s  <<< ERROR!
> org.osgi.util.converter.ConversionException: Cannot convert 1234 to class 
> java.lang.Integer
>   at 
> org.osgi.util.converter.ConverterTest.testFromUnknownDataTypeViaString(ConverterTest.java:246)
> [ERROR] testCharArrayConversion(org.osgi.util.converter.ConverterTest)  Time 
> elapsed: 0.001 s  <<< FAILURE!
> org.junit.internal.ArrayComparisonFailure: arrays first differed at element 
> [0]; expected:<> but was:
>   at 
> org.osgi.util.converter.ConverterTest.testCharArrayConversion(ConverterTest.java:342)
> Caused by: java.lang.AssertionError: expected:<> but was:
>   at 
> org.osgi.util.converter.ConverterTest.testCharArrayConversion(ConverterTest.java:342)
> [ERROR] testPrefixDTO(org.osgi.util.converter.ConverterTest)  Time elapsed: 
> 0.001 s  <<< ERROR!
> org.osgi.util.converter.ConversionException: Cannot create DTO class 
> org.osgi.util.converter.PrefixDTO
>   at 
> org.osgi.util.converter.ConverterTest.testPrefixDTO(ConverterTest.java:1288)
> Caused by: org.osgi.util.converter.ConversionException: Cannot convert 327 to 
> class java.lang.Long
>   at 
> org.osgi.util.converter.ConverterTest.testPrefixDTO(ConverterTest.java:1288)
> [ERROR] testFromGenericSetToLinkedList(org.osgi.util.converter.ConverterTest) 
>  Time elapsed: 0.001 s  <<< FAILURE!
> java.lang.AssertionError: expected:<[123, 456]> but was:<[describeConstable, 
> describeConstable]>
>   at 
> org.osgi.util.converter.ConverterTest.testFromGenericSetToLinkedList(ConverterTest.java:302)
> [ERROR] 

[jira] [Commented] (FELIX-6157) Converter build fails with Java 12

2019-08-16 Thread David Bosschaert (JIRA)


[ 
https://issues.apache.org/jira/browse/FELIX-6157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16909129#comment-16909129
 ] 

David Bosschaert commented on FELIX-6157:
-

I looked a little bit into it. For example, the following test case starts 
failing: ConverterTest.testFromUnknownDataTypeViaString() with this error:
{code:java}
org.osgi.util.converter.ConversionException: Cannot convert 1234 to class 
java.lang.Integer
{code}
This is caused by the fact that for a java.lang.Integer the 
ConvertingImpl.isMapType() incorrectly returns true. This in turn is caused by 
the ConvertingImpl.getInterfaces() to return a non-zero set for 
java.lang.Integer. 
 That in turn is caused by the fact that from Java 12 onwards java.lang.Integer 
implements two new interfaces: [interface java.lang.constant.Constable, 
interface java.lang.constant.ConstantDesc]

These 2 interfaces should be added to the NO_MAP_VIEW_TYPES constant in 
ConvertingImpl but only in such a way that it doesn't cause any problems for 
pre-java 12 releases.

> Converter build fails with Java 12
> --
>
> Key: FELIX-6157
> URL: https://issues.apache.org/jira/browse/FELIX-6157
> Project: Felix
>  Issue Type: Improvement
>  Components: Converter
>Affects Versions: converter-1.0.8
>Reporter: David Bosschaert
>Assignee: David Bosschaert
>Priority: Major
>
> When I build the converter project with Java 12 I get a lot of failures, see 
> below.
> These problems don't exist with Java 11. This needs to be investigated and 
> fixed.
>  
> {code:java}
> [INFO] ---
> [INFO]  T E S T S
> [INFO] ---
> [INFO] Running org.osgi.util.converter.UtilTest
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.028 
> s - in org.osgi.util.converter.UtilTest
> [INFO] Running org.osgi.util.converter.ConverterBuilderTest
> [ERROR] Tests run: 9, Failures: 1, Errors: 0, Skipped: 3, Time elapsed: 0.046 
> s <<< FAILURE! - in org.osgi.util.converter.ConverterBuilderTest
> [ERROR] testWildcardAdapter1(org.osgi.util.converter.ConverterBuilderTest)  
> Time elapsed: 0.041 s  <<< FAILURE!
> org.junit.ComparisonFailure: expected:<[1]> but was:<[describeConstable]>
>   at 
> org.osgi.util.converter.ConverterBuilderTest.testWildcardAdapter1(ConverterBuilderTest.java:192)
> [INFO] Running org.osgi.util.converter.ConverterTest
> [ERROR] Tests run: 77, Failures: 6, Errors: 13, Skipped: 0, Time elapsed: 
> 0.104 s <<< FAILURE! - in org.osgi.util.converter.ConverterTest
> [ERROR] testCustomErrorHandling(org.osgi.util.converter.ConverterTest)  Time 
> elapsed: 0.001 s  <<< ERROR!
> org.osgi.util.converter.ConversionException: Cannot convert 12 to class 
> java.lang.Integer
>   at 
> org.osgi.util.converter.ConverterTest.testCustomErrorHandling(ConverterTest.java:495)
> [ERROR] 
> testFromArrayToGenericOrderPreservingSet(org.osgi.util.converter.ConverterTest)
>   Time elapsed: 0.001 s  <<< ERROR!
> java.lang.ClassCastException: class java.lang.String cannot be cast to class 
> java.lang.Long (java.lang.String and java.lang.Long are in module java.base 
> of loader 'bootstrap')
>   at 
> org.osgi.util.converter.ConverterTest.testFromArrayToGenericOrderPreservingSet(ConverterTest.java:313)
> [ERROR] testDTOFieldShadowing(org.osgi.util.converter.ConverterTest)  Time 
> elapsed: 0.006 s  <<< FAILURE!
> java.lang.AssertionError: expected:<{ping=test, count=THREE, pong=0, 
> embedded=null}> but was:<{count=describeConstable, pong=describeConstable, 
> embedded=null, ping=test}>
>   at 
> org.osgi.util.converter.ConverterTest.testDTOFieldShadowing(ConverterTest.java:874)
> [ERROR] testEnums(org.osgi.util.converter.ConverterTest)  Time elapsed: 0.001 
> s  <<< ERROR!
> org.osgi.util.converter.ConversionException: Cannot convert [] to class 
> org.osgi.util.converter.ConverterTest$TestEnum
>   at 
> org.osgi.util.converter.ConverterTest.testEnums(ConverterTest.java:212)
> [ERROR] 
> testFromUnknownDataTypeViaString(org.osgi.util.converter.ConverterTest)  Time 
> elapsed: 0 s  <<< ERROR!
> org.osgi.util.converter.ConversionException: Cannot convert 1234 to class 
> java.lang.Integer
>   at 
> org.osgi.util.converter.ConverterTest.testFromUnknownDataTypeViaString(ConverterTest.java:246)
> [ERROR] testCharArrayConversion(org.osgi.util.converter.ConverterTest)  Time 
> elapsed: 0.001 s  <<< FAILURE!
> org.junit.internal.ArrayComparisonFailure: arrays first differed at element 
> [0]; expected:<> but was:
>   at 
> org.osgi.util.converter.ConverterTest.testCharArrayConversion(ConverterTest.java:342)
> Caused by: java.lang.AssertionError: expected:<> but was:
>   at 
> 

[jira] [Assigned] (FELIX-6157) Converter build fails with Java 12

2019-08-16 Thread David Bosschaert (JIRA)


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

David Bosschaert reassigned FELIX-6157:
---

Assignee: David Bosschaert

> Converter build fails with Java 12
> --
>
> Key: FELIX-6157
> URL: https://issues.apache.org/jira/browse/FELIX-6157
> Project: Felix
>  Issue Type: Improvement
>  Components: Converter
>Affects Versions: converter-1.0.8
>Reporter: David Bosschaert
>Assignee: David Bosschaert
>Priority: Major
>
> When I build the converter project with Java 12 I get a lot of failures, see 
> below.
> These problems don't exist with Java 11. This needs to be investigated and 
> fixed.
>  
> {code:java}
> [INFO] ---
> [INFO]  T E S T S
> [INFO] ---
> [INFO] Running org.osgi.util.converter.UtilTest
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.028 
> s - in org.osgi.util.converter.UtilTest
> [INFO] Running org.osgi.util.converter.ConverterBuilderTest
> [ERROR] Tests run: 9, Failures: 1, Errors: 0, Skipped: 3, Time elapsed: 0.046 
> s <<< FAILURE! - in org.osgi.util.converter.ConverterBuilderTest
> [ERROR] testWildcardAdapter1(org.osgi.util.converter.ConverterBuilderTest)  
> Time elapsed: 0.041 s  <<< FAILURE!
> org.junit.ComparisonFailure: expected:<[1]> but was:<[describeConstable]>
>   at 
> org.osgi.util.converter.ConverterBuilderTest.testWildcardAdapter1(ConverterBuilderTest.java:192)
> [INFO] Running org.osgi.util.converter.ConverterTest
> [ERROR] Tests run: 77, Failures: 6, Errors: 13, Skipped: 0, Time elapsed: 
> 0.104 s <<< FAILURE! - in org.osgi.util.converter.ConverterTest
> [ERROR] testCustomErrorHandling(org.osgi.util.converter.ConverterTest)  Time 
> elapsed: 0.001 s  <<< ERROR!
> org.osgi.util.converter.ConversionException: Cannot convert 12 to class 
> java.lang.Integer
>   at 
> org.osgi.util.converter.ConverterTest.testCustomErrorHandling(ConverterTest.java:495)
> [ERROR] 
> testFromArrayToGenericOrderPreservingSet(org.osgi.util.converter.ConverterTest)
>   Time elapsed: 0.001 s  <<< ERROR!
> java.lang.ClassCastException: class java.lang.String cannot be cast to class 
> java.lang.Long (java.lang.String and java.lang.Long are in module java.base 
> of loader 'bootstrap')
>   at 
> org.osgi.util.converter.ConverterTest.testFromArrayToGenericOrderPreservingSet(ConverterTest.java:313)
> [ERROR] testDTOFieldShadowing(org.osgi.util.converter.ConverterTest)  Time 
> elapsed: 0.006 s  <<< FAILURE!
> java.lang.AssertionError: expected:<{ping=test, count=THREE, pong=0, 
> embedded=null}> but was:<{count=describeConstable, pong=describeConstable, 
> embedded=null, ping=test}>
>   at 
> org.osgi.util.converter.ConverterTest.testDTOFieldShadowing(ConverterTest.java:874)
> [ERROR] testEnums(org.osgi.util.converter.ConverterTest)  Time elapsed: 0.001 
> s  <<< ERROR!
> org.osgi.util.converter.ConversionException: Cannot convert [] to class 
> org.osgi.util.converter.ConverterTest$TestEnum
>   at 
> org.osgi.util.converter.ConverterTest.testEnums(ConverterTest.java:212)
> [ERROR] 
> testFromUnknownDataTypeViaString(org.osgi.util.converter.ConverterTest)  Time 
> elapsed: 0 s  <<< ERROR!
> org.osgi.util.converter.ConversionException: Cannot convert 1234 to class 
> java.lang.Integer
>   at 
> org.osgi.util.converter.ConverterTest.testFromUnknownDataTypeViaString(ConverterTest.java:246)
> [ERROR] testCharArrayConversion(org.osgi.util.converter.ConverterTest)  Time 
> elapsed: 0.001 s  <<< FAILURE!
> org.junit.internal.ArrayComparisonFailure: arrays first differed at element 
> [0]; expected:<> but was:
>   at 
> org.osgi.util.converter.ConverterTest.testCharArrayConversion(ConverterTest.java:342)
> Caused by: java.lang.AssertionError: expected:<> but was:
>   at 
> org.osgi.util.converter.ConverterTest.testCharArrayConversion(ConverterTest.java:342)
> [ERROR] testPrefixDTO(org.osgi.util.converter.ConverterTest)  Time elapsed: 
> 0.001 s  <<< ERROR!
> org.osgi.util.converter.ConversionException: Cannot create DTO class 
> org.osgi.util.converter.PrefixDTO
>   at 
> org.osgi.util.converter.ConverterTest.testPrefixDTO(ConverterTest.java:1288)
> Caused by: org.osgi.util.converter.ConversionException: Cannot convert 327 to 
> class java.lang.Long
>   at 
> org.osgi.util.converter.ConverterTest.testPrefixDTO(ConverterTest.java:1288)
> [ERROR] testFromGenericSetToLinkedList(org.osgi.util.converter.ConverterTest) 
>  Time elapsed: 0.001 s  <<< FAILURE!
> java.lang.AssertionError: expected:<[123, 456]> but was:<[describeConstable, 
> describeConstable]>
>   at 
> org.osgi.util.converter.ConverterTest.testFromGenericSetToLinkedList(ConverterTest.java:302)
> [ERROR] 

[jira] [Resolved] (FELIX-6168) Enable WebConsole login only after specified Security Providers are present

2019-08-15 Thread David Bosschaert (JIRA)


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

David Bosschaert resolved FELIX-6168.
-
Resolution: Fixed

Fixed with http://svn.apache.org/viewvc?view=revision=1865232

> Enable WebConsole login only after specified Security Providers are present
> ---
>
> Key: FELIX-6168
> URL: https://issues.apache.org/jira/browse/FELIX-6168
> Project: Felix
>  Issue Type: Bug
>  Components: Web Console
>Affects Versions: webconsole-4.3.12
>Reporter: David Bosschaert
>Assignee: David Bosschaert
>Priority: Major
> Fix For: webconsole-4.3.14
>
> Attachments: FELIX-6168.patch
>
>
> It should be possible to configure the WebConsole to only accept logins after 
> specified Security Providers are found. 
> If these security providers are not yet registered in the Service Registry, 
> logging in should be disabled. The local plain username/password approach 
> should not provide the opportunity to log in, in that case.
> The configuration to enable this should be provided as a framework property.
> This approach is similar to what has been implemented for ConfigAdmin in 
> FELIX-6059



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Commented] (FELIX-6168) Enable WebConsole login only after specified Security Providers are present

2019-08-15 Thread David Bosschaert (JIRA)


[ 
https://issues.apache.org/jira/browse/FELIX-6168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16908110#comment-16908110
 ] 

David Bosschaert commented on FELIX-6168:
-

I have attached FELIX-6168.patch with an implementation proposal. [~cziegeler] 
WDYT?

> Enable WebConsole login only after specified Security Providers are present
> ---
>
> Key: FELIX-6168
> URL: https://issues.apache.org/jira/browse/FELIX-6168
> Project: Felix
>  Issue Type: Bug
>  Components: Web Console
>Affects Versions: webconsole-4.3.12
>Reporter: David Bosschaert
>Assignee: David Bosschaert
>Priority: Major
> Fix For: webconsole-4.3.14
>
> Attachments: FELIX-6168.patch
>
>
> It should be possible to configure the WebConsole to only accept logins after 
> specified Security Providers are found. 
> If these security providers are not yet registered in the Service Registry, 
> logging in should be disabled. The local plain username/password approach 
> should not provide the opportunity to log in, in that case.
> The configuration to enable this should be provided as a framework property.
> This approach is similar to what has been implemented for ConfigAdmin in 
> FELIX-6059



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Updated] (FELIX-6168) Enable WebConsole login only after specified Security Providers are present

2019-08-15 Thread David Bosschaert (JIRA)


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

David Bosschaert updated FELIX-6168:

Attachment: FELIX-6168.patch

> Enable WebConsole login only after specified Security Providers are present
> ---
>
> Key: FELIX-6168
> URL: https://issues.apache.org/jira/browse/FELIX-6168
> Project: Felix
>  Issue Type: Bug
>  Components: Web Console
>Affects Versions: webconsole-4.3.12
>Reporter: David Bosschaert
>Assignee: David Bosschaert
>Priority: Major
> Fix For: webconsole-4.3.14
>
> Attachments: FELIX-6168.patch
>
>
> It should be possible to configure the WebConsole to only accept logins after 
> specified Security Providers are found. 
> If these security providers are not yet registered in the Service Registry, 
> logging in should be disabled. The local plain username/password approach 
> should not provide the opportunity to log in, in that case.
> The configuration to enable this should be provided as a framework property.
> This approach is similar to what has been implemented for ConfigAdmin in 
> FELIX-6059



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Work started] (FELIX-6168) Enable WebConsole login only after specified Security Providers are present

2019-08-13 Thread David Bosschaert (JIRA)


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

Work on FELIX-6168 started by David Bosschaert.
---
> Enable WebConsole login only after specified Security Providers are present
> ---
>
> Key: FELIX-6168
> URL: https://issues.apache.org/jira/browse/FELIX-6168
> Project: Felix
>  Issue Type: Bug
>  Components: Web Console
>Affects Versions: webconsole-4.3.12
>Reporter: David Bosschaert
>Assignee: David Bosschaert
>Priority: Major
>
> It should be possible to configure the WebConsole to only accept logins after 
> specified Security Providers are found. 
> If these security providers are not yet registered in the Service Registry, 
> logging in should be disabled. The local plain username/password approach 
> should not provide the opportunity to log in, in that case.
> The configuration to enable this should be provided as a framework property.
> This approach is similar to what has been implemented for ConfigAdmin in 
> FELIX-6059



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Commented] (FELIX-6168) Enable WebConsole login only after specified Security Providers are present

2019-08-13 Thread David Bosschaert (JIRA)


[ 
https://issues.apache.org/jira/browse/FELIX-6168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16906078#comment-16906078
 ] 

David Bosschaert commented on FELIX-6168:
-

Thanks for the idea, [~cziegeler]. I have updated the description accordingly.

> Enable WebConsole login only after specified Security Providers are present
> ---
>
> Key: FELIX-6168
> URL: https://issues.apache.org/jira/browse/FELIX-6168
> Project: Felix
>  Issue Type: Bug
>  Components: Web Console
>Affects Versions: webconsole-4.3.12
>Reporter: David Bosschaert
>Assignee: David Bosschaert
>Priority: Major
>
> It should be possible to configure the WebConsole to only accept logins after 
> specified Security Providers are found. 
> If these security providers are not yet registered in the Service Registry, 
> logging in should be disabled. The local plain username/password approach 
> should not provide the opportunity to log in, in that case.
> The configuration to enable this should be provided as a framework property.
> This approach is similar to what has been implemented for ConfigAdmin in 
> FELIX-6059



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Updated] (FELIX-6168) Enable WebConsole login only after specified Security Providers are present

2019-08-13 Thread David Bosschaert (JIRA)


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

David Bosschaert updated FELIX-6168:

Description: 
It should be possible to configure the WebConsole to only accept logins after 
specified Security Providers are found. 
If these security providers are not yet registered in the Service Registry, 
logging in should be disabled. The local plain username/password approach 
should not provide the opportunity to log in, in that case.

The configuration to enable this should be provided as a framework property.

This approach is similar to what has been implemented for ConfigAdmin in 
FELIX-6059

  was:
It should be possible to disable plain username/password access to the 
WebConsole. 

When disabled, a simple user name and password (such as the default 
admin/admin) does not work any more. 
The WebConsole Security Provider should be the only enabled mechanism to log in.

Disabling should happen through configuration or a framework property.


> Enable WebConsole login only after specified Security Providers are present
> ---
>
> Key: FELIX-6168
> URL: https://issues.apache.org/jira/browse/FELIX-6168
> Project: Felix
>  Issue Type: Bug
>  Components: Web Console
>Affects Versions: webconsole-4.3.12
>Reporter: David Bosschaert
>Assignee: David Bosschaert
>Priority: Major
>
> It should be possible to configure the WebConsole to only accept logins after 
> specified Security Providers are found. 
> If these security providers are not yet registered in the Service Registry, 
> logging in should be disabled. The local plain username/password approach 
> should not provide the opportunity to log in, in that case.
> The configuration to enable this should be provided as a framework property.
> This approach is similar to what has been implemented for ConfigAdmin in 
> FELIX-6059



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Updated] (FELIX-6168) Enable WebConsole login only after specified Security Providers are present

2019-08-13 Thread David Bosschaert (JIRA)


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

David Bosschaert updated FELIX-6168:

Summary: Enable WebConsole login only after specified Security Providers 
are present  (was: Disable username/password access to WebConsole)

> Enable WebConsole login only after specified Security Providers are present
> ---
>
> Key: FELIX-6168
> URL: https://issues.apache.org/jira/browse/FELIX-6168
> Project: Felix
>  Issue Type: Bug
>  Components: Web Console
>Affects Versions: webconsole-4.3.12
>Reporter: David Bosschaert
>Assignee: David Bosschaert
>Priority: Major
>
> It should be possible to disable plain username/password access to the 
> WebConsole. 
> When disabled, a simple user name and password (such as the default 
> admin/admin) does not work any more. 
> The WebConsole Security Provider should be the only enabled mechanism to log 
> in.
> Disabling should happen through configuration or a framework property.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Assigned] (FELIX-6168) Disable username/password access to WebConsole

2019-08-13 Thread David Bosschaert (JIRA)


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

David Bosschaert reassigned FELIX-6168:
---

Assignee: David Bosschaert

> Disable username/password access to WebConsole
> --
>
> Key: FELIX-6168
> URL: https://issues.apache.org/jira/browse/FELIX-6168
> Project: Felix
>  Issue Type: Bug
>  Components: Web Console
>Affects Versions: webconsole-4.3.12
>Reporter: David Bosschaert
>Assignee: David Bosschaert
>Priority: Major
>
> It should be possible to disable plain username/password access to the 
> WebConsole. 
> When disabled, a simple user name and password (such as the default 
> admin/admin) does not work any more. 
> The WebConsole Security Provider should be the only enabled mechanism to log 
> in.
> Disabling should happen through configuration or a framework property.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Created] (FELIX-6168) Disable username/password access to WebConsole

2019-08-13 Thread David Bosschaert (JIRA)
David Bosschaert created FELIX-6168:
---

 Summary: Disable username/password access to WebConsole
 Key: FELIX-6168
 URL: https://issues.apache.org/jira/browse/FELIX-6168
 Project: Felix
  Issue Type: Bug
  Components: Web Console
Affects Versions: webconsole-4.3.12
Reporter: David Bosschaert


It should be possible to disable plain username/password access to the 
WebConsole. 

When disabled, a simple user name and password (such as the default 
admin/admin) does not work any more. 
The WebConsole Security Provider should be the only enabled mechanism to log in.

Disabling should happen through configuration or a framework property.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Created] (FELIX-6165) Rename org.apache.felix.configadmin.plugin.interpolation.dir

2019-08-01 Thread David Bosschaert (JIRA)
David Bosschaert created FELIX-6165:
---

 Summary: Rename 
org.apache.felix.configadmin.plugin.interpolation.dir
 Key: FELIX-6165
 URL: https://issues.apache.org/jira/browse/FELIX-6165
 Project: Felix
  Issue Type: Bug
  Components: Configuration Admin
Affects Versions: configadmin-interpolation-plugin-0.0.2
Reporter: David Bosschaert
 Fix For: configadmin-interpolation-plugin-0.0.4


As discused on the devlist: we need to rename the property 
org.apache.felix.configadmin.plugin.interpolation.dir to
org.apache.felix.configadmin.plugin.interpolation.secretsdir



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Created] (FELIX-6157) Converter build fails with Java 12

2019-07-03 Thread David Bosschaert (JIRA)
David Bosschaert created FELIX-6157:
---

 Summary: Converter build fails with Java 12
 Key: FELIX-6157
 URL: https://issues.apache.org/jira/browse/FELIX-6157
 Project: Felix
  Issue Type: Improvement
  Components: Converter
Affects Versions: converter-1.0.8
Reporter: David Bosschaert


When I build the converter project with Java 12 I get a lot of failures, see 
below.
These problems don't exist with Java 11. This needs to be investigated and 
fixed.

 
{code:java}
[INFO] ---
[INFO]  T E S T S
[INFO] ---
[INFO] Running org.osgi.util.converter.UtilTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.028 s 
- in org.osgi.util.converter.UtilTest
[INFO] Running org.osgi.util.converter.ConverterBuilderTest
[ERROR] Tests run: 9, Failures: 1, Errors: 0, Skipped: 3, Time elapsed: 0.046 s 
<<< FAILURE! - in org.osgi.util.converter.ConverterBuilderTest
[ERROR] testWildcardAdapter1(org.osgi.util.converter.ConverterBuilderTest)  
Time elapsed: 0.041 s  <<< FAILURE!
org.junit.ComparisonFailure: expected:<[1]> but was:<[describeConstable]>
at 
org.osgi.util.converter.ConverterBuilderTest.testWildcardAdapter1(ConverterBuilderTest.java:192)

[INFO] Running org.osgi.util.converter.ConverterTest
[ERROR] Tests run: 77, Failures: 6, Errors: 13, Skipped: 0, Time elapsed: 0.104 
s <<< FAILURE! - in org.osgi.util.converter.ConverterTest
[ERROR] testCustomErrorHandling(org.osgi.util.converter.ConverterTest)  Time 
elapsed: 0.001 s  <<< ERROR!
org.osgi.util.converter.ConversionException: Cannot convert 12 to class 
java.lang.Integer
at 
org.osgi.util.converter.ConverterTest.testCustomErrorHandling(ConverterTest.java:495)

[ERROR] 
testFromArrayToGenericOrderPreservingSet(org.osgi.util.converter.ConverterTest) 
 Time elapsed: 0.001 s  <<< ERROR!
java.lang.ClassCastException: class java.lang.String cannot be cast to class 
java.lang.Long (java.lang.String and java.lang.Long are in module java.base of 
loader 'bootstrap')
at 
org.osgi.util.converter.ConverterTest.testFromArrayToGenericOrderPreservingSet(ConverterTest.java:313)

[ERROR] testDTOFieldShadowing(org.osgi.util.converter.ConverterTest)  Time 
elapsed: 0.006 s  <<< FAILURE!
java.lang.AssertionError: expected:<{ping=test, count=THREE, pong=0, 
embedded=null}> but was:<{count=describeConstable, pong=describeConstable, 
embedded=null, ping=test}>
at 
org.osgi.util.converter.ConverterTest.testDTOFieldShadowing(ConverterTest.java:874)

[ERROR] testEnums(org.osgi.util.converter.ConverterTest)  Time elapsed: 0.001 s 
 <<< ERROR!
org.osgi.util.converter.ConversionException: Cannot convert [] to class 
org.osgi.util.converter.ConverterTest$TestEnum
at 
org.osgi.util.converter.ConverterTest.testEnums(ConverterTest.java:212)

[ERROR] testFromUnknownDataTypeViaString(org.osgi.util.converter.ConverterTest) 
 Time elapsed: 0 s  <<< ERROR!
org.osgi.util.converter.ConversionException: Cannot convert 1234 to class 
java.lang.Integer
at 
org.osgi.util.converter.ConverterTest.testFromUnknownDataTypeViaString(ConverterTest.java:246)

[ERROR] testCharArrayConversion(org.osgi.util.converter.ConverterTest)  Time 
elapsed: 0.001 s  <<< FAILURE!
org.junit.internal.ArrayComparisonFailure: arrays first differed at element 
[0]; expected:<> but was:
at 
org.osgi.util.converter.ConverterTest.testCharArrayConversion(ConverterTest.java:342)
Caused by: java.lang.AssertionError: expected:<> but was:
at 
org.osgi.util.converter.ConverterTest.testCharArrayConversion(ConverterTest.java:342)

[ERROR] testPrefixDTO(org.osgi.util.converter.ConverterTest)  Time elapsed: 
0.001 s  <<< ERROR!
org.osgi.util.converter.ConversionException: Cannot create DTO class 
org.osgi.util.converter.PrefixDTO
at 
org.osgi.util.converter.ConverterTest.testPrefixDTO(ConverterTest.java:1288)
Caused by: org.osgi.util.converter.ConversionException: Cannot convert 327 to 
class java.lang.Long
at 
org.osgi.util.converter.ConverterTest.testPrefixDTO(ConverterTest.java:1288)

[ERROR] testFromGenericSetToLinkedList(org.osgi.util.converter.ConverterTest)  
Time elapsed: 0.001 s  <<< FAILURE!
java.lang.AssertionError: expected:<[123, 456]> but was:<[describeConstable, 
describeConstable]>
at 
org.osgi.util.converter.ConverterTest.testFromGenericSetToLinkedList(ConverterTest.java:302)

[ERROR] testDefaultValue(org.osgi.util.converter.ConverterTest)  Time elapsed: 
0 s  <<< ERROR!
org.osgi.util.converter.ConversionException: Cannot convert 12 to class 
java.lang.Long
at 
org.osgi.util.converter.ConverterTest.testDefaultValue(ConverterTest.java:723)

[ERROR] testDTONameMangling(org.osgi.util.converter.ConverterTest)  Time 
elapsed: 0.001 s  <<< ERROR!
org.osgi.util.converter.ConversionException: 

[jira] [Comment Edited] (FELIX-6137) Converting an default-less annotation property throws instead of returning null

2019-05-31 Thread David Bosschaert (JIRA)


[ 
https://issues.apache.org/jira/browse/FELIX-6137?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16853037#comment-16853037
 ] 

David Bosschaert edited comment on FELIX-6137 at 5/31/19 1:51 PM:
--

Hi [~marett], this is actually by design. You can convert a map to an interface 
or annotation without having to specify all the values available as methods in 
those. However, if you invoke a method on the interface or annotation for which 
no value is specified in the original map or a default is otherwise provided, 
the converter throws an exception. This behaviour is specified in the OSGi 
converter spec 
([https://osgi.org/specification/osgi.enterprise/7.0.0/util.converter.html#util.converter-maps)]
 section 707.4.4.4.5 Annotation states: "If no default is specified a 
ConversionException is thrown."

However, since returning {{null}} for undefined values is a pretty common 
scenario, you can quite easily achieve this by slightly customizing your 
converter using an Error Handler. This is described in section 707.7 
([https://osgi.org/specification/osgi.enterprise/7.0.0/util.converter.html#d0e107836)]
 of the converter spec.

So to apply this to your test case, instead of
{code:java}
@Test
public void testDictionaryToAnnotationWithoutDefault() {
  Dictionary dict = new TestDictionary<>();
  TestAnnotation ta = converter.convert(dict).to(TestAnnotation.class);
  assertEquals(null, ta.noDefault());
}
{code}
You can change it to:
{code:java}
@Test
public void testDictionaryToAnnotationWithoutDefault() {
  Converter nullDefaultConverter = converter.newConverterBuilder().
errorHandler((o,t) -> null).build();

  Dictionary dict = new TestDictionary<>();
  TestAnnotation ta = nullDefaultConverter.convert(dict).
to(TestAnnotation.class);
  assertEquals(null, ta.noDefault());
}
{code}
Note the error handler lambda, which will return null instead of throwing a 
conversion exception. It will provide the behaviour you are looking for I think.
  


was (Author: bosschaert):
Hi [~marett], this is actually by design. You can convert a map to an interface 
or annotation without having to specify all the values available as methods in 
those. However, if you invoke a method on the interface or annotation for which 
no value is specified in the original map or a default is otherwise provided, 
the converter throws an exception. This behaviour is specified in the OSGi 
converter spec 
([https://osgi.org/specification/osgi.enterprise/7.0.0/util.converter.html#util.converter-maps)]
 section 707.4.4.4.5 Annotation states: "If no default is specified a 
ConversionException is thrown."

However, since returning {{null}} for undefined values is a pretty common 
scenario, you can quite easily achieve this by slightly customizing your 
converter using an Error Handler. This is described in section 707.7 
([https://osgi.org/specification/osgi.enterprise/7.0.0/util.converter.html#d0e107836)]
 of the converter spec.

So to apply this to your test case, instead of
{code:java}
@Test
public void testDictionaryToAnnotationWithoutDefault() {
  Dictionary dict = new TestDictionary<>();
  TestAnnotation ta = converter.convert(dict).to(TestAnnotation.class);
  assertEquals(null, ta.noDefault());
}
{code}
You can change it to:
{code:java}
@Test
public void testDictionaryToAnnotationWithoutDefault() {
  Converter nullDefaultConverter = converter.newConverterBuilder().
errorHandler((o,t) -> null).build();

  Dictionary dict = new TestDictionary<>();
  TestAnnotation ta = 
nullDefaultConverter.convert(dict).to(TestAnnotation.class);
  assertEquals(null, ta.noDefault());
}
{code}
Note the error handler lambda, which will return null instead of throwing a 
conversion exception. It will provide the behaviour you are looking for I think.
  

> Converting an default-less annotation property throws instead of returning 
> null
> ---
>
> Key: FELIX-6137
> URL: https://issues.apache.org/jira/browse/FELIX-6137
> Project: Felix
>  Issue Type: Bug
>  Components: Converter
>Affects Versions: converter-1.0.8
>Reporter: Timothee Maret
>Assignee: David Bosschaert
>Priority: Major
>
> Converting a dictionary to an annotation that does not define a default value 
> property throws a {{org.osgi.util.converter.ConversionException}} like the 
> one below instead of returning {{null}}.
> {code}
> org.osgi.util.converter.ConversionException: No value for property: noDefault
>   at 
> org.osgi.util.converter.ConvertingImpl$4.invoke(ConvertingImpl.java:806)
>   at org.osgi.util.converter.$Proxy9.noDefault(Unknown Source)
>   at 
> org.osgi.util.converter.ConverterMapTest.testDictionaryToAnnotationWithoutDefault(ConverterMapTest.java:520)
>   at 

[jira] [Commented] (FELIX-6137) Converting an default-less annotation property throws instead of returning null

2019-05-31 Thread David Bosschaert (JIRA)


[ 
https://issues.apache.org/jira/browse/FELIX-6137?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16853037#comment-16853037
 ] 

David Bosschaert commented on FELIX-6137:
-

Hi [~marett], this is actually by design. You can convert a map to an interface 
or annotation without having to specify all the values available as methods in 
those. However, if you invoke a method on the interface or annotation for which 
no value is specified in the original map or a default is otherwise provided, 
the converter throws an exception. This behaviour is specified in the OSGi 
converter spec 
([https://osgi.org/specification/osgi.enterprise/7.0.0/util.converter.html#util.converter-maps)]
 section 707.4.4.4.5 Annotation states: "If no default is specified a 
ConversionException is thrown."

However, since returning {{null}} for undefined values is a pretty common 
scenario, you can quite easily achieve this by slightly customizing your 
converter using an Error Handler. This is described in section 707.7 
([https://osgi.org/specification/osgi.enterprise/7.0.0/util.converter.html#d0e107836)]
 of the converter spec.

So to apply this to your test case, instead of
{code:java}
@Test
public void testDictionaryToAnnotationWithoutDefault() {
  Dictionary dict = new TestDictionary<>();
  TestAnnotation ta = converter.convert(dict).to(TestAnnotation.class);
  assertEquals(null, ta.noDefault());
}
{code}
You can change it to:
{code:java}
@Test
public void testDictionaryToAnnotationWithoutDefault() {
  Converter nullDefaultConverter = converter.newConverterBuilder().
errorHandler((o,t) -> null).build();

  Dictionary dict = new TestDictionary<>();
  TestAnnotation ta = 
nullDefaultConverter.convert(dict).to(TestAnnotation.class);
  assertEquals(null, ta.noDefault());
}
{code}
Note the error handler lambda, which will return null instead of throwing a 
conversion exception. It will provide the behaviour you are looking for I think.
  

> Converting an default-less annotation property throws instead of returning 
> null
> ---
>
> Key: FELIX-6137
> URL: https://issues.apache.org/jira/browse/FELIX-6137
> Project: Felix
>  Issue Type: Bug
>  Components: Converter
>Affects Versions: converter-1.0.8
>Reporter: Timothee Maret
>Assignee: David Bosschaert
>Priority: Major
>
> Converting a dictionary to an annotation that does not define a default value 
> property throws a {{org.osgi.util.converter.ConversionException}} like the 
> one below instead of returning {{null}}.
> {code}
> org.osgi.util.converter.ConversionException: No value for property: noDefault
>   at 
> org.osgi.util.converter.ConvertingImpl$4.invoke(ConvertingImpl.java:806)
>   at org.osgi.util.converter.$Proxy9.noDefault(Unknown Source)
>   at 
> org.osgi.util.converter.ConverterMapTest.testDictionaryToAnnotationWithoutDefault(ConverterMapTest.java:520)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:498)
>   at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
>   at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>   at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
>   at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>   at 
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
>   at 
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
>   at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
>   at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
>   at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
>   at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
>   at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
>   at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
>   at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
>   at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
> {code}



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


[jira] [Assigned] (FELIX-6137) Converting an default-less annotation property throws instead of returning null

2019-05-31 Thread David Bosschaert (JIRA)


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

David Bosschaert reassigned FELIX-6137:
---

Assignee: David Bosschaert

> Converting an default-less annotation property throws instead of returning 
> null
> ---
>
> Key: FELIX-6137
> URL: https://issues.apache.org/jira/browse/FELIX-6137
> Project: Felix
>  Issue Type: Bug
>  Components: Converter
>Affects Versions: converter-1.0.8
>Reporter: Timothee Maret
>Assignee: David Bosschaert
>Priority: Major
>
> Converting a dictionary to an annotation that does not define a default value 
> property throws a {{org.osgi.util.converter.ConversionException}} like the 
> one below instead of returning {{null}}.
> {code}
> org.osgi.util.converter.ConversionException: No value for property: noDefault
>   at 
> org.osgi.util.converter.ConvertingImpl$4.invoke(ConvertingImpl.java:806)
>   at org.osgi.util.converter.$Proxy9.noDefault(Unknown Source)
>   at 
> org.osgi.util.converter.ConverterMapTest.testDictionaryToAnnotationWithoutDefault(ConverterMapTest.java:520)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:498)
>   at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
>   at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>   at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
>   at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>   at 
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
>   at 
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
>   at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
>   at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
>   at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
>   at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
>   at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
>   at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
>   at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
>   at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
> {code}



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


[jira] [Commented] (FELIX-5678) Allow merging of objects

2019-05-31 Thread David Bosschaert (JIRA)


[ 
https://issues.apache.org/jira/browse/FELIX-5678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16852851#comment-16852851
 ] 

David Bosschaert commented on FELIX-5678:
-

Hi [~dleangen] somehow I think that a merger is fundamentally different to a 
converter, albeit the case that it may be easy to implement a deep merger with 
the help of the converter. So to me it sounds like a separate component. 

I have to admit, I have not really had the need for a deep merger myself that 
often, but that doesn't mean others don't need it. 

I would suggest discussing it on one of the Felix mailing lists (for increased 
visibility) and maybe get an initial implementation started in Felix? Maybe we 
can take it from there?

Oh, and BTW it's certainly not too early for OSGi R8 proposals :)

> Allow merging of objects
> 
>
> Key: FELIX-5678
> URL: https://issues.apache.org/jira/browse/FELIX-5678
> Project: Felix
>  Issue Type: Bug
>  Components: Converter
>Reporter: David Leangen
>Priority: Major
>
> Given a typed object O1 and a "partial" representation of an object O2 (for 
> instance in the form of a Map), allow O2 to be merged into O1.
> Example:
> {code}
> public class Foo {
>   public String a;
>   public String b;
>   public String c;
> }
> Foo f = new Foo();
> a = "Eh!";
> b = "Be cool.";
> c = "See you later?";
> Map m = new Map<>();
> m.put("b", "Be there or be square");
> Foo f2 = Converter.convert(f).merge(m);
> {code}
> I am sure there are many ways to skin this cat.
> If the Converter API cannot be changed, what would be the best way to tackle 
> this problem?
> (In the meantime, while awaiting comments form [~bosschaert], I'll try to run 
> a few experiments to see if I can come up with something reasonable.)



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


[jira] [Commented] (FELIX-5678) Allow merging of objects

2019-05-30 Thread David Bosschaert (JIRA)


[ 
https://issues.apache.org/jira/browse/FELIX-5678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16851706#comment-16851706
 ] 

David Bosschaert commented on FELIX-5678:
-

Hi [~dleangen],

I think the simplest solution would be to take your 2 objects and convert them 
both to simple Maps using the converter. Then you can merge the 2 maps by 
calling {{map1.putAll(map2)}}
 Finally you can convert your resulting map back to the target object you need 
using the converter.

Alternatively you should be able to use a custom converter rule like described 
in the first comment, and in more detail here: 
[https://osgi.org/specification/osgi.enterprise/7.0.0/util.converter.html#util.converter-customizing.converters]

Let me know if this helps...

Cheers,

David

> Allow merging of objects
> 
>
> Key: FELIX-5678
> URL: https://issues.apache.org/jira/browse/FELIX-5678
> Project: Felix
>  Issue Type: Bug
>  Components: Converter
>Reporter: David Leangen
>Priority: Major
>
> Given a typed object O1 and a "partial" representation of an object O2 (for 
> instance in the form of a Map), allow O2 to be merged into O1.
> Example:
> {code}
> public class Foo {
>   public String a;
>   public String b;
>   public String c;
> }
> Foo f = new Foo();
> a = "Eh!";
> b = "Be cool.";
> c = "See you later?";
> Map m = new Map<>();
> m.put("b", "Be there or be square");
> Foo f2 = Converter.convert(f).merge(m);
> {code}
> I am sure there are many ways to skin this cat.
> If the Converter API cannot be changed, what would be the best way to tackle 
> this problem?
> (In the meantime, while awaiting comments form [~bosschaert], I'll try to run 
> a few experiments to see if I can come up with something reasonable.)



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


[jira] [Resolved] (FELIX-6100) The converter fails to properly convert null to array types

2019-04-12 Thread David Bosschaert (JIRA)


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

David Bosschaert resolved FELIX-6100.
-
Resolution: Fixed

Many thanks for the patch [~timothyjward]! It's applied in 
[http://svn.apache.org/viewvc?view=revision=1857407]

> The converter fails to properly convert null to array types
> ---
>
> Key: FELIX-6100
> URL: https://issues.apache.org/jira/browse/FELIX-6100
> Project: Felix
>  Issue Type: Bug
>  Components: Converter
>Affects Versions: converter-1.0.4
>Reporter: Timothy Ward
>Assignee: Timothy Ward
>Priority: Major
> Fix For: converter-1.0.6
>
>
> The Converter specification [says in 
> 707.4.3.1|https://osgi.org/specification/osgi.cmpn/7.0.0/util.converter.html#util.converter-arrays.collections]
>  that null should be converted to an empty array, however the current 
> implementation converts to an empty `Object[]` regardless of the target type, 
> for example a `byte[]`. This is clearly wrong as the returned object cannot 
> be assigned to the target type!



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


[jira] [Resolved] (FELIX-6065) The Converter doesn't support Wildcard types

2019-03-11 Thread David Bosschaert (JIRA)


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

David Bosschaert resolved FELIX-6065.
-
Resolution: Fixed
  Assignee: Timothy Ward

> The Converter doesn't support Wildcard types
> 
>
> Key: FELIX-6065
> URL: https://issues.apache.org/jira/browse/FELIX-6065
> Project: Felix
>  Issue Type: Improvement
>  Components: Converter
>Affects Versions: converter-1.0.2
>Reporter: Timothy Ward
>Assignee: Timothy Ward
>Priority: Major
> Fix For: converter-1.0.6
>
>
> If you pass a wildcard type to the converter then it fails to do the 
> conversion. This is an odd thing to do, but it is definitely possible to work 
> out what the type is.
>  
> For example:
>     to(new TypeReference>(){});
>  
> can be converted to a Map, and 
>     to(new TypeReference>>(){});
> can be converted to a Map>
>  
> It is unclear what it would mean to use
> {{ to(new TypeReference(){});}}



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


[jira] [Resolved] (FELIX-6008) ErrorHandlers should be applied in reverse order

2019-03-11 Thread David Bosschaert (JIRA)


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

David Bosschaert resolved FELIX-6008.
-
Resolution: Fixed

Fixed in http://svn.apache.org/viewvc?view=revision=1855240

[~cvgaviao] could you please double check that this works for you?

> ErrorHandlers should be applied in reverse order
> 
>
> Key: FELIX-6008
> URL: https://issues.apache.org/jira/browse/FELIX-6008
> Project: Felix
>  Issue Type: Bug
>  Components: Converter
>Affects Versions: converter-1.0.2
>Reporter: Cristiano Gavião
>Assignee: David Bosschaert
>Priority: Major
> Fix For: converter-1.0.6
>
>
> It could become common to create a new converter from an existent one.
> So, in case of more than one errorHandler were registered they must be 
> applied in reverse order.



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


[jira] [Updated] (FELIX-6008) ErrorHandlers should be applied in reverse order

2019-03-11 Thread David Bosschaert (JIRA)


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

David Bosschaert updated FELIX-6008:

Fix Version/s: converter-1.0.6

> ErrorHandlers should be applied in reverse order
> 
>
> Key: FELIX-6008
> URL: https://issues.apache.org/jira/browse/FELIX-6008
> Project: Felix
>  Issue Type: Bug
>  Components: Converter
>Affects Versions: converter-1.0.2
>Reporter: Cristiano Gavião
>Assignee: David Bosschaert
>Priority: Major
> Fix For: converter-1.0.6
>
>
> It could become common to create a new converter from an existent one.
> So, in case of more than one errorHandler were registered they must be 
> applied in reverse order.



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


[jira] [Commented] (FELIX-6063) Avoid using reflection operations which require permissions

2019-02-20 Thread David Bosschaert (JIRA)


[ 
https://issues.apache.org/jira/browse/FELIX-6063?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16772882#comment-16772882
 ] 

David Bosschaert commented on FELIX-6063:
-

Thanks [~timothyjward]! I changed the fix version to 1.0.6 as 1.0.4 is 
currently under vote and has been already for a number of days.

> Avoid using reflection operations which require permissions
> ---
>
> Key: FELIX-6063
> URL: https://issues.apache.org/jira/browse/FELIX-6063
> Project: Felix
>  Issue Type: Improvement
>  Components: Converter
>Affects Versions: converter-1.0.2
>Reporter: Timothy Ward
>Assignee: Timothy Ward
>Priority: Major
> Fix For: converter-1.0.6
>
>
> The Converter implementation uses lots of reflection as part of its 
> operation, however it is only expected to interact with public members. It 
> should therefore not use getDeclaredMethods() or getDeclaredFields().



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


[jira] [Updated] (FELIX-6063) Avoid using reflection operations which require permissions

2019-02-20 Thread David Bosschaert (JIRA)


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

David Bosschaert updated FELIX-6063:

Fix Version/s: (was: converter-1.0.4)
   converter-1.0.6

> Avoid using reflection operations which require permissions
> ---
>
> Key: FELIX-6063
> URL: https://issues.apache.org/jira/browse/FELIX-6063
> Project: Felix
>  Issue Type: Improvement
>  Components: Converter
>Affects Versions: converter-1.0.2
>Reporter: Timothy Ward
>Assignee: Timothy Ward
>Priority: Major
> Fix For: converter-1.0.6
>
>
> The Converter implementation uses lots of reflection as part of its 
> operation, however it is only expected to interact with public members. It 
> should therefore not use getDeclaredMethods() or getDeclaredFields().



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


[jira] [Work started] (FELIX-6008) ErrorHandlers should be applied in reverse order

2019-02-20 Thread David Bosschaert (JIRA)


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

Work on FELIX-6008 started by David Bosschaert.
---
> ErrorHandlers should be applied in reverse order
> 
>
> Key: FELIX-6008
> URL: https://issues.apache.org/jira/browse/FELIX-6008
> Project: Felix
>  Issue Type: Bug
>  Components: Converter
>Affects Versions: converter-1.0.2
>Reporter: Cristiano Gavião
>Assignee: David Bosschaert
>Priority: Major
>
> It could become common to create a new converter from an existent one.
> So, in case of more than one errorHandler were registered they must be 
> applied in reverse order.



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


[jira] [Assigned] (FELIX-6042) Lists are not recognized as typed properties

2019-01-31 Thread David Bosschaert (JIRA)


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

David Bosschaert reassigned FELIX-6042:
---

Assignee: David Bosschaert

> Lists are not recognized as typed properties
> 
>
> Key: FELIX-6042
> URL: https://issues.apache.org/jira/browse/FELIX-6042
> Project: Felix
>  Issue Type: Bug
>  Components: Utils
>Reporter: Christoph Fiehe
>Assignee: David Bosschaert
>Priority: Major
>
> The issue is related to TypedProperties and appears only when lists are 
> deserialized. It was originally reported by 
> [t...@quarendon.net|mailto:t...@quarendon.net] (Apparent bug storing 
> collection in org.apache.felix.utils.properties.TypedProperties) in the Felix 
> mailing list.
> The class org.apache.felix.utils.properties.Properties.PropertiesReader uses 
> an incomplete regular expression, so that lists are not recognized as typed 
> properties and get interpreted as strings.
> Extending the regular expression will fix the issue.



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


[jira] [Resolved] (FELIX-6042) Lists are not recognized as typed properties

2019-01-31 Thread David Bosschaert (JIRA)


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

David Bosschaert resolved FELIX-6042.
-
   Resolution: Fixed
Fix Version/s: utils-1.11.4

Thanks for the patch [~cfiehe]! It's applied in 
http://svn.apache.org/viewvc?view=revision=1852591

> Lists are not recognized as typed properties
> 
>
> Key: FELIX-6042
> URL: https://issues.apache.org/jira/browse/FELIX-6042
> Project: Felix
>  Issue Type: Bug
>  Components: Utils
>Reporter: Christoph Fiehe
>Assignee: David Bosschaert
>Priority: Major
> Fix For: utils-1.11.4
>
>
> The issue is related to TypedProperties and appears only when lists are 
> deserialized. It was originally reported by 
> [t...@quarendon.net|mailto:t...@quarendon.net] (Apparent bug storing 
> collection in org.apache.felix.utils.properties.TypedProperties) in the Felix 
> mailing list.
> The class org.apache.felix.utils.properties.Properties.PropertiesReader uses 
> an incomplete regular expression, so that lists are not recognized as typed 
> properties and get interpreted as strings.
> Extending the regular expression will fix the issue.



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


[jira] [Resolved] (FELIX-6020) Converter could not convert to Interfaces, which only has methods from inherited Interfaces

2019-01-21 Thread David Bosschaert (JIRA)


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

David Bosschaert resolved FELIX-6020.
-
   Resolution: Fixed
 Assignee: David Bosschaert
Fix Version/s: converter-1.0.4

Resolved with FELIX-6031

> Converter could not convert to Interfaces, which only has methods from 
> inherited Interfaces
> ---
>
> Key: FELIX-6020
> URL: https://issues.apache.org/jira/browse/FELIX-6020
> Project: Felix
>  Issue Type: Bug
>  Components: Converter
>Affects Versions: converter-1.0.2
>Reporter: Stefan Bischof
>Assignee: David Bosschaert
>Priority: Major
> Fix For: converter-1.0.4
>
>
> Hi,
> the Converter could not convert to an Interfaces, when the Interface only has 
> methods from inherited other Interfaces. 
> Here is a TestCase:
> {code:java}
> import static org.junit.Assert.assertEquals;
> import java.util.HashMap;
> import java.util.Map;
> import org.junit.Test;
> import org.osgi.util.converter.Converter;
> import org.osgi.util.converter.Converters;
> public class ConvTest {
>     interface InterfaceFoo {
>         String foo();
>     }
>     interface InterfaceFooBar extends InterfaceFoo {
>         String bar();
>     }
>     interface InterfaceFooNon extends InterfaceFoo {
>         // Empty
>     }
>     private static final String fooValue = "foofoo";
>     private static final String barValue = "barbar";
>     final Converter converter = Converters.standardConverter();
>     @Test
>     public void testFooPure() throws Exception {
>         final Map map = new HashMap();
>         map.put("foo", fooValue);
>         final InterfaceFoo iFoo = 
> converter.convert(map).to(InterfaceFoo.class);
>         assertEquals(fooValue, iFoo.foo());
>     }
>     @Test
>     public void testFooBar() throws Exception {
>         final Map map = new HashMap();
>         map.put("foo", fooValue);
>         map.put("bar", barValue);
>         final InterfaceFooBar iFooBar = 
> converter.convert(map).to(InterfaceFooBar.class);
>         assertEquals(fooValue, iFooBar.foo());
>         assertEquals(barValue, iFooBar.bar());
>     }
>     @Test
>     public void testFooNon() throws Exception {
>         final Map map = new HashMap();
>         map.put("foo", fooValue);
>         final InterfaceFooNon iFooNon = 
> converter.convert(map).to(InterfaceFooNon.class);
>         assertEquals(fooValue, iFooNon.foo());
>     }
> }{code}
>  
>  
> Stacktrace
> {code:java}
> org.osgi.util.converter.ConversionException: Cannot convert foo to interface 
> de.jena.servicehub.doc.latex.itest.ConvTest$InterfaceFooNon
>     at org.osgi.util.converter.ConvertingImpl.to(ConvertingImpl.java:212)
>     at 
> org.osgi.util.converter.CustomConverterImpl$ConvertingWrapper.to(CustomConverterImpl.java:176)
>     at 
> org.osgi.util.converter.CustomConverterImpl$ConvertingWrapper.to(CustomConverterImpl.java:139)
>     at 
> org.osgi.util.converter.ConvertingImpl.convertMapEntryToSingleValue(ConvertingImpl.java:260)
>     at org.osgi.util.converter.ConvertingImpl.to(ConvertingImpl.java:197)
>     at 
> org.osgi.util.converter.CustomConverterImpl$ConvertingWrapper.to(CustomConverterImpl.java:176)
>     at 
> org.osgi.util.converter.CustomConverterImpl$ConvertingWrapper.to(CustomConverterImpl.java:139)
>     at 
> org.osgi.util.converter.ConvertingImpl.convertMapToSingleValue(ConvertingImpl.java:236)
>     at org.osgi.util.converter.ConvertingImpl.to(ConvertingImpl.java:195)
>     at 
> org.osgi.util.converter.CustomConverterImpl$ConvertingWrapper.to(CustomConverterImpl.java:176)
>     at 
> org.osgi.util.converter.CustomConverterImpl$ConvertingWrapper.to(CustomConverterImpl.java:139)
> {code}



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


[jira] [Commented] (FELIX-6031) Converter is not working properly when the target is an interface that extends others

2019-01-21 Thread David Bosschaert (JIRA)


[ 
https://issues.apache.org/jira/browse/FELIX-6031?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16747892#comment-16747892
 ] 

David Bosschaert commented on FELIX-6031:
-

Just deployed a snapshot: 
[https://repository.apache.org/content/groups/snapshots/org/apache/felix/org.apache.felix.converter/1.0.3-SNAPSHOT/]

> Converter is not working properly when the target is an interface that 
> extends others
> -
>
> Key: FELIX-6031
> URL: https://issues.apache.org/jira/browse/FELIX-6031
> Project: Felix
>  Issue Type: Bug
>  Components: Converter
>Affects Versions: converter-1.0.2
>Reporter: Cristiano Gavião
>Assignee: David Bosschaert
>Priority: Critical
> Fix For: converter-1.0.4
>
>
> I'm converting from a map to an interface and since that interface has not 
> any direct method
>  it is not being considered a "map". But one of the interfaces that it 
> extends has the required method named with the source's map key name.
> The problem is in the routine that identifies the interfaces in the method 
> "getInterfaces0":
> {code:java}
>   private static boolean isMapType(Class< ? > cls, boolean asJavaBean,
>   boolean asDTO) {
>   if (asDTO)
>   return true;
>   // All interface types that are not Collections are treated as 
> maps
>   if (Map.class.isAssignableFrom(cls))
>   return true;
>   *else if (getInterfaces(cls).size() > 0)*
>   return true;
>   else if (DTOUtil.isDTOType(cls))
>   return true;
>   else if (asJavaBean && isWriteableJavaBean(cls))
>   return true;
>   else
>   return Dictionary.class.isAssignableFrom(cls);
>   }
> {code}
> {code:java}
>   private static Set> getInterfaces(Class< ? > cls) {
>   if (NO_MAP_VIEW_TYPES.contains(cls))
>   return Collections.emptySet();
>   Set> interfaces = getInterfaces0(cls);
>   for (Iterator> it = interfaces.iterator(); 
> it.hasNext();) {
>   Class< ? > intf = it.next();
>   if (intf.getDeclaredMethods().length == 0)
>   it.remove();
>   }
>   interfaces.removeAll(NO_MAP_VIEW_TYPES);
>   return interfaces;
>   }
> {code}
> {code:java}
>   private static Set> getInterfaces0(Class< ? > cls) {
>   if (cls == null)
>   return Collections.emptySet();
>   Set> classes = new LinkedHashSet<>();
>   if (cls.isInterface()) {
>   classes.add(cls);
>   } else {
>   classes.addAll(Arrays.asList(cls.getInterfaces()));
>   }
>   classes.addAll(getInterfaces(cls.getSuperclass()));
>   return classes;
>   }
> {code}
> Below is my proposed fix that recursively takes all interfaces that the 
> target extends:
> {code:java}
>   private static Set> getInterfaces0(Class< ? > cls) {
>   if (cls == null)
>   return Collections.emptySet();
>   Set> classes = new LinkedHashSet<>();
>   if (cls.isInterface()) {
>   classes.add(cls);
>   if (cls.getInterfaces()!= null && 
> cls.getInterfaces().length > 0) {
>   for (Class intf : cls.getInterfaces()) {
> classes.addAll(getInterfaces0(intf));
> }
>   }
>   } else {
>   classes.addAll(Arrays.asList(cls.getInterfaces()));
>   }
>   classes.addAll(getInterfaces(cls.getSuperclass()));
>   return classes;
>   }
> {code}



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


[jira] [Commented] (FELIX-6008) ErrorHandlers should be applied in reverse order

2019-01-18 Thread David Bosschaert (JIRA)


[ 
https://issues.apache.org/jira/browse/FELIX-6008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16746425#comment-16746425
 ] 

David Bosschaert commented on FELIX-6008:
-

I'm thinking should this also be the case for custom rules?

> ErrorHandlers should be applied in reverse order
> 
>
> Key: FELIX-6008
> URL: https://issues.apache.org/jira/browse/FELIX-6008
> Project: Felix
>  Issue Type: Bug
>  Components: Converter
>Affects Versions: converter-1.0.2
>Reporter: Cristiano Gavião
>Assignee: David Bosschaert
>Priority: Major
>
> It could become common to create a new converter from an existent one.
> So, in case of more than one errorHandler were registered they must be 
> applied in reverse order.



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


[jira] [Commented] (FELIX-6031) Converter is not working properly when the target is an interface that extends others

2019-01-18 Thread David Bosschaert (JIRA)


[ 
https://issues.apache.org/jira/browse/FELIX-6031?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16746395#comment-16746395
 ] 

David Bosschaert commented on FELIX-6031:
-

Ah [~bisch...@jena.de] could you please let us know if this fix also addresses 
FELIX-6020 ?

> Converter is not working properly when the target is an interface that 
> extends others
> -
>
> Key: FELIX-6031
> URL: https://issues.apache.org/jira/browse/FELIX-6031
> Project: Felix
>  Issue Type: Bug
>  Components: Converter
>Affects Versions: converter-1.0.2
>Reporter: Cristiano Gavião
>Assignee: David Bosschaert
>Priority: Critical
> Fix For: converter-1.0.4
>
>
> I'm converting from a map to an interface and since that interface has not 
> any direct method
>  it is not being considered a "map". But one of the interfaces that it 
> extends has the required method named with the source's map key name.
> The problem is in the routine that identifies the interfaces in the method 
> "getInterfaces0":
> {code:java}
>   private static boolean isMapType(Class< ? > cls, boolean asJavaBean,
>   boolean asDTO) {
>   if (asDTO)
>   return true;
>   // All interface types that are not Collections are treated as 
> maps
>   if (Map.class.isAssignableFrom(cls))
>   return true;
>   *else if (getInterfaces(cls).size() > 0)*
>   return true;
>   else if (DTOUtil.isDTOType(cls))
>   return true;
>   else if (asJavaBean && isWriteableJavaBean(cls))
>   return true;
>   else
>   return Dictionary.class.isAssignableFrom(cls);
>   }
> {code}
> {code:java}
>   private static Set> getInterfaces(Class< ? > cls) {
>   if (NO_MAP_VIEW_TYPES.contains(cls))
>   return Collections.emptySet();
>   Set> interfaces = getInterfaces0(cls);
>   for (Iterator> it = interfaces.iterator(); 
> it.hasNext();) {
>   Class< ? > intf = it.next();
>   if (intf.getDeclaredMethods().length == 0)
>   it.remove();
>   }
>   interfaces.removeAll(NO_MAP_VIEW_TYPES);
>   return interfaces;
>   }
> {code}
> {code:java}
>   private static Set> getInterfaces0(Class< ? > cls) {
>   if (cls == null)
>   return Collections.emptySet();
>   Set> classes = new LinkedHashSet<>();
>   if (cls.isInterface()) {
>   classes.add(cls);
>   } else {
>   classes.addAll(Arrays.asList(cls.getInterfaces()));
>   }
>   classes.addAll(getInterfaces(cls.getSuperclass()));
>   return classes;
>   }
> {code}
> Below is my proposed fix that recursively takes all interfaces that the 
> target extends:
> {code:java}
>   private static Set> getInterfaces0(Class< ? > cls) {
>   if (cls == null)
>   return Collections.emptySet();
>   Set> classes = new LinkedHashSet<>();
>   if (cls.isInterface()) {
>   classes.add(cls);
>   if (cls.getInterfaces()!= null && 
> cls.getInterfaces().length > 0) {
>   for (Class intf : cls.getInterfaces()) {
> classes.addAll(getInterfaces0(intf));
> }
>   }
>   } else {
>   classes.addAll(Arrays.asList(cls.getInterfaces()));
>   }
>   classes.addAll(getInterfaces(cls.getSuperclass()));
>   return classes;
>   }
> {code}



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


[jira] [Assigned] (FELIX-6008) ErrorHandlers should be applied in reverse order

2019-01-18 Thread David Bosschaert (JIRA)


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

David Bosschaert reassigned FELIX-6008:
---

Assignee: David Bosschaert

> ErrorHandlers should be applied in reverse order
> 
>
> Key: FELIX-6008
> URL: https://issues.apache.org/jira/browse/FELIX-6008
> Project: Felix
>  Issue Type: Bug
>  Components: Converter
>Affects Versions: converter-1.0.2
>Reporter: Cristiano Gavião
>Assignee: David Bosschaert
>Priority: Major
>
> It could become common to create a new converter from an existent one.
> So, in case of more than one errorHandler were registered they must be 
> applied in reverse order.



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


[jira] [Resolved] (FELIX-6031) Converter is not working properly when the target is an interface that extends others

2019-01-18 Thread David Bosschaert (JIRA)


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

David Bosschaert resolved FELIX-6031.
-
Resolution: Fixed

> Converter is not working properly when the target is an interface that 
> extends others
> -
>
> Key: FELIX-6031
> URL: https://issues.apache.org/jira/browse/FELIX-6031
> Project: Felix
>  Issue Type: Bug
>  Components: Converter
>Affects Versions: converter-1.0.2
>Reporter: Cristiano Gavião
>Assignee: David Bosschaert
>Priority: Critical
> Fix For: converter-1.0.4
>
>
> I'm converting from a map to an interface and since that interface has not 
> any direct method
>  it is not being considered a "map". But one of the interfaces that it 
> extends has the required method named with the source's map key name.
> The problem is in the routine that identifies the interfaces in the method 
> "getInterfaces0":
> {code:java}
>   private static boolean isMapType(Class< ? > cls, boolean asJavaBean,
>   boolean asDTO) {
>   if (asDTO)
>   return true;
>   // All interface types that are not Collections are treated as 
> maps
>   if (Map.class.isAssignableFrom(cls))
>   return true;
>   *else if (getInterfaces(cls).size() > 0)*
>   return true;
>   else if (DTOUtil.isDTOType(cls))
>   return true;
>   else if (asJavaBean && isWriteableJavaBean(cls))
>   return true;
>   else
>   return Dictionary.class.isAssignableFrom(cls);
>   }
> {code}
> {code:java}
>   private static Set> getInterfaces(Class< ? > cls) {
>   if (NO_MAP_VIEW_TYPES.contains(cls))
>   return Collections.emptySet();
>   Set> interfaces = getInterfaces0(cls);
>   for (Iterator> it = interfaces.iterator(); 
> it.hasNext();) {
>   Class< ? > intf = it.next();
>   if (intf.getDeclaredMethods().length == 0)
>   it.remove();
>   }
>   interfaces.removeAll(NO_MAP_VIEW_TYPES);
>   return interfaces;
>   }
> {code}
> {code:java}
>   private static Set> getInterfaces0(Class< ? > cls) {
>   if (cls == null)
>   return Collections.emptySet();
>   Set> classes = new LinkedHashSet<>();
>   if (cls.isInterface()) {
>   classes.add(cls);
>   } else {
>   classes.addAll(Arrays.asList(cls.getInterfaces()));
>   }
>   classes.addAll(getInterfaces(cls.getSuperclass()));
>   return classes;
>   }
> {code}
> Below is my proposed fix that recursively takes all interfaces that the 
> target extends:
> {code:java}
>   private static Set> getInterfaces0(Class< ? > cls) {
>   if (cls == null)
>   return Collections.emptySet();
>   Set> classes = new LinkedHashSet<>();
>   if (cls.isInterface()) {
>   classes.add(cls);
>   if (cls.getInterfaces()!= null && 
> cls.getInterfaces().length > 0) {
>   for (Class intf : cls.getInterfaces()) {
> classes.addAll(getInterfaces0(intf));
> }
>   }
>   } else {
>   classes.addAll(Arrays.asList(cls.getInterfaces()));
>   }
>   classes.addAll(getInterfaces(cls.getSuperclass()));
>   return classes;
>   }
> {code}



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


  1   2   3   4   5   6   7   8   >