ztellman/potemkin — pull request #32 by xsc (2014-09-19 15:07:08+00:00)
Title: AOT with Java 6

This PR ensures that the sole AOT-compiled class is compatible with Java 6.

The current version causes the following:

__project.clj__

```clojure
(defproject tester "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.6.0"]
[potemkin "0.3.9"]]
:aot [tester.core])
```

__src/tester/core.clj__

```clojure
(ns tester.core
(:import potemkin.LazyMapEntry))

(def x (LazyMapEntry. {} :x))
```

__Command Line (Java 7)__

```bash
$ lein version
Leiningen 2.5.0 on Java 1.7.0_67 Java HotSpot(TM) 64-Bit Server VM

$ lein jar
Compiling tester.core
Created /git/github/tester/target/tester-0.1.0-SNAPSHOT.jar
```

__Command Line (Java 6)__

```bash
$ JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home lein version
Leiningen 2.5.0 on Java 1.6.0_65 Java HotSpot(TM) 64-Bit Server VM

$ JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home lein jar
Retrieving potemkin/potemkin/0.3.9/potemkin-0.3.9.pom from clojars
Retrieving potemkin/potemkin/0.3.9/potemkin-0.3.9.jar from clojars
Compiling tester.core
java.lang.UnsupportedClassVersionError: potemkin/LazyMapEntry : Unsupported major.minor version 51.0, compiling:(core.clj:1:1)
at clojure.lang.Compiler$InvokeExpr.eval(Compiler.java:3558)
at clojure.lang.Compiler.compile1(Compiler.java:7226)
at clojure.lang.Compiler.compile1(Compiler.java:7216)
at clojure.lang.Compiler.compile(Compiler.java:7292)