equal
deleted
inserted
replaced
41 } |
41 } |
42 } |
42 } |
43 |
43 |
44 @Override |
44 @Override |
45 public Connection connect(String url, Properties info) throws SQLException { |
45 public Connection connect(String url, Properties info) throws SQLException { |
46 return new Connection(url, info); |
46 if (acceptsURL(url)) { |
|
47 return new Connection(url, info); |
|
48 } else { |
|
49 throw new SQLException("Unsupported URL: " + url); |
|
50 } |
47 } |
51 } |
48 |
52 |
49 @Override |
53 @Override |
50 public boolean acceptsURL(String url) throws SQLException { |
54 public boolean acceptsURL(String url) throws SQLException { |
51 return url != null && url.startsWith("jdbc:loopback://"); |
55 return url != null && url.startsWith("jdbc:loopback://"); |