WIP validate
authorKai Moritz <kai@juplo.de>
Sun, 27 Nov 2016 13:38:55 +0000 (14:38 +0100)
committerKai Moritz <kai@juplo.de>
Sun, 27 Nov 2016 13:38:55 +0000 (14:38 +0100)
src/main/java/de/juplo/plugins/hibernate/CreateMojo.java
src/main/java/de/juplo/plugins/hibernate/DropMojo.java
src/main/java/de/juplo/plugins/hibernate/UpdateMojo.java

index 9a959ec..98bc8e8 100644 (file)
@@ -91,7 +91,7 @@ public class CreateMojo extends AbstractSchemaMojo
     SchemaManagementTool tool = registry.getService(SchemaManagementTool.class);
 
     final EnumSet<TargetType> targetTypes = EnumSet.of(TargetType.SCRIPT);
-    if ((Boolean)settings.get(EXECUTE))
+    if (Boolean.parseBoolean(settings.get(EXECUTE).toString()))
       targetTypes.add(TargetType.DATABASE);
 
     TargetDescriptor target = new TargetDescriptor()
index 88f6698..beb3bfd 100644 (file)
@@ -90,7 +90,7 @@ public class DropMojo extends AbstractSchemaMojo
     SchemaManagementTool tool = registry.getService(SchemaManagementTool.class);
 
     final EnumSet<TargetType> targetTypes = EnumSet.of(TargetType.SCRIPT);
-    if ((Boolean)settings.get(EXECUTE))
+    if (Boolean.parseBoolean(settings.get(EXECUTE).toString()))
       targetTypes.add(TargetType.DATABASE);
 
     TargetDescriptor target = new TargetDescriptor()
index a97982e..b64b4b2 100644 (file)
@@ -90,7 +90,7 @@ public class UpdateMojo extends AbstractSchemaMojo
     SchemaManagementTool tool = registry.getService(SchemaManagementTool.class);
 
     final EnumSet<TargetType> targetTypes = EnumSet.of(TargetType.SCRIPT);
-    if ((Boolean)settings.get(EXECUTE))
+    if (Boolean.parseBoolean(settings.get(EXECUTE).toString()))
       targetTypes.add(TargetType.DATABASE);
 
     TargetDescriptor target = new TargetDescriptor()