You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Emmanuel Bourg (Commented) (JIRA)" <ji...@apache.org> on 2012/02/21 13:19:34 UTC
[jira] [Commented] (CONFIGURATION-477) PropertyListConfiguration
cannot deal with comments
[ https://issues.apache.org/jira/browse/CONFIGURATION-477?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13212534#comment-13212534 ]
Emmanuel Bourg commented on CONFIGURATION-477:
----------------------------------------------
The specification I used to implement it didn't mention that comments were allowed.
http://www.gnustep.org/resources/documentation/Developer/Base/Reference/NSPropertyList.html
I checked the plist parser in the OpenStep code and it does indeed skip C-style comments (both block comments and line comments):
{code:java}
/*
* Property list parsing - skip whitespace keeping count of lines and
* regarding objective-c style comments as whitespace.
* Returns YES if there is any non-whitespace text remaining.
*/
static BOOL skipSpace(pldata *pld)
{
unsigned char c;
while (pld->pos < pld->end)
{
c = pld->ptr[pld->pos];
if (GS_IS_WHITESPACE(c) == NO)
{
if (c == '/' && pld->pos < pld->end - 1)
{
/*
* Check for comments beginning '/' followed by '/' or '*'
*/
if (pld->ptr[pld->pos + 1] == '/')
{
pld->pos += 2;
while (pld->pos < pld->end)
{code}
> PropertyListConfiguration cannot deal with comments
> ---------------------------------------------------
>
> Key: CONFIGURATION-477
> URL: https://issues.apache.org/jira/browse/CONFIGURATION-477
> Project: Commons Configuration
> Issue Type: Bug
> Components: Format
> Affects Versions: 1.7
> Reporter: Oliver Heger
>
> According to http://code.google.com/p/networkpx/wiki/PlistSpec a plist file can contain C-style comments. These are currently not recognized by {{PropertyListConfiguration}}.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira