Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MOE Sync 2020-07-09 #1359

Merged
merged 1 commit into from
Jul 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ javadoc.packagenames=com.google.inject,com.google.inject.spi,\
com.google.inject.testing.fieldbinder
test.class=com.google.inject.AllTests
module=com.google.inject
imports=!net.sf.cglib.*,!org.objectweb.asm.*
imports=!org.objectweb.asm.*
46 changes: 29 additions & 17 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,13 @@
<artifactId>guava</artifactId>
</dependency>
<!--
| CGLIB is embedded by default by the JarJar build profile
| ASM is embedded by default by the JarJar build profile
-->
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
<optional>true</optional>
</dependency>
<!--
| Test dependencies
-->
Expand Down Expand Up @@ -106,6 +101,31 @@
<exclude>**/TypeConversionTest*</exclude>
</excludes>
</configuration>
<executions>
<execution>
<id>anonymous-class-loading</id>
<phase>test</phase>
<goals><goal>test</goal></goals>
<configuration>
<argLine>-Dguice_custom_class_loading=ANONYMOUS</argLine>
</configuration>
</execution>
<execution>
<id>child-class-loading</id>
<phase>test</phase>
<goals><goal>test</goal></goals>
<configuration>
<argLine>-Dguice_custom_class_loading=CHILD</argLine>
<!--
| These tests rely on package access which CHILD loading doesn't have
-->
<excludes combine.children="append">
<exclude>**/BytecodeGenTest*</exclude>
<exclude>**/ProviderMethodsTest*</exclude>
</excludes>
</configuration>
</execution>
</executions>
</plugin>
<!--
| Add OSGi manifest
Expand All @@ -116,7 +136,7 @@
<configuration>
<instructions>
<Bundle-Name>${project.artifactId}$(if;$(classes;NAMED;*.MethodAspect);; (no_aop))</Bundle-Name>
<Import-Package>!net.sf.cglib.*,!org.objectweb.asm.*,!com.google.inject.*,*</Import-Package>
<Import-Package>!org.objectweb.asm.*,!com.google.inject.*,*</Import-Package>
<Eclipse-ExtensibleAPI>true</Eclipse-ExtensibleAPI>
</instructions>
</configuration>
Expand Down Expand Up @@ -180,6 +200,7 @@
<configuration>
<symbols>NO_AOP</symbols>
<excludes>
**/aop/*.java,
**/InterceptorBinding.java,
**/InterceptorBindingProcessor.java,
**/InterceptorStackCallback.java,
Expand Down Expand Up @@ -222,7 +243,7 @@
</profile>
<profile>
<!--
| JarJar build profile: Embed CGLIB (and ASM) classes under a Guice namespace
| JarJar build profile: Embed ASM classes under a Guice namespace
-->
<id>guice.with.jarjar</id>
<activation>
Expand All @@ -247,17 +268,8 @@
<overwrite>true</overwrite>
<includes>
<include>*:asm*</include>
<include>*:cglib</include>
</includes>
<rules>
<rule>
<pattern>net.sf.cglib.*</pattern>
<result>com.google.inject.internal.cglib.$@1</result>
</rule>
<rule>
<pattern>net.sf.cglib.**.*</pattern>
<result>com.google.inject.internal.cglib.@1.$@2</result>
</rule>
<rule>
<pattern>org.objectweb.asm.*</pattern>
<result>com.google.inject.internal.asm.$@1</result>
Expand Down
4 changes: 2 additions & 2 deletions core/src/com/google/inject/Scopes.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package com.google.inject;

import com.google.inject.internal.BindingImpl;
import com.google.inject.internal.CircularDependencyProxy;
import com.google.inject.internal.BytecodeGen;
import com.google.inject.internal.SingletonScope;
import com.google.inject.spi.BindingScopingVisitor;
import com.google.inject.spi.ExposedBinding;
Expand Down Expand Up @@ -197,6 +197,6 @@ private static Injector getInjector(LinkedKeyBinding<?> linkedKeyBinding) {
* @since 4.0
*/
public static boolean isCircularProxy(Object object) {
return object instanceof CircularDependencyProxy;
return BytecodeGen.isCircularProxy(object);
}
}
Loading