#671 Driver nextToken prevents forward slash for path

v1.2
open
Other (154)
5
2014-08-14
2012-08-14
Anonymous
No

While trying to change the bufferDir option I determined that the way nextToken is coded it's impossible to have a forward slash like Linux paths use. What I did was modify the nextToken method to have the signature:

private static int nextToken(String url, int pos, StringBuffer token, boolean allowForwardSlash)

I then adjusted the internal logic to read:

        if (ch == '/' && !allowForwardSlash) {
            if (pos < url.length() && url.charAt(pos) == '/') {
                pos++;
            }

            break;
        }

Finally I made all the calls to nextToken within the parseURL method pass in false for the fourth parameter except for the last one which is parsing everything after the database name. At that point in the URL the only separator that it should care about would be a colon or semicolon. I added some debug print statements to the code to verify that after making this change I can successfully set the bufferDir.

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks