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">
<html>
<head>
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
  <title></title>
</head>
<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>
<br>
Satheesh<br>
<br>
            for (int lastNonWS = line.length() - 1;<br>
                lastNonWS &gt;= 0; lastNonWS--)<br>
            {<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>
                    }<br>
                    break;<br>
                }<br>
<br>
Satheesh Bandaram (JIRA) wrote:<br>
<blockquote
 cite="mid1576888364.1131064917503.JavaMail.jira@ajax.apache.org"
 type="cite">
  <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.


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

         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
    Versions: 10.2.0.0, 10.1.1.1, 10.1.1.0
    Reporter: A B
    Assignee: A B
    Priority: Minor
     Fix For: 10.2.0.0
 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
FROM --DERBY-PROPERTIES joinOrder=FIXED \\n \
into
FROM --DERBY-PROPERTIES joinOrder=FIXED \
\
n \
(in other words, escaped characters like "\n" are handled incorrectly)..
    </pre>
  </blockquote>
  <pre wrap=""><!---->
  </pre>
</blockquote>
</body>
</html>


Mime
View raw message