File: disable-java6-and-java7-support.patch

package info (click to toggle)
lombok 1.18.42-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,704 kB
  • sloc: java: 98,970; xml: 3,314; sh: 63; ansic: 16; makefile: 10
file content (39 lines) | stat: -rw-r--r-- 1,215 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Description: Disables support for Java 6 and 7
Author: Emmanuel Bourg <ebourg@apache.org>
Forwarded: not-needed
--- a/src/utils/lombok/javac/Javac.java
+++ b/src/utils/lombok/javac/Javac.java
@@ -446,7 +446,7 @@
 		} catch (IllegalAccessException ignore) {}
 		
 		if (Javac.getJavaCompilerVersion() < 8) {
-			return new JCNoType(((Integer) tag.value).intValue());
+			throw new UnsupportedOperationException("Java before version 8 isn't supported in Debian, please use Lombok binaries from upstream");
 		} else {
 			try {
 				if (CTC_VOID.equals(tag)) {
@@ -466,24 +466,6 @@
 		}
 	}
 	
-	private static class JCNoType extends Type implements NoType {
-		public JCNoType(int tag) {
-			super(tag, null);
-		}
-		
-		@Override
-		public TypeKind getKind() {
-			if (tag == ((Integer) CTC_VOID.value).intValue()) return TypeKind.VOID;
-			if (tag == ((Integer) CTC_NONE.value).intValue()) return TypeKind.NONE;
-			throw new AssertionError("Unexpected tag: " + tag);
-		}
-		
-		@Override
-		public <R, P> R accept(TypeVisitor<R, P> v, P p) {
-			return v.visitNoType(this, p);
-		}
-	}
-	
 	private static final Field JCCOMPILATIONUNIT_ENDPOSITIONS, JCCOMPILATIONUNIT_DOCCOMMENTS;
 	static {
 		Field f = null;