blob: b52fa788630cfd8132cefd7f555e6f731e585894 [file] [log] [blame]
Paul Duffin0888a092015-01-23 14:38:46 +00001Guava: Google Core Libraries for Java (JDK5 Backport)
2=====================================================
Paul Duffin7dd25272015-01-22 16:04:43 +00003
Paul Duffin0888a092015-01-23 14:38:46 +00004This is the JDK5 backport of Guava. Notable differences from the
5JDK6 version of Guava include:
Paul Duffin7dd25272015-01-22 16:04:43 +00006
Paul Duffin0888a092015-01-23 14:38:46 +00007- A variety of code is removed, most notably code that uses
8 `Math.scalb`, `Deque` and its inheritors, `NavigableMap`,
9 `NavigableSet` and their inheritors, and lots of methods that don't
10 make sense without the above.
11- `TimeUnit` only supports `SECONDS` as the highest granularity time
12 unit in 1.5, so all uses of `MINUTES`, `DAYS` and `HOURS` have been
13 re-cast in terms of `SECONDS`.
14- `Charset`-accepting methods on `String` and elsewhere were added in
15 1.6, so all charsets are passed in by using `Charsets.FOO.name()`,
16 and exceptions are trapped or thrown as appropriate.
17- The guava-gwt module is disabled by not including it in the list
18 of modules in the parent pom.xml.
Paul Duffin7dd25272015-01-22 16:04:43 +000019
Paul Duffin0888a092015-01-23 14:38:46 +000020The JDK5 backport builds with Maven, but has a number of
21ideosyncrasies.
Paul Duffin7dd25272015-01-22 16:04:43 +000022
Paul Duffin0888a092015-01-23 14:38:46 +000023- While it uses `-source 1.5` and `-target 1.5` and produces valid 1.5
24 compatible class files, the backport does not build with JDK5.
25 @Override annotations on interface methods are retained.
26- It requries a custom ExecutorService and AbstractExecutorService,
27 which we build in a boostrap project which is included in the build
28 of guava, guava-testlib and guava-tests.
29- The Maven build will use a bootstrap rt.jar classpath based on a
30 standard sun JDK on unix. But this is overridable on a Mac by
31 passing in `-Dbootstrap.classes=/path/to/my/classes.jar`. Since
32 the backport will not build with JDK5, a JDK5 `rt.jar` should be used
33 to ensure that no JDK6+ APIs are used. If you have difficulties
34 building, please try setting the `bootstrap.classes` property to a
35 known `rt.jar` or `classes.jar`.
36- Some tests will fail when run under JDK5 due to `guava-testlib` and
37 `guava-tests` having dependencies on other libraries that are compiled
38 with `-target 1.6`.