From d847db4b8ab44e7cd38bfc0c6f795580bd736456 Mon Sep 17 00:00:00 2001
From: Richard Fearn <richardfearn@gmail.com>
Date: Sun, 24 May 2020 00:10:00 +0100
Subject: [PATCH] Enable building with JDK 11: use source/target 1.8

---
 jsr-305-java8.patch | 22 ++++++++++++++++++++++
 jsr-305.spec        |  8 +++++++-
 2 files changed, 29 insertions(+), 1 deletion(-)
 create mode 100644 jsr-305-java8.patch

diff --git a/jsr-305-java8.patch b/jsr-305-java8.patch
new file mode 100644
index 0000000..de90366
--- /dev/null
+++ b/jsr-305-java8.patch
@@ -0,0 +1,22 @@
+diff --git a/pom.xml b/pom.xml
+index dcafc07..f5799e2 100644
+--- a/pom.xml
++++ b/pom.xml
+@@ -27,8 +27,15 @@
+ 				<groupId>org.apache.maven.plugins</groupId>
+ 				<artifactId>maven-compiler-plugin</artifactId>
+ 				<configuration>
+-					<source>1.5</source>
+-					<target>1.5</target>
++					<source>1.8</source>
++					<target>1.8</target>
++				</configuration>
++			</plugin>
++			<plugin>
++				<groupId>org.apache.maven.plugins</groupId>
++				<artifactId>maven-javadoc-plugin</artifactId>
++				<configuration>
++					<source>1.8</source>
+ 				</configuration>
+ 			</plugin>
+ 		</plugins>
diff --git a/jsr-305.spec b/jsr-305.spec
index d41c174..4b46029 100644
--- a/jsr-305.spec
+++ b/jsr-305.spec
@@ -1,6 +1,6 @@
 Name:           jsr-305
 Version:        0
-Release:        0.27.20130910svn%{?dist}
+Release:        0.28.20130910svn%{?dist}
 Summary:        Correctness annotations for Java code
 
 # The majority of code is BSD-licensed, but some Java sources
@@ -18,6 +18,8 @@ Source0:        jsr-305-20130910svn.tgz
 # File containing URL to CC-BY license text
 Source1:        NOTICE-CC-BY.txt
 
+Patch0:         %{name}-java8.patch
+
 BuildRequires:  maven-local
 
 %package javadoc
@@ -34,6 +36,7 @@ This package contains the API documentation for %{name}.
 %prep
 %setup -q -n %{name}
 cp %{SOURCE1} NOTICE-CC-BY
+%patch0 -p1
 
 %mvn_file :ri %{name}
 %mvn_alias :ri com.google.code.findbugs:jsr305
@@ -57,6 +60,9 @@ cp %{SOURCE1} NOTICE-CC-BY
 %license ri/LICENSE
 
 %changelog
+* Sat May 23 2020 Richard Fearn <richardfearn@gmail.com> - 0-0.28.20130910svn
+- Enable building with JDK 11: use source/target 1.8
+
 * Sun Feb 02 2020 Richard Fearn <richardfearn@gmail.com> - 0-0.27.20130910svn
 - Use %%license