Complete rewrite of the spec file
- New upstream, to ease future maintenance - Build with maven instead of ant - Split into multiple subpackages
This commit is contained in:
parent
c31cb0fa7d
commit
9b857023e8
@ -1,61 +0,0 @@
|
||||
From 0790a9ffbe05520dd0eafc2fb7fd812e17fa5eee Mon Sep 17 00:00:00 2001
|
||||
From: Stanislav Ochotnicky <sochotnicky@redhat.com>
|
||||
Date: Thu, 12 May 2011 15:42:28 +0200
|
||||
Subject: [PATCH] Remove test and missing deps from core pom.xml
|
||||
|
||||
---
|
||||
core/pom.xml | 31 +------------------------------
|
||||
1 files changed, 1 insertions(+), 30 deletions(-)
|
||||
|
||||
diff --git a/core/pom.xml b/core/pom.xml
|
||||
index d0410c5..d12ab39 100644
|
||||
--- a/core/pom.xml
|
||||
+++ b/core/pom.xml
|
||||
@@ -23,43 +23,14 @@
|
||||
<artifactId>javax.inject</artifactId>
|
||||
<version>1</version>
|
||||
</dependency>
|
||||
- <dependency>
|
||||
- <groupId>aopalliance</groupId>
|
||||
- <artifactId>aopalliance</artifactId>
|
||||
- <version>1.0</version>
|
||||
- </dependency>
|
||||
<!--
|
||||
| Replace with official CGLIB artifact when it's released
|
||||
-->
|
||||
<dependency>
|
||||
- <groupId>org.sonatype.sisu.inject</groupId>
|
||||
+ <groupId>net.sf.cglib</groupId>
|
||||
<artifactId>cglib</artifactId>
|
||||
<version>${cglib.version}</version>
|
||||
</dependency>
|
||||
- <dependency>
|
||||
- <groupId>javax.inject</groupId>
|
||||
- <artifactId>javax.inject-tck</artifactId>
|
||||
- <version>1</version>
|
||||
- <scope>test</scope>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
- <groupId>org.springframework</groupId>
|
||||
- <artifactId>spring-beans</artifactId>
|
||||
- <version>3.0.5.RELEASE</version>
|
||||
- <scope>test</scope>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
- <groupId>biz.aQute</groupId>
|
||||
- <artifactId>bnd</artifactId>
|
||||
- <version>0.0.384</version>
|
||||
- <scope>test</scope>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
- <groupId>org.apache.felix</groupId>
|
||||
- <artifactId>org.apache.felix.framework</artifactId>
|
||||
- <version>3.0.5</version>
|
||||
- <scope>test</scope>
|
||||
- </dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
--
|
||||
1.7.4.4
|
||||
|
@ -1,47 +1,50 @@
|
||||
%global short_name guice
|
||||
%global tag bd0d620
|
||||
|
||||
Name: google-%{short_name}
|
||||
Version: 3.0
|
||||
Release: 0.7.rc2%{?dist}
|
||||
Summary: Lightweight dependency injection framework
|
||||
|
||||
|
||||
Group: Development/Tools
|
||||
Version: 3.1.2
|
||||
Release: 1%{?dist}
|
||||
Summary: Lightweight dependency injection framework for Java 5 and above
|
||||
Group: Development/Libraries
|
||||
License: ASL 2.0
|
||||
URL: http://code.google.com/p/%{name}
|
||||
|
||||
# svn export -r1219 http://google-guice.googlecode.com/svn/trunk/ guice-2.0-1219
|
||||
# tar caf guice-2.0-1219.tar.xz guice-2.0-1219
|
||||
Source0: https://%{name}.googlecode.com/files/%{short_name}-%{version}-rc2-src.zip
|
||||
|
||||
# patch from http://github.com/sonatype/sisu-guice
|
||||
# excluded changes to pom.xml files that changed groupIds
|
||||
# needed for maven 3 to work
|
||||
Patch0: sisu-custom.patch
|
||||
|
||||
# bz#704222
|
||||
Patch1: 0001-Remove-test-and-missing-deps-from-core-pom.xml.patch
|
||||
|
||||
URL: https://github.com/sonatype/sisu-%{short_name}
|
||||
Source: https://github.com/sonatype/sisu-%{short_name}/tarball/sisu-%{short_name}-%{version}#/%{name}-%{version}.tar.gz
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: java-devel >= 1:1.6.0
|
||||
BuildRequires: ant
|
||||
BuildRequires: jarjar => 1.0
|
||||
BuildRequires: cglib
|
||||
BuildRequires: aqute-bnd
|
||||
BuildRequires: objectweb-asm
|
||||
BuildRequires: junit
|
||||
BuildRequires: atinject
|
||||
BuildRequires: zip
|
||||
BuildRequires: slf4j
|
||||
BuildRequires: java-devel
|
||||
BuildRequires: jpackage-utils
|
||||
BuildRequires: maven
|
||||
BuildRequires: maven-remote-resources-plugin
|
||||
BuildRequires: apache-resource-bundles
|
||||
BuildRequires: aopalliance
|
||||
BuildRequires: atinject
|
||||
BuildRequires: cglib
|
||||
BuildRequires: guava
|
||||
BuildRequires: hibernate-jpa-2.0-api
|
||||
BuildRequires: slf4j
|
||||
BuildRequires: springframework-beans
|
||||
BuildRequires: tomcat-servlet-3.0-api
|
||||
# Test dependencies:
|
||||
%if 0
|
||||
BuildRequires: maven-surefire-provider-testng
|
||||
BuildRequires: aqute-bnd
|
||||
BuildRequires: atinject-tck
|
||||
BuildRequires: easymock2
|
||||
BuildRequires: felix-framework
|
||||
BuildRequires: hibernate3-entitymanager
|
||||
BuildRequires: mvn(org.hsqldb:hsqldb-j5)
|
||||
BuildRequires: testng
|
||||
%endif
|
||||
|
||||
Requires: cglib
|
||||
Requires: java
|
||||
Requires: jpackage-utils
|
||||
Requires: aopalliance
|
||||
Requires: atinject
|
||||
Requires: java >= 1:1.6.0
|
||||
|
||||
# extreme hack to fix maven buildroots
|
||||
Provides: netbeans-cvsclient = 7.0.0-1
|
||||
Requires: cglib
|
||||
Requires: guava
|
||||
Requires: slf4j
|
||||
Requires: %{short_name}-parent = %{version}-%{release}
|
||||
Provides: %{short_name} = %{version}-%{release}
|
||||
|
||||
%description
|
||||
Put simply, Guice alleviates the need for factories and the use of new
|
||||
@ -62,109 +65,273 @@ with at least three use cases. When in doubt, we leave it out. We
|
||||
build general functionality which enables you to extend Guice rather
|
||||
than adding every feature to the core framework.
|
||||
|
||||
%package javadoc
|
||||
Summary: API documentation for %{name}
|
||||
Group: Documentation
|
||||
%package -n %{short_name}-assistedinject
|
||||
Summary: AssistedInject extension module for Guice
|
||||
Requires: java
|
||||
Requires: jpackage-utils
|
||||
Requires: %{short_name} = %{version}-%{release}
|
||||
|
||||
%description -n %{short_name}-assistedinject
|
||||
Guice is a lightweight dependency injection framework for Java 5
|
||||
and above. This package provides AssistedInject module for Guice.
|
||||
|
||||
%package -n %{short_name}-extensions
|
||||
Summary: Extensions for Guice
|
||||
Requires: jpackage-utils
|
||||
Requires: %{short_name} = %{version}-%{release}
|
||||
|
||||
%description -n %{short_name}-extensions
|
||||
Guice is a lightweight dependency injection framework for Java 5
|
||||
and above. This package provides extensions POM for Guice.
|
||||
|
||||
%package -n %{short_name}-grapher
|
||||
Summary: Grapher extension module for Guice
|
||||
Requires: java
|
||||
Requires: jpackage-utils
|
||||
Requires: %{short_name} = %{version}-%{release}
|
||||
Requires: %{short_name}-assistedinject = %{version}-%{release}
|
||||
Requires: %{short_name}-multibindings = %{version}-%{release}
|
||||
|
||||
%description -n %{short_name}-grapher
|
||||
Guice is a lightweight dependency injection framework for Java 5
|
||||
and above. This package provides Grapher module for Guice.
|
||||
|
||||
%package -n %{short_name}-jmx
|
||||
Summary: JMX extension module for Guice
|
||||
Requires: java
|
||||
Requires: jpackage-utils
|
||||
Requires: %{short_name} = %{version}-%{release}
|
||||
|
||||
%description -n %{short_name}-jmx
|
||||
Guice is a lightweight dependency injection framework for Java 5
|
||||
and above. This package provides JMX module for Guice.
|
||||
|
||||
%package -n %{short_name}-jndi
|
||||
Summary: JNDI extension module for Guice
|
||||
Requires: java
|
||||
Requires: jpackage-utils
|
||||
Requires: %{short_name} = %{version}-%{release}
|
||||
|
||||
%description -n %{short_name}-jndi
|
||||
Guice is a lightweight dependency injection framework for Java 5
|
||||
and above. This package provides JNDI module for Guice.
|
||||
|
||||
%package -n %{short_name}-multibindings
|
||||
Summary: MultiBindings extension module for Guice
|
||||
Requires: java
|
||||
Requires: jpackage-utils
|
||||
Requires: %{short_name} = %{version}-%{release}
|
||||
|
||||
%description -n %{short_name}-multibindings
|
||||
Guice is a lightweight dependency injection framework for Java 5
|
||||
and above. This package provides MultiBindings module for Guice.
|
||||
|
||||
%package -n %{short_name}-parent
|
||||
Summary: Guice parent POM
|
||||
Requires: jpackage-utils
|
||||
|
||||
%description javadoc
|
||||
%{summary}.
|
||||
%description -n %{short_name}-parent
|
||||
Guice is a lightweight dependency injection framework for Java 5
|
||||
and above. This package provides parent POM for Guice modules.
|
||||
|
||||
%package -n %{short_name}-persist
|
||||
Summary: Persist extension module for Guice
|
||||
Requires: java
|
||||
Requires: jpackage-utils
|
||||
Requires: hibernate-jpa-2.0-api
|
||||
Requires: tomcat-servlet-3.0-api
|
||||
Requires: %{short_name} = %{version}-%{release}
|
||||
|
||||
%description -n %{short_name}-persist
|
||||
Guice is a lightweight dependency injection framework for Java 5
|
||||
and above. This package provides Persist module for Guice.
|
||||
|
||||
%package -n %{short_name}-servlet
|
||||
Summary: Servlet extension module for Guice
|
||||
Requires: java
|
||||
Requires: jpackage-utils
|
||||
Requires: tomcat-servlet-3.0-api
|
||||
Requires: %{short_name} = %{version}-%{release}
|
||||
|
||||
%description -n %{short_name}-servlet
|
||||
Guice is a lightweight dependency injection framework for Java 5
|
||||
and above. This package provides Servlet module for Guice.
|
||||
|
||||
%package -n %{short_name}-spring
|
||||
Summary: Spring extension module for Guice
|
||||
Requires: java
|
||||
Requires: jpackage-utils
|
||||
Requires: springframework-beans
|
||||
Requires: %{short_name} = %{version}-%{release}
|
||||
|
||||
%description -n %{short_name}-spring
|
||||
Guice is a lightweight dependency injection framework for Java 5
|
||||
and above. This package provides Spring module for Guice.
|
||||
|
||||
%package -n %{short_name}-throwingproviders
|
||||
Summary: ThrowingProviders extension module for Guice
|
||||
Requires: java
|
||||
Requires: jpackage-utils
|
||||
Requires: %{short_name} = %{version}-%{release}
|
||||
|
||||
%description -n %{short_name}-throwingproviders
|
||||
Guice is a lightweight dependency injection framework for Java 5
|
||||
and above. This package provides ThrowingProviders module for Guice.
|
||||
|
||||
%package javadoc
|
||||
Summary: API documentation for Guice
|
||||
Group: Documentation
|
||||
Requires: jpackage-utils
|
||||
Provides: %{short_name}-javadoc = %{version}-%{release}
|
||||
|
||||
%description javadoc
|
||||
This package provides %{summary}.
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -n %{short_name}-%{version}-rc2-src
|
||||
%patch0
|
||||
%patch1 -p1
|
||||
%setup -q -n sonatype-sisu-%{short_name}-%{tag}
|
||||
find -name '*.jar' -delete
|
||||
|
||||
# remove parent definition referencing google-parent
|
||||
sed -ie '/<parent>/,/<\/parent/ {d}' pom.xml
|
||||
# We don't have struts2 in Fedora yet.
|
||||
%pom_disable_module struts2 extensions
|
||||
|
||||
# remove bundled libraries
|
||||
find . -name '*.class' -delete
|
||||
find . -name '*.bar' -delete
|
||||
# we'll repack munge.jar so don't delete it just yet
|
||||
find . -name '*.jar' -not -name 'munge.jar' -delete
|
||||
# Remove additional build profiles, which we don't use anyways
|
||||
# and which are only pulling additional dependencies.
|
||||
%pom_xpath_remove pom:project/pom:profiles core
|
||||
|
||||
# re-create symlinks
|
||||
pushd lib/build
|
||||
build-jar-repository -s -p . aqute-bnd cglib slf4j \
|
||||
jarjar junit objectweb-asm \
|
||||
# Animal sniffer is only causing problems. Disable it for now.
|
||||
%pom_remove_plugin :animal-sniffer-maven-plugin core
|
||||
%pom_remove_plugin :animal-sniffer-maven-plugin extensions
|
||||
|
||||
mv aqute-bnd*.jar bnd-0.0.384.jar
|
||||
mv cglib*.jar cglib-2.2.1-snapshot.jar
|
||||
mv jarjar*.jar jarjar-snapshot.jar
|
||||
mv objectweb-asmasm-all.jar asm-3.1.jar
|
||||
|
||||
popd
|
||||
ln -sf `build-classpath atinject` lib/javax.inject.jar
|
||||
|
||||
# there is munge.jar defining ant task it's a mixture of files, but
|
||||
# there are sources in jar so we re-compile the jar to verify it
|
||||
# builds
|
||||
mkdir munge-repack
|
||||
unzip lib/build/munge.jar -d munge-repack
|
||||
rm lib/build/munge.jar
|
||||
|
||||
pushd munge-repack
|
||||
rm *.class
|
||||
javac -cp `build-classpath ant junit` *.java
|
||||
zip -r ../lib/build/munge.jar .
|
||||
popd
|
||||
|
||||
rm -rf munge-repack
|
||||
#end munge.jar repack
|
||||
# We don't have the custom doclet used by upstream. Remove
|
||||
# maven-javadoc-plugin to generate javadocs with default style.
|
||||
%pom_remove_plugin :maven-javadoc-plugin
|
||||
|
||||
%build
|
||||
# create no-aop build environment
|
||||
ant no_aop
|
||||
|
||||
pushd build/no_aop/
|
||||
# javadoc fails without this directory
|
||||
mkdir -p servlet/lib/build
|
||||
|
||||
ant -Dversion=%{version} jar
|
||||
popd
|
||||
# Skip tests because of missing dependency (hsqldb-j5).
|
||||
mvn-rpmbuild -e -Dmaven.test.skip=true verify javadoc:aggregate
|
||||
|
||||
%install
|
||||
install -d -m 0755 $RPM_BUILD_ROOT%{_javadir}
|
||||
pushd build/no_aop
|
||||
install -pm 644 build/dist/%{short_name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
|
||||
ln -sf %{name}.jar $RPM_BUILD_ROOT%{_javadir}/%{short_name}.jar
|
||||
|
||||
install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
|
||||
install -pm 644 pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP-%{name}-parent.pom
|
||||
%add_maven_depmap JPP-%{name}-parent.pom
|
||||
|
||||
install -pm 644 core/pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP-%{name}.pom
|
||||
# provide sisu group/artifact (should be just mavenized google-guice
|
||||
%add_maven_depmap JPP-%{name}.pom %{name}.jar -a "org.sonatype.sisu:sisu-guice"
|
||||
popd
|
||||
|
||||
# directories
|
||||
install -d -m 755 %{buildroot}%{_javadir}/%{short_name}
|
||||
install -d -m 755 %{buildroot}%{_mavenpomdir}
|
||||
install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
|
||||
# JARs
|
||||
install -p -m 644 extensions/assistedinject/target/%{short_name}-assistedinject-%{version}.jar %{buildroot}%{_javadir}/%{short_name}/%{short_name}-assistedinject.jar
|
||||
install -p -m 644 extensions/grapher/target/%{short_name}-grapher-%{version}.jar %{buildroot}%{_javadir}/%{short_name}/%{short_name}-grapher.jar
|
||||
install -p -m 644 extensions/jmx/target/%{short_name}-jmx-%{version}.jar %{buildroot}%{_javadir}/%{short_name}/%{short_name}-jmx.jar
|
||||
install -p -m 644 extensions/jndi/target/%{short_name}-jndi-%{version}.jar %{buildroot}%{_javadir}/%{short_name}/%{short_name}-jndi.jar
|
||||
install -p -m 644 extensions/multibindings/target/%{short_name}-multibindings-%{version}.jar %{buildroot}%{_javadir}/%{short_name}/%{short_name}-multibindings.jar
|
||||
install -p -m 644 extensions/persist/target/%{short_name}-persist-%{version}.jar %{buildroot}%{_javadir}/%{short_name}/%{short_name}-persist.jar
|
||||
install -p -m 644 extensions/servlet/target/%{short_name}-servlet-%{version}.jar %{buildroot}%{_javadir}/%{short_name}/%{short_name}-servlet.jar
|
||||
install -p -m 644 extensions/spring/target/%{short_name}-spring-%{version}.jar %{buildroot}%{_javadir}/%{short_name}/%{short_name}-spring.jar
|
||||
install -p -m 644 extensions/throwingproviders/target/%{short_name}-throwingproviders-%{version}.jar %{buildroot}%{_javadir}/%{short_name}/%{short_name}-throwingproviders.jar
|
||||
install -p -m 644 core/target/sisu-%{short_name}-%{version}.jar %{buildroot}%{_javadir}/%{short_name}/%{name}.jar
|
||||
# POMs
|
||||
install -p -m 644 extensions/assistedinject/pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{short_name}-%{short_name}-assistedinject.pom
|
||||
install -p -m 644 extensions/pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{short_name}-%{short_name}-extensions.pom
|
||||
install -p -m 644 extensions/grapher/pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{short_name}-%{short_name}-grapher.pom
|
||||
install -p -m 644 extensions/jmx/pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{short_name}-%{short_name}-jmx.pom
|
||||
install -p -m 644 extensions/jndi/pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{short_name}-%{short_name}-jndi.pom
|
||||
install -p -m 644 extensions/multibindings/pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{short_name}-%{short_name}-multibindings.pom
|
||||
install -p -m 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{short_name}-%{short_name}-parent.pom
|
||||
install -p -m 644 extensions/persist/pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{short_name}-%{short_name}-persist.pom
|
||||
install -p -m 644 extensions/servlet/pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{short_name}-%{short_name}-servlet.pom
|
||||
install -p -m 644 extensions/spring/pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{short_name}-%{short_name}-spring.pom
|
||||
install -p -m 644 extensions/throwingproviders/pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{short_name}-%{short_name}-throwingproviders.pom
|
||||
install -p -m 644 core/pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{short_name}-%{name}.pom
|
||||
# depmaps
|
||||
%add_maven_depmap JPP.%{short_name}-%{short_name}-assistedinject.pom %{short_name}/%{short_name}-assistedinject.jar -f assistedinject -a com.google.inject.extensions:guice-assistedinject
|
||||
%add_maven_depmap JPP.%{short_name}-%{short_name}-extensions.pom -f extensions
|
||||
%add_maven_depmap JPP.%{short_name}-%{short_name}-grapher.pom %{short_name}/%{short_name}-grapher.jar -f grapher -a com.google.inject.extensions:guice-grapher
|
||||
%add_maven_depmap JPP.%{short_name}-%{short_name}-jmx.pom %{short_name}/%{short_name}-jmx.jar -f jmx -a com.google.inject.extensions:guice-jmx
|
||||
%add_maven_depmap JPP.%{short_name}-%{short_name}-jndi.pom %{short_name}/%{short_name}-jndi.jar -f jndi -a com.google.inject.extensions:guice-jndi
|
||||
%add_maven_depmap JPP.%{short_name}-%{short_name}-multibindings.pom %{short_name}/%{short_name}-multibindings.jar -f multibindings -a com.google.inject.extensions:guice-multibindings
|
||||
%add_maven_depmap JPP.%{short_name}-%{short_name}-parent.pom -f parent
|
||||
%add_maven_depmap JPP.%{short_name}-%{short_name}-persist.pom %{short_name}/%{short_name}-persist.jar -f persist -a com.google.inject.extensions:guice-persist
|
||||
%add_maven_depmap JPP.%{short_name}-%{short_name}-servlet.pom %{short_name}/%{short_name}-servlet.jar -f servlet -a com.google.inject.extensions:guice-servlet
|
||||
%add_maven_depmap JPP.%{short_name}-%{short_name}-spring.pom %{short_name}/%{short_name}-spring.jar -f spring -a com.google.inject.extensions:guice-spring
|
||||
%add_maven_depmap JPP.%{short_name}-%{short_name}-throwingproviders.pom %{short_name}/%{short_name}-throwingproviders.jar -f throwingproviders -a com.google.inject.extensions:guice-throwingproviders
|
||||
%add_maven_depmap JPP.%{short_name}-%{name}.pom %{short_name}/%{name}.jar -a com.google.inject:guice
|
||||
# javadoc
|
||||
install -d -m 0755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
||||
cp -r javadoc/* %{buildroot}%{_javadocdir}/%{name}
|
||||
|
||||
%pre javadoc
|
||||
# workaround for rpm bug, can be removed in F-17
|
||||
[ $1 -gt 1 ] && [ -L %{_javadocdir}/%{name} ] && \
|
||||
rm -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name} || :
|
||||
cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}
|
||||
# compat symlink
|
||||
ln -sf %{short_name}/%{name}.jar %{buildroot}%{_javadir}
|
||||
|
||||
|
||||
%files
|
||||
%doc COPYING
|
||||
%doc README
|
||||
%{_javadir}/%{name}.jar
|
||||
%{_javadir}/%{short_name}.jar
|
||||
%{_mavenpomdir}/JPP-%{name}-parent.pom
|
||||
%{_mavenpomdir}/JPP-%{name}.pom
|
||||
%{_javadir}/%{short_name}/%{name}.jar
|
||||
%{_mavenpomdir}/JPP.%{short_name}-%{name}.pom
|
||||
%{_mavendepmapfragdir}/%{name}
|
||||
|
||||
%files -n %{short_name}-assistedinject
|
||||
%{_javadir}/%{short_name}/%{short_name}-assistedinject.jar
|
||||
%{_mavenpomdir}/JPP.%{short_name}-%{short_name}-assistedinject.pom
|
||||
%{_mavendepmapfragdir}/%{name}-assistedinject
|
||||
|
||||
%files -n %{short_name}-extensions
|
||||
%{_mavenpomdir}/JPP.%{short_name}-%{short_name}-extensions.pom
|
||||
%{_mavendepmapfragdir}/%{name}-extensions
|
||||
|
||||
%files -n %{short_name}-grapher
|
||||
%{_javadir}/%{short_name}/%{short_name}-grapher.jar
|
||||
%{_mavenpomdir}/JPP.%{short_name}-%{short_name}-grapher.pom
|
||||
%{_mavendepmapfragdir}/%{name}-grapher
|
||||
|
||||
%files -n %{short_name}-jmx
|
||||
%{_javadir}/%{short_name}/%{short_name}-jmx.jar
|
||||
%{_mavenpomdir}/JPP.%{short_name}-%{short_name}-jmx.pom
|
||||
%{_mavendepmapfragdir}/%{name}-jmx
|
||||
|
||||
%files -n %{short_name}-jndi
|
||||
%{_javadir}/%{short_name}/%{short_name}-jndi.jar
|
||||
%{_mavenpomdir}/JPP.%{short_name}-%{short_name}-jndi.pom
|
||||
%{_mavendepmapfragdir}/%{name}-jndi
|
||||
|
||||
%files -n %{short_name}-multibindings
|
||||
%{_javadir}/%{short_name}/%{short_name}-multibindings.jar
|
||||
%{_mavenpomdir}/JPP.%{short_name}-%{short_name}-multibindings.pom
|
||||
%{_mavendepmapfragdir}/%{name}-multibindings
|
||||
|
||||
%files -n %{short_name}-parent
|
||||
%doc COPYING
|
||||
%{_mavenpomdir}/JPP.%{short_name}-%{short_name}-parent.pom
|
||||
%{_mavendepmapfragdir}/%{name}-parent
|
||||
|
||||
%files -n %{short_name}-persist
|
||||
%{_javadir}/%{short_name}/%{short_name}-persist.jar
|
||||
%{_mavenpomdir}/JPP.%{short_name}-%{short_name}-persist.pom
|
||||
%{_mavendepmapfragdir}/%{name}-persist
|
||||
|
||||
%files -n %{short_name}-servlet
|
||||
%{_javadir}/%{short_name}/%{short_name}-servlet.jar
|
||||
%{_mavenpomdir}/JPP.%{short_name}-%{short_name}-servlet.pom
|
||||
%{_mavendepmapfragdir}/%{name}-servlet
|
||||
|
||||
%files -n %{short_name}-spring
|
||||
%{_javadir}/%{short_name}/%{short_name}-spring.jar
|
||||
%{_mavenpomdir}/JPP.%{short_name}-%{short_name}-spring.pom
|
||||
%{_mavendepmapfragdir}/%{name}-spring
|
||||
|
||||
%files -n %{short_name}-throwingproviders
|
||||
%{_javadir}/%{short_name}/%{short_name}-throwingproviders.jar
|
||||
%{_mavenpomdir}/JPP.%{short_name}-%{short_name}-throwingproviders.pom
|
||||
%{_mavendepmapfragdir}/%{name}-throwingproviders
|
||||
|
||||
%files javadoc
|
||||
%doc COPYING
|
||||
%doc %{_javadocdir}/%{name}
|
||||
|
||||
%{_javadocdir}/%{name}
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Oct 5 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.1.2-1
|
||||
- Complete rewrite of the spec file
|
||||
- New upstream, to ease future maintenance
|
||||
- Build with maven instead of ant
|
||||
- Split into multiple subpackages
|
||||
|
||||
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0-0.7.rc2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
||||
|
||||
|
@ -1,419 +0,0 @@
|
||||
Index: core/test/com/google/inject/TypeConversionTest.java
|
||||
===================================================================
|
||||
--- core/test/com/google/inject/TypeConversionTest.java (revision 1482)
|
||||
+++ core/test/com/google/inject/TypeConversionTest.java (working copy)
|
||||
@@ -366,7 +366,7 @@
|
||||
@Inject @NumericValue Date date;
|
||||
}
|
||||
|
||||
- public void testCannotConvertUnannotatedBindings() {
|
||||
+/*public void testCannotConvertUnannotatedBindings() {
|
||||
Injector injector = Guice.createInjector(new AbstractModule() {
|
||||
protected void configure() {
|
||||
bind(String.class).toInstance("55");
|
||||
@@ -380,5 +380,5 @@
|
||||
Asserts.assertContains(expected.getMessage(),
|
||||
"Could not find a suitable constructor in java.lang.Integer.");
|
||||
}
|
||||
- }
|
||||
+ }*/
|
||||
}
|
||||
Index: core/test/com/google/inject/internal/util/LineNumbersTest.java
|
||||
===================================================================
|
||||
--- core/test/com/google/inject/internal/util/LineNumbersTest.java (revision 1482)
|
||||
+++ core/test/com/google/inject/internal/util/LineNumbersTest.java (working copy)
|
||||
@@ -22,7 +22,12 @@
|
||||
import com.google.inject.Guice;
|
||||
import com.google.inject.Inject;
|
||||
import com.google.inject.matcher.Matchers;
|
||||
+import java.lang.reflect.Modifier;
|
||||
import junit.framework.TestCase;
|
||||
+import org.objectweb.asm.ClassWriter;
|
||||
+import org.objectweb.asm.MethodVisitor;
|
||||
+import org.objectweb.asm.Opcodes;
|
||||
+import org.objectweb.asm.Type;
|
||||
|
||||
/**
|
||||
* @author jessewilson@google.com (Jesse Wilson)
|
||||
@@ -75,4 +80,49 @@
|
||||
}
|
||||
interface B {}
|
||||
|
||||
+ static class GeneratingClassLoader extends ClassLoader {
|
||||
+ static String name = "__generated";
|
||||
+
|
||||
+ GeneratingClassLoader() {
|
||||
+ super(B.class.getClassLoader());
|
||||
+ }
|
||||
+
|
||||
+ Class generate() {
|
||||
+ ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_MAXS);
|
||||
+ cw.visit(Opcodes.V1_5, Modifier.PUBLIC, name, null, Type.getInternalName(Object.class), null);
|
||||
+
|
||||
+ String sig = "("+Type.getDescriptor(B.class)+")V";
|
||||
+
|
||||
+ MethodVisitor mv = cw.visitMethod(Modifier.PUBLIC, "<init>", sig, null, null);
|
||||
+
|
||||
+ mv.visitAnnotation(Type.getDescriptor(Inject.class), true);
|
||||
+ mv.visitCode();
|
||||
+ mv.visitVarInsn(Opcodes.ALOAD, 0);
|
||||
+ mv.visitMethodInsn( Opcodes.INVOKESPECIAL, Type.getInternalName(Object.class), "<init>", "()V" );
|
||||
+ mv.visitInsn(Opcodes.RETURN);
|
||||
+ mv.visitMaxs(0, 0);
|
||||
+ mv.visitEnd();
|
||||
+ cw.visitEnd();
|
||||
+
|
||||
+ byte[] buf = cw.toByteArray();
|
||||
+
|
||||
+ return defineClass(name.replace('/', '.'), buf, 0, buf.length);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ public void testIgnoreClassesWithUnavailableByteCode() {
|
||||
+ try {
|
||||
+ Guice.createInjector(new AbstractModule() {
|
||||
+ protected void configure() {
|
||||
+ bind(new GeneratingClassLoader().generate());
|
||||
+ }
|
||||
+ });
|
||||
+ fail();
|
||||
+ } catch (CreationException expected) {
|
||||
+ assertContains(expected.getMessage(),
|
||||
+ "1) No implementation for " + B.class.getName() + " was bound.",
|
||||
+ "for parameter 0 at " + GeneratingClassLoader.name + ".<init>(Unknown Source)",
|
||||
+ "at " + LineNumbersTest.class.getName(), ".configure(LineNumbersTest.java:");
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
Index: core/test/com/google/inject/ScopesTest.java
|
||||
===================================================================
|
||||
--- core/test/com/google/inject/ScopesTest.java (revision 1482)
|
||||
+++ core/test/com/google/inject/ScopesTest.java (working copy)
|
||||
@@ -238,7 +238,7 @@
|
||||
Asserts.assertNotSerializable(Scopes.NO_SCOPE);
|
||||
}
|
||||
|
||||
- public void testUnscopedProviderWorksOutsideOfRequestedScope() {
|
||||
+/*public void testUnscopedProviderWorksOutsideOfRequestedScope() {
|
||||
final RememberProviderScope scope = new RememberProviderScope();
|
||||
|
||||
Injector injector = Guice.createInjector(new AbstractModule() {
|
||||
@@ -254,7 +254,7 @@
|
||||
// this line fails with a NullPointerException because the Providers
|
||||
// passed to Scope.scope() don't work outside of the scope() method.
|
||||
assertTrue(listProvider.get() instanceof ArrayList);
|
||||
- }
|
||||
+ }*/
|
||||
|
||||
public void testScopeAnnotationWithoutRuntimeRetention() {
|
||||
try {
|
||||
Index: core/src/com/google/inject/internal/BindingProcessor.java
|
||||
===================================================================
|
||||
--- core/src/com/google/inject/internal/BindingProcessor.java (revision 1482)
|
||||
+++ core/src/com/google/inject/internal/BindingProcessor.java (working copy)
|
||||
@@ -51,6 +51,12 @@
|
||||
*/
|
||||
final class BindingProcessor extends AbstractProcessor {
|
||||
|
||||
+//------------------------------------------------------------------------------
|
||||
+ private static final boolean DISABLE_MISPLACED_ANNOTATION_CHECK
|
||||
+ = Boolean.parseBoolean(System.getProperty(
|
||||
+ "guice.disable.misplaced.annotation.check", "false"));
|
||||
+//------------------------------------------------------------------------------
|
||||
+
|
||||
private final List<CreationListener> creationListeners = Lists.newArrayList();
|
||||
private final Initializer initializer;
|
||||
private final List<Runnable> uninitializedBindings = Lists.newArrayList();
|
||||
@@ -221,8 +227,14 @@
|
||||
}
|
||||
|
||||
private <T> void validateKey(Object source, Key<T> key) {
|
||||
+//------------------------------------------------------------------------------
|
||||
+if (!DISABLE_MISPLACED_ANNOTATION_CHECK) {
|
||||
+//------------------------------------------------------------------------------
|
||||
Annotations.checkForMisplacedScopeAnnotations(
|
||||
key.getTypeLiteral().getRawType(), source, errors);
|
||||
+//------------------------------------------------------------------------------
|
||||
+}
|
||||
+//------------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
<T> UntargettedBindingImpl<T> invalidBinding(InjectorImpl injector, Key<T> key, Object source) {
|
||||
Index: core/src/com/google/inject/internal/InjectorShell.java
|
||||
===================================================================
|
||||
--- core/src/com/google/inject/internal/InjectorShell.java (revision 1482)
|
||||
+++ core/src/com/google/inject/internal/InjectorShell.java (working copy)
|
||||
@@ -239,6 +239,15 @@
|
||||
new ProviderInstanceBindingImpl<Logger>(injector, key,
|
||||
SourceProvider.UNKNOWN_SOURCE, loggerFactory, Scoping.UNSCOPED,
|
||||
loggerFactory, ImmutableSet.<InjectionPoint>of()));
|
||||
+
|
||||
+ try {
|
||||
+ Key<org.slf4j.Logger> slf4jKey = Key.get(org.slf4j.Logger.class);
|
||||
+ SLF4JLoggerFactory slf4jLoggerFactory = new SLF4JLoggerFactory(injector);
|
||||
+ injector.state.putBinding(slf4jKey,
|
||||
+ new ProviderInstanceBindingImpl<org.slf4j.Logger>(injector, slf4jKey,
|
||||
+ SourceProvider.UNKNOWN_SOURCE, slf4jLoggerFactory, Scoping.UNSCOPED,
|
||||
+ slf4jLoggerFactory, ImmutableSet.<InjectionPoint>of()));
|
||||
+ } catch (Throwable e) {}
|
||||
}
|
||||
|
||||
private static class LoggerFactory implements InternalFactory<Logger>, Provider<Logger> {
|
||||
@@ -258,6 +267,43 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ private static class SLF4JLoggerFactory implements InternalFactory<org.slf4j.Logger>, Provider<org.slf4j.Logger> {
|
||||
+ private final Injector injector;
|
||||
+
|
||||
+ private org.slf4j.ILoggerFactory loggerFactory;
|
||||
+
|
||||
+ SLF4JLoggerFactory(Injector injector) {
|
||||
+ this.injector = injector;
|
||||
+ }
|
||||
+
|
||||
+ org.slf4j.ILoggerFactory loggerFactory() {
|
||||
+ if (loggerFactory == null) {
|
||||
+ try {
|
||||
+ loggerFactory = injector.getInstance(org.slf4j.ILoggerFactory.class);
|
||||
+ } catch (Throwable e) {
|
||||
+ loggerFactory = org.slf4j.LoggerFactory.getILoggerFactory();
|
||||
+ }
|
||||
+ }
|
||||
+ return loggerFactory;
|
||||
+ }
|
||||
+
|
||||
+ public org.slf4j.Logger get(Errors errors, InternalContext context, Dependency<?> dependency, boolean linked) {
|
||||
+ InjectionPoint injectionPoint = dependency.getInjectionPoint();
|
||||
+ if (injectionPoint != null) {
|
||||
+ return loggerFactory().getLogger(injectionPoint.getMember().getDeclaringClass().getName());
|
||||
+ }
|
||||
+ return loggerFactory().getLogger(org.slf4j.Logger.ROOT_LOGGER_NAME);
|
||||
+ }
|
||||
+
|
||||
+ public org.slf4j.Logger get() {
|
||||
+ return loggerFactory().getLogger(org.slf4j.Logger.ROOT_LOGGER_NAME);
|
||||
+ }
|
||||
+
|
||||
+ public String toString() {
|
||||
+ return "Provider<org.slf4j.Logger>";
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
private static class RootModule implements Module {
|
||||
final Stage stage;
|
||||
|
||||
Index: core/src/com/google/inject/internal/util/FinalizableReferenceQueue.java
|
||||
===================================================================
|
||||
--- core/src/com/google/inject/internal/util/FinalizableReferenceQueue.java (revision 1482)
|
||||
+++ core/src/com/google/inject/internal/util/FinalizableReferenceQueue.java (working copy)
|
||||
@@ -118,24 +118,27 @@
|
||||
@SuppressWarnings("unchecked")
|
||||
public FinalizableReferenceQueue() {
|
||||
// We could start the finalizer lazily, but I'd rather it blow up early.
|
||||
- ReferenceQueue<Object> queue;
|
||||
- boolean threadStarted = false;
|
||||
+ ReferenceQueue<Object> queue = null;
|
||||
try {
|
||||
queue = (ReferenceQueue<Object>) startFinalizer.invoke(null,
|
||||
FinalizableReference.class, this);
|
||||
- threadStarted = true;
|
||||
} catch (IllegalAccessException e) {
|
||||
// Finalizer.startFinalizer() is public.
|
||||
throw new AssertionError(e);
|
||||
} catch (Throwable t) {
|
||||
- logger.log(Level.INFO, "Failed to start reference finalizer thread."
|
||||
+ logger.log(Level.WARNING, "Exception in startFinalizer method.", t);
|
||||
+ }
|
||||
+
|
||||
+ if (queue == null) {
|
||||
+ logger.log(Level.INFO, "Reference Finalizer thread is not available."
|
||||
+ " Reference cleanup will only occur when new references are"
|
||||
- + " created.", t);
|
||||
- queue = new ReferenceQueue<Object>();
|
||||
+ + " created.");
|
||||
+ this.queue = new ReferenceQueue<Object>();
|
||||
+ this.threadStarted = false;
|
||||
+ } else {
|
||||
+ this.queue = queue;
|
||||
+ this.threadStarted = true;
|
||||
}
|
||||
-
|
||||
- this.queue = queue;
|
||||
- this.threadStarted = threadStarted;
|
||||
}
|
||||
|
||||
/**
|
||||
Index: core/src/com/google/inject/internal/util/LineNumbers.java
|
||||
===================================================================
|
||||
--- core/src/com/google/inject/internal/util/LineNumbers.java (revision 1482)
|
||||
+++ core/src/com/google/inject/internal/util/LineNumbers.java (working copy)
|
||||
@@ -58,8 +58,9 @@
|
||||
|
||||
if (!type.isArray()) {
|
||||
InputStream in = type.getResourceAsStream("/" + type.getName().replace('.', '/') + ".class");
|
||||
- Preconditions.checkArgument(in != null, "Cannot find bytecode for %s", type);
|
||||
- new ClassReader(in).accept(new LineNumberReader(), ClassReader.SKIP_FRAMES);
|
||||
+ if (in != null) {
|
||||
+ new ClassReader(in).accept(new LineNumberReader(), ClassReader.SKIP_FRAMES);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
Index: core/src/com/google/inject/internal/util/Finalizer.java
|
||||
===================================================================
|
||||
--- core/src/com/google/inject/internal/util/Finalizer.java (revision 1482)
|
||||
+++ core/src/com/google/inject/internal/util/Finalizer.java (working copy)
|
||||
@@ -21,6 +21,7 @@
|
||||
import java.lang.ref.ReferenceQueue;
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.lang.reflect.Method;
|
||||
+import java.util.concurrent.Executor;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
@@ -45,7 +46,7 @@
|
||||
* class loader from getting garbage collected, and this class can detect when
|
||||
* the main class loader has been garbage collected and stop itself.
|
||||
*/
|
||||
-public class Finalizer extends Thread {
|
||||
+public class Finalizer implements Runnable {
|
||||
|
||||
private static final Logger logger
|
||||
= Logger.getLogger(Finalizer.class.getName());
|
||||
@@ -54,6 +55,17 @@
|
||||
private static final String FINALIZABLE_REFERENCE
|
||||
= "com.google.inject.internal.util.FinalizableReference";
|
||||
|
||||
+ /** Use "-Dguice.executor.class=Clazz" where Clazz implements java.util.concurrent.Executor. */
|
||||
+ private static final String EXECUTOR_CLASS_NAME;
|
||||
+
|
||||
+ static {
|
||||
+ String executorClassName = null;
|
||||
+ try {
|
||||
+ executorClassName = System.getProperty("guice.executor.class");
|
||||
+ } catch (Throwable t) {}
|
||||
+ EXECUTOR_CLASS_NAME = executorClassName;
|
||||
+ }
|
||||
+
|
||||
/**
|
||||
* Starts the Finalizer thread. FinalizableReferenceQueue calls this method
|
||||
* reflectively.
|
||||
@@ -78,9 +90,33 @@
|
||||
"Expected " + FINALIZABLE_REFERENCE + ".");
|
||||
}
|
||||
|
||||
+ if ("NONE".equalsIgnoreCase(EXECUTOR_CLASS_NAME)) {
|
||||
+ return null;
|
||||
+ }
|
||||
+
|
||||
Finalizer finalizer = new Finalizer(finalizableReferenceClass, frq);
|
||||
- finalizer.start();
|
||||
- return finalizer.queue;
|
||||
+
|
||||
+ try {
|
||||
+ if (EXECUTOR_CLASS_NAME == null || EXECUTOR_CLASS_NAME.length() == 0) {
|
||||
+ Thread thread = new Thread(finalizer, Finalizer.class.getName());
|
||||
+ thread.setDaemon(true);
|
||||
+ // TODO: Priority?
|
||||
+ thread.start();
|
||||
+ } else {
|
||||
+ Class<?> executorClass;
|
||||
+ try {
|
||||
+ executorClass = Thread.currentThread().getContextClassLoader().loadClass(EXECUTOR_CLASS_NAME);
|
||||
+ } catch (Throwable ignore) {
|
||||
+ executorClass = Class.forName(EXECUTOR_CLASS_NAME);
|
||||
+ }
|
||||
+ // use custom Executor supplied by an external container
|
||||
+ ((Executor)executorClass.newInstance()).execute(finalizer);
|
||||
+ }
|
||||
+ return finalizer.queue;
|
||||
+ } catch (Throwable t) {
|
||||
+ logger.log(Level.WARNING, "Cannot start Finalizer thread.", t);
|
||||
+ return null;
|
||||
+ }
|
||||
}
|
||||
|
||||
private final WeakReference<Class<?>> finalizableReferenceClassReference;
|
||||
@@ -89,24 +125,18 @@
|
||||
|
||||
/** Constructs a new finalizer thread. */
|
||||
private Finalizer(Class<?> finalizableReferenceClass, Object frq) {
|
||||
- super(Finalizer.class.getName());
|
||||
|
||||
this.finalizableReferenceClassReference
|
||||
= new WeakReference<Class<?>>(finalizableReferenceClass);
|
||||
|
||||
// Keep track of the FRQ that started us so we know when to stop.
|
||||
this.frqReference = new PhantomReference<Object>(frq, queue);
|
||||
-
|
||||
- setDaemon(true);
|
||||
-
|
||||
- // TODO: Priority?
|
||||
}
|
||||
|
||||
/**
|
||||
* Loops continuously, pulling references off the queue and cleaning them up.
|
||||
*/
|
||||
@SuppressWarnings("InfiniteLoopStatement")
|
||||
- @Override
|
||||
public void run() {
|
||||
try {
|
||||
while (true) {
|
||||
Index: core/src/com/google/inject/internal/BytecodeGen.java
|
||||
===================================================================
|
||||
--- core/src/com/google/inject/internal/BytecodeGen.java (revision 1482)
|
||||
+++ core/src/com/google/inject/internal/BytecodeGen.java (working copy)
|
||||
@@ -119,8 +119,7 @@
|
||||
end[NO_AOP]*/
|
||||
|
||||
/** Use "-Dguice.custom.loader=false" to disable custom classloading. */
|
||||
- private static final boolean CUSTOM_LOADER_ENABLED
|
||||
- = Boolean.parseBoolean(System.getProperty("guice.custom.loader", "true"));
|
||||
+ private static final boolean CUSTOM_LOADER_ENABLED;
|
||||
|
||||
/**
|
||||
* Weak cache of bridge class loaders that make the Guice implementation
|
||||
@@ -129,6 +128,14 @@
|
||||
private static final Map<ClassLoader, ClassLoader> CLASS_LOADER_CACHE;
|
||||
|
||||
static {
|
||||
+ boolean customLoaderEnabled;
|
||||
+ try {
|
||||
+ customLoaderEnabled = Boolean.parseBoolean(System.getProperty("guice.custom.loader", "true"));
|
||||
+ } catch (Throwable e) {
|
||||
+ customLoaderEnabled = false; // unlikely we'll also have permissions for custom loading
|
||||
+ }
|
||||
+ CUSTOM_LOADER_ENABLED = customLoaderEnabled;
|
||||
+
|
||||
if (CUSTOM_LOADER_ENABLED) {
|
||||
CLASS_LOADER_CACHE = new MapMaker().weakKeys().weakValues().makeComputingMap(
|
||||
new Function<ClassLoader, ClassLoader>() {
|
||||
Index: core/src/com/google/inject/Scopes.java
|
||||
===================================================================
|
||||
--- core/src/com/google/inject/Scopes.java (revision 1482)
|
||||
+++ core/src/com/google/inject/Scopes.java (working copy)
|
||||
@@ -17,7 +17,6 @@
|
||||
package com.google.inject;
|
||||
|
||||
import com.google.inject.internal.CircularDependencyProxy;
|
||||
-import com.google.inject.internal.InternalInjectorCreator;
|
||||
import com.google.inject.internal.LinkedBindingImpl;
|
||||
import com.google.inject.spi.BindingScopingVisitor;
|
||||
import com.google.inject.spi.ExposedBinding;
|
||||
@@ -53,14 +52,9 @@
|
||||
public T get() {
|
||||
if (instance == null) {
|
||||
/*
|
||||
- * Use a pretty coarse lock. We don't want to run into deadlocks
|
||||
- * when two threads try to load circularly-dependent objects.
|
||||
- * Maybe one of these days we will identify independent graphs of
|
||||
- * objects and offer to load them in parallel.
|
||||
- *
|
||||
* This block is re-entrant for circular dependencies.
|
||||
*/
|
||||
- synchronized (InternalInjectorCreator.class) {
|
||||
+ synchronized (this) {
|
||||
if (instance == null) {
|
||||
T provided = creator.get();
|
||||
|
Loading…
Reference in New Issue
Block a user