From 926ad95afac40cd52353a571b2ff061d02506e95 Mon Sep 17 00:00:00 2001 From: Paul Schwarz Date: Sat, 16 May 2020 11:10:55 +0200 Subject: [PATCH 1/3] Add gitignores for IntelliJ and VSCode --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 4e247ee..e1acc3c 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,6 @@ /target /.classpath /.project +/.idea +/*.iml +/.vscode/ From 40187bf6f500d4ddff7a9309a6fa6a7950f704ec Mon Sep 17 00:00:00 2001 From: Paul Schwarz Date: Sat, 16 May 2020 11:12:44 +0200 Subject: [PATCH 2/3] Bump project from Java 1.6 to 1.8 --- pom.xml | 10 +++++++--- .../com/overstock/sample/processor/JpaProcessor.java | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index f1159c4..29aa212 100644 --- a/pom.xml +++ b/pom.xml @@ -3,6 +3,9 @@ com.overstock.sample jpa-annotation-processor trunk-SNAPSHOT + + UTF-8 + org.hibernate.javax.persistence @@ -45,12 +48,13 @@ org.apache.maven.plugins maven-compiler-plugin + 3.8.1 - 1.6 - 1.6 + 1.8 + 1.8 -proc:none - \ No newline at end of file + diff --git a/src/main/java/com/overstock/sample/processor/JpaProcessor.java b/src/main/java/com/overstock/sample/processor/JpaProcessor.java index 875c1b1..bf9f699 100644 --- a/src/main/java/com/overstock/sample/processor/JpaProcessor.java +++ b/src/main/java/com/overstock/sample/processor/JpaProcessor.java @@ -49,7 +49,7 @@ * */ @SupportedAnnotationTypes({"javax.persistence.Entity", "javax.persistence.OneToMany"}) -@SupportedSourceVersion(SourceVersion.RELEASE_6) +@SupportedSourceVersion(SourceVersion.RELEASE_8) public class JpaProcessor extends AbstractProcessor { // various types we'll want to refer to, initialized in init method From 3eb312506f9526b0937f777747779eddcd5a39ac Mon Sep 17 00:00:00 2001 From: Paul Schwarz Date: Sat, 16 May 2020 11:20:05 +0200 Subject: [PATCH 3/3] Add JUnit After hook to cleanup temporary compiler output files --- .../com/overstock/sample/processor/JpaProcessorTest.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/test/java/com/overstock/sample/processor/JpaProcessorTest.java b/src/test/java/com/overstock/sample/processor/JpaProcessorTest.java index 6164316..e084acb 100644 --- a/src/test/java/com/overstock/sample/processor/JpaProcessorTest.java +++ b/src/test/java/com/overstock/sample/processor/JpaProcessorTest.java @@ -8,6 +8,7 @@ import javax.lang.model.element.Element; import javax.tools.Diagnostic.Kind; +import org.junit.After; import org.junit.Before; import org.junit.Test; import org.mockito.Matchers; @@ -26,6 +27,11 @@ public void setup() throws Exception{ compiler = new Compiler(); } + @After + public void teardown() { + compiler.cleanUp(); + } + @Test public void testEntityWithNoArgConstructor() throws Exception { SourceFile[] sourceFiles = { new SourceFile(