You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Oliver Heger (Created) (JIRA)" <ji...@apache.org> on 2012/01/31 21:58:10 UTC

[jira] [Created] (CONFIGURATION-477) PropertyListConfiguration cannot deal with comments

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

        

[jira] [Commented] (CONFIGURATION-477) PropertyListConfiguration cannot deal with comments

Posted by "Emmanuel Bourg (Commented) (JIRA)" <ji...@apache.org>.
    [ 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

        

[jira] [Resolved] (CONFIGURATION-477) PropertyListConfiguration cannot deal with comments

Posted by "Oliver Heger (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CONFIGURATION-477?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oliver Heger resolved CONFIGURATION-477.
----------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.9

Fixed in subversion in revision 1301722.
                
> 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
>            Assignee: Oliver Heger
>             Fix For: 1.9
>
>
> 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