diff --git a/jOOQ-test/src/org/jooq/test/BaseTest.java b/jOOQ-test/src/org/jooq/test/BaseTest.java index 562baea8cb..20c4d3ee66 100644 --- a/jOOQ-test/src/org/jooq/test/BaseTest.java +++ b/jOOQ-test/src/org/jooq/test/BaseTest.java @@ -796,10 +796,9 @@ public abstract class BaseTest< return (Sequence) cSequences().getField("S_AUTHOR_ID").get(cSequences()); } - @SuppressWarnings("deprecation") protected final Schema schema() { Schema schema = TAuthor().getSchema(); - Schema mapped = create().getSchemaMapping().map(schema); + Schema mapped = create().map(schema); return mapped != null ? mapped : schema; } diff --git a/jOOQ-test/src/org/jooq/test/jOOQAbstractTest.java b/jOOQ-test/src/org/jooq/test/jOOQAbstractTest.java index aa77680208..db691da16c 100644 --- a/jOOQ-test/src/org/jooq/test/jOOQAbstractTest.java +++ b/jOOQ-test/src/org/jooq/test/jOOQAbstractTest.java @@ -838,7 +838,7 @@ public abstract class jOOQAbstractTest< @SuppressWarnings("deprecation") protected final Schema schema() { - return create().getSchemaMapping().map(TAuthor().getSchema()); + return create().map(TAuthor().getSchema()); } protected final Executor create() { diff --git a/jOOQ/src/main/java/org/jooq/SchemaMapping.java b/jOOQ/src/main/java/org/jooq/SchemaMapping.java index 586b38816f..83e9357002 100644 --- a/jOOQ/src/main/java/org/jooq/SchemaMapping.java +++ b/jOOQ/src/main/java/org/jooq/SchemaMapping.java @@ -91,7 +91,6 @@ public class SchemaMapping implements Serializable { private static volatile boolean loggedDeprecation = false; private final Configuration configuration; - private final boolean ignoreMapping; private volatile transient Map schemata; private volatile transient Map> tables; @@ -99,15 +98,7 @@ public class SchemaMapping implements Serializable { * Construct a mapping from a {@link Configuration} object */ public SchemaMapping(Configuration configuration) { - this(configuration, false); - } - - /** - * Auxiliary constructor used for backwards-compatibility. - */ - private SchemaMapping(Configuration configuration, boolean ignore) { this.configuration = configuration; - this.ignoreMapping = ignore; } private final RenderMapping mapping() { @@ -137,7 +128,6 @@ public class SchemaMapping implements Serializable { * @param schema the default schema */ public void use(Schema schema) { - if (ignoreMapping) return; use(schema.getName()); } @@ -151,7 +141,6 @@ public class SchemaMapping implements Serializable { * @param schemaName the default schema */ public void use(String schemaName) { - if (ignoreMapping) return; logDeprecation(); mapping().setDefaultSchema(schemaName); @@ -164,7 +153,6 @@ public class SchemaMapping implements Serializable { * @param outputSchema The schema configured at run time to be mapped */ public void add(String inputSchema, String outputSchema) { - if (ignoreMapping) return; logDeprecation(); // Find existing mapped schema @@ -192,7 +180,6 @@ public class SchemaMapping implements Serializable { * @param outputSchema The schema configured at run time to be mapped */ public void add(String inputSchema, Schema outputSchema) { - if (ignoreMapping) return; add(inputSchema, outputSchema.getName()); } @@ -203,7 +190,6 @@ public class SchemaMapping implements Serializable { * @param outputSchema The schema configured at run time to be mapped */ public void add(Schema inputSchema, Schema outputSchema) { - if (ignoreMapping) return; add(inputSchema.getName(), outputSchema.getName()); } @@ -214,7 +200,6 @@ public class SchemaMapping implements Serializable { * @param outputSchema The schema configured at run time to be mapped */ public void add(Schema inputSchema, String outputSchema) { - if (ignoreMapping) return; add(inputSchema.getName(), outputSchema); } @@ -225,7 +210,6 @@ public class SchemaMapping implements Serializable { * @param outputTable The table configured at run time to be mapped */ public void add(Table inputTable, Table outputTable) { - if (ignoreMapping) return; add(inputTable, outputTable.getName()); } @@ -236,7 +220,6 @@ public class SchemaMapping implements Serializable { * @param outputTable The table configured at run time to be mapped */ public void add(final Table inputTable, final String outputTable) { - if (ignoreMapping) return; logDeprecation(); // Try to find a pre-existing schema mapping in the settings @@ -285,7 +268,6 @@ public class SchemaMapping implements Serializable { // [#1774] The default Settings render schema flag takes precedence over // The DefaultConfiguration's ignoreMapping flag! if (!renderSchema()) return null; - if (ignoreMapping) return schema; Schema result = null; if (schema != null) { @@ -344,7 +326,6 @@ public class SchemaMapping implements Serializable { */ @SuppressWarnings("unchecked") public Table map(Table table) { - if (ignoreMapping) return table; Table result = null; if (table != null) { @@ -402,7 +383,6 @@ public class SchemaMapping implements Serializable { * Spring */ public void setDefaultSchema(String schema) { - if (ignoreMapping) return; use(schema); } @@ -410,7 +390,6 @@ public class SchemaMapping implements Serializable { * Initialise SchemaMapping. Added for better interoperability with Spring */ public void setSchemaMapping(Map schemaMap) { - if (ignoreMapping) return; for (Entry entry : schemaMap.entrySet()) { add(entry.getKey(), entry.getValue()); }