Skip to content

Guice42

Sam Berlin edited this page Feb 28, 2018 · 6 revisions

Guice 4.2

Released February 28th, 2018

Maven

Guice:

<dependency>
  <groupId>com.google.inject</groupId>
  <artifactId>guice</artifactId>
  <version>4.2.0</version>
</dependency>

Guice (No AOP):

<dependency>
  <groupId>com.google.inject</groupId>
  <artifactId>guice</artifactId>
  <version>4.2.0</version>
  <classifier>no_aop</classifier>
</dependency>

Extensions:

<dependency>
  <groupId>com.google.inject.extensions</groupId>
  <artifactId>guice-${extension}</artifactId>
  <version>4.2.0</version>
</dependency>

Downloads

Changes since Guice 4.2

  • Java 9 and JPMS support
  • Multibindings are now in the Guice core artifact. The multibindings artifact is empty to prevent confusion during upgrading and will be removed in a later release.
  • Improve the performance of guice provisioning (by about 20%) by changing the way errors are reported. Guice will no longer report multiple errors during provisioning (Guice still reports multiple errors during injector creation).
  • Better error messages for a missing binding.
  • Various optimizations.
  • AbstractModule.configure() is non-abstract to allow modules with only @Provides/@ProvidesIntoSet/... methods.
  • Add a CheckedProviders class.
  • Change the way Singletons work to not rely on ThreadLocals nor WeakReferences.
  • Add MapBinderBinding.getEntries(Iterable).
  • Deprecate ProvisionListener.ProvisionInvocation.getDependencyChain(). It is scheduled for deletion in 4.3.
  • Ensure that Struts interceptors are populated even if they are created after the injector (Fixes #1081, #1075).
  • Add support for multibindings with annotations in the Guice DaggerMethodScanner.
Clone this wiki locally