<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to bugs</title><link>https://sourceforge.net/p/judoscript/bugs/</link><description>Recent changes to bugs</description><atom:link href="https://sourceforge.net/p/judoscript/bugs/feed.rss" rel="self"/><language>en</language><lastBuildDate>Thu, 23 Mar 2006 06:39:25 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/judoscript/bugs/feed.rss" rel="self" type="application/rss+xml"/><item><title>Error in DBHandle.checkNamedBindParameters</title><link>https://sourceforge.net/p/judoscript/bugs/1/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;checkNamedBindParameters in DBHandle seems very buggy!!&lt;/p&gt;
&lt;p&gt;for (int i=0; i&amp;lt;sql.length(); ++i) {&lt;br /&gt;
char ch = sql.charAt(i);&lt;br /&gt;
switch(state) {&lt;br /&gt;
case 1:  // state of in-string&lt;br /&gt;
switch(ch) {&lt;br /&gt;
case ':':  state = 2; ch = '?'; break;&lt;br /&gt;
case '\'': state = 1; break;&lt;br /&gt;
default:   sb.append(ch); break;&lt;br /&gt;
}&lt;br /&gt;
break;&lt;/p&gt;
&lt;p&gt;case 2:  // state of the parameter name&lt;br /&gt;
if (!Character.isJavaIdentifierPart(ch)) {&lt;br /&gt;
state = 0;&lt;br /&gt;
sb.append(ch);&lt;br /&gt;
namedBindParameters.put(sb1.toString(), new&lt;br /&gt;
Integer(idx++));&lt;br /&gt;
sb1.setLength(0);&lt;br /&gt;
} else {&lt;br /&gt;
sb1.append(ch);&lt;br /&gt;
}&lt;br /&gt;
break;&lt;br /&gt;
default: // original state&lt;br /&gt;
switch(ch) {&lt;br /&gt;
case ':':  state = 2; ch = '?'; break;&lt;br /&gt;
case '\'': state = 1; break;&lt;br /&gt;
}&lt;br /&gt;
sb.append(ch);&lt;br /&gt;
break;&lt;br /&gt;
}&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;case 1 seems to be an "in-string" state entered by "'"&lt;br /&gt;
from default state. But in case 1 the termination of&lt;br /&gt;
the string "'" is never added to the sql string.&lt;/p&gt;
&lt;p&gt;It's possible to enter a parametername inside a quoted&lt;br /&gt;
string? In the implementation it seems to be possible.&lt;/p&gt;
&lt;p&gt;What is with a string quoted by '"'?&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alfons Spiegelhauer</dc:creator><pubDate>Thu, 23 Mar 2006 06:39:25 -0000</pubDate><guid>https://sourceforge.nete72e8eb802a5d2218de1c4e14545217b6e5a3976</guid></item></channel></rss>