db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Satheesh Bandaram <sathe...@Sourcery.Org>
Subject Re: [jira] Commented: (DERBY-675) Build-time processing of "metadata.properties" file handles slashes incorrectly.
Date Fri, 04 Nov 2005 00:51:39 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
<body bgcolor="#ffffff" text="#000000">
It seems the second loop shown below may not be necessary, since
checking if the last character to be '\\' might be sufficient. But the
code is correct and since only used during build time, it should be ok.<br>
            for (int lastNonWS = line.length() - 1;<br>
                lastNonWS &gt;= 0; lastNonWS--)<br>
                char ch = line.charAt(lastNonWS);<br>
                if (!Character.isWhitespace(ch)) {<br>
                // this is the last non-whitespace character; if it's<br>
                // a backslash, then we continue building the query<br>
                // by reading the next line.<br>
                    if (ch == '\\') {<br>
                    // then continue building the query.<br>
                        done = false;<br>
Satheesh Bandaram (JIRA) wrote:<br>
  <pre wrap="">    [ <a class="moz-txt-link-freetext" href="http://issues.apache.org/jira/browse/DERBY-675?page=comments#action_12356730">http://issues.apache.org/jira/browse/DERBY-675?page=comments#action_12356730</a>

Satheesh Bandaram commented on DERBY-675:

This patch is committed.

Sending        java\build\org\apache\derbyBuild\ODBCMetadataGenerator.java
Transmitting file data .
Committed revision 330672.

  <blockquote type="cite">
    <pre wrap="">Build-time processing of "metadata.properties" file handles slashes

         Key: DERBY-675
         URL: <a class="moz-txt-link-freetext" href="http://issues.apache.org/jira/browse/DERBY-675">http://issues.apache.org/jira/browse/DERBY-675</a>
     Project: Derby
        Type: Bug
  Components: Build tools
    Reporter: A B
    Assignee: A B
    Priority: Minor
     Fix For:
 Attachments: d675_v2.patch

As found and described by Mamta here:
<a class="moz-txt-link-freetext" href="http://www.nabble.com/-Derby-573-Optimizer-overrides-and-metadata.properties-files-t460642.html">http://www.nabble.com/-Derby-573-Optimizer-overrides-and-metadata.properties-files-t460642.html</a>
During the ant build process, Derby's metadata.properties file is modified by the ODBCMetadataGenerator
class and that class treats backslashes that occur in the metadata.properties file incorrectly.
 More specifically, it treats every backslash as the end of a line and thus will translate
things like
n \
(in other words, escaped characters like "\n" are handled incorrectly)..
  <pre wrap=""><!---->

View raw message