Skip to content

Commit

Permalink
refactor(test): rollback DBUtil.java
Browse files Browse the repository at this point in the history
  • Loading branch information
MuLeiSY2021 committed Jan 6, 2025
1 parent 04df0ae commit fcb987a
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@

package org.apache.hugegraph.loader.test.functional;

import org.apache.hugegraph.loader.exception.LoadException;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;

import org.apache.hugegraph.loader.exception.LoadException;

public class DBUtil {

private final String driver;
Expand All @@ -47,10 +47,10 @@ public void connect() {
this.conn = DriverManager.getConnection(url, this.user, this.pass);
} catch (ClassNotFoundException e) {
throw new LoadException("Invalid driver class '%s'",
e, this.driver);
e, this.driver);
} catch (SQLException e) {
throw new LoadException("Failed to connect database via '%s'",
e, this.url);
e, this.url);
}
}

Expand All @@ -63,10 +63,10 @@ public void connect(String database) {
this.conn = DriverManager.getConnection(url, this.user, this.pass);
} catch (ClassNotFoundException e) {
throw new LoadException("Invalid driver class '%s'",
e, this.driver);
e, this.driver);
} catch (SQLException e) {
throw new LoadException("Failed to connect database via '%s'",
e, this.url);
e, this.url);
}
}

Expand Down

0 comments on commit fcb987a

Please sign in to comment.