Revision: 1091
Author: limpbizkit
Date: Sun Sep 27 19:51:24 2009
Log: Update JSR 330 support.
http://code.google.com/p/google-guice/source/detail?r=1091
Added:
/trunk/lib/javax.inject.jar
Deleted:
/trunk/lib/atinject.jar
Modified:
/trunk/build.xml
/trunk/common.xml
/trunk/guice.iml
/trunk/src/com/google/inject/spi/InjectionPoint.java
/trunk/test/com/googlecode/guice/Jsr330Test.java
=======================================
--- /dev/null
+++ /trunk/lib/javax.inject.jar Sun Sep 27 19:51:24 2009
Binary file, no diff available.
=======================================
--- /trunk/lib/atinject.jar Mon Sep 7 14:00:57 2009
+++ /dev/null
Binary file, no diff available.
=======================================
--- /trunk/build.xml Tue May 19 15:29:44 2009
+++ /trunk/build.xml Sun Sep 27 19:51:24 2009
@@ -103,7 +103,7 @@
destdir="${build.dir}/javadoc"
author="false"
protected="true"
- windowtitle="Guice 2.0 API">
+ windowtitle="Guice ${version} API">
<sourcepath>
<pathelement location="${src.dir}"/>
<pathelement location="${servlet.src.dir}"/>
@@ -128,7 +128,7 @@
destdir="${build.dir}/javadoc-core"
author="false"
protected="true"
- windowtitle="Guice 2.0 Core API"
+ windowtitle="Guice ${version} Core API"
sourcepath="${src.dir}">
<classpath refid="compile.classpath"/>
<link href="http://aopalliance.sourceforge.net/doc"/>
=======================================
--- /trunk/common.xml Tue May 19 00:43:18 2009
+++ /trunk/common.xml Sun Sep 27 19:51:24 2009
@@ -6,8 +6,8 @@
<!-- can be overridden at the command line with -Dversion=
or in IDEA, in the ant properties dialog -->
- <property name="version" value="2.0"/>
- <property name="api.version" value="1.2"/>
+ <property name="version" value="snapshot"/>
+ <property name="api.version" value="1.3"/>
<target name="compile" description="Compile Java source.">
<mkdir dir="${build.dir}/classes"/>
=======================================
--- /trunk/guice.iml Mon Sep 7 14:00:57 2009
+++ /trunk/guice.iml Sun Sep 27 19:51:24 2009
@@ -78,11 +78,10 @@
<jarDirectory url="file://$MODULE_DIR$/lib/build"
recursive="false" />
</library>
</orderEntry>
- <orderEntry type="module" module-name="multibindings" />
<orderEntry type="module-library" exported="">
<library>
<CLASSES>
- <root url="jar://$MODULE_DIR$/lib/atinject.jar!/" />
+ <root url="jar://$MODULE_DIR$/lib/javax.inject.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
=======================================
--- /trunk/src/com/google/inject/spi/InjectionPoint.java Mon Sep 7
17:17:45 2009
+++ /trunk/src/com/google/inject/spi/InjectionPoint.java Sun Sep 27
19:51:24 2009
@@ -226,7 +226,7 @@
if (javaxInject == null) {
continue;
}
- optional = javaxInject.optional();
+ optional = false;
} else {
optional = guiceInject.optional();
}
@@ -409,7 +409,7 @@
boolean optional;
javax.inject.Inject javaxInject =
member.getAnnotation(javax.inject.Inject.class);
if (javaxInject != null) {
- optional = javaxInject.optional();
+ optional = false;
if (!factory.checkJsr330Compliance(member, errors)) {
continue; // don't bother to inject noncompliant members
}
@@ -468,10 +468,6 @@
errors.cannotInjectAbstractMethod(member);
result = false;
}
- if (member.getReturnType() != void.class) {
- errors.cannotInjectNonVoidMethod(member);
- result = false;
- }
if (member.getTypeParameters().length > 0) {
errors.cannotInjectMethodWithTypeParameters(member);
result = false;
=======================================
--- /trunk/test/com/googlecode/guice/Jsr330Test.java Mon Sep 7 17:55:29
2009
+++ /trunk/test/com/googlecode/guice/Jsr330Test.java Sun Sep 27 19:51:24
2009
@@ -216,17 +216,11 @@
}
public void testInjectingMethodsWithNonVoidReturnTypes() {
- try {
- Guice.createInjector(new AbstractModule() {
- protected void configure() {
- bind(P.class);
- }
- });
- fail();
- } catch (CreationException expected) {
- assertContains(expected.getMessage(),
- "1) Injected method " + P.class.getName() + ".setB() must return
void.");
- }
+ Guice.createInjector(new AbstractModule() {
+ protected void configure() {
+ bind(P.class);
+ }
+ });
}
/**
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"google-guice-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-guice-dev?hl=en
-~----------~----~----~----~------~----~------~--~---