Removal of redundant JdkVersion checks in the test suite

Issue: SPR-13312
This commit is contained in:
Juergen Hoeller
2015-08-12 18:42:36 +02:00
parent 6e1567b4b0
commit e0f012f32d
8 changed files with 69 additions and 96 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2008 the original author or authors.
* Copyright 2002-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,7 +20,6 @@ import java.sql.SQLException;
import junit.framework.TestCase;
import org.springframework.core.JdkVersion;
import org.springframework.dao.ConcurrencyFailureException;
import org.springframework.dao.DataAccessResourceFailureException;
import org.springframework.dao.DataIntegrityViolationException;
@@ -39,15 +38,11 @@ public class SQLExceptionSubclassTranslatorTests extends TestCase {
private static SQLErrorCodes ERROR_CODES = new SQLErrorCodes();
static {
ERROR_CODES.setBadSqlGrammarCodes(new String[] { "1" });
ERROR_CODES.setBadSqlGrammarCodes("1");
}
public void testErrorCodeTranslation() {
if (JdkVersion.getMajorJavaVersion() < JdkVersion.JAVA_16) {
return;
}
SQLExceptionTranslator sext = new SQLErrorCodeSQLExceptionTranslator(ERROR_CODES);
SQLException dataIntegrityViolationEx = SQLExceptionSubclassFactory.newSQLDataException("", "", 0);