You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by "Leschke, Scott" <SL...@medline.com> on 2017/06/01 20:38:51 UTC

Karaf-4346 JIRA

The status of this is listed as fixed as of 4.1 but I can't seem to get it to work.  I'm trying to set an int[] neither of the following worked. I get a NumberFormatException complaining about input string "{15,10,5}" or alternatively "[15,10,5]";

myInts = {10,5,0};
myInts = [10,5,0];

There's discussion in the JIRA about the filter needing to be updated to support .cfg files but it's looks like that change was made. So if this was in fact fixed, what's the correct syntax?  I would think it would be the first. It works for defining the default in the config. def interface.

Scott



Re: Karaf-4346 JIRA

Posted by Guillaume Nodet <gn...@apache.org>.
The difference between 4.1 and 4.2 is that with 4.2, both cfg and config
files can hold typed or untyped configurations and karaf will switch to a
typed configuration automatically if needed.  The syntax will be the same
however.  And there's currently no ETA defined.

2017-06-01 23:21 GMT+02:00 Leschke, Scott <SL...@medline.com>:

> *From your answer I gather this will be fully sussed out in 4.2, i.e. .cfg
> will be supported and the syntax may change somewhat. Is there an ETA on
> that release?*
>
>
>
> *From:* Guillaume Nodet [mailto:gnodet@apache.org]
> *Sent:* Thursday, June 01, 2017 4:11 PM
> *To:* user <us...@karaf.apache.org>
> *Subject:* Re: Karaf-4346 JIRA
>
>
>
> First, it has to be xx.config not xx.cfg.  Before 4.2, both are handled
> differently.
>
> So in 4.1, you need to use the config syntax:
>
>   myInts = i[ "10", "5", "4" ]
>
>
>
> See the syntax description:
>
>   https://github.com/apache/felix/blob/trunk/configadmin/
> src/main/java/org/apache/felix/cm/file/ConfigurationHandler.java#L53-L61
>
>
>
> 2017-06-01 22:38 GMT+02:00 Leschke, Scott <SL...@medline.com>:
>
> The status of this is listed as fixed as of 4.1 but I can’t seem to get it
> to work.  I’m trying to set an int[] neither of the following worked. I get
> a NumberFormatException complaining about input string “{15,10,5}” or
> alternatively “[15,10,5]”;
>
>
>
> myInts = {10,5,0};
>
> myInts = [10,5,0];
>
>
>
> There’s discussion in the JIRA about the filter needing to be updated to
> support .cfg files but it’s looks like that change was made. So if this was
> in fact fixed, what’s the correct syntax?  I would think it would be the
> first. It works for defining the default in the config. def interface.
>
>
>
> Scott
>
>
>
>
>
>
>
>
>
> --
>
> ------------------------
> Guillaume Nodet
>
>
>



-- 
------------------------
Guillaume Nodet

RE: Karaf-4346 JIRA

Posted by "Leschke, Scott" <SL...@medline.com>.
From your answer I gather this will be fully sussed out in 4.2, i.e. .cfg will be supported and the syntax may change somewhat. Is there an ETA on that release?

From: Guillaume Nodet [mailto:gnodet@apache.org]
Sent: Thursday, June 01, 2017 4:11 PM
To: user <us...@karaf.apache.org>
Subject: Re: Karaf-4346 JIRA

First, it has to be xx.config not xx.cfg.  Before 4.2, both are handled differently.
So in 4.1, you need to use the config syntax:
  myInts = i[ "10", "5", "4" ]

See the syntax description:
  https://github.com/apache/felix/blob/trunk/configadmin/src/main/java/org/apache/felix/cm/file/ConfigurationHandler.java#L53-L61

2017-06-01 22:38 GMT+02:00 Leschke, Scott <SL...@medline.com>>:
The status of this is listed as fixed as of 4.1 but I can’t seem to get it to work.  I’m trying to set an int[] neither of the following worked. I get a NumberFormatException complaining about input string “{15,10,5}” or alternatively “[15,10,5]”;

myInts = {10,5,0};
myInts = [10,5,0];

There’s discussion in the JIRA about the filter needing to be updated to support .cfg files but it’s looks like that change was made. So if this was in fact fixed, what’s the correct syntax?  I would think it would be the first. It works for defining the default in the config. def interface.

Scott





--
------------------------
Guillaume Nodet


Re: Karaf-4346 JIRA

Posted by Guillaume Nodet <gn...@apache.org>.
First, it has to be xx.config not xx.cfg.  Before 4.2, both are handled
differently.
So in 4.1, you need to use the config syntax:
  myInts = i[ "10", "5", "4" ]

See the syntax description:

https://github.com/apache/felix/blob/trunk/configadmin/src/main/java/org/apache/felix/cm/file/ConfigurationHandler.java#L53-L61

2017-06-01 22:38 GMT+02:00 Leschke, Scott <SL...@medline.com>:

> The status of this is listed as fixed as of 4.1 but I can’t seem to get it
> to work.  I’m trying to set an int[] neither of the following worked. I get
> a NumberFormatException complaining about input string “{15,10,5}” or
> alternatively “[15,10,5]”;
>
>
>
> myInts = {10,5,0};
>
> myInts = [10,5,0];
>
>
>
> There’s discussion in the JIRA about the filter needing to be updated to
> support .cfg files but it’s looks like that change was made. So if this was
> in fact fixed, what’s the correct syntax?  I would think it would be the
> first. It works for defining the default in the config. def interface.
>
>
>
> Scott
>
>
>
>
>



-- 
------------------------
Guillaume Nodet