GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Timeout configuration option should accept long not int · Issue #1758 · JSQLParser/JSqlParser

Timeout configuration option should accept long not int #1758

New issue
Copy link
New issue
Copy link
Closed
Closed
Timeout configuration option should accept long not int#1758
Copy link

Description

@zaza
zaza
opened on Apr 4, 2023
Issue body actions

When waiting for a parser to complete its job in CCJSqlParser.parseStatement(CCJSqlParser) we call Future.get(long, TimeUnit) which clearly expects a long value to be passed, however the project does this:

statement = future.get( parser.getConfiguration().getAsInteger(Feature.timeOut), TimeUnit.MILLISECONDS);
Note the getAsInteger method.

Furthermore when using a custom value for the timeout setting it would be more convenient to just do:
CCJSqlParserUtil.parse(sql, parser -> parser.withTimeOut(TimeUnit.SECONDS.toMillis(30)))
instead of current:
CCJSqlParserUtil.parse(sql, parser -> parser.withTimeOut(Long.valueOf(TimeUnit.SECONDS.toMillis(30)).intValue()))

Activity

  1. zaza
    added 2 commits that reference this issue on Apr 4, 2023

    Fix JSQLParser#1758: Use long for Feature.timeOut

    This issue will close once commit d438186 is merged into the 'master' branch.
    d438186

    Fix JSQLParser#1758: Use long for Feature.timeOut

    This issue will close once commit fcbcdea is merged into the 'master' branch.
    fcbcdea
  2. wumpz
    closed this as completedin 3314edfon Apr 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.