[#6845] <deprecationOnUnknownTypes/> has no effect

This commit is contained in:
lukaseder 2017-11-22 19:02:31 +01:00
parent 7b2a0f417a
commit 8efb2090be
2 changed files with 2 additions and 2 deletions

View File

@ -524,7 +524,7 @@ public class GenerationTool {
generator.setGenerateRelations(g.getGenerate().isRelations());
if (g.getGenerate().isDeprecated() != null)
generator.setGenerateDeprecated(g.getGenerate().isDeprecated());
if (g.getGenerate().isDeprecationOnUnknownTypes())
if (g.getGenerate().isDeprecationOnUnknownTypes() != null)
generator.setGenerateDeprecationOnUnknownTypes(g.getGenerate().isDeprecationOnUnknownTypes());
if (g.getGenerate().isInstanceFields() != null)
generator.setGenerateInstanceFields(g.getGenerate().isInstanceFields());

View File

@ -4575,7 +4575,7 @@ public class JavaGenerator extends AbstractGenerator {
}
private boolean printDeprecationIfUnknownType(JavaWriter out, String type, int indentation) {
if ("java.lang.Object".equals(type)) {
if (generateDeprecationOnUnknownTypes() && "java.lang.Object".equals(type)) {
out.tab(indentation).javadoc("@deprecated Unknown data type. "
+ "Please define an explicit {@link org.jooq.Binding} to specify how this "
+ "type should be handled.");