"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "log4j-core/src/test/java/org/apache/logging/log4j/core/appender/db/jdbc/JdbcH2TestHelper.java" between
apache-log4j-2.11.1-src.tar.gz and apache-log4j-2.11.2-src.tar.gz

About: Apache Log4j 2 is a logging library for Java. Source distribution (Java).

JdbcH2TestHelper.java  (apache-log4j-2.11.1-src):JdbcH2TestHelper.java  (apache-log4j-2.11.2-src)
skipping to change at line 23 skipping to change at line 23
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the license for the specific language governing permissions and * See the license for the specific language governing permissions and
* limitations under the license. * limitations under the license.
*/ */
package org.apache.logging.log4j.core.appender.db.jdbc; package org.apache.logging.log4j.core.appender.db.jdbc;
import java.sql.Connection; import java.sql.Connection;
import java.sql.DriverManager; import java.sql.DriverManager;
import java.sql.SQLException; import java.sql.SQLException;
import org.apache.commons.lang3.SystemUtils;
public class JdbcH2TestHelper { public class JdbcH2TestHelper {
static final String CONNECTION_STRING = "jdbc:h2:mem:Log4j"; /**
static final String USER_NAME = "sa"; * A JDBC connection string for an H2 in-memory database.
static final String PASSWORD = ""; */
static final String CONNECTION_STRING_MEM = "jdbc:h2:mem:Log4j";
public static ConnectionSource TEST_CONFIGURATION_SOURCE = new AbstractConne
ctionSource() { /**
@Override * A JDBC connection string for an H2 database in the Java temporary dire
public Connection getConnection() throws SQLException { ctory.
return JdbcH2TestHelper.getConnection(); */
} static final String CONNECTION_STRING_TMPDIR = "jdbc:h2:" + SystemUtils.J
}; AVA_IO_TMPDIR
+ "/h2/test_log4j;TRACE_LEVEL_SYSTEM_OUT=0";
public static Connection getConnection() throws SQLException {
return DriverManager.getConnection(CONNECTION_STRING, USER_NAME, PASSWOR static final String USER_NAME = "sa";
D); static final String PASSWORD = "";
}
public static ConnectionSource TEST_CONFIGURATION_SOURCE_MEM = new Abstra
ctConnectionSource() {
@Override
public Connection getConnection() throws SQLException {
return JdbcH2TestHelper.getConnectionMem();
}
};
public static ConnectionSource TEST_CONFIGURATION_SOURCE_TMPDIR = new Abs
tractConnectionSource() {
@Override
public Connection getConnection() throws SQLException {
return JdbcH2TestHelper.getConnectionTmpDir();
}
};
public static Connection getConnectionMem() throws SQLException {
return DriverManager.getConnection(CONNECTION_STRING_MEM, USER_NA
ME, PASSWORD);
}
public static Connection getConnectionTmpDir() throws SQLException {
return DriverManager.getConnection(CONNECTION_STRING_TMPDIR, USER
_NAME, PASSWORD);
}
} }
 End of changes. 2 change blocks. 
16 lines changed or deleted 43 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)