Today you cannot have spaces in system properties:
$ sbt -Dfoo="bar baz" ...
It passes [-Dfoo=bar] and [baz] to java (see https://github.com/sbt/sbt/issues/2787).
This change allows you to do:
$ sbt "-Dfoo=bar baz"
which will pass ["-Dfoo=bar baz"]. And both of these two:
$ sbt "-Dfoo=bar"
$ sbt -Dfoo=bar
still work, passing [-Dfoo=bar].
java.lang.Class#newInstance deprecated since Java 9
http://download.java.net/java/jdk9/docs/api/java/lang/Class.html#newInstance--
```
Deprecated. This method propagates any exception thrown by the nullary constructor, including a checked exception. Use of this method effectively bypasses the compile-time exception checking that would otherwise be performed by the compiler. The Constructor.newInstance method avoids this problem by wrapping any exception thrown by the constructor in a (checked) InvocationTargetException.
The call
clazz.newInstance()
can be replaced by
clazz.getDeclaredConstructor().newInstance()
The latter sequence of calls is inferred to be able to throw the additional exception types InvocationTargetException and NoSuchMethodException. Both of these exception types are subclasses of ReflectiveOperationException.
Creates a new instance of the class represented by this Class object. The class is instantiated as if by a new expression with an empty argument list. The class is initialized if it has not already been initialized.
```
This commit addresses several concers:
* Document better the Zinc internal implementation.
* Getting the implementation ready for moving things from internal to
public APIs. This will be done in a follow-up commit.
* Removing `inputs` and `setups` from the `IncrementalCompilerUtil` as
they exist mainly to interface between Scala code and Java code. The
reality is that both Java and Scala developers can easily call the
constructors by themselves and don't learn more API methods.
* Removes unused imports, that emit stupid warnings.
* Make code more readable, especifically in the analyzing compilers for
both Java and Scala, which was hardly understandable and documented.
* Make `AnalyzingJavaCompiler` to extend `JavaCompiler` as
`AnalyzingCompiler` does for `ScalaCompiler`. In an upcoming commit,
`AnalyzingCompiler` will be renamed into `AnalyzingScalaCompiler` for
consistency reasons.
* Replace use of `sbt.util.Logger` helpers by `sbt.util.InterfaceUtil`.
The dependency as specified won't work on Fedora 25.
The situation concerning requiring the selection of Java versions
is tricky, and is detailed at:
https://github.com/elastic/logstash/issues/6275
The conclusion of that thread is that "it is not possible to
provide a package that correctly works for users of all supported
Java packages.", meaning a dependency on either one of OpenJDK or
Oracle JDK.
Assuming the dependency is on OpenJDK, the list of metapackages
provided is listed at:
https://github.com/elastic/logstash/issues/6275#issuecomment-261356980
The dependency "java-1.8.0-devel" will be satisfied by any
revision of OpenJDK 1.8, so that is the one that is proposed
in this pull request.