From 08c347e44a4eaeb0c5106f6c03c21f8c4282a14b Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Wed, 28 Nov 2012 17:05:10 +0100 Subject: [PATCH] DriverProxy now implements Driver.getParentLogger() Otherwise, the plugin would not run with database-drivers compiled for Java 1.7. This method must not be annotated with @Override, because otherwise, the plugin won't compile under Java 1.6 (the method was added to the interface Driver in Java 1.7). --- .../java/de/juplo/plugins/hibernate4/Hbm2DdlMojo.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main/java/de/juplo/plugins/hibernate4/Hbm2DdlMojo.java b/src/main/java/de/juplo/plugins/hibernate4/Hbm2DdlMojo.java index 1017ae6c..7c5cc340 100644 --- a/src/main/java/de/juplo/plugins/hibernate4/Hbm2DdlMojo.java +++ b/src/main/java/de/juplo/plugins/hibernate4/Hbm2DdlMojo.java @@ -27,12 +27,14 @@ import java.sql.Driver; import java.sql.DriverManager; import java.sql.DriverPropertyInfo; import java.sql.SQLException; +import java.sql.SQLFeatureNotSupportedException; import java.util.Enumeration; import java.util.HashSet; import java.util.List; import java.util.Map.Entry; import java.util.Properties; import java.util.Set; +import java.util.logging.Logger; import javax.persistence.Embeddable; import javax.persistence.Entity; import javax.persistence.MappedSuperclass; @@ -530,6 +532,15 @@ public class Hbm2DdlMojo extends AbstractMojo return target.jdbcCompliant(); } + /** + * This Method cannot be annotated with @Override, becaus the plugin + * will not compile then under Java 1.6! + */ + public Logger getParentLogger() throws SQLFeatureNotSupportedException + { + throw new SQLFeatureNotSupportedException("Not supported, for backward-compatibility with Java 1.6"); + } + @Override public String toString() { -- 2.20.1