celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gabriele Ricciardi (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CELIX-410) Property loader duplicates spaces and tabs
Date Fri, 16 Jun 2017 10:42:00 GMT

    [ https://issues.apache.org/jira/browse/CELIX-410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16051756#comment-16051756
] 

Gabriele Ricciardi commented on CELIX-410:
------------------------------------------

Indeed Bob, you are correct. The first updateBuffers is just redundant.
I fixed it, and just to be sure I created a new test case for this.

> Property loader duplicates spaces and tabs
> ------------------------------------------
>
>                 Key: CELIX-410
>                 URL: https://issues.apache.org/jira/browse/CELIX-410
>             Project: Celix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: 1.0.0-incubating
>            Reporter: Bob Fels
>
> In  framework / private / src / properties.c in function static void parseLine(const
char* line, properties_pt props):
> When a space or tab is parsed within a property, its outputted double, this happens because
the following 2 blocks of code both output this space/tab:
>  235                         else {
>  236                                 output[outputPos++] = line[linePos];
>  237                                 updateBuffers(&key, &value, &output,
outputPos, &key_len, &value_len);
>  238                         }
> and 
>  284                 else { //normal character
>  285                         precedingCharIsBackslash = false;
>  286                         output[outputPos++] = line[linePos];
>  287                         updateBuffers(&key, &value, &output, outputPos,
&key_len, &value_len);
>  288                 }
> I think lines 235..238 are unintended, but feel free to fix it any way you like of course.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message