Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-2368

Call Driver.accept() in Driver.getConnection and return null if false

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.7.0
    • Component/s: None
    • Labels:

      Description

      The driver should return "null" if it realizes it is the wrong kind of driver to connect to the given URL.

      Your driver is throwing an exception instead of returning null.

      Here's the start of a test case:

      public static void main(String[] args) throws Exception {
          Class.forName(PhoenixDriver.class.getName());
          PhoenixDriver d = (PhoenixDriver) DriverManager.getDriver("jdbc:phoenix");
          d.close();
          DriverManager.getConnection("any text whatever you want to put here");
      }
      

        Attachments

        1. PHOENIX-2368_1.patch
          3 kB
          ramkrishna.s.vasudevan
        2. PHOENIX-2368.patch
          3 kB
          ramkrishna.s.vasudevan
        3. PHOENIX-2368.patch
          3 kB
          ramkrishna.s.vasudevan

          Activity

            People

            • Assignee:
              ram_krish ramkrishna.s.vasudevan
              Reporter:
              jamestaylor James R. Taylor
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: