[jOOQ/jOOQ#7373] [jOOQ/jOOQ#10944] Code generator warning message should refer to deprecated <customType/> only if customType configuration is present

This commit is contained in:
Lukas Eder 2020-11-16 09:34:45 +01:00
parent 0f6f05e2bf
commit 9a94ce3bc6

View File

@ -326,7 +326,12 @@ public abstract class AbstractTypedElementDefinition<T extends Definition>
// matching customType, the user probably malconfigured
// their <forcedTypes/> or <customTypes/>
else {
log.warn("Bad configuration for <forcedType/> " + forcedType.getName() + ". No matching <customType/> found, and no matching SQLDataType found: " + forcedType);
// [#7373] [#10944] Refer to <customType/> only if someone is still using the feature
if (db.getConfiguredCustomTypes().isEmpty())
log.warn("Bad configuration for <forcedType/> " + forcedType.getName() + ". No matching SQLDataType found: " + forcedType);
else
log.warn("Bad configuration for <forcedType/> " + forcedType.getName() + ". No matching <customType/> found, and no matching SQLDataType found: " + forcedType);
}
}
}