issue_id
int64 2.04k
425k
| title
stringlengths 9
251
| body
stringlengths 4
32.8k
⌀ | status
stringclasses 6
values | after_fix_sha
stringlengths 7
7
| project_name
stringclasses 6
values | repo_url
stringclasses 6
values | repo_name
stringclasses 6
values | language
stringclasses 1
value | issue_url
null | before_fix_sha
null | pull_url
null | commit_datetime
timestamp[us, tz=UTC] | report_datetime
timestamp[us, tz=UTC] | updated_file
stringlengths 23
187
| chunk_content
stringlengths 1
22k
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
152,161 |
Bug 152161 Contribution: Support -Xset in Load-Time Weaving Configuration
|
I needed this to try out a setting in the pipelined compilation (-Xset:runMinimalMemory=true) ... I was able to verify that it parsed and set an option correctly in the debugger. I also have included a test that sets all the currently available options.
|
resolved fixed
|
039be68
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-08T13:50:57Z | 2006-07-28T15:20:00Z |
loadtime/src/org/aspectj/weaver/loadtime/Options.java
|
weaverOption.lintFile = arg.substring(OPTIONVALUED_Xlintfile.length()).trim();
}
} else if (arg.startsWith(OPTIONVALUED_Xlint)) {
if (arg.length() > OPTIONVALUED_Xlint.length()) {
weaverOption.lint = arg.substring(OPTIONVALUED_Xlint.length()).trim();
}
} else {
weaverOption.messageHandler.handleMessage(
new Message(
"Cannot configure weaver with option '" + arg + "': unknown option",
IMessage.WARNING,
null,
null
)
);
}
}
if (weaverOption.noWarn) {
weaverOption.messageHandler.dontIgnore(IMessage.WARNING);
}
if (weaverOption.verbose) {
weaverOption.messageHandler.dontIgnore(IMessage.INFO);
}
if (weaverOption.showWeaveInfo) {
weaverOption.messageHandler.dontIgnore(IMessage.WEAVEINFO);
}
return weaverOption;
}
public static class WeaverOption {
|
152,161 |
Bug 152161 Contribution: Support -Xset in Load-Time Weaving Configuration
|
I needed this to try out a setting in the pipelined compilation (-Xset:runMinimalMemory=true) ... I was able to verify that it parsed and set an option correctly in the debugger. I also have included a test that sets all the currently available options.
|
resolved fixed
|
039be68
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-08T13:50:57Z | 2006-07-28T15:20:00Z |
loadtime/src/org/aspectj/weaver/loadtime/Options.java
|
boolean java5;
boolean lazyTjp;
boolean hasMember;
String optionalJoinpoints;
boolean noWarn;
boolean proceedOnError;
boolean verbose;
boolean notReWeavable = true;
boolean noInline;
boolean addSerialVersionUID;
boolean showWeaveInfo;
boolean pinpoint;
IMessageHandler messageHandler;
String lint;
String lintFile;
public WeaverOption(IMessageHandler imh) {
this.messageHandler = imh;
}
}
}
|
152,161 |
Bug 152161 Contribution: Support -Xset in Load-Time Weaving Configuration
|
I needed this to try out a setting in the pipelined compilation (-Xset:runMinimalMemory=true) ... I was able to verify that it parsed and set an option correctly in the debugger. I also have included a test that sets all the currently available options.
|
resolved fixed
|
039be68
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-08T13:50:57Z | 2006-07-28T15:20:00Z |
tests/src/org/aspectj/systemtest/ajc150/ltw/LTWTests.java
|
/*******************************************************************************
* Copyright (c) 2005 Contributors.
* All rights reserved.
* This program and the accompanying materials are made available
* under the terms of the Eclipse Public License v1.0
* which accompanies this distribution and is available at
* http:eclipse.org/legal/epl-v10.html
*
* Contributors:
* Matthew Webster initial implementation
*******************************************************************************/
package org.aspectj.systemtest.ajc150.ltw;
import java.io.File;
import java.util.Enumeration;
import java.util.Properties;
import junit.framework.Test;
import org.aspectj.testing.XMLBasedAjcTestCase;
import org.aspectj.weaver.tools.WeavingAdaptor;
public class LTWTests extends org.aspectj.testing.XMLBasedAjcTestCase {
|
152,161 |
Bug 152161 Contribution: Support -Xset in Load-Time Weaving Configuration
|
I needed this to try out a setting in the pipelined compilation (-Xset:runMinimalMemory=true) ... I was able to verify that it parsed and set an option correctly in the debugger. I also have included a test that sets all the currently available options.
|
resolved fixed
|
039be68
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-08T13:50:57Z | 2006-07-28T15:20:00Z |
tests/src/org/aspectj/systemtest/ajc150/ltw/LTWTests.java
|
public static Test suite() {
return XMLBasedAjcTestCase.loadSuite(LTWTests.class);
}
protected File getSpecFile() {
return new File("../tests/src/org/aspectj/systemtest/ajc150/ltw/ltw.xml");
}
public void test001(){
runTest("Ensure 1st aspect is rewoven when weaving 2nd aspect");
}
public void testOutxmlFile (){
runTest("Ensure valid aop.xml file is generated");
}
public void testOutxmlJar (){
runTest("Ensure valid aop.xml is generated for -outjar");
}
|
152,161 |
Bug 152161 Contribution: Support -Xset in Load-Time Weaving Configuration
|
I needed this to try out a setting in the pipelined compilation (-Xset:runMinimalMemory=true) ... I was able to verify that it parsed and set an option correctly in the debugger. I also have included a test that sets all the currently available options.
|
resolved fixed
|
039be68
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-08T13:50:57Z | 2006-07-28T15:20:00Z |
tests/src/org/aspectj/systemtest/ajc150/ltw/LTWTests.java
|
public void testNoAopxml(){
setSystemProperty(WeavingAdaptor.WEAVING_ADAPTOR_VERBOSE,"true");
runTest("Ensure no weaving without visible aop.xml");
}
public void testDefineConcreteAspect(){
runTest("Define concrete sub-aspect using aop.xml");
}
public void testDeclareAbstractAspect(){
runTest("Use abstract aspect for ITD using aop.xml");
}
public void testAspectsInclude () {
runTest("Ensure a subset of inherited aspects is used for weaving");
}
public void testAspectsIncludeWithLintWarning () {
runTest("Ensure weaver lint warning issued when an aspect is not used for weaving");
}
public void testXlintfileEmpty () {
runTest("Empty Xlint.properties file");
}
public void testXlintfileMissing () {
runTest("Warning with missing Xlint.properties file");
}
public void testXlintWarningAdviceDidNotMatchSuppressed () {
runTest("Warning when advice doesn't match suppressed for LTW");
}
public void testXlintfile () {
runTest("Override suppressing of warning when advice doesn't match using -Xlintfile");
}
public void testXlintDefault () {
|
152,161 |
Bug 152161 Contribution: Support -Xset in Load-Time Weaving Configuration
|
I needed this to try out a setting in the pipelined compilation (-Xset:runMinimalMemory=true) ... I was able to verify that it parsed and set an option correctly in the debugger. I also have included a test that sets all the currently available options.
|
resolved fixed
|
039be68
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-08T13:50:57Z | 2006-07-28T15:20:00Z |
tests/src/org/aspectj/systemtest/ajc150/ltw/LTWTests.java
|
runTest("Warning when advice doesn't match using -Xlint:default");
}
public void testXlintWarning () {
runTest("Override suppressing of warning when advice doesn't match using -Xlint:warning");
}
public void testNonstandardJarFiles() {
runTest("Nonstandard jar file extensions");
}
public void testOddzipOnClasspath() {
runTest("Odd zip on classpath");
}
public void testJ14LTWWithXML() {
runTest("JDK14 LTW with XML");
}
public void testJ14LTWWithASPECTPATH() {
runTest("JDK14 LTW with ASPECTPATH");
}
/*
* Allow system properties to be set and restored
* TODO maw move to XMLBasedAjcTestCase or RunSpec
*/
private final static String NULL = "null";
|
152,161 |
Bug 152161 Contribution: Support -Xset in Load-Time Weaving Configuration
|
I needed this to try out a setting in the pipelined compilation (-Xset:runMinimalMemory=true) ... I was able to verify that it parsed and set an option correctly in the debugger. I also have included a test that sets all the currently available options.
|
resolved fixed
|
039be68
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-08T13:50:57Z | 2006-07-28T15:20:00Z |
tests/src/org/aspectj/systemtest/ajc150/ltw/LTWTests.java
|
private Properties savedProperties;
protected void setSystemProperty (String key, String value) {
Properties systemProperties = System.getProperties();
copyProperty(key,systemProperties,savedProperties);
systemProperties.setProperty(key,value);
}
private static void copyProperty (String key, Properties from, Properties to) {
String value = from.getProperty(key,NULL);
to.setProperty(key,value);
}
protected void setUp() throws Exception {
super.setUp();
savedProperties = new Properties();
}
protected void tearDown() throws Exception {
super.tearDown();
Properties systemProperties = System.getProperties();
for (Enumeration enu = savedProperties.keys(); enu.hasMoreElements(); ) {
String key = (String)enu.nextElement();
String value = savedProperties.getProperty(key);
if (value == NULL) systemProperties.remove(key);
else systemProperties.setProperty(key,value);
}
}
}
|
148,219 |
Bug 148219 Wrong warning is reported
|
I used ajdt_1.3.1_for_eclipse_3.1.zip on Eclipse 3.1.2. Below is my aspectj code. public aspect MyMessages { pointcut getResourceString(String key): args(key, ..) && call (* CommonPlugin.getResourceString(String, ..)); String around(String key):getResourceString(key) { return key; } } The warning message is The parameter key is never read. See my screenshot.
|
resolved fixed
|
07c2189
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-08T15:37:36Z | 2006-06-22T15:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java
|
/* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
* All rights reserved.
* This program and the accompanying materials are made available
* under the terms of the Eclipse Public License v1.0
* which accompanies this distribution and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* PARC initial implementation
* ******************************************************************/
package org.aspectj.ajdt.internal.compiler.problem;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.lang.reflect.Modifier;
import java.util.Iterator;
import java.util.List;
import org.aspectj.ajdt.internal.compiler.ast.AspectDeclaration;
import org.aspectj.ajdt.internal.compiler.ast.PointcutDeclaration;
import org.aspectj.ajdt.internal.compiler.ast.Proceed;
|
148,219 |
Bug 148219 Wrong warning is reported
|
I used ajdt_1.3.1_for_eclipse_3.1.zip on Eclipse 3.1.2. Below is my aspectj code. public aspect MyMessages { pointcut getResourceString(String key): args(key, ..) && call (* CommonPlugin.getResourceString(String, ..)); String around(String key):getResourceString(key) { return key; } } The warning message is The parameter key is never read. See my screenshot.
|
resolved fixed
|
07c2189
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-08T15:37:36Z | 2006-06-22T15:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java
|
import org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory;
import org.aspectj.ajdt.internal.compiler.lookup.InterTypeMethodBinding;
import org.aspectj.ajdt.internal.compiler.lookup.PrivilegedFieldBinding;
import org.aspectj.bridge.context.CompilationAndWeavingContext;
import org.aspectj.org.eclipse.jdt.core.compiler.CharOperation;
import org.aspectj.org.eclipse.jdt.core.compiler.IProblem;
import org.aspectj.org.eclipse.jdt.internal.compiler.CompilationResult;
import org.aspectj.org.eclipse.jdt.internal.compiler.IErrorHandlingPolicy;
import org.aspectj.org.eclipse.jdt.internal.compiler.IProblemFactory;
import org.aspectj.org.eclipse.jdt.internal.compiler.ast.ASTNode;
import org.aspectj.org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration;
import org.aspectj.org.eclipse.jdt.internal.compiler.ast.Annotation;
import org.aspectj.org.eclipse.jdt.internal.compiler.ast.ExplicitConstructorCall;
import org.aspectj.org.eclipse.jdt.internal.compiler.ast.Expression;
import org.aspectj.org.eclipse.jdt.internal.compiler.ast.LocalDeclaration;
import org.aspectj.org.eclipse.jdt.internal.compiler.ast.QualifiedNameReference;
import org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration;
import org.aspectj.org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
import org.aspectj.org.eclipse.jdt.internal.compiler.impl.ReferenceContext;
import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ArrayBinding;
import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.MethodBinding;
import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding;
import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding;
import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.TagBits;
import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.TypeBinding;
import org.aspectj.org.eclipse.jdt.internal.compiler.problem.ProblemReporter;
import org.aspectj.util.FuzzyBoolean;
import org.aspectj.weaver.AjcMemberMaker;
import org.aspectj.weaver.ConcreteTypeMunger;
import org.aspectj.weaver.ResolvedMember;
|
148,219 |
Bug 148219 Wrong warning is reported
|
I used ajdt_1.3.1_for_eclipse_3.1.zip on Eclipse 3.1.2. Below is my aspectj code. public aspect MyMessages { pointcut getResourceString(String key): args(key, ..) && call (* CommonPlugin.getResourceString(String, ..)); String around(String key):getResourceString(key) { return key; } } The warning message is The parameter key is never read. See my screenshot.
|
resolved fixed
|
07c2189
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-08T15:37:36Z | 2006-06-22T15:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java
|
import org.aspectj.weaver.ResolvedType;
import org.aspectj.weaver.Shadow;
import org.aspectj.weaver.UnresolvedType;
import org.aspectj.weaver.patterns.DeclareAnnotation;
import org.aspectj.weaver.patterns.DeclareParents;
import org.aspectj.weaver.patterns.DeclareSoft;
import org.aspectj.weaver.patterns.TypePattern;
/**
* Extends problem reporter to support compiler-side implementation of declare soft.
* Also overrides error reporting for the need to implement abstract methods to
* account for inter-type declarations and pointcut declarations. This second
* job might be better done directly in the SourceTypeBinding/ClassScope classes.
*
* @author Jim Hugunin
*/
public class AjProblemReporter extends ProblemReporter {
private static final boolean DUMP_STACK = false;
public EclipseFactory factory;
public AjProblemReporter(
IErrorHandlingPolicy policy,
CompilerOptions options,
IProblemFactory problemFactory) {
super(policy, options, problemFactory);
}
public void unhandledException(
TypeBinding exceptionType,
|
148,219 |
Bug 148219 Wrong warning is reported
|
I used ajdt_1.3.1_for_eclipse_3.1.zip on Eclipse 3.1.2. Below is my aspectj code. public aspect MyMessages { pointcut getResourceString(String key): args(key, ..) && call (* CommonPlugin.getResourceString(String, ..)); String around(String key):getResourceString(key) { return key; } } The warning message is The parameter key is never read. See my screenshot.
|
resolved fixed
|
07c2189
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-08T15:37:36Z | 2006-06-22T15:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java
|
ASTNode location)
{
if (!factory.getWorld().getDeclareSoft().isEmpty()) {
Shadow callSite = factory.makeShadow(location, referenceContext);
Shadow enclosingExec = factory.makeShadow(referenceContext);
if ((callSite == null) && (enclosingExec.getKind() == Shadow.ConstructorExecution)
&& (location instanceof ExplicitConstructorCall)) {
super.unhandledException(exceptionType, location);
return;
}
for (Iterator i = factory.getWorld().getDeclareSoft().iterator(); i.hasNext(); ) {
DeclareSoft d = (DeclareSoft)i.next();
ResolvedType throwException = factory.fromEclipse((ReferenceBinding)exceptionType);
FuzzyBoolean isExceptionTypeOrSubtype =
d.getException().matchesInstanceof(throwException);
if (!isExceptionTypeOrSubtype.alwaysTrue() ) continue;
if (callSite != null) {
FuzzyBoolean match = d.getPointcut().match(callSite);
if (match.alwaysTrue()) {
return;
} else if (!match.alwaysFalse()) {
|
148,219 |
Bug 148219 Wrong warning is reported
|
I used ajdt_1.3.1_for_eclipse_3.1.zip on Eclipse 3.1.2. Below is my aspectj code. public aspect MyMessages { pointcut getResourceString(String key): args(key, ..) && call (* CommonPlugin.getResourceString(String, ..)); String around(String key):getResourceString(key) { return key; } } The warning message is The parameter key is never read. See my screenshot.
|
resolved fixed
|
07c2189
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-08T15:37:36Z | 2006-06-22T15:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java
|
}
}
if (enclosingExec != null) {
FuzzyBoolean match = d.getPointcut().match(enclosingExec);
if (match.alwaysTrue()) {
return;
} else if (!match.alwaysFalse()) {
}
}
}
}
if (location instanceof Proceed) {
return;
}
super.unhandledException(exceptionType, location);
}
private boolean isPointcutDeclaration(MethodBinding binding) {
return CharOperation.prefixEquals(PointcutDeclaration.mangledPrefix, binding.selector);
}
private boolean isIntertypeDeclaration(MethodBinding binding) {
return (binding instanceof InterTypeMethodBinding);
}
public void abstractMethodCannotBeOverridden(
|
148,219 |
Bug 148219 Wrong warning is reported
|
I used ajdt_1.3.1_for_eclipse_3.1.zip on Eclipse 3.1.2. Below is my aspectj code. public aspect MyMessages { pointcut getResourceString(String key): args(key, ..) && call (* CommonPlugin.getResourceString(String, ..)); String around(String key):getResourceString(key) { return key; } } The warning message is The parameter key is never read. See my screenshot.
|
resolved fixed
|
07c2189
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-08T15:37:36Z | 2006-06-22T15:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java
|
SourceTypeBinding type,
MethodBinding concreteMethod)
{
if (isPointcutDeclaration(concreteMethod)) {
return;
}
super.abstractMethodCannotBeOverridden(type, concreteMethod);
}
public void inheritedMethodReducesVisibility(SourceTypeBinding type, MethodBinding concreteMethod, MethodBinding[] abstractMethods) {
ResolvedType onTypeX = null;
if (!type.isAnonymousType()) {
onTypeX = factory.fromEclipse(type);
} else {
onTypeX = factory.fromEclipse(type.superclass());
}
for (Iterator i = onTypeX.getInterTypeMungersIncludingSupers().iterator(); i.hasNext(); ) {
ConcreteTypeMunger m = (ConcreteTypeMunger)i.next();
ResolvedMember sig = m.getSignature();
if (!Modifier.isAbstract(sig.getModifiers())) {
if (ResolvedType
.matches(
AjcMemberMaker.interMethod(
sig,
m.getAspectType(),
|
148,219 |
Bug 148219 Wrong warning is reported
|
I used ajdt_1.3.1_for_eclipse_3.1.zip on Eclipse 3.1.2. Below is my aspectj code. public aspect MyMessages { pointcut getResourceString(String key): args(key, ..) && call (* CommonPlugin.getResourceString(String, ..)); String around(String key):getResourceString(key) { return key; } } The warning message is The parameter key is never read. See my screenshot.
|
resolved fixed
|
07c2189
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-08T15:37:36Z | 2006-06-22T15:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java
|
sig.getDeclaringType().resolve(factory.getWorld()).isInterface()),
factory.makeResolvedMember(concreteMethod))) {
return;
}
}
}
super.inheritedMethodReducesVisibility(type,concreteMethod,abstractMethods);
}
public void staticAndInstanceConflict(MethodBinding currentMethod, MethodBinding inheritedMethod) {
if (currentMethod instanceof InterTypeMethodBinding) return;
if (inheritedMethod instanceof InterTypeMethodBinding) return;
super.staticAndInstanceConflict(currentMethod, inheritedMethod);
}
public void abstractMethodMustBeImplemented(
SourceTypeBinding type,
MethodBinding abstractMethod)
{
if (isPointcutDeclaration(abstractMethod)) return;
if (isIntertypeDeclaration(abstractMethod)) return;
if (CharOperation.prefixEquals("ajc$interField".toCharArray(), abstractMethod.selector)) {
return;
}
|
148,219 |
Bug 148219 Wrong warning is reported
|
I used ajdt_1.3.1_for_eclipse_3.1.zip on Eclipse 3.1.2. Below is my aspectj code. public aspect MyMessages { pointcut getResourceString(String key): args(key, ..) && call (* CommonPlugin.getResourceString(String, ..)); String around(String key):getResourceString(key) { return key; } } The warning message is The parameter key is never read. See my screenshot.
|
resolved fixed
|
07c2189
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-08T15:37:36Z | 2006-06-22T15:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java
|
ResolvedType onTypeX = null;
if (!type.isAnonymousType()) {
onTypeX = factory.fromEclipse(type);
} else {
onTypeX = factory.fromEclipse(type.superclass());
}
for (Iterator i = onTypeX.getInterTypeMungersIncludingSupers().iterator(); i.hasNext(); ) {
ConcreteTypeMunger m = (ConcreteTypeMunger)i.next();
ResolvedMember sig = m.getSignature();
if (!Modifier.isAbstract(sig.getModifiers())) {
if (ResolvedType
.matches(
AjcMemberMaker.interMethod(
sig,
m.getAspectType(),
sig.getDeclaringType().resolve(factory.getWorld()).isInterface()),
factory.makeResolvedMember(abstractMethod))) {
return;
}
}
}
super.abstractMethodMustBeImplemented(type, abstractMethod);
}
/* (non-Javadoc)
|
148,219 |
Bug 148219 Wrong warning is reported
|
I used ajdt_1.3.1_for_eclipse_3.1.zip on Eclipse 3.1.2. Below is my aspectj code. public aspect MyMessages { pointcut getResourceString(String key): args(key, ..) && call (* CommonPlugin.getResourceString(String, ..)); String around(String key):getResourceString(key) { return key; } } The warning message is The parameter key is never read. See my screenshot.
|
resolved fixed
|
07c2189
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-08T15:37:36Z | 2006-06-22T15:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java
|
* @see org.aspectj.org.eclipse.jdt.internal.compiler.problem.ProblemReporter#disallowedTargetForAnnotation(org.aspectj.org.eclipse.jdt.internal.compiler.ast.Annotation)
*/
public void disallowedTargetForAnnotation(Annotation annotation) {
if (annotation.recipient instanceof MethodBinding) {
MethodBinding binding = (MethodBinding) annotation.recipient;
String name = new String(binding.selector);
if (name.startsWith("ajc$")) {
long metaTagBits = annotation.resolvedType.getAnnotationTagBits();
if (name.indexOf("interField") != -1) {
if ((metaTagBits & TagBits.AnnotationForField) != 0) return;
} else if (name.indexOf("interConstructor") != -1) {
if ((metaTagBits & TagBits.AnnotationForConstructor) != 0) return;
} else if (name.indexOf("interMethod") != -1) {
if ((metaTagBits & TagBits.AnnotationForMethod) != 0) return;
} else if (name.indexOf("declare_"+DeclareAnnotation.AT_TYPE+"_")!=-1) {
if ((metaTagBits & TagBits.AnnotationForAnnotationType)!=0 ||
(metaTagBits & TagBits.AnnotationForType)!=0) return;
} else if (name.indexOf("declare_"+DeclareAnnotation.AT_FIELD+"_")!=-1) {
if ((metaTagBits & TagBits.AnnotationForField)!=0) return;
} else if (name.indexOf("declare_"+DeclareAnnotation.AT_CONSTRUCTOR+"_")!=-1) {
if ((metaTagBits & TagBits.AnnotationForConstructor)!=0) return;
} else if (name.indexOf("declare_eow") != -1) {
if ((metaTagBits & TagBits.AnnotationForField) != 0) return;
}
}
}
super.disallowedTargetForAnnotation(annotation);
|
148,219 |
Bug 148219 Wrong warning is reported
|
I used ajdt_1.3.1_for_eclipse_3.1.zip on Eclipse 3.1.2. Below is my aspectj code. public aspect MyMessages { pointcut getResourceString(String key): args(key, ..) && call (* CommonPlugin.getResourceString(String, ..)); String around(String key):getResourceString(key) { return key; } } The warning message is The parameter key is never read. See my screenshot.
|
resolved fixed
|
07c2189
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-08T15:37:36Z | 2006-06-22T15:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java
|
}
public void overridesPackageDefaultMethod(MethodBinding localMethod, MethodBinding inheritedMethod) {
if (new String(localMethod.selector).startsWith("ajc$")) return;
super.overridesPackageDefaultMethod(localMethod,inheritedMethod);
}
public void handle(
int problemId,
String[] problemArguments,
String[] messageArguments,
int severity,
int problemStartPosition,
int problemEndPosition,
ReferenceContext referenceContext,
CompilationResult unitResult)
{
if (severity != Ignore && DUMP_STACK) {
Thread.dumpStack();
}
super.handle(
problemId,
problemArguments,
messageArguments,
severity,
problemStartPosition,
problemEndPosition,
referenceContext,
unitResult);
}
|
148,219 |
Bug 148219 Wrong warning is reported
|
I used ajdt_1.3.1_for_eclipse_3.1.zip on Eclipse 3.1.2. Below is my aspectj code. public aspect MyMessages { pointcut getResourceString(String key): args(key, ..) && call (* CommonPlugin.getResourceString(String, ..)); String around(String key):getResourceString(key) { return key; } } The warning message is The parameter key is never read. See my screenshot.
|
resolved fixed
|
07c2189
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-08T15:37:36Z | 2006-06-22T15:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java
|
public void javadocMissingParamTag(char[] name, int sourceStart, int sourceEnd, int modifiers) {
boolean reportIt = true;
String sName = new String(name);
if (sName.startsWith("ajc$")) reportIt = false;
if (sName.equals("thisJoinPoint")) reportIt = false;
if (sName.equals("thisJoinPointStaticPart")) reportIt = false;
if (sName.equals("thisEnclosingJoinPointStaticPart")) reportIt = false;
if (sName.equals("ajc_aroundClosure")) reportIt = false;
if (reportIt)
super.javadocMissingParamTag(name,sourceStart,sourceEnd,modifiers);
}
public void abstractMethodInAbstractClass(SourceTypeBinding type, AbstractMethodDeclaration methodDecl) {
String abstractMethodName = new String(methodDecl.selector);
if (abstractMethodName.startsWith("ajc$pointcut")) {
return;
}
String[] arguments = new String[] {new String(type.sourceName()), abstractMethodName};
super.handle(
IProblem.AbstractMethodInAbstractClass,
arguments,
arguments,
methodDecl.sourceStart,
methodDecl.sourceEnd,this.referenceContext,
this.referenceContext == null ? null : this.referenceContext.compilationResult());
}
|
148,219 |
Bug 148219 Wrong warning is reported
|
I used ajdt_1.3.1_for_eclipse_3.1.zip on Eclipse 3.1.2. Below is my aspectj code. public aspect MyMessages { pointcut getResourceString(String key): args(key, ..) && call (* CommonPlugin.getResourceString(String, ..)); String around(String key):getResourceString(key) { return key; } } The warning message is The parameter key is never read. See my screenshot.
|
resolved fixed
|
07c2189
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-08T15:37:36Z | 2006-06-22T15:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java
|
/**
* Called when there is an ITD marked @override that doesn't override a supertypes method.
* The method and the binding are passed - some information is useful from each. The 'method'
* knows about source offsets for the message, the 'binding' has the signature of what the
* ITD is trying to be in the target class.
*/
public void itdMethodMustOverride(AbstractMethodDeclaration method,MethodBinding binding) {
this.handle(
IProblem.MethodMustOverride,
new String[] {new String(binding.selector), typesAsString(binding.isVarargs(), binding.parameters, false), new String(binding.declaringClass.readableName()), },
new String[] {new String(binding.selector), typesAsString(binding.isVarargs(), binding.parameters, true), new String(binding.declaringClass.shortReadableName()),},
method.sourceStart,
method.sourceEnd,
this.referenceContext,
this.referenceContext == null ? null : this.referenceContext.compilationResult());
}
/**
* Overrides the implementation in ProblemReporter and is ITD aware.
* To report a *real* problem with an ITD marked @override, the other methodMustOverride() method is used.
*/
public void methodMustOverride(AbstractMethodDeclaration method) {
MethodBinding binding = method.binding;
if (new String(method.selector).startsWith("ajc$")) return;
ResolvedMember possiblyErroneousRm = factory.makeResolvedMember(method.binding);
ResolvedType onTypeX = factory.fromEclipse(method.binding.declaringClass);
|
148,219 |
Bug 148219 Wrong warning is reported
|
I used ajdt_1.3.1_for_eclipse_3.1.zip on Eclipse 3.1.2. Below is my aspectj code. public aspect MyMessages { pointcut getResourceString(String key): args(key, ..) && call (* CommonPlugin.getResourceString(String, ..)); String around(String key):getResourceString(key) { return key; } } The warning message is The parameter key is never read. See my screenshot.
|
resolved fixed
|
07c2189
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-08T15:37:36Z | 2006-06-22T15:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java
|
ResolvedType supertypeToLookAt = onTypeX.getSuperclass();
while (supertypeToLookAt!=null) {
List itMungers = supertypeToLookAt.getInterTypeMungers();
for (Iterator i = itMungers.iterator(); i.hasNext(); ) {
ConcreteTypeMunger m = (ConcreteTypeMunger)i.next();
ResolvedMember sig = m.getSignature();
ResolvedMember rm = AjcMemberMaker.interMethod(sig,m.getAspectType(),
sig.getDeclaringType().resolve(factory.getWorld()).isInterface());
if (ResolvedType.matches(rm,possiblyErroneousRm)) {
return;
}
}
supertypeToLookAt = supertypeToLookAt.getSuperclass();
}
super.methodMustOverride(method);
}
private String typesAsString(boolean isVarargs, TypeBinding[] types, boolean makeShort) {
StringBuffer buffer = new StringBuffer(10);
for (int i = 0, length = types.length; i < length; i++) {
if (i != 0)
buffer.append(", ");
TypeBinding type = types[i];
boolean isVarargType = isVarargs && i == length-1;
|
148,219 |
Bug 148219 Wrong warning is reported
|
I used ajdt_1.3.1_for_eclipse_3.1.zip on Eclipse 3.1.2. Below is my aspectj code. public aspect MyMessages { pointcut getResourceString(String key): args(key, ..) && call (* CommonPlugin.getResourceString(String, ..)); String around(String key):getResourceString(key) { return key; } } The warning message is The parameter key is never read. See my screenshot.
|
resolved fixed
|
07c2189
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-08T15:37:36Z | 2006-06-22T15:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java
|
if (isVarargType) type = ((ArrayBinding)type).elementsType();
buffer.append(new String(makeShort ? type.shortReadableName() : type.readableName()));
if (isVarargType) buffer.append("...");
}
return buffer.toString();
}
public void visibilityConflict(MethodBinding currentMethod, MethodBinding inheritedMethod) {
if (isIntertypeDeclaration(currentMethod) &&
isIntertypeDeclaration(inheritedMethod) &&
Modifier.isPrivate(currentMethod.modifiers) &&
Modifier.isPrivate(inheritedMethod.modifiers)) {
return;
}
super.visibilityConflict(currentMethod,inheritedMethod);
}
public void unusedPrivateType(TypeDeclaration typeDecl) {
if (typeDecl instanceof AspectDeclaration) return;
if (typeDecl.enclosingType!=null && (typeDecl.enclosingType instanceof AspectDeclaration)) {
AspectDeclaration ad = (AspectDeclaration)typeDecl.enclosingType;
if (ad.concreteName!=null) {
List declares = ad.concreteName.declares;
for (Iterator iter = declares.iterator(); iter.hasNext();) {
Object dec = (Object) iter.next();
if (dec instanceof DeclareParents) {
DeclareParents decp = (DeclareParents)dec;
|
148,219 |
Bug 148219 Wrong warning is reported
|
I used ajdt_1.3.1_for_eclipse_3.1.zip on Eclipse 3.1.2. Below is my aspectj code. public aspect MyMessages { pointcut getResourceString(String key): args(key, ..) && call (* CommonPlugin.getResourceString(String, ..)); String around(String key):getResourceString(key) { return key; } } The warning message is The parameter key is never read. See my screenshot.
|
resolved fixed
|
07c2189
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-08T15:37:36Z | 2006-06-22T15:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java
|
TypePattern[] newparents = decp.getParents().getTypePatterns();
for (int i = 0; i < newparents.length; i++) {
TypePattern pattern = newparents[i];
UnresolvedType ut = pattern.getExactType();
if (ut==null) continue;
if (CharOperation.compareWith(typeDecl.binding.signature(),ut.getSignature().toCharArray())==0) return;
}
}
}
}
}
super.unusedPrivateType(typeDecl);
}
public void unusedPrivateMethod(AbstractMethodDeclaration methodDecl) {
if (!(methodDecl instanceof PointcutDeclaration))
super.unusedPrivateMethod(methodDecl);
}
public void caseExpressionMustBeConstant(Expression expression) {
if (expression instanceof QualifiedNameReference) {
QualifiedNameReference qnr = (QualifiedNameReference)expression;
if (qnr.otherBindings!=null && qnr.otherBindings.length>0 && qnr.otherBindings[0] instanceof PrivilegedFieldBinding) {
super.signalError(expression.sourceStart,expression.sourceEnd,"Fields accessible due to an aspect being privileged can not be used in switch statements");
referenceContext.tagAsHavingErrors();
return;
}
}
super.caseExpressionMustBeConstant(expression);
}
|
148,219 |
Bug 148219 Wrong warning is reported
|
I used ajdt_1.3.1_for_eclipse_3.1.zip on Eclipse 3.1.2. Below is my aspectj code. public aspect MyMessages { pointcut getResourceString(String key): args(key, ..) && call (* CommonPlugin.getResourceString(String, ..)); String around(String key):getResourceString(key) { return key; } } The warning message is The parameter key is never read. See my screenshot.
|
resolved fixed
|
07c2189
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-08T15:37:36Z | 2006-06-22T15:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java
|
public void unusedArgument(LocalDeclaration localDecl) {
String argType = new String(localDecl.type.resolvedType.signature());
if (argType.startsWith("Lorg/aspectj/runtime/internal")) return;
super.unusedArgument(localDecl);
}
/**
* A side-effect of the way that we handle itds on default methods on top-most implementors
* of interfaces is that a class acquiring a final default ITD will erroneously report
* that it can't override its own member. This method detects that situation.
*/
public void finalMethodCannotBeOverridden(MethodBinding currentMethod, MethodBinding inheritedMethod) {
if (currentMethod == inheritedMethod) return;
super.finalMethodCannotBeOverridden(currentMethod, inheritedMethod);
}
/**
* The method verifier is a bit 'keen' and doesn't cope well with ITDMs which are
* of course to be considered a 'default' implementation if the target type doesn't
* supply one. This test may not be complete - it is possible that it should read if
* *either* is an ITD...but I dont have a testcase that shows that is required. yet.
* (pr115788)
*/
public void duplicateInheritedMethods(SourceTypeBinding type, MethodBinding inheritedMethod1, MethodBinding inheritedMethod2) {
if (!(inheritedMethod1 instanceof InterTypeMethodBinding &&
inheritedMethod2 instanceof InterTypeMethodBinding))
super.duplicateInheritedMethods(type,inheritedMethod1,inheritedMethod2);
}
|
148,219 |
Bug 148219 Wrong warning is reported
|
I used ajdt_1.3.1_for_eclipse_3.1.zip on Eclipse 3.1.2. Below is my aspectj code. public aspect MyMessages { pointcut getResourceString(String key): args(key, ..) && call (* CommonPlugin.getResourceString(String, ..)); String around(String key):getResourceString(key) { return key; } } The warning message is The parameter key is never read. See my screenshot.
|
resolved fixed
|
07c2189
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-08T15:37:36Z | 2006-06-22T15:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java
|
/**
* All problems end up routed through here at some point...
*/
public IProblem createProblem(char[] fileName, int problemId, String[] problemArguments, String[] messageArguments, int severity, int problemStartPosition, int problemEndPosition, int lineNumber) {
IProblem problem = super.createProblem(fileName, problemId, problemArguments,
messageArguments, severity, problemStartPosition, problemEndPosition,
lineNumber);
if (factory.getWorld().isInPinpointMode()) {
MessageIssued ex = new MessageIssued();
ex.fillInStackTrace();
StringWriter sw = new StringWriter();
ex.printStackTrace(new PrintWriter(sw));
StringBuffer sb = new StringBuffer();
sb.append(CompilationAndWeavingContext.getCurrentContext());
sb.append(sw.toString());
problem = new PinpointedProblem(problem,sb.toString());
}
return problem;
}
private static class MessageIssued extends RuntimeException {
public String getMessage() {
return "message issued...";
}
}
private static class PinpointedProblem implements IProblem {
private IProblem delegate;
private String message;
|
148,219 |
Bug 148219 Wrong warning is reported
|
I used ajdt_1.3.1_for_eclipse_3.1.zip on Eclipse 3.1.2. Below is my aspectj code. public aspect MyMessages { pointcut getResourceString(String key): args(key, ..) && call (* CommonPlugin.getResourceString(String, ..)); String around(String key):getResourceString(key) { return key; } } The warning message is The parameter key is never read. See my screenshot.
|
resolved fixed
|
07c2189
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-08T15:37:36Z | 2006-06-22T15:26:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java
|
public PinpointedProblem(IProblem aProblem, String pinpoint) {
this.delegate = aProblem;
if (delegate.getMessage().indexOf("message issued...") == -1) {
this.message = delegate.getMessage() + "\n" + pinpoint;
} else {
this.message = delegate.getMessage();
}
}
public String[] getArguments() {return delegate.getArguments();}
public int getID() {return delegate.getID();}
public String getMessage() { return message; }
public char[] getOriginatingFileName() {return delegate.getOriginatingFileName();}
public int getSourceEnd() { return delegate.getSourceEnd();}
public int getSourceLineNumber() { return delegate.getSourceLineNumber();}
public int getSourceStart() { return delegate.getSourceStart();}
public boolean isError() { return delegate.isError();}
public boolean isWarning() { return delegate.isWarning();}
public void setSourceEnd(int sourceEnd) { delegate.setSourceEnd(sourceEnd); }
public void setSourceLineNumber(int lineNumber) { delegate.setSourceLineNumber(lineNumber);}
public void setSourceStart(int sourceStart) { delegate.setSourceStart(sourceStart);}
public void setSeeAlsoProblems(IProblem[] problems) { delegate.setSeeAlsoProblems(problems);}
public IProblem[] seeAlso() { return delegate.seeAlso();}
public void setSupplementaryMessageInfo(String msg) { delegate.setSupplementaryMessageInfo(msg);}
public String getSupplementaryMessageInfo() { return delegate.getSupplementaryMessageInfo();}
}
}
|
148,219 |
Bug 148219 Wrong warning is reported
|
I used ajdt_1.3.1_for_eclipse_3.1.zip on Eclipse 3.1.2. Below is my aspectj code. public aspect MyMessages { pointcut getResourceString(String key): args(key, ..) && call (* CommonPlugin.getResourceString(String, ..)); String around(String key):getResourceString(key) { return key; } } The warning message is The parameter key is never read. See my screenshot.
|
resolved fixed
|
07c2189
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-08T15:37:36Z | 2006-06-22T15:26:40Z |
tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java
|
/*******************************************************************************
* Copyright (c) 2006 IBM
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Andy Clement - initial API and implementation
*******************************************************************************/
package org.aspectj.systemtest.ajc153;
import java.io.File;
import junit.framework.Test;
import org.aspectj.testing.Utils;
import org.aspectj.testing.XMLBasedAjcTestCase;
import org.aspectj.weaver.bcel.Utility;
public class Ajc153Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
|
148,219 |
Bug 148219 Wrong warning is reported
|
I used ajdt_1.3.1_for_eclipse_3.1.zip on Eclipse 3.1.2. Below is my aspectj code. public aspect MyMessages { pointcut getResourceString(String key): args(key, ..) && call (* CommonPlugin.getResourceString(String, ..)); String around(String key):getResourceString(key) { return key; } } The warning message is The parameter key is never read. See my screenshot.
|
resolved fixed
|
07c2189
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-08T15:37:36Z | 2006-06-22T15:26:40Z |
tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java
|
public void testDecpAndCflowadderMungerClash_pr152631() { runTest("decp and cflowadder munger clash");}
public void testGenericInheritanceDecp_pr150095() { runTest("generics, inheritance and decp");}
public void testIllegalStateException_pr148737() { runTest("illegalstateexception for non generic type");}
public void testAtajInheritance_pr149305_1() { runTest("ataj inheritance - 1");}
public void testAtajInheritance_pr149305_2() { runTest("ataj inheritance - 2");}
public void testAtajInheritance_pr149305_3() { runTest("ataj inheritance - 3");}
public void testVerificationFailureForAspectOf_pr148693() {
runTest("verification problem");
Utils.verifyClass(ajc,"mypackage.MyAspect");
}
|
148,219 |
Bug 148219 Wrong warning is reported
|
I used ajdt_1.3.1_for_eclipse_3.1.zip on Eclipse 3.1.2. Below is my aspectj code. public aspect MyMessages { pointcut getResourceString(String key): args(key, ..) && call (* CommonPlugin.getResourceString(String, ..)); String around(String key):getResourceString(key) { return key; } } The warning message is The parameter key is never read. See my screenshot.
|
resolved fixed
|
07c2189
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-08T15:37:36Z | 2006-06-22T15:26:40Z |
tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java
|
public void testIncorrectAnnotationValue_pr148537() { runTest("incorrect annotation value");}
public void testVerifyErrNoTypeCflowField_pr145693_1() { runTest("verifyErrNoTypeCflowField"); }
public void testVerifyErrInpathNoTypeCflowField_pr145693_2() { runTest("verifyErrInpathNoTypeCflowField"); }
public void testCpathNoTypeCflowField_pr145693_3() { runTest("cpathNoTypeCflowField"); }
public void testGenericSignatures_pr148409() { runTest("generic signature problem"); }
public void testCantFindType_pr149322_01() {runTest("can't find type on interface call 1");}
public void testCantFindType_pr149322_02() {runTest("can't find type on interface call 2");}
public void testCantFindType_pr149322_03() {runTest("can't find type on interface call 3");}
public void testParsingBytecodeLess_pr152871() {
Utility.testingParseCounter=0;
runTest("parsing bytecode less");
assertTrue("Should have called parse 5 times, not "+Utility.testingParseCounter+" times",Utility.testingParseCounter==5);
}
public void testMatchVolatileField_pr150671() {runTest("match volatile field");};
public void testDuplicateJVMTIAgents_pr151938() {runTest("Duplicate JVMTI agents");};
public static Test suite() {
return XMLBasedAjcTestCase.loadSuite(Ajc153Tests.class);
}
protected File getSpecFile() {
return new File("../tests/src/org/aspectj/systemtest/ajc153/ajc153.xml");
}
}
|
153,535 |
Bug 153535 Bug in reflection delegate signature for array of object type
|
The following problem is interesting because the advice weaves correctly with Java 1.5 LTW and also using Java 1.4 with build-time weaving. However, the following call pointcut isn't matching the expected call site in Java 1.4 load-time weaving (*). Pointcut: private pointcut inExecQuery() : (within(uk.ltd.getahead.dwr.impl.ExecuteQuery) || within(uk.ltd.getahead.dwr.ExecuteQuery)); public pointcut dwrQuery(Method method, Object receiver, Object[] params) : inExecQuery() && withincode(* execute(..)) && call(* Method.invoke(..)) && args(receiver, params) && target(method); protected pointcut monitorEnd() : dwrQuery(*, *, *); Matching call site: Object reply = method.invoke(object, params); I've tracked it down to failing to find the method in ResolvedType.matches. On line 405: "m1.getSignature()"= "(Ljava/lang/Object;[Ljava.lang.Object;)Ljava/lang/Object;" "m2.getSignature()"= "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;" Note the difference between . and / ^ ^ It looks to me like the signature for array types in the reflection delegate is erroneously using . instead of /. I have attached a patch to the ReflectionBasedReferenceTypeDelegateTest that isolates this unexpected signature return. Hopefully you agree that this is not correct. If not, some more information follows. Here's the stack trace where the match fails: ResolvedType.matches(Member, Member) line: 405 ReferenceType(ResolvedType).lookupMember(Member, Iterator) line: 347 ReferenceType(ResolvedType).lookupMethod(Member) line: 326 LTWWorld(World).resolve(Member) line: 504 MemberImpl.resolve(World) line: 93 JoinPointSignatureIterator.addSignaturesUpToFirstDefiningMember() line: 109 JoinPointSignatureIterator.<init>(Member, World) line: 51 MemberImpl.getJoinPointSignatures(World) line: 943 SignaturePattern.matches(Member, World, boolean) line: 286 KindedPointcut.matchInternal(Shadow) line: 106 KindedPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 53 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 OrPointcut.matchInternal(Shadow) line: 50 OrPointcut(Pointcut).match(Shadow) line: 146 BcelAdvice(ShadowMunger).match(Shadow, World) line: 71 BcelAdvice(Advice).match(Shadow, World) line: 112 BcelAdvice.match(Shadow, World) line: 107 BcelClassWeaver.match(BcelShadow, List) line: 2806 BcelClassWeaver.matchInvokeInstruction(LazyMethodGen, InstructionHandle, InvokeInstruction, BcelShadow, List) line: 2768 BcelClassWeaver.match(LazyMethodGen, InstructionHandle, BcelShadow, List) line: 2506 BcelClassWeaver.match(LazyMethodGen) line: 2332 BcelClassWeaver.weave() line: 494 BcelClassWeaver.weave(BcelWorld, LazyClassGen, List, List, List) line: 119 BcelWeaver.weave(UnwovenClassFile, BcelObjectType, boolean) line: 1613 BcelWeaver.weaveWithoutDump(UnwovenClassFile, BcelObjectType) line: 1564 BcelWeaver.weaveAndNotify(UnwovenClassFile, BcelObjectType, IWeaveRequestor) line: 1341 BcelWeaver.weave(IClassFileProvider) line: 1163 ClassLoaderWeavingAdaptor(WeavingAdaptor).getWovenBytes(String, byte[]) line: 319 ClassLoaderWeavingAdaptor(WeavingAdaptor).weaveClass(String, byte[]) line: 225 Aj.preProcess(String, byte[], ClassLoader) line: 77 ClassPreProcessorAdapter.preProcess(String, byte[], ClassLoader) line: 67 ClassPreProcessorHelper.defineClass0Pre(ClassLoader, String, byte[], int, int, ProtectionDomain) line: 107 WebappClassLoader(ClassLoader).defineClass(String, byte[], int, int, ProtectionDomain) line: 539 WebappClassLoader(SecureClassLoader).defineClass(String, byte[], int, int, CodeSource) line: 123 WebappClassLoader.findClassInternal(String) line: 1786 WebappClassLoader.findClass(String) line: 1048 WebappClassLoader.loadClass(String, boolean) line: 1506 WebappClassLoader.loadClass(String) line: 1385 WebappClassLoader(ClassLoader).loadClassInternal(String) line: 302 Class.forName0(String, boolean, ClassLoader) line: not available [native method] Class.forName(String) line: 141 InitializeLog.setWarnLogging(String) line: 121 InitializeLog.initializeLogging() line: 96 ContextLoaderServlet.init() line: 13 ContextLoaderServlet(GenericServlet).init(ServletConfig) line: 212 StandardWrapper.loadServlet() line: 879 StandardWrapper.load() line: 767 StandardContext.loadOnStartup(Container[]) line: 3483 StandardContext.start() line: 3709 StandardHost(ContainerBase).addChildInternal(Container) line: 776 StandardHost(ContainerBase).addChild(Container) line: 759 StandardHost.addChild(Container) line: 537 StandardHostDeployer.install(String, URL) line: 260 StandardHost.install(String, URL) line: 730 HostConfig.deployWARs(File, String[]) line: 558 HostConfig.deployApps() line: 373 HostConfig.start() line: 784 HostConfig.lifecycleEvent(LifecycleEvent) line: 330 LifecycleSupport.fireLifecycleEvent(String, Object) line: 119 StandardHost(ContainerBase).start() line: 1155 StandardHost.start() line: 696 StandardEngine(ContainerBase).start() line: 1147 StandardEngine.start() line: 310 StandardService.start() line: 449 StandardServer.start() line: 2212 Catalina.start() line: 458 Catalina.execute() line: 345 Catalina.process(String[]) line: 129 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 Method.invoke(Object, Object[]) line: 324 Bootstrap.main(String[]) line: 150 I'm using a modified version of Alex Vasseur's LTW plugin for a Java 1.4 VM although I haven't tested on the JRockIt plugin for a 1.4 VM: my guess is that this would fail there too.
|
resolved fixed
|
82e3e13
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-15T11:51:21Z | 2006-08-11T07:06:40Z |
weaver/src/org/aspectj/weaver/reflect/ReflectionWorld.java
|
/* *******************************************************************
* Copyright (c) 2005 Contributors.
* All rights reserved.
* This program and the accompanying materials are made available
* under the terms of the Eclipse Public License v1.0
* which accompanies this distribution and is available at
* http://eclipse.org/legal/epl-v10.html
*
* Contributors:
* Adrian Colyer Initial implementation
* ******************************************************************/
package org.aspectj.weaver.reflect;
import org.aspectj.bridge.AbortException;
import org.aspectj.bridge.IMessage;
import org.aspectj.bridge.IMessageHandler;
import org.aspectj.util.LangUtil;
import org.aspectj.weaver.Advice;
import org.aspectj.weaver.BCException;
import org.aspectj.weaver.ConcreteTypeMunger;
import org.aspectj.weaver.Member;
import org.aspectj.weaver.ReferenceType;
import org.aspectj.weaver.ReferenceTypeDelegate;
|
153,535 |
Bug 153535 Bug in reflection delegate signature for array of object type
|
The following problem is interesting because the advice weaves correctly with Java 1.5 LTW and also using Java 1.4 with build-time weaving. However, the following call pointcut isn't matching the expected call site in Java 1.4 load-time weaving (*). Pointcut: private pointcut inExecQuery() : (within(uk.ltd.getahead.dwr.impl.ExecuteQuery) || within(uk.ltd.getahead.dwr.ExecuteQuery)); public pointcut dwrQuery(Method method, Object receiver, Object[] params) : inExecQuery() && withincode(* execute(..)) && call(* Method.invoke(..)) && args(receiver, params) && target(method); protected pointcut monitorEnd() : dwrQuery(*, *, *); Matching call site: Object reply = method.invoke(object, params); I've tracked it down to failing to find the method in ResolvedType.matches. On line 405: "m1.getSignature()"= "(Ljava/lang/Object;[Ljava.lang.Object;)Ljava/lang/Object;" "m2.getSignature()"= "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;" Note the difference between . and / ^ ^ It looks to me like the signature for array types in the reflection delegate is erroneously using . instead of /. I have attached a patch to the ReflectionBasedReferenceTypeDelegateTest that isolates this unexpected signature return. Hopefully you agree that this is not correct. If not, some more information follows. Here's the stack trace where the match fails: ResolvedType.matches(Member, Member) line: 405 ReferenceType(ResolvedType).lookupMember(Member, Iterator) line: 347 ReferenceType(ResolvedType).lookupMethod(Member) line: 326 LTWWorld(World).resolve(Member) line: 504 MemberImpl.resolve(World) line: 93 JoinPointSignatureIterator.addSignaturesUpToFirstDefiningMember() line: 109 JoinPointSignatureIterator.<init>(Member, World) line: 51 MemberImpl.getJoinPointSignatures(World) line: 943 SignaturePattern.matches(Member, World, boolean) line: 286 KindedPointcut.matchInternal(Shadow) line: 106 KindedPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 53 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 OrPointcut.matchInternal(Shadow) line: 50 OrPointcut(Pointcut).match(Shadow) line: 146 BcelAdvice(ShadowMunger).match(Shadow, World) line: 71 BcelAdvice(Advice).match(Shadow, World) line: 112 BcelAdvice.match(Shadow, World) line: 107 BcelClassWeaver.match(BcelShadow, List) line: 2806 BcelClassWeaver.matchInvokeInstruction(LazyMethodGen, InstructionHandle, InvokeInstruction, BcelShadow, List) line: 2768 BcelClassWeaver.match(LazyMethodGen, InstructionHandle, BcelShadow, List) line: 2506 BcelClassWeaver.match(LazyMethodGen) line: 2332 BcelClassWeaver.weave() line: 494 BcelClassWeaver.weave(BcelWorld, LazyClassGen, List, List, List) line: 119 BcelWeaver.weave(UnwovenClassFile, BcelObjectType, boolean) line: 1613 BcelWeaver.weaveWithoutDump(UnwovenClassFile, BcelObjectType) line: 1564 BcelWeaver.weaveAndNotify(UnwovenClassFile, BcelObjectType, IWeaveRequestor) line: 1341 BcelWeaver.weave(IClassFileProvider) line: 1163 ClassLoaderWeavingAdaptor(WeavingAdaptor).getWovenBytes(String, byte[]) line: 319 ClassLoaderWeavingAdaptor(WeavingAdaptor).weaveClass(String, byte[]) line: 225 Aj.preProcess(String, byte[], ClassLoader) line: 77 ClassPreProcessorAdapter.preProcess(String, byte[], ClassLoader) line: 67 ClassPreProcessorHelper.defineClass0Pre(ClassLoader, String, byte[], int, int, ProtectionDomain) line: 107 WebappClassLoader(ClassLoader).defineClass(String, byte[], int, int, ProtectionDomain) line: 539 WebappClassLoader(SecureClassLoader).defineClass(String, byte[], int, int, CodeSource) line: 123 WebappClassLoader.findClassInternal(String) line: 1786 WebappClassLoader.findClass(String) line: 1048 WebappClassLoader.loadClass(String, boolean) line: 1506 WebappClassLoader.loadClass(String) line: 1385 WebappClassLoader(ClassLoader).loadClassInternal(String) line: 302 Class.forName0(String, boolean, ClassLoader) line: not available [native method] Class.forName(String) line: 141 InitializeLog.setWarnLogging(String) line: 121 InitializeLog.initializeLogging() line: 96 ContextLoaderServlet.init() line: 13 ContextLoaderServlet(GenericServlet).init(ServletConfig) line: 212 StandardWrapper.loadServlet() line: 879 StandardWrapper.load() line: 767 StandardContext.loadOnStartup(Container[]) line: 3483 StandardContext.start() line: 3709 StandardHost(ContainerBase).addChildInternal(Container) line: 776 StandardHost(ContainerBase).addChild(Container) line: 759 StandardHost.addChild(Container) line: 537 StandardHostDeployer.install(String, URL) line: 260 StandardHost.install(String, URL) line: 730 HostConfig.deployWARs(File, String[]) line: 558 HostConfig.deployApps() line: 373 HostConfig.start() line: 784 HostConfig.lifecycleEvent(LifecycleEvent) line: 330 LifecycleSupport.fireLifecycleEvent(String, Object) line: 119 StandardHost(ContainerBase).start() line: 1155 StandardHost.start() line: 696 StandardEngine(ContainerBase).start() line: 1147 StandardEngine.start() line: 310 StandardService.start() line: 449 StandardServer.start() line: 2212 Catalina.start() line: 458 Catalina.execute() line: 345 Catalina.process(String[]) line: 129 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 Method.invoke(Object, Object[]) line: 324 Bootstrap.main(String[]) line: 150 I'm using a modified version of Alex Vasseur's LTW plugin for a Java 1.4 VM although I haven't tested on the JRockIt plugin for a 1.4 VM: my guess is that this would fail there too.
|
resolved fixed
|
82e3e13
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-15T11:51:21Z | 2006-08-11T07:06:40Z |
weaver/src/org/aspectj/weaver/reflect/ReflectionWorld.java
|
import org.aspectj.weaver.ResolvedMember;
import org.aspectj.weaver.ResolvedType;
import org.aspectj.weaver.ResolvedTypeMunger;
import org.aspectj.weaver.UnresolvedType;
import org.aspectj.weaver.World;
import org.aspectj.weaver.AjAttribute.AdviceAttribute;
import org.aspectj.weaver.patterns.Pointcut;
import org.aspectj.weaver.patterns.PerClause.Kind;
/**
* A ReflectionWorld is used solely for purposes of type resolution based on
* the runtime classpath (java.lang.reflect). It does not support weaving operations
* (creation of mungers etc..).
*
*/
public class ReflectionWorld extends World implements IReflectionWorld {
private ClassLoader classLoader;
private AnnotationFinder annotationFinder;
private ReflectionWorld() {
super();
this.setMessageHandler(new ExceptionBasedMessageHandler());
setBehaveInJava5Way(LangUtil.is15VMOrGreater());
this.classLoader = ReflectionWorld.class.getClassLoader();
this.annotationFinder = makeAnnotationFinderIfAny(classLoader, this);
}
public ReflectionWorld(ClassLoader aClassLoader) {
super();
this.setMessageHandler(new ExceptionBasedMessageHandler());
setBehaveInJava5Way(LangUtil.is15VMOrGreater());
|
153,535 |
Bug 153535 Bug in reflection delegate signature for array of object type
|
The following problem is interesting because the advice weaves correctly with Java 1.5 LTW and also using Java 1.4 with build-time weaving. However, the following call pointcut isn't matching the expected call site in Java 1.4 load-time weaving (*). Pointcut: private pointcut inExecQuery() : (within(uk.ltd.getahead.dwr.impl.ExecuteQuery) || within(uk.ltd.getahead.dwr.ExecuteQuery)); public pointcut dwrQuery(Method method, Object receiver, Object[] params) : inExecQuery() && withincode(* execute(..)) && call(* Method.invoke(..)) && args(receiver, params) && target(method); protected pointcut monitorEnd() : dwrQuery(*, *, *); Matching call site: Object reply = method.invoke(object, params); I've tracked it down to failing to find the method in ResolvedType.matches. On line 405: "m1.getSignature()"= "(Ljava/lang/Object;[Ljava.lang.Object;)Ljava/lang/Object;" "m2.getSignature()"= "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;" Note the difference between . and / ^ ^ It looks to me like the signature for array types in the reflection delegate is erroneously using . instead of /. I have attached a patch to the ReflectionBasedReferenceTypeDelegateTest that isolates this unexpected signature return. Hopefully you agree that this is not correct. If not, some more information follows. Here's the stack trace where the match fails: ResolvedType.matches(Member, Member) line: 405 ReferenceType(ResolvedType).lookupMember(Member, Iterator) line: 347 ReferenceType(ResolvedType).lookupMethod(Member) line: 326 LTWWorld(World).resolve(Member) line: 504 MemberImpl.resolve(World) line: 93 JoinPointSignatureIterator.addSignaturesUpToFirstDefiningMember() line: 109 JoinPointSignatureIterator.<init>(Member, World) line: 51 MemberImpl.getJoinPointSignatures(World) line: 943 SignaturePattern.matches(Member, World, boolean) line: 286 KindedPointcut.matchInternal(Shadow) line: 106 KindedPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 53 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 OrPointcut.matchInternal(Shadow) line: 50 OrPointcut(Pointcut).match(Shadow) line: 146 BcelAdvice(ShadowMunger).match(Shadow, World) line: 71 BcelAdvice(Advice).match(Shadow, World) line: 112 BcelAdvice.match(Shadow, World) line: 107 BcelClassWeaver.match(BcelShadow, List) line: 2806 BcelClassWeaver.matchInvokeInstruction(LazyMethodGen, InstructionHandle, InvokeInstruction, BcelShadow, List) line: 2768 BcelClassWeaver.match(LazyMethodGen, InstructionHandle, BcelShadow, List) line: 2506 BcelClassWeaver.match(LazyMethodGen) line: 2332 BcelClassWeaver.weave() line: 494 BcelClassWeaver.weave(BcelWorld, LazyClassGen, List, List, List) line: 119 BcelWeaver.weave(UnwovenClassFile, BcelObjectType, boolean) line: 1613 BcelWeaver.weaveWithoutDump(UnwovenClassFile, BcelObjectType) line: 1564 BcelWeaver.weaveAndNotify(UnwovenClassFile, BcelObjectType, IWeaveRequestor) line: 1341 BcelWeaver.weave(IClassFileProvider) line: 1163 ClassLoaderWeavingAdaptor(WeavingAdaptor).getWovenBytes(String, byte[]) line: 319 ClassLoaderWeavingAdaptor(WeavingAdaptor).weaveClass(String, byte[]) line: 225 Aj.preProcess(String, byte[], ClassLoader) line: 77 ClassPreProcessorAdapter.preProcess(String, byte[], ClassLoader) line: 67 ClassPreProcessorHelper.defineClass0Pre(ClassLoader, String, byte[], int, int, ProtectionDomain) line: 107 WebappClassLoader(ClassLoader).defineClass(String, byte[], int, int, ProtectionDomain) line: 539 WebappClassLoader(SecureClassLoader).defineClass(String, byte[], int, int, CodeSource) line: 123 WebappClassLoader.findClassInternal(String) line: 1786 WebappClassLoader.findClass(String) line: 1048 WebappClassLoader.loadClass(String, boolean) line: 1506 WebappClassLoader.loadClass(String) line: 1385 WebappClassLoader(ClassLoader).loadClassInternal(String) line: 302 Class.forName0(String, boolean, ClassLoader) line: not available [native method] Class.forName(String) line: 141 InitializeLog.setWarnLogging(String) line: 121 InitializeLog.initializeLogging() line: 96 ContextLoaderServlet.init() line: 13 ContextLoaderServlet(GenericServlet).init(ServletConfig) line: 212 StandardWrapper.loadServlet() line: 879 StandardWrapper.load() line: 767 StandardContext.loadOnStartup(Container[]) line: 3483 StandardContext.start() line: 3709 StandardHost(ContainerBase).addChildInternal(Container) line: 776 StandardHost(ContainerBase).addChild(Container) line: 759 StandardHost.addChild(Container) line: 537 StandardHostDeployer.install(String, URL) line: 260 StandardHost.install(String, URL) line: 730 HostConfig.deployWARs(File, String[]) line: 558 HostConfig.deployApps() line: 373 HostConfig.start() line: 784 HostConfig.lifecycleEvent(LifecycleEvent) line: 330 LifecycleSupport.fireLifecycleEvent(String, Object) line: 119 StandardHost(ContainerBase).start() line: 1155 StandardHost.start() line: 696 StandardEngine(ContainerBase).start() line: 1147 StandardEngine.start() line: 310 StandardService.start() line: 449 StandardServer.start() line: 2212 Catalina.start() line: 458 Catalina.execute() line: 345 Catalina.process(String[]) line: 129 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 Method.invoke(Object, Object[]) line: 324 Bootstrap.main(String[]) line: 150 I'm using a modified version of Alex Vasseur's LTW plugin for a Java 1.4 VM although I haven't tested on the JRockIt plugin for a 1.4 VM: my guess is that this would fail there too.
|
resolved fixed
|
82e3e13
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-15T11:51:21Z | 2006-08-11T07:06:40Z |
weaver/src/org/aspectj/weaver/reflect/ReflectionWorld.java
|
this.classLoader = aClassLoader;
this.annotationFinder = makeAnnotationFinderIfAny(classLoader, this);
}
public static AnnotationFinder makeAnnotationFinderIfAny(ClassLoader loader, World world) {
AnnotationFinder annotationFinder = null;
try {
if (LangUtil.is15VMOrGreater()) {
Class java15AnnotationFinder = Class.forName("org.aspectj.weaver.reflect.Java15AnnotationFinder");
annotationFinder = (AnnotationFinder) java15AnnotationFinder.newInstance();
annotationFinder.setClassLoader(loader);
annotationFinder.setWorld(world);
}
} catch(ClassNotFoundException ex) {
} catch(IllegalAccessException ex) {
throw new BCException("AspectJ internal error",ex);
} catch(InstantiationException ex) {
throw new BCException("AspectJ internal error",ex);
}
return annotationFinder;
}
public ClassLoader getClassLoader() {
return this.classLoader;
}
public AnnotationFinder getAnnotationFinder() {
return this.annotationFinder;
}
|
153,535 |
Bug 153535 Bug in reflection delegate signature for array of object type
|
The following problem is interesting because the advice weaves correctly with Java 1.5 LTW and also using Java 1.4 with build-time weaving. However, the following call pointcut isn't matching the expected call site in Java 1.4 load-time weaving (*). Pointcut: private pointcut inExecQuery() : (within(uk.ltd.getahead.dwr.impl.ExecuteQuery) || within(uk.ltd.getahead.dwr.ExecuteQuery)); public pointcut dwrQuery(Method method, Object receiver, Object[] params) : inExecQuery() && withincode(* execute(..)) && call(* Method.invoke(..)) && args(receiver, params) && target(method); protected pointcut monitorEnd() : dwrQuery(*, *, *); Matching call site: Object reply = method.invoke(object, params); I've tracked it down to failing to find the method in ResolvedType.matches. On line 405: "m1.getSignature()"= "(Ljava/lang/Object;[Ljava.lang.Object;)Ljava/lang/Object;" "m2.getSignature()"= "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;" Note the difference between . and / ^ ^ It looks to me like the signature for array types in the reflection delegate is erroneously using . instead of /. I have attached a patch to the ReflectionBasedReferenceTypeDelegateTest that isolates this unexpected signature return. Hopefully you agree that this is not correct. If not, some more information follows. Here's the stack trace where the match fails: ResolvedType.matches(Member, Member) line: 405 ReferenceType(ResolvedType).lookupMember(Member, Iterator) line: 347 ReferenceType(ResolvedType).lookupMethod(Member) line: 326 LTWWorld(World).resolve(Member) line: 504 MemberImpl.resolve(World) line: 93 JoinPointSignatureIterator.addSignaturesUpToFirstDefiningMember() line: 109 JoinPointSignatureIterator.<init>(Member, World) line: 51 MemberImpl.getJoinPointSignatures(World) line: 943 SignaturePattern.matches(Member, World, boolean) line: 286 KindedPointcut.matchInternal(Shadow) line: 106 KindedPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 53 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 OrPointcut.matchInternal(Shadow) line: 50 OrPointcut(Pointcut).match(Shadow) line: 146 BcelAdvice(ShadowMunger).match(Shadow, World) line: 71 BcelAdvice(Advice).match(Shadow, World) line: 112 BcelAdvice.match(Shadow, World) line: 107 BcelClassWeaver.match(BcelShadow, List) line: 2806 BcelClassWeaver.matchInvokeInstruction(LazyMethodGen, InstructionHandle, InvokeInstruction, BcelShadow, List) line: 2768 BcelClassWeaver.match(LazyMethodGen, InstructionHandle, BcelShadow, List) line: 2506 BcelClassWeaver.match(LazyMethodGen) line: 2332 BcelClassWeaver.weave() line: 494 BcelClassWeaver.weave(BcelWorld, LazyClassGen, List, List, List) line: 119 BcelWeaver.weave(UnwovenClassFile, BcelObjectType, boolean) line: 1613 BcelWeaver.weaveWithoutDump(UnwovenClassFile, BcelObjectType) line: 1564 BcelWeaver.weaveAndNotify(UnwovenClassFile, BcelObjectType, IWeaveRequestor) line: 1341 BcelWeaver.weave(IClassFileProvider) line: 1163 ClassLoaderWeavingAdaptor(WeavingAdaptor).getWovenBytes(String, byte[]) line: 319 ClassLoaderWeavingAdaptor(WeavingAdaptor).weaveClass(String, byte[]) line: 225 Aj.preProcess(String, byte[], ClassLoader) line: 77 ClassPreProcessorAdapter.preProcess(String, byte[], ClassLoader) line: 67 ClassPreProcessorHelper.defineClass0Pre(ClassLoader, String, byte[], int, int, ProtectionDomain) line: 107 WebappClassLoader(ClassLoader).defineClass(String, byte[], int, int, ProtectionDomain) line: 539 WebappClassLoader(SecureClassLoader).defineClass(String, byte[], int, int, CodeSource) line: 123 WebappClassLoader.findClassInternal(String) line: 1786 WebappClassLoader.findClass(String) line: 1048 WebappClassLoader.loadClass(String, boolean) line: 1506 WebappClassLoader.loadClass(String) line: 1385 WebappClassLoader(ClassLoader).loadClassInternal(String) line: 302 Class.forName0(String, boolean, ClassLoader) line: not available [native method] Class.forName(String) line: 141 InitializeLog.setWarnLogging(String) line: 121 InitializeLog.initializeLogging() line: 96 ContextLoaderServlet.init() line: 13 ContextLoaderServlet(GenericServlet).init(ServletConfig) line: 212 StandardWrapper.loadServlet() line: 879 StandardWrapper.load() line: 767 StandardContext.loadOnStartup(Container[]) line: 3483 StandardContext.start() line: 3709 StandardHost(ContainerBase).addChildInternal(Container) line: 776 StandardHost(ContainerBase).addChild(Container) line: 759 StandardHost.addChild(Container) line: 537 StandardHostDeployer.install(String, URL) line: 260 StandardHost.install(String, URL) line: 730 HostConfig.deployWARs(File, String[]) line: 558 HostConfig.deployApps() line: 373 HostConfig.start() line: 784 HostConfig.lifecycleEvent(LifecycleEvent) line: 330 LifecycleSupport.fireLifecycleEvent(String, Object) line: 119 StandardHost(ContainerBase).start() line: 1155 StandardHost.start() line: 696 StandardEngine(ContainerBase).start() line: 1147 StandardEngine.start() line: 310 StandardService.start() line: 449 StandardServer.start() line: 2212 Catalina.start() line: 458 Catalina.execute() line: 345 Catalina.process(String[]) line: 129 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 Method.invoke(Object, Object[]) line: 324 Bootstrap.main(String[]) line: 150 I'm using a modified version of Alex Vasseur's LTW plugin for a Java 1.4 VM although I haven't tested on the JRockIt plugin for a 1.4 VM: my guess is that this would fail there too.
|
resolved fixed
|
82e3e13
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-15T11:51:21Z | 2006-08-11T07:06:40Z |
weaver/src/org/aspectj/weaver/reflect/ReflectionWorld.java
|
/* (non-Javadoc)
* @see org.aspectj.weaver.reflect.IReflectionWorld#resolve(java.lang.Class)
*/
public ResolvedType resolve(Class aClass) {
return resolve(this, aClass);
}
public static ResolvedType resolve(World world, Class aClass) {
String className = aClass.getName();
if (aClass.isArray()) {
return world.resolve(UnresolvedType.forSignature(className));
}
else{
return world.resolve(className);
}
}
/* (non-Javadoc)
* @see org.aspectj.weaver.World#resolveDelegate(org.aspectj.weaver.ReferenceType)
*/
protected ReferenceTypeDelegate resolveDelegate(ReferenceType ty) {
return ReflectionBasedReferenceTypeDelegateFactory.createDelegate(ty, this, this.classLoader);
}
/* (non-Javadoc)
* @see org.aspectj.weaver.World#createAdviceMunger(org.aspectj.weaver.AjAttribute.AdviceAttribute, org.aspectj.weaver.patterns.Pointcut, org.aspectj.weaver.Member)
*/
public Advice createAdviceMunger(AdviceAttribute attribute,
Pointcut pointcut, Member signature) {
|
153,535 |
Bug 153535 Bug in reflection delegate signature for array of object type
|
The following problem is interesting because the advice weaves correctly with Java 1.5 LTW and also using Java 1.4 with build-time weaving. However, the following call pointcut isn't matching the expected call site in Java 1.4 load-time weaving (*). Pointcut: private pointcut inExecQuery() : (within(uk.ltd.getahead.dwr.impl.ExecuteQuery) || within(uk.ltd.getahead.dwr.ExecuteQuery)); public pointcut dwrQuery(Method method, Object receiver, Object[] params) : inExecQuery() && withincode(* execute(..)) && call(* Method.invoke(..)) && args(receiver, params) && target(method); protected pointcut monitorEnd() : dwrQuery(*, *, *); Matching call site: Object reply = method.invoke(object, params); I've tracked it down to failing to find the method in ResolvedType.matches. On line 405: "m1.getSignature()"= "(Ljava/lang/Object;[Ljava.lang.Object;)Ljava/lang/Object;" "m2.getSignature()"= "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;" Note the difference between . and / ^ ^ It looks to me like the signature for array types in the reflection delegate is erroneously using . instead of /. I have attached a patch to the ReflectionBasedReferenceTypeDelegateTest that isolates this unexpected signature return. Hopefully you agree that this is not correct. If not, some more information follows. Here's the stack trace where the match fails: ResolvedType.matches(Member, Member) line: 405 ReferenceType(ResolvedType).lookupMember(Member, Iterator) line: 347 ReferenceType(ResolvedType).lookupMethod(Member) line: 326 LTWWorld(World).resolve(Member) line: 504 MemberImpl.resolve(World) line: 93 JoinPointSignatureIterator.addSignaturesUpToFirstDefiningMember() line: 109 JoinPointSignatureIterator.<init>(Member, World) line: 51 MemberImpl.getJoinPointSignatures(World) line: 943 SignaturePattern.matches(Member, World, boolean) line: 286 KindedPointcut.matchInternal(Shadow) line: 106 KindedPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 53 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 OrPointcut.matchInternal(Shadow) line: 50 OrPointcut(Pointcut).match(Shadow) line: 146 BcelAdvice(ShadowMunger).match(Shadow, World) line: 71 BcelAdvice(Advice).match(Shadow, World) line: 112 BcelAdvice.match(Shadow, World) line: 107 BcelClassWeaver.match(BcelShadow, List) line: 2806 BcelClassWeaver.matchInvokeInstruction(LazyMethodGen, InstructionHandle, InvokeInstruction, BcelShadow, List) line: 2768 BcelClassWeaver.match(LazyMethodGen, InstructionHandle, BcelShadow, List) line: 2506 BcelClassWeaver.match(LazyMethodGen) line: 2332 BcelClassWeaver.weave() line: 494 BcelClassWeaver.weave(BcelWorld, LazyClassGen, List, List, List) line: 119 BcelWeaver.weave(UnwovenClassFile, BcelObjectType, boolean) line: 1613 BcelWeaver.weaveWithoutDump(UnwovenClassFile, BcelObjectType) line: 1564 BcelWeaver.weaveAndNotify(UnwovenClassFile, BcelObjectType, IWeaveRequestor) line: 1341 BcelWeaver.weave(IClassFileProvider) line: 1163 ClassLoaderWeavingAdaptor(WeavingAdaptor).getWovenBytes(String, byte[]) line: 319 ClassLoaderWeavingAdaptor(WeavingAdaptor).weaveClass(String, byte[]) line: 225 Aj.preProcess(String, byte[], ClassLoader) line: 77 ClassPreProcessorAdapter.preProcess(String, byte[], ClassLoader) line: 67 ClassPreProcessorHelper.defineClass0Pre(ClassLoader, String, byte[], int, int, ProtectionDomain) line: 107 WebappClassLoader(ClassLoader).defineClass(String, byte[], int, int, ProtectionDomain) line: 539 WebappClassLoader(SecureClassLoader).defineClass(String, byte[], int, int, CodeSource) line: 123 WebappClassLoader.findClassInternal(String) line: 1786 WebappClassLoader.findClass(String) line: 1048 WebappClassLoader.loadClass(String, boolean) line: 1506 WebappClassLoader.loadClass(String) line: 1385 WebappClassLoader(ClassLoader).loadClassInternal(String) line: 302 Class.forName0(String, boolean, ClassLoader) line: not available [native method] Class.forName(String) line: 141 InitializeLog.setWarnLogging(String) line: 121 InitializeLog.initializeLogging() line: 96 ContextLoaderServlet.init() line: 13 ContextLoaderServlet(GenericServlet).init(ServletConfig) line: 212 StandardWrapper.loadServlet() line: 879 StandardWrapper.load() line: 767 StandardContext.loadOnStartup(Container[]) line: 3483 StandardContext.start() line: 3709 StandardHost(ContainerBase).addChildInternal(Container) line: 776 StandardHost(ContainerBase).addChild(Container) line: 759 StandardHost.addChild(Container) line: 537 StandardHostDeployer.install(String, URL) line: 260 StandardHost.install(String, URL) line: 730 HostConfig.deployWARs(File, String[]) line: 558 HostConfig.deployApps() line: 373 HostConfig.start() line: 784 HostConfig.lifecycleEvent(LifecycleEvent) line: 330 LifecycleSupport.fireLifecycleEvent(String, Object) line: 119 StandardHost(ContainerBase).start() line: 1155 StandardHost.start() line: 696 StandardEngine(ContainerBase).start() line: 1147 StandardEngine.start() line: 310 StandardService.start() line: 449 StandardServer.start() line: 2212 Catalina.start() line: 458 Catalina.execute() line: 345 Catalina.process(String[]) line: 129 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 Method.invoke(Object, Object[]) line: 324 Bootstrap.main(String[]) line: 150 I'm using a modified version of Alex Vasseur's LTW plugin for a Java 1.4 VM although I haven't tested on the JRockIt plugin for a 1.4 VM: my guess is that this would fail there too.
|
resolved fixed
|
82e3e13
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-15T11:51:21Z | 2006-08-11T07:06:40Z |
weaver/src/org/aspectj/weaver/reflect/ReflectionWorld.java
|
throw new UnsupportedOperationException("Cannot create advice munger in ReflectionWorld");
}
/* (non-Javadoc)
* @see org.aspectj.weaver.World#makeCflowStackFieldAdder(org.aspectj.weaver.ResolvedMember)
*/
public ConcreteTypeMunger makeCflowStackFieldAdder(ResolvedMember cflowField) {
throw new UnsupportedOperationException("Cannot create cflow stack in ReflectionWorld");
}
/* (non-Javadoc)
* @see org.aspectj.weaver.World#makeCflowCounterFieldAdder(org.aspectj.weaver.ResolvedMember)
*/
public ConcreteTypeMunger makeCflowCounterFieldAdder(
ResolvedMember cflowField) {
throw new UnsupportedOperationException("Cannot create cflow counter in ReflectionWorld");
}
/* (non-Javadoc)
* @see org.aspectj.weaver.World#makePerClauseAspect(org.aspectj.weaver.ResolvedType, org.aspectj.weaver.patterns.PerClause.Kind)
*/
public ConcreteTypeMunger makePerClauseAspect(ResolvedType aspect, Kind kind) {
throw new UnsupportedOperationException("Cannot create per clause in ReflectionWorld");
}
/* (non-Javadoc)
* @see org.aspectj.weaver.World#concreteTypeMunger(org.aspectj.weaver.ResolvedTypeMunger, org.aspectj.weaver.ResolvedType)
*/
public ConcreteTypeMunger concreteTypeMunger(ResolvedTypeMunger munger,
ResolvedType aspectType) {
throw new UnsupportedOperationException("Cannot create type munger in ReflectionWorld");
}
public static class ReflectionWorldException extends RuntimeException {
|
153,535 |
Bug 153535 Bug in reflection delegate signature for array of object type
|
The following problem is interesting because the advice weaves correctly with Java 1.5 LTW and also using Java 1.4 with build-time weaving. However, the following call pointcut isn't matching the expected call site in Java 1.4 load-time weaving (*). Pointcut: private pointcut inExecQuery() : (within(uk.ltd.getahead.dwr.impl.ExecuteQuery) || within(uk.ltd.getahead.dwr.ExecuteQuery)); public pointcut dwrQuery(Method method, Object receiver, Object[] params) : inExecQuery() && withincode(* execute(..)) && call(* Method.invoke(..)) && args(receiver, params) && target(method); protected pointcut monitorEnd() : dwrQuery(*, *, *); Matching call site: Object reply = method.invoke(object, params); I've tracked it down to failing to find the method in ResolvedType.matches. On line 405: "m1.getSignature()"= "(Ljava/lang/Object;[Ljava.lang.Object;)Ljava/lang/Object;" "m2.getSignature()"= "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;" Note the difference between . and / ^ ^ It looks to me like the signature for array types in the reflection delegate is erroneously using . instead of /. I have attached a patch to the ReflectionBasedReferenceTypeDelegateTest that isolates this unexpected signature return. Hopefully you agree that this is not correct. If not, some more information follows. Here's the stack trace where the match fails: ResolvedType.matches(Member, Member) line: 405 ReferenceType(ResolvedType).lookupMember(Member, Iterator) line: 347 ReferenceType(ResolvedType).lookupMethod(Member) line: 326 LTWWorld(World).resolve(Member) line: 504 MemberImpl.resolve(World) line: 93 JoinPointSignatureIterator.addSignaturesUpToFirstDefiningMember() line: 109 JoinPointSignatureIterator.<init>(Member, World) line: 51 MemberImpl.getJoinPointSignatures(World) line: 943 SignaturePattern.matches(Member, World, boolean) line: 286 KindedPointcut.matchInternal(Shadow) line: 106 KindedPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 53 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 OrPointcut.matchInternal(Shadow) line: 50 OrPointcut(Pointcut).match(Shadow) line: 146 BcelAdvice(ShadowMunger).match(Shadow, World) line: 71 BcelAdvice(Advice).match(Shadow, World) line: 112 BcelAdvice.match(Shadow, World) line: 107 BcelClassWeaver.match(BcelShadow, List) line: 2806 BcelClassWeaver.matchInvokeInstruction(LazyMethodGen, InstructionHandle, InvokeInstruction, BcelShadow, List) line: 2768 BcelClassWeaver.match(LazyMethodGen, InstructionHandle, BcelShadow, List) line: 2506 BcelClassWeaver.match(LazyMethodGen) line: 2332 BcelClassWeaver.weave() line: 494 BcelClassWeaver.weave(BcelWorld, LazyClassGen, List, List, List) line: 119 BcelWeaver.weave(UnwovenClassFile, BcelObjectType, boolean) line: 1613 BcelWeaver.weaveWithoutDump(UnwovenClassFile, BcelObjectType) line: 1564 BcelWeaver.weaveAndNotify(UnwovenClassFile, BcelObjectType, IWeaveRequestor) line: 1341 BcelWeaver.weave(IClassFileProvider) line: 1163 ClassLoaderWeavingAdaptor(WeavingAdaptor).getWovenBytes(String, byte[]) line: 319 ClassLoaderWeavingAdaptor(WeavingAdaptor).weaveClass(String, byte[]) line: 225 Aj.preProcess(String, byte[], ClassLoader) line: 77 ClassPreProcessorAdapter.preProcess(String, byte[], ClassLoader) line: 67 ClassPreProcessorHelper.defineClass0Pre(ClassLoader, String, byte[], int, int, ProtectionDomain) line: 107 WebappClassLoader(ClassLoader).defineClass(String, byte[], int, int, ProtectionDomain) line: 539 WebappClassLoader(SecureClassLoader).defineClass(String, byte[], int, int, CodeSource) line: 123 WebappClassLoader.findClassInternal(String) line: 1786 WebappClassLoader.findClass(String) line: 1048 WebappClassLoader.loadClass(String, boolean) line: 1506 WebappClassLoader.loadClass(String) line: 1385 WebappClassLoader(ClassLoader).loadClassInternal(String) line: 302 Class.forName0(String, boolean, ClassLoader) line: not available [native method] Class.forName(String) line: 141 InitializeLog.setWarnLogging(String) line: 121 InitializeLog.initializeLogging() line: 96 ContextLoaderServlet.init() line: 13 ContextLoaderServlet(GenericServlet).init(ServletConfig) line: 212 StandardWrapper.loadServlet() line: 879 StandardWrapper.load() line: 767 StandardContext.loadOnStartup(Container[]) line: 3483 StandardContext.start() line: 3709 StandardHost(ContainerBase).addChildInternal(Container) line: 776 StandardHost(ContainerBase).addChild(Container) line: 759 StandardHost.addChild(Container) line: 537 StandardHostDeployer.install(String, URL) line: 260 StandardHost.install(String, URL) line: 730 HostConfig.deployWARs(File, String[]) line: 558 HostConfig.deployApps() line: 373 HostConfig.start() line: 784 HostConfig.lifecycleEvent(LifecycleEvent) line: 330 LifecycleSupport.fireLifecycleEvent(String, Object) line: 119 StandardHost(ContainerBase).start() line: 1155 StandardHost.start() line: 696 StandardEngine(ContainerBase).start() line: 1147 StandardEngine.start() line: 310 StandardService.start() line: 449 StandardServer.start() line: 2212 Catalina.start() line: 458 Catalina.execute() line: 345 Catalina.process(String[]) line: 129 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 Method.invoke(Object, Object[]) line: 324 Bootstrap.main(String[]) line: 150 I'm using a modified version of Alex Vasseur's LTW plugin for a Java 1.4 VM although I haven't tested on the JRockIt plugin for a 1.4 VM: my guess is that this would fail there too.
|
resolved fixed
|
82e3e13
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-15T11:51:21Z | 2006-08-11T07:06:40Z |
weaver/src/org/aspectj/weaver/reflect/ReflectionWorld.java
|
private static final long serialVersionUID = -3432261918302793005L;
public ReflectionWorldException(String message) {
super(message);
}
}
private static class ExceptionBasedMessageHandler implements IMessageHandler {
public boolean handleMessage(IMessage message) throws AbortException {
throw new ReflectionWorldException(message.toString());
}
public boolean isIgnoring(org.aspectj.bridge.IMessage.Kind kind) {
if (kind == IMessage.INFO) {
return true;
} else {
return false;
}
}
public void dontIgnore(org.aspectj.bridge.IMessage.Kind kind) {
}
}
}
|
153,535 |
Bug 153535 Bug in reflection delegate signature for array of object type
|
The following problem is interesting because the advice weaves correctly with Java 1.5 LTW and also using Java 1.4 with build-time weaving. However, the following call pointcut isn't matching the expected call site in Java 1.4 load-time weaving (*). Pointcut: private pointcut inExecQuery() : (within(uk.ltd.getahead.dwr.impl.ExecuteQuery) || within(uk.ltd.getahead.dwr.ExecuteQuery)); public pointcut dwrQuery(Method method, Object receiver, Object[] params) : inExecQuery() && withincode(* execute(..)) && call(* Method.invoke(..)) && args(receiver, params) && target(method); protected pointcut monitorEnd() : dwrQuery(*, *, *); Matching call site: Object reply = method.invoke(object, params); I've tracked it down to failing to find the method in ResolvedType.matches. On line 405: "m1.getSignature()"= "(Ljava/lang/Object;[Ljava.lang.Object;)Ljava/lang/Object;" "m2.getSignature()"= "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;" Note the difference between . and / ^ ^ It looks to me like the signature for array types in the reflection delegate is erroneously using . instead of /. I have attached a patch to the ReflectionBasedReferenceTypeDelegateTest that isolates this unexpected signature return. Hopefully you agree that this is not correct. If not, some more information follows. Here's the stack trace where the match fails: ResolvedType.matches(Member, Member) line: 405 ReferenceType(ResolvedType).lookupMember(Member, Iterator) line: 347 ReferenceType(ResolvedType).lookupMethod(Member) line: 326 LTWWorld(World).resolve(Member) line: 504 MemberImpl.resolve(World) line: 93 JoinPointSignatureIterator.addSignaturesUpToFirstDefiningMember() line: 109 JoinPointSignatureIterator.<init>(Member, World) line: 51 MemberImpl.getJoinPointSignatures(World) line: 943 SignaturePattern.matches(Member, World, boolean) line: 286 KindedPointcut.matchInternal(Shadow) line: 106 KindedPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 53 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 OrPointcut.matchInternal(Shadow) line: 50 OrPointcut(Pointcut).match(Shadow) line: 146 BcelAdvice(ShadowMunger).match(Shadow, World) line: 71 BcelAdvice(Advice).match(Shadow, World) line: 112 BcelAdvice.match(Shadow, World) line: 107 BcelClassWeaver.match(BcelShadow, List) line: 2806 BcelClassWeaver.matchInvokeInstruction(LazyMethodGen, InstructionHandle, InvokeInstruction, BcelShadow, List) line: 2768 BcelClassWeaver.match(LazyMethodGen, InstructionHandle, BcelShadow, List) line: 2506 BcelClassWeaver.match(LazyMethodGen) line: 2332 BcelClassWeaver.weave() line: 494 BcelClassWeaver.weave(BcelWorld, LazyClassGen, List, List, List) line: 119 BcelWeaver.weave(UnwovenClassFile, BcelObjectType, boolean) line: 1613 BcelWeaver.weaveWithoutDump(UnwovenClassFile, BcelObjectType) line: 1564 BcelWeaver.weaveAndNotify(UnwovenClassFile, BcelObjectType, IWeaveRequestor) line: 1341 BcelWeaver.weave(IClassFileProvider) line: 1163 ClassLoaderWeavingAdaptor(WeavingAdaptor).getWovenBytes(String, byte[]) line: 319 ClassLoaderWeavingAdaptor(WeavingAdaptor).weaveClass(String, byte[]) line: 225 Aj.preProcess(String, byte[], ClassLoader) line: 77 ClassPreProcessorAdapter.preProcess(String, byte[], ClassLoader) line: 67 ClassPreProcessorHelper.defineClass0Pre(ClassLoader, String, byte[], int, int, ProtectionDomain) line: 107 WebappClassLoader(ClassLoader).defineClass(String, byte[], int, int, ProtectionDomain) line: 539 WebappClassLoader(SecureClassLoader).defineClass(String, byte[], int, int, CodeSource) line: 123 WebappClassLoader.findClassInternal(String) line: 1786 WebappClassLoader.findClass(String) line: 1048 WebappClassLoader.loadClass(String, boolean) line: 1506 WebappClassLoader.loadClass(String) line: 1385 WebappClassLoader(ClassLoader).loadClassInternal(String) line: 302 Class.forName0(String, boolean, ClassLoader) line: not available [native method] Class.forName(String) line: 141 InitializeLog.setWarnLogging(String) line: 121 InitializeLog.initializeLogging() line: 96 ContextLoaderServlet.init() line: 13 ContextLoaderServlet(GenericServlet).init(ServletConfig) line: 212 StandardWrapper.loadServlet() line: 879 StandardWrapper.load() line: 767 StandardContext.loadOnStartup(Container[]) line: 3483 StandardContext.start() line: 3709 StandardHost(ContainerBase).addChildInternal(Container) line: 776 StandardHost(ContainerBase).addChild(Container) line: 759 StandardHost.addChild(Container) line: 537 StandardHostDeployer.install(String, URL) line: 260 StandardHost.install(String, URL) line: 730 HostConfig.deployWARs(File, String[]) line: 558 HostConfig.deployApps() line: 373 HostConfig.start() line: 784 HostConfig.lifecycleEvent(LifecycleEvent) line: 330 LifecycleSupport.fireLifecycleEvent(String, Object) line: 119 StandardHost(ContainerBase).start() line: 1155 StandardHost.start() line: 696 StandardEngine(ContainerBase).start() line: 1147 StandardEngine.start() line: 310 StandardService.start() line: 449 StandardServer.start() line: 2212 Catalina.start() line: 458 Catalina.execute() line: 345 Catalina.process(String[]) line: 129 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 Method.invoke(Object, Object[]) line: 324 Bootstrap.main(String[]) line: 150 I'm using a modified version of Alex Vasseur's LTW plugin for a Java 1.4 VM although I haven't tested on the JRockIt plugin for a 1.4 VM: my guess is that this would fail there too.
|
resolved fixed
|
82e3e13
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-15T11:51:21Z | 2006-08-11T07:06:40Z |
weaver/testsrc/org/aspectj/weaver/reflect/ReflectionBasedReferenceTypeDelegateTest.java
|
/* *******************************************************************
* Copyright (c) 2005 Contributors.
* All rights reserved.
* This program and the accompanying materials are made available
* under the terms of the Eclipse Public License v1.0
* which accompanies this distribution and is available at
* http://eclipse.org/legal/epl-v10.html
*
* Contributors:
* Adrian Colyer Initial implementation
* ******************************************************************/
package org.aspectj.weaver.reflect;
import java.util.HashSet;
import java.util.Set;
import junit.framework.TestCase;
import org.aspectj.bridge.IMessageHandler;
import org.aspectj.weaver.ReferenceType;
import org.aspectj.weaver.ResolvedMember;
import org.aspectj.weaver.ResolvedType;
import org.aspectj.weaver.UnresolvedType;
import org.aspectj.weaver.bcel.BcelWorld;
public class ReflectionBasedReferenceTypeDelegateTest extends TestCase {
|
153,535 |
Bug 153535 Bug in reflection delegate signature for array of object type
|
The following problem is interesting because the advice weaves correctly with Java 1.5 LTW and also using Java 1.4 with build-time weaving. However, the following call pointcut isn't matching the expected call site in Java 1.4 load-time weaving (*). Pointcut: private pointcut inExecQuery() : (within(uk.ltd.getahead.dwr.impl.ExecuteQuery) || within(uk.ltd.getahead.dwr.ExecuteQuery)); public pointcut dwrQuery(Method method, Object receiver, Object[] params) : inExecQuery() && withincode(* execute(..)) && call(* Method.invoke(..)) && args(receiver, params) && target(method); protected pointcut monitorEnd() : dwrQuery(*, *, *); Matching call site: Object reply = method.invoke(object, params); I've tracked it down to failing to find the method in ResolvedType.matches. On line 405: "m1.getSignature()"= "(Ljava/lang/Object;[Ljava.lang.Object;)Ljava/lang/Object;" "m2.getSignature()"= "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;" Note the difference between . and / ^ ^ It looks to me like the signature for array types in the reflection delegate is erroneously using . instead of /. I have attached a patch to the ReflectionBasedReferenceTypeDelegateTest that isolates this unexpected signature return. Hopefully you agree that this is not correct. If not, some more information follows. Here's the stack trace where the match fails: ResolvedType.matches(Member, Member) line: 405 ReferenceType(ResolvedType).lookupMember(Member, Iterator) line: 347 ReferenceType(ResolvedType).lookupMethod(Member) line: 326 LTWWorld(World).resolve(Member) line: 504 MemberImpl.resolve(World) line: 93 JoinPointSignatureIterator.addSignaturesUpToFirstDefiningMember() line: 109 JoinPointSignatureIterator.<init>(Member, World) line: 51 MemberImpl.getJoinPointSignatures(World) line: 943 SignaturePattern.matches(Member, World, boolean) line: 286 KindedPointcut.matchInternal(Shadow) line: 106 KindedPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 53 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 OrPointcut.matchInternal(Shadow) line: 50 OrPointcut(Pointcut).match(Shadow) line: 146 BcelAdvice(ShadowMunger).match(Shadow, World) line: 71 BcelAdvice(Advice).match(Shadow, World) line: 112 BcelAdvice.match(Shadow, World) line: 107 BcelClassWeaver.match(BcelShadow, List) line: 2806 BcelClassWeaver.matchInvokeInstruction(LazyMethodGen, InstructionHandle, InvokeInstruction, BcelShadow, List) line: 2768 BcelClassWeaver.match(LazyMethodGen, InstructionHandle, BcelShadow, List) line: 2506 BcelClassWeaver.match(LazyMethodGen) line: 2332 BcelClassWeaver.weave() line: 494 BcelClassWeaver.weave(BcelWorld, LazyClassGen, List, List, List) line: 119 BcelWeaver.weave(UnwovenClassFile, BcelObjectType, boolean) line: 1613 BcelWeaver.weaveWithoutDump(UnwovenClassFile, BcelObjectType) line: 1564 BcelWeaver.weaveAndNotify(UnwovenClassFile, BcelObjectType, IWeaveRequestor) line: 1341 BcelWeaver.weave(IClassFileProvider) line: 1163 ClassLoaderWeavingAdaptor(WeavingAdaptor).getWovenBytes(String, byte[]) line: 319 ClassLoaderWeavingAdaptor(WeavingAdaptor).weaveClass(String, byte[]) line: 225 Aj.preProcess(String, byte[], ClassLoader) line: 77 ClassPreProcessorAdapter.preProcess(String, byte[], ClassLoader) line: 67 ClassPreProcessorHelper.defineClass0Pre(ClassLoader, String, byte[], int, int, ProtectionDomain) line: 107 WebappClassLoader(ClassLoader).defineClass(String, byte[], int, int, ProtectionDomain) line: 539 WebappClassLoader(SecureClassLoader).defineClass(String, byte[], int, int, CodeSource) line: 123 WebappClassLoader.findClassInternal(String) line: 1786 WebappClassLoader.findClass(String) line: 1048 WebappClassLoader.loadClass(String, boolean) line: 1506 WebappClassLoader.loadClass(String) line: 1385 WebappClassLoader(ClassLoader).loadClassInternal(String) line: 302 Class.forName0(String, boolean, ClassLoader) line: not available [native method] Class.forName(String) line: 141 InitializeLog.setWarnLogging(String) line: 121 InitializeLog.initializeLogging() line: 96 ContextLoaderServlet.init() line: 13 ContextLoaderServlet(GenericServlet).init(ServletConfig) line: 212 StandardWrapper.loadServlet() line: 879 StandardWrapper.load() line: 767 StandardContext.loadOnStartup(Container[]) line: 3483 StandardContext.start() line: 3709 StandardHost(ContainerBase).addChildInternal(Container) line: 776 StandardHost(ContainerBase).addChild(Container) line: 759 StandardHost.addChild(Container) line: 537 StandardHostDeployer.install(String, URL) line: 260 StandardHost.install(String, URL) line: 730 HostConfig.deployWARs(File, String[]) line: 558 HostConfig.deployApps() line: 373 HostConfig.start() line: 784 HostConfig.lifecycleEvent(LifecycleEvent) line: 330 LifecycleSupport.fireLifecycleEvent(String, Object) line: 119 StandardHost(ContainerBase).start() line: 1155 StandardHost.start() line: 696 StandardEngine(ContainerBase).start() line: 1147 StandardEngine.start() line: 310 StandardService.start() line: 449 StandardServer.start() line: 2212 Catalina.start() line: 458 Catalina.execute() line: 345 Catalina.process(String[]) line: 129 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 Method.invoke(Object, Object[]) line: 324 Bootstrap.main(String[]) line: 150 I'm using a modified version of Alex Vasseur's LTW plugin for a Java 1.4 VM although I haven't tested on the JRockIt plugin for a 1.4 VM: my guess is that this would fail there too.
|
resolved fixed
|
82e3e13
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-15T11:51:21Z | 2006-08-11T07:06:40Z |
weaver/testsrc/org/aspectj/weaver/reflect/ReflectionBasedReferenceTypeDelegateTest.java
|
protected ReflectionWorld world;
private ResolvedType objectType;
private ResolvedType classType;
public void testIsAspect() {
assertFalse(objectType.isAspect());
}
public void testIsAnnotationStyleAspect() {
assertFalse(objectType.isAnnotationStyleAspect());
}
public void testIsInterface() {
assertFalse(objectType.isInterface());
assertTrue(world.resolve("java.io.Serializable").isInterface());
}
public void testIsEnum() {
assertFalse(objectType.isEnum());
}
public void testIsAnnotation() {
assertFalse(objectType.isAnnotation());
}
public void testIsAnnotationWithRuntimeRetention() {
assertFalse(objectType.isAnnotationWithRuntimeRetention());
}
public void testIsClass() {
|
153,535 |
Bug 153535 Bug in reflection delegate signature for array of object type
|
The following problem is interesting because the advice weaves correctly with Java 1.5 LTW and also using Java 1.4 with build-time weaving. However, the following call pointcut isn't matching the expected call site in Java 1.4 load-time weaving (*). Pointcut: private pointcut inExecQuery() : (within(uk.ltd.getahead.dwr.impl.ExecuteQuery) || within(uk.ltd.getahead.dwr.ExecuteQuery)); public pointcut dwrQuery(Method method, Object receiver, Object[] params) : inExecQuery() && withincode(* execute(..)) && call(* Method.invoke(..)) && args(receiver, params) && target(method); protected pointcut monitorEnd() : dwrQuery(*, *, *); Matching call site: Object reply = method.invoke(object, params); I've tracked it down to failing to find the method in ResolvedType.matches. On line 405: "m1.getSignature()"= "(Ljava/lang/Object;[Ljava.lang.Object;)Ljava/lang/Object;" "m2.getSignature()"= "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;" Note the difference between . and / ^ ^ It looks to me like the signature for array types in the reflection delegate is erroneously using . instead of /. I have attached a patch to the ReflectionBasedReferenceTypeDelegateTest that isolates this unexpected signature return. Hopefully you agree that this is not correct. If not, some more information follows. Here's the stack trace where the match fails: ResolvedType.matches(Member, Member) line: 405 ReferenceType(ResolvedType).lookupMember(Member, Iterator) line: 347 ReferenceType(ResolvedType).lookupMethod(Member) line: 326 LTWWorld(World).resolve(Member) line: 504 MemberImpl.resolve(World) line: 93 JoinPointSignatureIterator.addSignaturesUpToFirstDefiningMember() line: 109 JoinPointSignatureIterator.<init>(Member, World) line: 51 MemberImpl.getJoinPointSignatures(World) line: 943 SignaturePattern.matches(Member, World, boolean) line: 286 KindedPointcut.matchInternal(Shadow) line: 106 KindedPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 53 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 OrPointcut.matchInternal(Shadow) line: 50 OrPointcut(Pointcut).match(Shadow) line: 146 BcelAdvice(ShadowMunger).match(Shadow, World) line: 71 BcelAdvice(Advice).match(Shadow, World) line: 112 BcelAdvice.match(Shadow, World) line: 107 BcelClassWeaver.match(BcelShadow, List) line: 2806 BcelClassWeaver.matchInvokeInstruction(LazyMethodGen, InstructionHandle, InvokeInstruction, BcelShadow, List) line: 2768 BcelClassWeaver.match(LazyMethodGen, InstructionHandle, BcelShadow, List) line: 2506 BcelClassWeaver.match(LazyMethodGen) line: 2332 BcelClassWeaver.weave() line: 494 BcelClassWeaver.weave(BcelWorld, LazyClassGen, List, List, List) line: 119 BcelWeaver.weave(UnwovenClassFile, BcelObjectType, boolean) line: 1613 BcelWeaver.weaveWithoutDump(UnwovenClassFile, BcelObjectType) line: 1564 BcelWeaver.weaveAndNotify(UnwovenClassFile, BcelObjectType, IWeaveRequestor) line: 1341 BcelWeaver.weave(IClassFileProvider) line: 1163 ClassLoaderWeavingAdaptor(WeavingAdaptor).getWovenBytes(String, byte[]) line: 319 ClassLoaderWeavingAdaptor(WeavingAdaptor).weaveClass(String, byte[]) line: 225 Aj.preProcess(String, byte[], ClassLoader) line: 77 ClassPreProcessorAdapter.preProcess(String, byte[], ClassLoader) line: 67 ClassPreProcessorHelper.defineClass0Pre(ClassLoader, String, byte[], int, int, ProtectionDomain) line: 107 WebappClassLoader(ClassLoader).defineClass(String, byte[], int, int, ProtectionDomain) line: 539 WebappClassLoader(SecureClassLoader).defineClass(String, byte[], int, int, CodeSource) line: 123 WebappClassLoader.findClassInternal(String) line: 1786 WebappClassLoader.findClass(String) line: 1048 WebappClassLoader.loadClass(String, boolean) line: 1506 WebappClassLoader.loadClass(String) line: 1385 WebappClassLoader(ClassLoader).loadClassInternal(String) line: 302 Class.forName0(String, boolean, ClassLoader) line: not available [native method] Class.forName(String) line: 141 InitializeLog.setWarnLogging(String) line: 121 InitializeLog.initializeLogging() line: 96 ContextLoaderServlet.init() line: 13 ContextLoaderServlet(GenericServlet).init(ServletConfig) line: 212 StandardWrapper.loadServlet() line: 879 StandardWrapper.load() line: 767 StandardContext.loadOnStartup(Container[]) line: 3483 StandardContext.start() line: 3709 StandardHost(ContainerBase).addChildInternal(Container) line: 776 StandardHost(ContainerBase).addChild(Container) line: 759 StandardHost.addChild(Container) line: 537 StandardHostDeployer.install(String, URL) line: 260 StandardHost.install(String, URL) line: 730 HostConfig.deployWARs(File, String[]) line: 558 HostConfig.deployApps() line: 373 HostConfig.start() line: 784 HostConfig.lifecycleEvent(LifecycleEvent) line: 330 LifecycleSupport.fireLifecycleEvent(String, Object) line: 119 StandardHost(ContainerBase).start() line: 1155 StandardHost.start() line: 696 StandardEngine(ContainerBase).start() line: 1147 StandardEngine.start() line: 310 StandardService.start() line: 449 StandardServer.start() line: 2212 Catalina.start() line: 458 Catalina.execute() line: 345 Catalina.process(String[]) line: 129 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 Method.invoke(Object, Object[]) line: 324 Bootstrap.main(String[]) line: 150 I'm using a modified version of Alex Vasseur's LTW plugin for a Java 1.4 VM although I haven't tested on the JRockIt plugin for a 1.4 VM: my guess is that this would fail there too.
|
resolved fixed
|
82e3e13
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-15T11:51:21Z | 2006-08-11T07:06:40Z |
weaver/testsrc/org/aspectj/weaver/reflect/ReflectionBasedReferenceTypeDelegateTest.java
|
assertTrue(objectType.isClass());
assertFalse(world.resolve("java.io.Serializable").isClass());
}
public void testIsGeneric() {
assertFalse(objectType.isGenericType());
}
public void testIsExposedToWeaver() {
assertFalse(objectType.isExposedToWeaver());
}
public void testHasAnnotation() {
assertFalse(objectType.hasAnnotation(UnresolvedType.forName("Foo")));
}
public void testGetAnnotations() {
assertEquals("no entries",0,objectType.getAnnotations().length);
}
public void testGetAnnotationTypes() {
assertEquals("no entries",0,objectType.getAnnotationTypes().length);
}
public void testGetTypeVariables() {
assertEquals("no entries",0,objectType.getTypeVariables().length);
}
public void testGetPerClause() {
assertNull(objectType.getPerClause());
|
153,535 |
Bug 153535 Bug in reflection delegate signature for array of object type
|
The following problem is interesting because the advice weaves correctly with Java 1.5 LTW and also using Java 1.4 with build-time weaving. However, the following call pointcut isn't matching the expected call site in Java 1.4 load-time weaving (*). Pointcut: private pointcut inExecQuery() : (within(uk.ltd.getahead.dwr.impl.ExecuteQuery) || within(uk.ltd.getahead.dwr.ExecuteQuery)); public pointcut dwrQuery(Method method, Object receiver, Object[] params) : inExecQuery() && withincode(* execute(..)) && call(* Method.invoke(..)) && args(receiver, params) && target(method); protected pointcut monitorEnd() : dwrQuery(*, *, *); Matching call site: Object reply = method.invoke(object, params); I've tracked it down to failing to find the method in ResolvedType.matches. On line 405: "m1.getSignature()"= "(Ljava/lang/Object;[Ljava.lang.Object;)Ljava/lang/Object;" "m2.getSignature()"= "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;" Note the difference between . and / ^ ^ It looks to me like the signature for array types in the reflection delegate is erroneously using . instead of /. I have attached a patch to the ReflectionBasedReferenceTypeDelegateTest that isolates this unexpected signature return. Hopefully you agree that this is not correct. If not, some more information follows. Here's the stack trace where the match fails: ResolvedType.matches(Member, Member) line: 405 ReferenceType(ResolvedType).lookupMember(Member, Iterator) line: 347 ReferenceType(ResolvedType).lookupMethod(Member) line: 326 LTWWorld(World).resolve(Member) line: 504 MemberImpl.resolve(World) line: 93 JoinPointSignatureIterator.addSignaturesUpToFirstDefiningMember() line: 109 JoinPointSignatureIterator.<init>(Member, World) line: 51 MemberImpl.getJoinPointSignatures(World) line: 943 SignaturePattern.matches(Member, World, boolean) line: 286 KindedPointcut.matchInternal(Shadow) line: 106 KindedPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 53 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 OrPointcut.matchInternal(Shadow) line: 50 OrPointcut(Pointcut).match(Shadow) line: 146 BcelAdvice(ShadowMunger).match(Shadow, World) line: 71 BcelAdvice(Advice).match(Shadow, World) line: 112 BcelAdvice.match(Shadow, World) line: 107 BcelClassWeaver.match(BcelShadow, List) line: 2806 BcelClassWeaver.matchInvokeInstruction(LazyMethodGen, InstructionHandle, InvokeInstruction, BcelShadow, List) line: 2768 BcelClassWeaver.match(LazyMethodGen, InstructionHandle, BcelShadow, List) line: 2506 BcelClassWeaver.match(LazyMethodGen) line: 2332 BcelClassWeaver.weave() line: 494 BcelClassWeaver.weave(BcelWorld, LazyClassGen, List, List, List) line: 119 BcelWeaver.weave(UnwovenClassFile, BcelObjectType, boolean) line: 1613 BcelWeaver.weaveWithoutDump(UnwovenClassFile, BcelObjectType) line: 1564 BcelWeaver.weaveAndNotify(UnwovenClassFile, BcelObjectType, IWeaveRequestor) line: 1341 BcelWeaver.weave(IClassFileProvider) line: 1163 ClassLoaderWeavingAdaptor(WeavingAdaptor).getWovenBytes(String, byte[]) line: 319 ClassLoaderWeavingAdaptor(WeavingAdaptor).weaveClass(String, byte[]) line: 225 Aj.preProcess(String, byte[], ClassLoader) line: 77 ClassPreProcessorAdapter.preProcess(String, byte[], ClassLoader) line: 67 ClassPreProcessorHelper.defineClass0Pre(ClassLoader, String, byte[], int, int, ProtectionDomain) line: 107 WebappClassLoader(ClassLoader).defineClass(String, byte[], int, int, ProtectionDomain) line: 539 WebappClassLoader(SecureClassLoader).defineClass(String, byte[], int, int, CodeSource) line: 123 WebappClassLoader.findClassInternal(String) line: 1786 WebappClassLoader.findClass(String) line: 1048 WebappClassLoader.loadClass(String, boolean) line: 1506 WebappClassLoader.loadClass(String) line: 1385 WebappClassLoader(ClassLoader).loadClassInternal(String) line: 302 Class.forName0(String, boolean, ClassLoader) line: not available [native method] Class.forName(String) line: 141 InitializeLog.setWarnLogging(String) line: 121 InitializeLog.initializeLogging() line: 96 ContextLoaderServlet.init() line: 13 ContextLoaderServlet(GenericServlet).init(ServletConfig) line: 212 StandardWrapper.loadServlet() line: 879 StandardWrapper.load() line: 767 StandardContext.loadOnStartup(Container[]) line: 3483 StandardContext.start() line: 3709 StandardHost(ContainerBase).addChildInternal(Container) line: 776 StandardHost(ContainerBase).addChild(Container) line: 759 StandardHost.addChild(Container) line: 537 StandardHostDeployer.install(String, URL) line: 260 StandardHost.install(String, URL) line: 730 HostConfig.deployWARs(File, String[]) line: 558 HostConfig.deployApps() line: 373 HostConfig.start() line: 784 HostConfig.lifecycleEvent(LifecycleEvent) line: 330 LifecycleSupport.fireLifecycleEvent(String, Object) line: 119 StandardHost(ContainerBase).start() line: 1155 StandardHost.start() line: 696 StandardEngine(ContainerBase).start() line: 1147 StandardEngine.start() line: 310 StandardService.start() line: 449 StandardServer.start() line: 2212 Catalina.start() line: 458 Catalina.execute() line: 345 Catalina.process(String[]) line: 129 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 Method.invoke(Object, Object[]) line: 324 Bootstrap.main(String[]) line: 150 I'm using a modified version of Alex Vasseur's LTW plugin for a Java 1.4 VM although I haven't tested on the JRockIt plugin for a 1.4 VM: my guess is that this would fail there too.
|
resolved fixed
|
82e3e13
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-15T11:51:21Z | 2006-08-11T07:06:40Z |
weaver/testsrc/org/aspectj/weaver/reflect/ReflectionBasedReferenceTypeDelegateTest.java
|
}
public void testGetModifiers() {
assertEquals(Object.class.getModifiers(),objectType.getModifiers());
}
public void testGetSuperclass() {
assertTrue("Superclass of object should be null, but it is: "+objectType.getSuperclass(),objectType.getSuperclass()==null);
assertEquals(objectType,world.resolve("java.lang.Class").getSuperclass());
ResolvedType d = world.resolve("reflect.tests.D");
assertEquals(world.resolve("reflect.tests.C"),d.getSuperclass());
}
protected int findMethod(String name, ResolvedMember[] methods) {
for (int i=0; i<methods.length; i++) {
if (name.equals(methods[i].getName())) {
return i;
}
}
return -1;
}
protected int findMethod(String name, int numArgs, ResolvedMember[] methods) {
for (int i=0; i<methods.length; i++) {
if (name.equals(methods[i].getName()) && (methods[i].getParameterTypes().length == numArgs)) {
return i;
}
}
return -1;
}
|
153,535 |
Bug 153535 Bug in reflection delegate signature for array of object type
|
The following problem is interesting because the advice weaves correctly with Java 1.5 LTW and also using Java 1.4 with build-time weaving. However, the following call pointcut isn't matching the expected call site in Java 1.4 load-time weaving (*). Pointcut: private pointcut inExecQuery() : (within(uk.ltd.getahead.dwr.impl.ExecuteQuery) || within(uk.ltd.getahead.dwr.ExecuteQuery)); public pointcut dwrQuery(Method method, Object receiver, Object[] params) : inExecQuery() && withincode(* execute(..)) && call(* Method.invoke(..)) && args(receiver, params) && target(method); protected pointcut monitorEnd() : dwrQuery(*, *, *); Matching call site: Object reply = method.invoke(object, params); I've tracked it down to failing to find the method in ResolvedType.matches. On line 405: "m1.getSignature()"= "(Ljava/lang/Object;[Ljava.lang.Object;)Ljava/lang/Object;" "m2.getSignature()"= "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;" Note the difference between . and / ^ ^ It looks to me like the signature for array types in the reflection delegate is erroneously using . instead of /. I have attached a patch to the ReflectionBasedReferenceTypeDelegateTest that isolates this unexpected signature return. Hopefully you agree that this is not correct. If not, some more information follows. Here's the stack trace where the match fails: ResolvedType.matches(Member, Member) line: 405 ReferenceType(ResolvedType).lookupMember(Member, Iterator) line: 347 ReferenceType(ResolvedType).lookupMethod(Member) line: 326 LTWWorld(World).resolve(Member) line: 504 MemberImpl.resolve(World) line: 93 JoinPointSignatureIterator.addSignaturesUpToFirstDefiningMember() line: 109 JoinPointSignatureIterator.<init>(Member, World) line: 51 MemberImpl.getJoinPointSignatures(World) line: 943 SignaturePattern.matches(Member, World, boolean) line: 286 KindedPointcut.matchInternal(Shadow) line: 106 KindedPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 53 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 OrPointcut.matchInternal(Shadow) line: 50 OrPointcut(Pointcut).match(Shadow) line: 146 BcelAdvice(ShadowMunger).match(Shadow, World) line: 71 BcelAdvice(Advice).match(Shadow, World) line: 112 BcelAdvice.match(Shadow, World) line: 107 BcelClassWeaver.match(BcelShadow, List) line: 2806 BcelClassWeaver.matchInvokeInstruction(LazyMethodGen, InstructionHandle, InvokeInstruction, BcelShadow, List) line: 2768 BcelClassWeaver.match(LazyMethodGen, InstructionHandle, BcelShadow, List) line: 2506 BcelClassWeaver.match(LazyMethodGen) line: 2332 BcelClassWeaver.weave() line: 494 BcelClassWeaver.weave(BcelWorld, LazyClassGen, List, List, List) line: 119 BcelWeaver.weave(UnwovenClassFile, BcelObjectType, boolean) line: 1613 BcelWeaver.weaveWithoutDump(UnwovenClassFile, BcelObjectType) line: 1564 BcelWeaver.weaveAndNotify(UnwovenClassFile, BcelObjectType, IWeaveRequestor) line: 1341 BcelWeaver.weave(IClassFileProvider) line: 1163 ClassLoaderWeavingAdaptor(WeavingAdaptor).getWovenBytes(String, byte[]) line: 319 ClassLoaderWeavingAdaptor(WeavingAdaptor).weaveClass(String, byte[]) line: 225 Aj.preProcess(String, byte[], ClassLoader) line: 77 ClassPreProcessorAdapter.preProcess(String, byte[], ClassLoader) line: 67 ClassPreProcessorHelper.defineClass0Pre(ClassLoader, String, byte[], int, int, ProtectionDomain) line: 107 WebappClassLoader(ClassLoader).defineClass(String, byte[], int, int, ProtectionDomain) line: 539 WebappClassLoader(SecureClassLoader).defineClass(String, byte[], int, int, CodeSource) line: 123 WebappClassLoader.findClassInternal(String) line: 1786 WebappClassLoader.findClass(String) line: 1048 WebappClassLoader.loadClass(String, boolean) line: 1506 WebappClassLoader.loadClass(String) line: 1385 WebappClassLoader(ClassLoader).loadClassInternal(String) line: 302 Class.forName0(String, boolean, ClassLoader) line: not available [native method] Class.forName(String) line: 141 InitializeLog.setWarnLogging(String) line: 121 InitializeLog.initializeLogging() line: 96 ContextLoaderServlet.init() line: 13 ContextLoaderServlet(GenericServlet).init(ServletConfig) line: 212 StandardWrapper.loadServlet() line: 879 StandardWrapper.load() line: 767 StandardContext.loadOnStartup(Container[]) line: 3483 StandardContext.start() line: 3709 StandardHost(ContainerBase).addChildInternal(Container) line: 776 StandardHost(ContainerBase).addChild(Container) line: 759 StandardHost.addChild(Container) line: 537 StandardHostDeployer.install(String, URL) line: 260 StandardHost.install(String, URL) line: 730 HostConfig.deployWARs(File, String[]) line: 558 HostConfig.deployApps() line: 373 HostConfig.start() line: 784 HostConfig.lifecycleEvent(LifecycleEvent) line: 330 LifecycleSupport.fireLifecycleEvent(String, Object) line: 119 StandardHost(ContainerBase).start() line: 1155 StandardHost.start() line: 696 StandardEngine(ContainerBase).start() line: 1147 StandardEngine.start() line: 310 StandardService.start() line: 449 StandardServer.start() line: 2212 Catalina.start() line: 458 Catalina.execute() line: 345 Catalina.process(String[]) line: 129 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 Method.invoke(Object, Object[]) line: 324 Bootstrap.main(String[]) line: 150 I'm using a modified version of Alex Vasseur's LTW plugin for a Java 1.4 VM although I haven't tested on the JRockIt plugin for a 1.4 VM: my guess is that this would fail there too.
|
resolved fixed
|
82e3e13
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-15T11:51:21Z | 2006-08-11T07:06:40Z |
weaver/testsrc/org/aspectj/weaver/reflect/ReflectionBasedReferenceTypeDelegateTest.java
|
public void testGetDeclaredMethods() {
ResolvedMember[] methods = objectType.getDeclaredMethods();
assertEquals(Object.class.getDeclaredMethods().length + Object.class.getDeclaredConstructors().length, methods.length);
ResolvedType c = world.resolve("reflect.tests.C");
methods = c.getDeclaredMethods();
assertEquals(3,methods.length);
int idx = findMethod("foo", methods);
assertTrue(idx > -1);
assertEquals(world.resolve("java.lang.String"),methods[idx].getReturnType());
assertEquals(1, methods[idx].getParameterTypes().length);
assertEquals(objectType,methods[idx].getParameterTypes()[0]);
assertEquals(1,methods[idx].getExceptions().length);
assertEquals(world.resolve("java.lang.Exception"),methods[idx].getExceptions()[0]);
int baridx = findMethod("bar", methods);
int initidx = findMethod("<init>", methods);
assertTrue(baridx > -1);
assertTrue(initidx > -1);
assertTrue(baridx != initidx && baridx != idx && idx <= 2 && initidx <= 2 && baridx <= 2);
ResolvedType d = world.resolve("reflect.tests.D");
methods = d.getDeclaredMethods();
assertEquals(2,methods.length);
classType = world.resolve("java.lang.Class");
methods = classType.getDeclaredMethods();
assertEquals(Class.class.getDeclaredMethods().length + Class.class.getDeclaredConstructors().length, methods.length);
}
|
153,535 |
Bug 153535 Bug in reflection delegate signature for array of object type
|
The following problem is interesting because the advice weaves correctly with Java 1.5 LTW and also using Java 1.4 with build-time weaving. However, the following call pointcut isn't matching the expected call site in Java 1.4 load-time weaving (*). Pointcut: private pointcut inExecQuery() : (within(uk.ltd.getahead.dwr.impl.ExecuteQuery) || within(uk.ltd.getahead.dwr.ExecuteQuery)); public pointcut dwrQuery(Method method, Object receiver, Object[] params) : inExecQuery() && withincode(* execute(..)) && call(* Method.invoke(..)) && args(receiver, params) && target(method); protected pointcut monitorEnd() : dwrQuery(*, *, *); Matching call site: Object reply = method.invoke(object, params); I've tracked it down to failing to find the method in ResolvedType.matches. On line 405: "m1.getSignature()"= "(Ljava/lang/Object;[Ljava.lang.Object;)Ljava/lang/Object;" "m2.getSignature()"= "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;" Note the difference between . and / ^ ^ It looks to me like the signature for array types in the reflection delegate is erroneously using . instead of /. I have attached a patch to the ReflectionBasedReferenceTypeDelegateTest that isolates this unexpected signature return. Hopefully you agree that this is not correct. If not, some more information follows. Here's the stack trace where the match fails: ResolvedType.matches(Member, Member) line: 405 ReferenceType(ResolvedType).lookupMember(Member, Iterator) line: 347 ReferenceType(ResolvedType).lookupMethod(Member) line: 326 LTWWorld(World).resolve(Member) line: 504 MemberImpl.resolve(World) line: 93 JoinPointSignatureIterator.addSignaturesUpToFirstDefiningMember() line: 109 JoinPointSignatureIterator.<init>(Member, World) line: 51 MemberImpl.getJoinPointSignatures(World) line: 943 SignaturePattern.matches(Member, World, boolean) line: 286 KindedPointcut.matchInternal(Shadow) line: 106 KindedPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 53 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 OrPointcut.matchInternal(Shadow) line: 50 OrPointcut(Pointcut).match(Shadow) line: 146 BcelAdvice(ShadowMunger).match(Shadow, World) line: 71 BcelAdvice(Advice).match(Shadow, World) line: 112 BcelAdvice.match(Shadow, World) line: 107 BcelClassWeaver.match(BcelShadow, List) line: 2806 BcelClassWeaver.matchInvokeInstruction(LazyMethodGen, InstructionHandle, InvokeInstruction, BcelShadow, List) line: 2768 BcelClassWeaver.match(LazyMethodGen, InstructionHandle, BcelShadow, List) line: 2506 BcelClassWeaver.match(LazyMethodGen) line: 2332 BcelClassWeaver.weave() line: 494 BcelClassWeaver.weave(BcelWorld, LazyClassGen, List, List, List) line: 119 BcelWeaver.weave(UnwovenClassFile, BcelObjectType, boolean) line: 1613 BcelWeaver.weaveWithoutDump(UnwovenClassFile, BcelObjectType) line: 1564 BcelWeaver.weaveAndNotify(UnwovenClassFile, BcelObjectType, IWeaveRequestor) line: 1341 BcelWeaver.weave(IClassFileProvider) line: 1163 ClassLoaderWeavingAdaptor(WeavingAdaptor).getWovenBytes(String, byte[]) line: 319 ClassLoaderWeavingAdaptor(WeavingAdaptor).weaveClass(String, byte[]) line: 225 Aj.preProcess(String, byte[], ClassLoader) line: 77 ClassPreProcessorAdapter.preProcess(String, byte[], ClassLoader) line: 67 ClassPreProcessorHelper.defineClass0Pre(ClassLoader, String, byte[], int, int, ProtectionDomain) line: 107 WebappClassLoader(ClassLoader).defineClass(String, byte[], int, int, ProtectionDomain) line: 539 WebappClassLoader(SecureClassLoader).defineClass(String, byte[], int, int, CodeSource) line: 123 WebappClassLoader.findClassInternal(String) line: 1786 WebappClassLoader.findClass(String) line: 1048 WebappClassLoader.loadClass(String, boolean) line: 1506 WebappClassLoader.loadClass(String) line: 1385 WebappClassLoader(ClassLoader).loadClassInternal(String) line: 302 Class.forName0(String, boolean, ClassLoader) line: not available [native method] Class.forName(String) line: 141 InitializeLog.setWarnLogging(String) line: 121 InitializeLog.initializeLogging() line: 96 ContextLoaderServlet.init() line: 13 ContextLoaderServlet(GenericServlet).init(ServletConfig) line: 212 StandardWrapper.loadServlet() line: 879 StandardWrapper.load() line: 767 StandardContext.loadOnStartup(Container[]) line: 3483 StandardContext.start() line: 3709 StandardHost(ContainerBase).addChildInternal(Container) line: 776 StandardHost(ContainerBase).addChild(Container) line: 759 StandardHost.addChild(Container) line: 537 StandardHostDeployer.install(String, URL) line: 260 StandardHost.install(String, URL) line: 730 HostConfig.deployWARs(File, String[]) line: 558 HostConfig.deployApps() line: 373 HostConfig.start() line: 784 HostConfig.lifecycleEvent(LifecycleEvent) line: 330 LifecycleSupport.fireLifecycleEvent(String, Object) line: 119 StandardHost(ContainerBase).start() line: 1155 StandardHost.start() line: 696 StandardEngine(ContainerBase).start() line: 1147 StandardEngine.start() line: 310 StandardService.start() line: 449 StandardServer.start() line: 2212 Catalina.start() line: 458 Catalina.execute() line: 345 Catalina.process(String[]) line: 129 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 Method.invoke(Object, Object[]) line: 324 Bootstrap.main(String[]) line: 150 I'm using a modified version of Alex Vasseur's LTW plugin for a Java 1.4 VM although I haven't tested on the JRockIt plugin for a 1.4 VM: my guess is that this would fail there too.
|
resolved fixed
|
82e3e13
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-15T11:51:21Z | 2006-08-11T07:06:40Z |
weaver/testsrc/org/aspectj/weaver/reflect/ReflectionBasedReferenceTypeDelegateTest.java
|
public void testGetDeclaredFields() {
ResolvedMember[] fields = objectType.getDeclaredFields();
assertEquals(0,fields.length);
ResolvedType c = world.resolve("reflect.tests.C");
fields = c.getDeclaredFields();
assertEquals(2,fields.length);
assertEquals("f",fields[0].getName());
assertEquals("s",fields[1].getName());
assertEquals(ResolvedType.INT,fields[0].getReturnType());
assertEquals(world.resolve("java.lang.String"),fields[1].getReturnType());
}
public void testGetDeclaredInterfaces() {
ResolvedType[] interfaces = objectType.getDeclaredInterfaces();
assertEquals(0,interfaces.length);
ResolvedType d = world.resolve("reflect.tests.D");
interfaces = d.getDeclaredInterfaces();
assertEquals(1,interfaces.length);
assertEquals(world.resolve("java.io.Serializable"),interfaces[0]);
}
public void testGetDeclaredPointcuts() {
ResolvedMember[] pointcuts = objectType.getDeclaredPointcuts();
assertEquals(0,pointcuts.length);
}
public void testSerializableSuperclass() {
|
153,535 |
Bug 153535 Bug in reflection delegate signature for array of object type
|
The following problem is interesting because the advice weaves correctly with Java 1.5 LTW and also using Java 1.4 with build-time weaving. However, the following call pointcut isn't matching the expected call site in Java 1.4 load-time weaving (*). Pointcut: private pointcut inExecQuery() : (within(uk.ltd.getahead.dwr.impl.ExecuteQuery) || within(uk.ltd.getahead.dwr.ExecuteQuery)); public pointcut dwrQuery(Method method, Object receiver, Object[] params) : inExecQuery() && withincode(* execute(..)) && call(* Method.invoke(..)) && args(receiver, params) && target(method); protected pointcut monitorEnd() : dwrQuery(*, *, *); Matching call site: Object reply = method.invoke(object, params); I've tracked it down to failing to find the method in ResolvedType.matches. On line 405: "m1.getSignature()"= "(Ljava/lang/Object;[Ljava.lang.Object;)Ljava/lang/Object;" "m2.getSignature()"= "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;" Note the difference between . and / ^ ^ It looks to me like the signature for array types in the reflection delegate is erroneously using . instead of /. I have attached a patch to the ReflectionBasedReferenceTypeDelegateTest that isolates this unexpected signature return. Hopefully you agree that this is not correct. If not, some more information follows. Here's the stack trace where the match fails: ResolvedType.matches(Member, Member) line: 405 ReferenceType(ResolvedType).lookupMember(Member, Iterator) line: 347 ReferenceType(ResolvedType).lookupMethod(Member) line: 326 LTWWorld(World).resolve(Member) line: 504 MemberImpl.resolve(World) line: 93 JoinPointSignatureIterator.addSignaturesUpToFirstDefiningMember() line: 109 JoinPointSignatureIterator.<init>(Member, World) line: 51 MemberImpl.getJoinPointSignatures(World) line: 943 SignaturePattern.matches(Member, World, boolean) line: 286 KindedPointcut.matchInternal(Shadow) line: 106 KindedPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 53 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 OrPointcut.matchInternal(Shadow) line: 50 OrPointcut(Pointcut).match(Shadow) line: 146 BcelAdvice(ShadowMunger).match(Shadow, World) line: 71 BcelAdvice(Advice).match(Shadow, World) line: 112 BcelAdvice.match(Shadow, World) line: 107 BcelClassWeaver.match(BcelShadow, List) line: 2806 BcelClassWeaver.matchInvokeInstruction(LazyMethodGen, InstructionHandle, InvokeInstruction, BcelShadow, List) line: 2768 BcelClassWeaver.match(LazyMethodGen, InstructionHandle, BcelShadow, List) line: 2506 BcelClassWeaver.match(LazyMethodGen) line: 2332 BcelClassWeaver.weave() line: 494 BcelClassWeaver.weave(BcelWorld, LazyClassGen, List, List, List) line: 119 BcelWeaver.weave(UnwovenClassFile, BcelObjectType, boolean) line: 1613 BcelWeaver.weaveWithoutDump(UnwovenClassFile, BcelObjectType) line: 1564 BcelWeaver.weaveAndNotify(UnwovenClassFile, BcelObjectType, IWeaveRequestor) line: 1341 BcelWeaver.weave(IClassFileProvider) line: 1163 ClassLoaderWeavingAdaptor(WeavingAdaptor).getWovenBytes(String, byte[]) line: 319 ClassLoaderWeavingAdaptor(WeavingAdaptor).weaveClass(String, byte[]) line: 225 Aj.preProcess(String, byte[], ClassLoader) line: 77 ClassPreProcessorAdapter.preProcess(String, byte[], ClassLoader) line: 67 ClassPreProcessorHelper.defineClass0Pre(ClassLoader, String, byte[], int, int, ProtectionDomain) line: 107 WebappClassLoader(ClassLoader).defineClass(String, byte[], int, int, ProtectionDomain) line: 539 WebappClassLoader(SecureClassLoader).defineClass(String, byte[], int, int, CodeSource) line: 123 WebappClassLoader.findClassInternal(String) line: 1786 WebappClassLoader.findClass(String) line: 1048 WebappClassLoader.loadClass(String, boolean) line: 1506 WebappClassLoader.loadClass(String) line: 1385 WebappClassLoader(ClassLoader).loadClassInternal(String) line: 302 Class.forName0(String, boolean, ClassLoader) line: not available [native method] Class.forName(String) line: 141 InitializeLog.setWarnLogging(String) line: 121 InitializeLog.initializeLogging() line: 96 ContextLoaderServlet.init() line: 13 ContextLoaderServlet(GenericServlet).init(ServletConfig) line: 212 StandardWrapper.loadServlet() line: 879 StandardWrapper.load() line: 767 StandardContext.loadOnStartup(Container[]) line: 3483 StandardContext.start() line: 3709 StandardHost(ContainerBase).addChildInternal(Container) line: 776 StandardHost(ContainerBase).addChild(Container) line: 759 StandardHost.addChild(Container) line: 537 StandardHostDeployer.install(String, URL) line: 260 StandardHost.install(String, URL) line: 730 HostConfig.deployWARs(File, String[]) line: 558 HostConfig.deployApps() line: 373 HostConfig.start() line: 784 HostConfig.lifecycleEvent(LifecycleEvent) line: 330 LifecycleSupport.fireLifecycleEvent(String, Object) line: 119 StandardHost(ContainerBase).start() line: 1155 StandardHost.start() line: 696 StandardEngine(ContainerBase).start() line: 1147 StandardEngine.start() line: 310 StandardService.start() line: 449 StandardServer.start() line: 2212 Catalina.start() line: 458 Catalina.execute() line: 345 Catalina.process(String[]) line: 129 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 Method.invoke(Object, Object[]) line: 324 Bootstrap.main(String[]) line: 150 I'm using a modified version of Alex Vasseur's LTW plugin for a Java 1.4 VM although I haven't tested on the JRockIt plugin for a 1.4 VM: my guess is that this would fail there too.
|
resolved fixed
|
82e3e13
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-15T11:51:21Z | 2006-08-11T07:06:40Z |
weaver/testsrc/org/aspectj/weaver/reflect/ReflectionBasedReferenceTypeDelegateTest.java
|
ResolvedType serializableType = world.resolve("java.io.Serializable");
ResolvedType superType = serializableType.getSuperclass();
assertTrue("Superclass of serializable should be Object but was "+superType,superType.equals(UnresolvedType.OBJECT));
BcelWorld bcelworld = new BcelWorld();
bcelworld.setBehaveInJava5Way(true);
ResolvedType bcelSupertype = bcelworld.resolve(UnresolvedType.SERIALIZABLE).getSuperclass();
assertTrue("Should be null but is "+bcelSupertype,bcelSupertype.equals(UnresolvedType.OBJECT));
}
public void testSubinterfaceSuperclass() {
ResolvedType ifaceType = world.resolve("java.security.Key");
ResolvedType superType = ifaceType.getSuperclass();
assertTrue("Superclass should be Object but was "+superType,superType.equals(UnresolvedType.OBJECT));
BcelWorld bcelworld = new BcelWorld();
bcelworld.setBehaveInJava5Way(true);
ResolvedType bcelSupertype = bcelworld.resolve("java.security.Key").getSuperclass();
assertTrue("Should be null but is "+bcelSupertype,bcelSupertype.equals(UnresolvedType.OBJECT));
}
public void testVoidSuperclass() {
ResolvedType voidType = world.resolve(Void.TYPE);
ResolvedType superType = voidType.getSuperclass();
assertNull(superType);
BcelWorld bcelworld = new BcelWorld();
bcelworld.setBehaveInJava5Way(true);
ResolvedType bcelSupertype = bcelworld.resolve("void").getSuperclass();
assertTrue("Should be null but is "+bcelSupertype,bcelSupertype==null);
}
public void testIntSuperclass() {
|
153,535 |
Bug 153535 Bug in reflection delegate signature for array of object type
|
The following problem is interesting because the advice weaves correctly with Java 1.5 LTW and also using Java 1.4 with build-time weaving. However, the following call pointcut isn't matching the expected call site in Java 1.4 load-time weaving (*). Pointcut: private pointcut inExecQuery() : (within(uk.ltd.getahead.dwr.impl.ExecuteQuery) || within(uk.ltd.getahead.dwr.ExecuteQuery)); public pointcut dwrQuery(Method method, Object receiver, Object[] params) : inExecQuery() && withincode(* execute(..)) && call(* Method.invoke(..)) && args(receiver, params) && target(method); protected pointcut monitorEnd() : dwrQuery(*, *, *); Matching call site: Object reply = method.invoke(object, params); I've tracked it down to failing to find the method in ResolvedType.matches. On line 405: "m1.getSignature()"= "(Ljava/lang/Object;[Ljava.lang.Object;)Ljava/lang/Object;" "m2.getSignature()"= "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;" Note the difference between . and / ^ ^ It looks to me like the signature for array types in the reflection delegate is erroneously using . instead of /. I have attached a patch to the ReflectionBasedReferenceTypeDelegateTest that isolates this unexpected signature return. Hopefully you agree that this is not correct. If not, some more information follows. Here's the stack trace where the match fails: ResolvedType.matches(Member, Member) line: 405 ReferenceType(ResolvedType).lookupMember(Member, Iterator) line: 347 ReferenceType(ResolvedType).lookupMethod(Member) line: 326 LTWWorld(World).resolve(Member) line: 504 MemberImpl.resolve(World) line: 93 JoinPointSignatureIterator.addSignaturesUpToFirstDefiningMember() line: 109 JoinPointSignatureIterator.<init>(Member, World) line: 51 MemberImpl.getJoinPointSignatures(World) line: 943 SignaturePattern.matches(Member, World, boolean) line: 286 KindedPointcut.matchInternal(Shadow) line: 106 KindedPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 53 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 OrPointcut.matchInternal(Shadow) line: 50 OrPointcut(Pointcut).match(Shadow) line: 146 BcelAdvice(ShadowMunger).match(Shadow, World) line: 71 BcelAdvice(Advice).match(Shadow, World) line: 112 BcelAdvice.match(Shadow, World) line: 107 BcelClassWeaver.match(BcelShadow, List) line: 2806 BcelClassWeaver.matchInvokeInstruction(LazyMethodGen, InstructionHandle, InvokeInstruction, BcelShadow, List) line: 2768 BcelClassWeaver.match(LazyMethodGen, InstructionHandle, BcelShadow, List) line: 2506 BcelClassWeaver.match(LazyMethodGen) line: 2332 BcelClassWeaver.weave() line: 494 BcelClassWeaver.weave(BcelWorld, LazyClassGen, List, List, List) line: 119 BcelWeaver.weave(UnwovenClassFile, BcelObjectType, boolean) line: 1613 BcelWeaver.weaveWithoutDump(UnwovenClassFile, BcelObjectType) line: 1564 BcelWeaver.weaveAndNotify(UnwovenClassFile, BcelObjectType, IWeaveRequestor) line: 1341 BcelWeaver.weave(IClassFileProvider) line: 1163 ClassLoaderWeavingAdaptor(WeavingAdaptor).getWovenBytes(String, byte[]) line: 319 ClassLoaderWeavingAdaptor(WeavingAdaptor).weaveClass(String, byte[]) line: 225 Aj.preProcess(String, byte[], ClassLoader) line: 77 ClassPreProcessorAdapter.preProcess(String, byte[], ClassLoader) line: 67 ClassPreProcessorHelper.defineClass0Pre(ClassLoader, String, byte[], int, int, ProtectionDomain) line: 107 WebappClassLoader(ClassLoader).defineClass(String, byte[], int, int, ProtectionDomain) line: 539 WebappClassLoader(SecureClassLoader).defineClass(String, byte[], int, int, CodeSource) line: 123 WebappClassLoader.findClassInternal(String) line: 1786 WebappClassLoader.findClass(String) line: 1048 WebappClassLoader.loadClass(String, boolean) line: 1506 WebappClassLoader.loadClass(String) line: 1385 WebappClassLoader(ClassLoader).loadClassInternal(String) line: 302 Class.forName0(String, boolean, ClassLoader) line: not available [native method] Class.forName(String) line: 141 InitializeLog.setWarnLogging(String) line: 121 InitializeLog.initializeLogging() line: 96 ContextLoaderServlet.init() line: 13 ContextLoaderServlet(GenericServlet).init(ServletConfig) line: 212 StandardWrapper.loadServlet() line: 879 StandardWrapper.load() line: 767 StandardContext.loadOnStartup(Container[]) line: 3483 StandardContext.start() line: 3709 StandardHost(ContainerBase).addChildInternal(Container) line: 776 StandardHost(ContainerBase).addChild(Container) line: 759 StandardHost.addChild(Container) line: 537 StandardHostDeployer.install(String, URL) line: 260 StandardHost.install(String, URL) line: 730 HostConfig.deployWARs(File, String[]) line: 558 HostConfig.deployApps() line: 373 HostConfig.start() line: 784 HostConfig.lifecycleEvent(LifecycleEvent) line: 330 LifecycleSupport.fireLifecycleEvent(String, Object) line: 119 StandardHost(ContainerBase).start() line: 1155 StandardHost.start() line: 696 StandardEngine(ContainerBase).start() line: 1147 StandardEngine.start() line: 310 StandardService.start() line: 449 StandardServer.start() line: 2212 Catalina.start() line: 458 Catalina.execute() line: 345 Catalina.process(String[]) line: 129 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 Method.invoke(Object, Object[]) line: 324 Bootstrap.main(String[]) line: 150 I'm using a modified version of Alex Vasseur's LTW plugin for a Java 1.4 VM although I haven't tested on the JRockIt plugin for a 1.4 VM: my guess is that this would fail there too.
|
resolved fixed
|
82e3e13
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-15T11:51:21Z | 2006-08-11T07:06:40Z |
weaver/testsrc/org/aspectj/weaver/reflect/ReflectionBasedReferenceTypeDelegateTest.java
|
ResolvedType voidType = world.resolve(Integer.TYPE);
ResolvedType superType = voidType.getSuperclass();
assertNull(superType);
BcelWorld bcelworld = new BcelWorld();
bcelworld.setBehaveInJava5Way(true);
ResolvedType bcelSupertype = bcelworld.resolve("int").getSuperclass();
assertTrue("Should be null but is "+bcelSupertype,bcelSupertype==null);
}
public void testGenericInterfaceSuperclass_BcelWorldResolution() {
BcelWorld bcelworld = new BcelWorld();
bcelworld.setBehaveInJava5Way(true);
UnresolvedType javaUtilMap = UnresolvedType.forName("java.util.Map");
ReferenceType rawType = (ReferenceType) bcelworld.resolve(javaUtilMap);
assertTrue("Should be the raw type ?!? "+rawType.getTypekind(),rawType.isRawType());
ReferenceType genericType = (ReferenceType)rawType.getGenericType();
assertTrue("Should be the generic type ?!? "+genericType.getTypekind(),genericType.isGenericType());
ResolvedType rt = rawType.getSuperclass();
assertTrue("Superclass for Map raw type should be Object but was "+rt,rt.equals(UnresolvedType.OBJECT));
ResolvedType rt2 = genericType.getSuperclass();
assertTrue("Superclass for Map generic type should be Object but was "+rt2,rt2.equals(UnresolvedType.OBJECT));
}
public void testCompareSubclassDelegates() {
|
153,535 |
Bug 153535 Bug in reflection delegate signature for array of object type
|
The following problem is interesting because the advice weaves correctly with Java 1.5 LTW and also using Java 1.4 with build-time weaving. However, the following call pointcut isn't matching the expected call site in Java 1.4 load-time weaving (*). Pointcut: private pointcut inExecQuery() : (within(uk.ltd.getahead.dwr.impl.ExecuteQuery) || within(uk.ltd.getahead.dwr.ExecuteQuery)); public pointcut dwrQuery(Method method, Object receiver, Object[] params) : inExecQuery() && withincode(* execute(..)) && call(* Method.invoke(..)) && args(receiver, params) && target(method); protected pointcut monitorEnd() : dwrQuery(*, *, *); Matching call site: Object reply = method.invoke(object, params); I've tracked it down to failing to find the method in ResolvedType.matches. On line 405: "m1.getSignature()"= "(Ljava/lang/Object;[Ljava.lang.Object;)Ljava/lang/Object;" "m2.getSignature()"= "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;" Note the difference between . and / ^ ^ It looks to me like the signature for array types in the reflection delegate is erroneously using . instead of /. I have attached a patch to the ReflectionBasedReferenceTypeDelegateTest that isolates this unexpected signature return. Hopefully you agree that this is not correct. If not, some more information follows. Here's the stack trace where the match fails: ResolvedType.matches(Member, Member) line: 405 ReferenceType(ResolvedType).lookupMember(Member, Iterator) line: 347 ReferenceType(ResolvedType).lookupMethod(Member) line: 326 LTWWorld(World).resolve(Member) line: 504 MemberImpl.resolve(World) line: 93 JoinPointSignatureIterator.addSignaturesUpToFirstDefiningMember() line: 109 JoinPointSignatureIterator.<init>(Member, World) line: 51 MemberImpl.getJoinPointSignatures(World) line: 943 SignaturePattern.matches(Member, World, boolean) line: 286 KindedPointcut.matchInternal(Shadow) line: 106 KindedPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 53 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 OrPointcut.matchInternal(Shadow) line: 50 OrPointcut(Pointcut).match(Shadow) line: 146 BcelAdvice(ShadowMunger).match(Shadow, World) line: 71 BcelAdvice(Advice).match(Shadow, World) line: 112 BcelAdvice.match(Shadow, World) line: 107 BcelClassWeaver.match(BcelShadow, List) line: 2806 BcelClassWeaver.matchInvokeInstruction(LazyMethodGen, InstructionHandle, InvokeInstruction, BcelShadow, List) line: 2768 BcelClassWeaver.match(LazyMethodGen, InstructionHandle, BcelShadow, List) line: 2506 BcelClassWeaver.match(LazyMethodGen) line: 2332 BcelClassWeaver.weave() line: 494 BcelClassWeaver.weave(BcelWorld, LazyClassGen, List, List, List) line: 119 BcelWeaver.weave(UnwovenClassFile, BcelObjectType, boolean) line: 1613 BcelWeaver.weaveWithoutDump(UnwovenClassFile, BcelObjectType) line: 1564 BcelWeaver.weaveAndNotify(UnwovenClassFile, BcelObjectType, IWeaveRequestor) line: 1341 BcelWeaver.weave(IClassFileProvider) line: 1163 ClassLoaderWeavingAdaptor(WeavingAdaptor).getWovenBytes(String, byte[]) line: 319 ClassLoaderWeavingAdaptor(WeavingAdaptor).weaveClass(String, byte[]) line: 225 Aj.preProcess(String, byte[], ClassLoader) line: 77 ClassPreProcessorAdapter.preProcess(String, byte[], ClassLoader) line: 67 ClassPreProcessorHelper.defineClass0Pre(ClassLoader, String, byte[], int, int, ProtectionDomain) line: 107 WebappClassLoader(ClassLoader).defineClass(String, byte[], int, int, ProtectionDomain) line: 539 WebappClassLoader(SecureClassLoader).defineClass(String, byte[], int, int, CodeSource) line: 123 WebappClassLoader.findClassInternal(String) line: 1786 WebappClassLoader.findClass(String) line: 1048 WebappClassLoader.loadClass(String, boolean) line: 1506 WebappClassLoader.loadClass(String) line: 1385 WebappClassLoader(ClassLoader).loadClassInternal(String) line: 302 Class.forName0(String, boolean, ClassLoader) line: not available [native method] Class.forName(String) line: 141 InitializeLog.setWarnLogging(String) line: 121 InitializeLog.initializeLogging() line: 96 ContextLoaderServlet.init() line: 13 ContextLoaderServlet(GenericServlet).init(ServletConfig) line: 212 StandardWrapper.loadServlet() line: 879 StandardWrapper.load() line: 767 StandardContext.loadOnStartup(Container[]) line: 3483 StandardContext.start() line: 3709 StandardHost(ContainerBase).addChildInternal(Container) line: 776 StandardHost(ContainerBase).addChild(Container) line: 759 StandardHost.addChild(Container) line: 537 StandardHostDeployer.install(String, URL) line: 260 StandardHost.install(String, URL) line: 730 HostConfig.deployWARs(File, String[]) line: 558 HostConfig.deployApps() line: 373 HostConfig.start() line: 784 HostConfig.lifecycleEvent(LifecycleEvent) line: 330 LifecycleSupport.fireLifecycleEvent(String, Object) line: 119 StandardHost(ContainerBase).start() line: 1155 StandardHost.start() line: 696 StandardEngine(ContainerBase).start() line: 1147 StandardEngine.start() line: 310 StandardService.start() line: 449 StandardServer.start() line: 2212 Catalina.start() line: 458 Catalina.execute() line: 345 Catalina.process(String[]) line: 129 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 Method.invoke(Object, Object[]) line: 324 Bootstrap.main(String[]) line: 150 I'm using a modified version of Alex Vasseur's LTW plugin for a Java 1.4 VM although I haven't tested on the JRockIt plugin for a 1.4 VM: my guess is that this would fail there too.
|
resolved fixed
|
82e3e13
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-15T11:51:21Z | 2006-08-11T07:06:40Z |
weaver/testsrc/org/aspectj/weaver/reflect/ReflectionBasedReferenceTypeDelegateTest.java
|
boolean barfIfClinitMissing = false;
world.setBehaveInJava5Way(true);
BcelWorld bcelWorld = new BcelWorld(getClass().getClassLoader(),IMessageHandler.THROW,null);
bcelWorld.setBehaveInJava5Way(true);
UnresolvedType javaUtilHashMap = UnresolvedType.forName("java.util.HashMap");
ReferenceType rawType =(ReferenceType)bcelWorld.resolve(javaUtilHashMap );
ReferenceType rawReflectType =(ReferenceType)world.resolve(javaUtilHashMap );
ResolvedMember[] rms1 = rawType.getDelegate().getDeclaredMethods();
ResolvedMember[] rms2 = rawReflectType.getDelegate().getDeclaredMethods();
StringBuffer errors = new StringBuffer();
Set one = new HashSet();
for (int i = 0; i < rms1.length; i++) {
one.add(rms1[i].toString());
}
Set two = new HashSet();
for (int i = 0; i < rms2.length; i++) {
two.add(rms2[i].toString());
}
for (int i = 0;i<rms2.length;i++) {
if (!one.contains(rms2[i].toString())) {
errors.append("Couldn't find "+rms2[i].toString()+" in the bcel set\n");
}
}
for (int i = 0;i<rms1.length;i++) {
if (!two.contains(rms1[i].toString())) {
if (!barfIfClinitMissing && rms1[i].getName().equals("<clinit>")) continue;
errors.append("Couldn't find "+rms1[i].toString()+" in the reflection set\n");
|
153,535 |
Bug 153535 Bug in reflection delegate signature for array of object type
|
The following problem is interesting because the advice weaves correctly with Java 1.5 LTW and also using Java 1.4 with build-time weaving. However, the following call pointcut isn't matching the expected call site in Java 1.4 load-time weaving (*). Pointcut: private pointcut inExecQuery() : (within(uk.ltd.getahead.dwr.impl.ExecuteQuery) || within(uk.ltd.getahead.dwr.ExecuteQuery)); public pointcut dwrQuery(Method method, Object receiver, Object[] params) : inExecQuery() && withincode(* execute(..)) && call(* Method.invoke(..)) && args(receiver, params) && target(method); protected pointcut monitorEnd() : dwrQuery(*, *, *); Matching call site: Object reply = method.invoke(object, params); I've tracked it down to failing to find the method in ResolvedType.matches. On line 405: "m1.getSignature()"= "(Ljava/lang/Object;[Ljava.lang.Object;)Ljava/lang/Object;" "m2.getSignature()"= "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;" Note the difference between . and / ^ ^ It looks to me like the signature for array types in the reflection delegate is erroneously using . instead of /. I have attached a patch to the ReflectionBasedReferenceTypeDelegateTest that isolates this unexpected signature return. Hopefully you agree that this is not correct. If not, some more information follows. Here's the stack trace where the match fails: ResolvedType.matches(Member, Member) line: 405 ReferenceType(ResolvedType).lookupMember(Member, Iterator) line: 347 ReferenceType(ResolvedType).lookupMethod(Member) line: 326 LTWWorld(World).resolve(Member) line: 504 MemberImpl.resolve(World) line: 93 JoinPointSignatureIterator.addSignaturesUpToFirstDefiningMember() line: 109 JoinPointSignatureIterator.<init>(Member, World) line: 51 MemberImpl.getJoinPointSignatures(World) line: 943 SignaturePattern.matches(Member, World, boolean) line: 286 KindedPointcut.matchInternal(Shadow) line: 106 KindedPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 53 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 OrPointcut.matchInternal(Shadow) line: 50 OrPointcut(Pointcut).match(Shadow) line: 146 BcelAdvice(ShadowMunger).match(Shadow, World) line: 71 BcelAdvice(Advice).match(Shadow, World) line: 112 BcelAdvice.match(Shadow, World) line: 107 BcelClassWeaver.match(BcelShadow, List) line: 2806 BcelClassWeaver.matchInvokeInstruction(LazyMethodGen, InstructionHandle, InvokeInstruction, BcelShadow, List) line: 2768 BcelClassWeaver.match(LazyMethodGen, InstructionHandle, BcelShadow, List) line: 2506 BcelClassWeaver.match(LazyMethodGen) line: 2332 BcelClassWeaver.weave() line: 494 BcelClassWeaver.weave(BcelWorld, LazyClassGen, List, List, List) line: 119 BcelWeaver.weave(UnwovenClassFile, BcelObjectType, boolean) line: 1613 BcelWeaver.weaveWithoutDump(UnwovenClassFile, BcelObjectType) line: 1564 BcelWeaver.weaveAndNotify(UnwovenClassFile, BcelObjectType, IWeaveRequestor) line: 1341 BcelWeaver.weave(IClassFileProvider) line: 1163 ClassLoaderWeavingAdaptor(WeavingAdaptor).getWovenBytes(String, byte[]) line: 319 ClassLoaderWeavingAdaptor(WeavingAdaptor).weaveClass(String, byte[]) line: 225 Aj.preProcess(String, byte[], ClassLoader) line: 77 ClassPreProcessorAdapter.preProcess(String, byte[], ClassLoader) line: 67 ClassPreProcessorHelper.defineClass0Pre(ClassLoader, String, byte[], int, int, ProtectionDomain) line: 107 WebappClassLoader(ClassLoader).defineClass(String, byte[], int, int, ProtectionDomain) line: 539 WebappClassLoader(SecureClassLoader).defineClass(String, byte[], int, int, CodeSource) line: 123 WebappClassLoader.findClassInternal(String) line: 1786 WebappClassLoader.findClass(String) line: 1048 WebappClassLoader.loadClass(String, boolean) line: 1506 WebappClassLoader.loadClass(String) line: 1385 WebappClassLoader(ClassLoader).loadClassInternal(String) line: 302 Class.forName0(String, boolean, ClassLoader) line: not available [native method] Class.forName(String) line: 141 InitializeLog.setWarnLogging(String) line: 121 InitializeLog.initializeLogging() line: 96 ContextLoaderServlet.init() line: 13 ContextLoaderServlet(GenericServlet).init(ServletConfig) line: 212 StandardWrapper.loadServlet() line: 879 StandardWrapper.load() line: 767 StandardContext.loadOnStartup(Container[]) line: 3483 StandardContext.start() line: 3709 StandardHost(ContainerBase).addChildInternal(Container) line: 776 StandardHost(ContainerBase).addChild(Container) line: 759 StandardHost.addChild(Container) line: 537 StandardHostDeployer.install(String, URL) line: 260 StandardHost.install(String, URL) line: 730 HostConfig.deployWARs(File, String[]) line: 558 HostConfig.deployApps() line: 373 HostConfig.start() line: 784 HostConfig.lifecycleEvent(LifecycleEvent) line: 330 LifecycleSupport.fireLifecycleEvent(String, Object) line: 119 StandardHost(ContainerBase).start() line: 1155 StandardHost.start() line: 696 StandardEngine(ContainerBase).start() line: 1147 StandardEngine.start() line: 310 StandardService.start() line: 449 StandardServer.start() line: 2212 Catalina.start() line: 458 Catalina.execute() line: 345 Catalina.process(String[]) line: 129 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 Method.invoke(Object, Object[]) line: 324 Bootstrap.main(String[]) line: 150 I'm using a modified version of Alex Vasseur's LTW plugin for a Java 1.4 VM although I haven't tested on the JRockIt plugin for a 1.4 VM: my guess is that this would fail there too.
|
resolved fixed
|
82e3e13
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-15T11:51:21Z | 2006-08-11T07:06:40Z |
weaver/testsrc/org/aspectj/weaver/reflect/ReflectionBasedReferenceTypeDelegateTest.java
|
}
}
assertTrue("Errors:"+errors.toString(),errors.length()==0);
if (rms1.length==rms2.length) return;
if (barfIfClinitMissing) {
assertEquals(rms1.length,rms2.length);
} else {
if (rms1.length!=(rms2.length+1)) {
for (int i = 0; i < rms1.length; i++) {
System.err.println("bcel"+i+" is "+rms1[i]);
}
for (int i = 0; i < rms2.length; i++) {
System.err.println("refl"+i+" is "+rms2[i]);
}
}
assertTrue("Should be one extra (clinit) in BCEL case, but bcel="+rms1.length+" reflect="+rms2.length,rms1.length==rms2.length+1);
}
}
protected void setUp() throws Exception {
world = new ReflectionWorld(getClass().getClassLoader());
objectType = world.resolve("java.lang.Object");
}
}
|
153,535 |
Bug 153535 Bug in reflection delegate signature for array of object type
|
The following problem is interesting because the advice weaves correctly with Java 1.5 LTW and also using Java 1.4 with build-time weaving. However, the following call pointcut isn't matching the expected call site in Java 1.4 load-time weaving (*). Pointcut: private pointcut inExecQuery() : (within(uk.ltd.getahead.dwr.impl.ExecuteQuery) || within(uk.ltd.getahead.dwr.ExecuteQuery)); public pointcut dwrQuery(Method method, Object receiver, Object[] params) : inExecQuery() && withincode(* execute(..)) && call(* Method.invoke(..)) && args(receiver, params) && target(method); protected pointcut monitorEnd() : dwrQuery(*, *, *); Matching call site: Object reply = method.invoke(object, params); I've tracked it down to failing to find the method in ResolvedType.matches. On line 405: "m1.getSignature()"= "(Ljava/lang/Object;[Ljava.lang.Object;)Ljava/lang/Object;" "m2.getSignature()"= "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;" Note the difference between . and / ^ ^ It looks to me like the signature for array types in the reflection delegate is erroneously using . instead of /. I have attached a patch to the ReflectionBasedReferenceTypeDelegateTest that isolates this unexpected signature return. Hopefully you agree that this is not correct. If not, some more information follows. Here's the stack trace where the match fails: ResolvedType.matches(Member, Member) line: 405 ReferenceType(ResolvedType).lookupMember(Member, Iterator) line: 347 ReferenceType(ResolvedType).lookupMethod(Member) line: 326 LTWWorld(World).resolve(Member) line: 504 MemberImpl.resolve(World) line: 93 JoinPointSignatureIterator.addSignaturesUpToFirstDefiningMember() line: 109 JoinPointSignatureIterator.<init>(Member, World) line: 51 MemberImpl.getJoinPointSignatures(World) line: 943 SignaturePattern.matches(Member, World, boolean) line: 286 KindedPointcut.matchInternal(Shadow) line: 106 KindedPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 53 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 OrPointcut.matchInternal(Shadow) line: 50 OrPointcut(Pointcut).match(Shadow) line: 146 BcelAdvice(ShadowMunger).match(Shadow, World) line: 71 BcelAdvice(Advice).match(Shadow, World) line: 112 BcelAdvice.match(Shadow, World) line: 107 BcelClassWeaver.match(BcelShadow, List) line: 2806 BcelClassWeaver.matchInvokeInstruction(LazyMethodGen, InstructionHandle, InvokeInstruction, BcelShadow, List) line: 2768 BcelClassWeaver.match(LazyMethodGen, InstructionHandle, BcelShadow, List) line: 2506 BcelClassWeaver.match(LazyMethodGen) line: 2332 BcelClassWeaver.weave() line: 494 BcelClassWeaver.weave(BcelWorld, LazyClassGen, List, List, List) line: 119 BcelWeaver.weave(UnwovenClassFile, BcelObjectType, boolean) line: 1613 BcelWeaver.weaveWithoutDump(UnwovenClassFile, BcelObjectType) line: 1564 BcelWeaver.weaveAndNotify(UnwovenClassFile, BcelObjectType, IWeaveRequestor) line: 1341 BcelWeaver.weave(IClassFileProvider) line: 1163 ClassLoaderWeavingAdaptor(WeavingAdaptor).getWovenBytes(String, byte[]) line: 319 ClassLoaderWeavingAdaptor(WeavingAdaptor).weaveClass(String, byte[]) line: 225 Aj.preProcess(String, byte[], ClassLoader) line: 77 ClassPreProcessorAdapter.preProcess(String, byte[], ClassLoader) line: 67 ClassPreProcessorHelper.defineClass0Pre(ClassLoader, String, byte[], int, int, ProtectionDomain) line: 107 WebappClassLoader(ClassLoader).defineClass(String, byte[], int, int, ProtectionDomain) line: 539 WebappClassLoader(SecureClassLoader).defineClass(String, byte[], int, int, CodeSource) line: 123 WebappClassLoader.findClassInternal(String) line: 1786 WebappClassLoader.findClass(String) line: 1048 WebappClassLoader.loadClass(String, boolean) line: 1506 WebappClassLoader.loadClass(String) line: 1385 WebappClassLoader(ClassLoader).loadClassInternal(String) line: 302 Class.forName0(String, boolean, ClassLoader) line: not available [native method] Class.forName(String) line: 141 InitializeLog.setWarnLogging(String) line: 121 InitializeLog.initializeLogging() line: 96 ContextLoaderServlet.init() line: 13 ContextLoaderServlet(GenericServlet).init(ServletConfig) line: 212 StandardWrapper.loadServlet() line: 879 StandardWrapper.load() line: 767 StandardContext.loadOnStartup(Container[]) line: 3483 StandardContext.start() line: 3709 StandardHost(ContainerBase).addChildInternal(Container) line: 776 StandardHost(ContainerBase).addChild(Container) line: 759 StandardHost.addChild(Container) line: 537 StandardHostDeployer.install(String, URL) line: 260 StandardHost.install(String, URL) line: 730 HostConfig.deployWARs(File, String[]) line: 558 HostConfig.deployApps() line: 373 HostConfig.start() line: 784 HostConfig.lifecycleEvent(LifecycleEvent) line: 330 LifecycleSupport.fireLifecycleEvent(String, Object) line: 119 StandardHost(ContainerBase).start() line: 1155 StandardHost.start() line: 696 StandardEngine(ContainerBase).start() line: 1147 StandardEngine.start() line: 310 StandardService.start() line: 449 StandardServer.start() line: 2212 Catalina.start() line: 458 Catalina.execute() line: 345 Catalina.process(String[]) line: 129 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 Method.invoke(Object, Object[]) line: 324 Bootstrap.main(String[]) line: 150 I'm using a modified version of Alex Vasseur's LTW plugin for a Java 1.4 VM although I haven't tested on the JRockIt plugin for a 1.4 VM: my guess is that this would fail there too.
|
resolved fixed
|
82e3e13
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-15T11:51:21Z | 2006-08-11T07:06:40Z |
weaver5/java5-testsrc/org/aspectj/weaver/reflect/ReflectionBasedReferenceTypeDelegateTest.java
|
/* *******************************************************************
* Copyright (c) 2005 Contributors.
* All rights reserved.
* This program and the accompanying materials are made available
* under the terms of the Eclipse Public License v1.0
* which accompanies this distribution and is available at
* http://eclipse.org/legal/epl-v10.html
*
* Contributors:
* Adrian Colyer Initial implementation
* ******************************************************************/
package org.aspectj.weaver.reflect;
import java.util.HashSet;
import java.util.Set;
import junit.framework.TestCase;
import org.aspectj.bridge.IMessageHandler;
import org.aspectj.weaver.ReferenceType;
import org.aspectj.weaver.ResolvedMember;
import org.aspectj.weaver.ResolvedType;
import org.aspectj.weaver.UnresolvedType;
import org.aspectj.weaver.bcel.BcelWorld;
public abstract class ReflectionBasedReferenceTypeDelegateTest extends TestCase {
|
153,535 |
Bug 153535 Bug in reflection delegate signature for array of object type
|
The following problem is interesting because the advice weaves correctly with Java 1.5 LTW and also using Java 1.4 with build-time weaving. However, the following call pointcut isn't matching the expected call site in Java 1.4 load-time weaving (*). Pointcut: private pointcut inExecQuery() : (within(uk.ltd.getahead.dwr.impl.ExecuteQuery) || within(uk.ltd.getahead.dwr.ExecuteQuery)); public pointcut dwrQuery(Method method, Object receiver, Object[] params) : inExecQuery() && withincode(* execute(..)) && call(* Method.invoke(..)) && args(receiver, params) && target(method); protected pointcut monitorEnd() : dwrQuery(*, *, *); Matching call site: Object reply = method.invoke(object, params); I've tracked it down to failing to find the method in ResolvedType.matches. On line 405: "m1.getSignature()"= "(Ljava/lang/Object;[Ljava.lang.Object;)Ljava/lang/Object;" "m2.getSignature()"= "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;" Note the difference between . and / ^ ^ It looks to me like the signature for array types in the reflection delegate is erroneously using . instead of /. I have attached a patch to the ReflectionBasedReferenceTypeDelegateTest that isolates this unexpected signature return. Hopefully you agree that this is not correct. If not, some more information follows. Here's the stack trace where the match fails: ResolvedType.matches(Member, Member) line: 405 ReferenceType(ResolvedType).lookupMember(Member, Iterator) line: 347 ReferenceType(ResolvedType).lookupMethod(Member) line: 326 LTWWorld(World).resolve(Member) line: 504 MemberImpl.resolve(World) line: 93 JoinPointSignatureIterator.addSignaturesUpToFirstDefiningMember() line: 109 JoinPointSignatureIterator.<init>(Member, World) line: 51 MemberImpl.getJoinPointSignatures(World) line: 943 SignaturePattern.matches(Member, World, boolean) line: 286 KindedPointcut.matchInternal(Shadow) line: 106 KindedPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 53 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 OrPointcut.matchInternal(Shadow) line: 50 OrPointcut(Pointcut).match(Shadow) line: 146 BcelAdvice(ShadowMunger).match(Shadow, World) line: 71 BcelAdvice(Advice).match(Shadow, World) line: 112 BcelAdvice.match(Shadow, World) line: 107 BcelClassWeaver.match(BcelShadow, List) line: 2806 BcelClassWeaver.matchInvokeInstruction(LazyMethodGen, InstructionHandle, InvokeInstruction, BcelShadow, List) line: 2768 BcelClassWeaver.match(LazyMethodGen, InstructionHandle, BcelShadow, List) line: 2506 BcelClassWeaver.match(LazyMethodGen) line: 2332 BcelClassWeaver.weave() line: 494 BcelClassWeaver.weave(BcelWorld, LazyClassGen, List, List, List) line: 119 BcelWeaver.weave(UnwovenClassFile, BcelObjectType, boolean) line: 1613 BcelWeaver.weaveWithoutDump(UnwovenClassFile, BcelObjectType) line: 1564 BcelWeaver.weaveAndNotify(UnwovenClassFile, BcelObjectType, IWeaveRequestor) line: 1341 BcelWeaver.weave(IClassFileProvider) line: 1163 ClassLoaderWeavingAdaptor(WeavingAdaptor).getWovenBytes(String, byte[]) line: 319 ClassLoaderWeavingAdaptor(WeavingAdaptor).weaveClass(String, byte[]) line: 225 Aj.preProcess(String, byte[], ClassLoader) line: 77 ClassPreProcessorAdapter.preProcess(String, byte[], ClassLoader) line: 67 ClassPreProcessorHelper.defineClass0Pre(ClassLoader, String, byte[], int, int, ProtectionDomain) line: 107 WebappClassLoader(ClassLoader).defineClass(String, byte[], int, int, ProtectionDomain) line: 539 WebappClassLoader(SecureClassLoader).defineClass(String, byte[], int, int, CodeSource) line: 123 WebappClassLoader.findClassInternal(String) line: 1786 WebappClassLoader.findClass(String) line: 1048 WebappClassLoader.loadClass(String, boolean) line: 1506 WebappClassLoader.loadClass(String) line: 1385 WebappClassLoader(ClassLoader).loadClassInternal(String) line: 302 Class.forName0(String, boolean, ClassLoader) line: not available [native method] Class.forName(String) line: 141 InitializeLog.setWarnLogging(String) line: 121 InitializeLog.initializeLogging() line: 96 ContextLoaderServlet.init() line: 13 ContextLoaderServlet(GenericServlet).init(ServletConfig) line: 212 StandardWrapper.loadServlet() line: 879 StandardWrapper.load() line: 767 StandardContext.loadOnStartup(Container[]) line: 3483 StandardContext.start() line: 3709 StandardHost(ContainerBase).addChildInternal(Container) line: 776 StandardHost(ContainerBase).addChild(Container) line: 759 StandardHost.addChild(Container) line: 537 StandardHostDeployer.install(String, URL) line: 260 StandardHost.install(String, URL) line: 730 HostConfig.deployWARs(File, String[]) line: 558 HostConfig.deployApps() line: 373 HostConfig.start() line: 784 HostConfig.lifecycleEvent(LifecycleEvent) line: 330 LifecycleSupport.fireLifecycleEvent(String, Object) line: 119 StandardHost(ContainerBase).start() line: 1155 StandardHost.start() line: 696 StandardEngine(ContainerBase).start() line: 1147 StandardEngine.start() line: 310 StandardService.start() line: 449 StandardServer.start() line: 2212 Catalina.start() line: 458 Catalina.execute() line: 345 Catalina.process(String[]) line: 129 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 Method.invoke(Object, Object[]) line: 324 Bootstrap.main(String[]) line: 150 I'm using a modified version of Alex Vasseur's LTW plugin for a Java 1.4 VM although I haven't tested on the JRockIt plugin for a 1.4 VM: my guess is that this would fail there too.
|
resolved fixed
|
82e3e13
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-15T11:51:21Z | 2006-08-11T07:06:40Z |
weaver5/java5-testsrc/org/aspectj/weaver/reflect/ReflectionBasedReferenceTypeDelegateTest.java
|
protected ReflectionWorld world;
private ResolvedType objectType;
private ResolvedType classType;
public void testIsAspect() {
assertFalse(objectType.isAspect());
}
public void testIsAnnotationStyleAspect() {
assertFalse(objectType.isAnnotationStyleAspect());
}
public void testIsInterface() {
assertFalse(objectType.isInterface());
assertTrue(world.resolve("java.io.Serializable").isInterface());
}
public void testIsEnum() {
assertFalse(objectType.isEnum());
}
public void testIsAnnotation() {
assertFalse(objectType.isAnnotation());
}
public void testIsAnnotationWithRuntimeRetention() {
assertFalse(objectType.isAnnotationWithRuntimeRetention());
}
public void testIsClass() {
|
153,535 |
Bug 153535 Bug in reflection delegate signature for array of object type
|
The following problem is interesting because the advice weaves correctly with Java 1.5 LTW and also using Java 1.4 with build-time weaving. However, the following call pointcut isn't matching the expected call site in Java 1.4 load-time weaving (*). Pointcut: private pointcut inExecQuery() : (within(uk.ltd.getahead.dwr.impl.ExecuteQuery) || within(uk.ltd.getahead.dwr.ExecuteQuery)); public pointcut dwrQuery(Method method, Object receiver, Object[] params) : inExecQuery() && withincode(* execute(..)) && call(* Method.invoke(..)) && args(receiver, params) && target(method); protected pointcut monitorEnd() : dwrQuery(*, *, *); Matching call site: Object reply = method.invoke(object, params); I've tracked it down to failing to find the method in ResolvedType.matches. On line 405: "m1.getSignature()"= "(Ljava/lang/Object;[Ljava.lang.Object;)Ljava/lang/Object;" "m2.getSignature()"= "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;" Note the difference between . and / ^ ^ It looks to me like the signature for array types in the reflection delegate is erroneously using . instead of /. I have attached a patch to the ReflectionBasedReferenceTypeDelegateTest that isolates this unexpected signature return. Hopefully you agree that this is not correct. If not, some more information follows. Here's the stack trace where the match fails: ResolvedType.matches(Member, Member) line: 405 ReferenceType(ResolvedType).lookupMember(Member, Iterator) line: 347 ReferenceType(ResolvedType).lookupMethod(Member) line: 326 LTWWorld(World).resolve(Member) line: 504 MemberImpl.resolve(World) line: 93 JoinPointSignatureIterator.addSignaturesUpToFirstDefiningMember() line: 109 JoinPointSignatureIterator.<init>(Member, World) line: 51 MemberImpl.getJoinPointSignatures(World) line: 943 SignaturePattern.matches(Member, World, boolean) line: 286 KindedPointcut.matchInternal(Shadow) line: 106 KindedPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 53 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 OrPointcut.matchInternal(Shadow) line: 50 OrPointcut(Pointcut).match(Shadow) line: 146 BcelAdvice(ShadowMunger).match(Shadow, World) line: 71 BcelAdvice(Advice).match(Shadow, World) line: 112 BcelAdvice.match(Shadow, World) line: 107 BcelClassWeaver.match(BcelShadow, List) line: 2806 BcelClassWeaver.matchInvokeInstruction(LazyMethodGen, InstructionHandle, InvokeInstruction, BcelShadow, List) line: 2768 BcelClassWeaver.match(LazyMethodGen, InstructionHandle, BcelShadow, List) line: 2506 BcelClassWeaver.match(LazyMethodGen) line: 2332 BcelClassWeaver.weave() line: 494 BcelClassWeaver.weave(BcelWorld, LazyClassGen, List, List, List) line: 119 BcelWeaver.weave(UnwovenClassFile, BcelObjectType, boolean) line: 1613 BcelWeaver.weaveWithoutDump(UnwovenClassFile, BcelObjectType) line: 1564 BcelWeaver.weaveAndNotify(UnwovenClassFile, BcelObjectType, IWeaveRequestor) line: 1341 BcelWeaver.weave(IClassFileProvider) line: 1163 ClassLoaderWeavingAdaptor(WeavingAdaptor).getWovenBytes(String, byte[]) line: 319 ClassLoaderWeavingAdaptor(WeavingAdaptor).weaveClass(String, byte[]) line: 225 Aj.preProcess(String, byte[], ClassLoader) line: 77 ClassPreProcessorAdapter.preProcess(String, byte[], ClassLoader) line: 67 ClassPreProcessorHelper.defineClass0Pre(ClassLoader, String, byte[], int, int, ProtectionDomain) line: 107 WebappClassLoader(ClassLoader).defineClass(String, byte[], int, int, ProtectionDomain) line: 539 WebappClassLoader(SecureClassLoader).defineClass(String, byte[], int, int, CodeSource) line: 123 WebappClassLoader.findClassInternal(String) line: 1786 WebappClassLoader.findClass(String) line: 1048 WebappClassLoader.loadClass(String, boolean) line: 1506 WebappClassLoader.loadClass(String) line: 1385 WebappClassLoader(ClassLoader).loadClassInternal(String) line: 302 Class.forName0(String, boolean, ClassLoader) line: not available [native method] Class.forName(String) line: 141 InitializeLog.setWarnLogging(String) line: 121 InitializeLog.initializeLogging() line: 96 ContextLoaderServlet.init() line: 13 ContextLoaderServlet(GenericServlet).init(ServletConfig) line: 212 StandardWrapper.loadServlet() line: 879 StandardWrapper.load() line: 767 StandardContext.loadOnStartup(Container[]) line: 3483 StandardContext.start() line: 3709 StandardHost(ContainerBase).addChildInternal(Container) line: 776 StandardHost(ContainerBase).addChild(Container) line: 759 StandardHost.addChild(Container) line: 537 StandardHostDeployer.install(String, URL) line: 260 StandardHost.install(String, URL) line: 730 HostConfig.deployWARs(File, String[]) line: 558 HostConfig.deployApps() line: 373 HostConfig.start() line: 784 HostConfig.lifecycleEvent(LifecycleEvent) line: 330 LifecycleSupport.fireLifecycleEvent(String, Object) line: 119 StandardHost(ContainerBase).start() line: 1155 StandardHost.start() line: 696 StandardEngine(ContainerBase).start() line: 1147 StandardEngine.start() line: 310 StandardService.start() line: 449 StandardServer.start() line: 2212 Catalina.start() line: 458 Catalina.execute() line: 345 Catalina.process(String[]) line: 129 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 Method.invoke(Object, Object[]) line: 324 Bootstrap.main(String[]) line: 150 I'm using a modified version of Alex Vasseur's LTW plugin for a Java 1.4 VM although I haven't tested on the JRockIt plugin for a 1.4 VM: my guess is that this would fail there too.
|
resolved fixed
|
82e3e13
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-15T11:51:21Z | 2006-08-11T07:06:40Z |
weaver5/java5-testsrc/org/aspectj/weaver/reflect/ReflectionBasedReferenceTypeDelegateTest.java
|
assertTrue(objectType.isClass());
assertFalse(world.resolve("java.io.Serializable").isClass());
}
public void testIsGeneric() {
assertFalse(objectType.isGenericType());
}
public void testIsExposedToWeaver() {
assertFalse(objectType.isExposedToWeaver());
}
public void testHasAnnotation() {
assertFalse(objectType.hasAnnotation(UnresolvedType.forName("Foo")));
}
public void testGetAnnotations() {
assertEquals("no entries",0,objectType.getAnnotations().length);
}
public void testGetAnnotationTypes() {
assertEquals("no entries",0,objectType.getAnnotationTypes().length);
}
public void testGetTypeVariables() {
assertEquals("no entries",0,objectType.getTypeVariables().length);
}
public void testGetPerClause() {
assertNull(objectType.getPerClause());
|
153,535 |
Bug 153535 Bug in reflection delegate signature for array of object type
|
The following problem is interesting because the advice weaves correctly with Java 1.5 LTW and also using Java 1.4 with build-time weaving. However, the following call pointcut isn't matching the expected call site in Java 1.4 load-time weaving (*). Pointcut: private pointcut inExecQuery() : (within(uk.ltd.getahead.dwr.impl.ExecuteQuery) || within(uk.ltd.getahead.dwr.ExecuteQuery)); public pointcut dwrQuery(Method method, Object receiver, Object[] params) : inExecQuery() && withincode(* execute(..)) && call(* Method.invoke(..)) && args(receiver, params) && target(method); protected pointcut monitorEnd() : dwrQuery(*, *, *); Matching call site: Object reply = method.invoke(object, params); I've tracked it down to failing to find the method in ResolvedType.matches. On line 405: "m1.getSignature()"= "(Ljava/lang/Object;[Ljava.lang.Object;)Ljava/lang/Object;" "m2.getSignature()"= "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;" Note the difference between . and / ^ ^ It looks to me like the signature for array types in the reflection delegate is erroneously using . instead of /. I have attached a patch to the ReflectionBasedReferenceTypeDelegateTest that isolates this unexpected signature return. Hopefully you agree that this is not correct. If not, some more information follows. Here's the stack trace where the match fails: ResolvedType.matches(Member, Member) line: 405 ReferenceType(ResolvedType).lookupMember(Member, Iterator) line: 347 ReferenceType(ResolvedType).lookupMethod(Member) line: 326 LTWWorld(World).resolve(Member) line: 504 MemberImpl.resolve(World) line: 93 JoinPointSignatureIterator.addSignaturesUpToFirstDefiningMember() line: 109 JoinPointSignatureIterator.<init>(Member, World) line: 51 MemberImpl.getJoinPointSignatures(World) line: 943 SignaturePattern.matches(Member, World, boolean) line: 286 KindedPointcut.matchInternal(Shadow) line: 106 KindedPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 53 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 OrPointcut.matchInternal(Shadow) line: 50 OrPointcut(Pointcut).match(Shadow) line: 146 BcelAdvice(ShadowMunger).match(Shadow, World) line: 71 BcelAdvice(Advice).match(Shadow, World) line: 112 BcelAdvice.match(Shadow, World) line: 107 BcelClassWeaver.match(BcelShadow, List) line: 2806 BcelClassWeaver.matchInvokeInstruction(LazyMethodGen, InstructionHandle, InvokeInstruction, BcelShadow, List) line: 2768 BcelClassWeaver.match(LazyMethodGen, InstructionHandle, BcelShadow, List) line: 2506 BcelClassWeaver.match(LazyMethodGen) line: 2332 BcelClassWeaver.weave() line: 494 BcelClassWeaver.weave(BcelWorld, LazyClassGen, List, List, List) line: 119 BcelWeaver.weave(UnwovenClassFile, BcelObjectType, boolean) line: 1613 BcelWeaver.weaveWithoutDump(UnwovenClassFile, BcelObjectType) line: 1564 BcelWeaver.weaveAndNotify(UnwovenClassFile, BcelObjectType, IWeaveRequestor) line: 1341 BcelWeaver.weave(IClassFileProvider) line: 1163 ClassLoaderWeavingAdaptor(WeavingAdaptor).getWovenBytes(String, byte[]) line: 319 ClassLoaderWeavingAdaptor(WeavingAdaptor).weaveClass(String, byte[]) line: 225 Aj.preProcess(String, byte[], ClassLoader) line: 77 ClassPreProcessorAdapter.preProcess(String, byte[], ClassLoader) line: 67 ClassPreProcessorHelper.defineClass0Pre(ClassLoader, String, byte[], int, int, ProtectionDomain) line: 107 WebappClassLoader(ClassLoader).defineClass(String, byte[], int, int, ProtectionDomain) line: 539 WebappClassLoader(SecureClassLoader).defineClass(String, byte[], int, int, CodeSource) line: 123 WebappClassLoader.findClassInternal(String) line: 1786 WebappClassLoader.findClass(String) line: 1048 WebappClassLoader.loadClass(String, boolean) line: 1506 WebappClassLoader.loadClass(String) line: 1385 WebappClassLoader(ClassLoader).loadClassInternal(String) line: 302 Class.forName0(String, boolean, ClassLoader) line: not available [native method] Class.forName(String) line: 141 InitializeLog.setWarnLogging(String) line: 121 InitializeLog.initializeLogging() line: 96 ContextLoaderServlet.init() line: 13 ContextLoaderServlet(GenericServlet).init(ServletConfig) line: 212 StandardWrapper.loadServlet() line: 879 StandardWrapper.load() line: 767 StandardContext.loadOnStartup(Container[]) line: 3483 StandardContext.start() line: 3709 StandardHost(ContainerBase).addChildInternal(Container) line: 776 StandardHost(ContainerBase).addChild(Container) line: 759 StandardHost.addChild(Container) line: 537 StandardHostDeployer.install(String, URL) line: 260 StandardHost.install(String, URL) line: 730 HostConfig.deployWARs(File, String[]) line: 558 HostConfig.deployApps() line: 373 HostConfig.start() line: 784 HostConfig.lifecycleEvent(LifecycleEvent) line: 330 LifecycleSupport.fireLifecycleEvent(String, Object) line: 119 StandardHost(ContainerBase).start() line: 1155 StandardHost.start() line: 696 StandardEngine(ContainerBase).start() line: 1147 StandardEngine.start() line: 310 StandardService.start() line: 449 StandardServer.start() line: 2212 Catalina.start() line: 458 Catalina.execute() line: 345 Catalina.process(String[]) line: 129 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 Method.invoke(Object, Object[]) line: 324 Bootstrap.main(String[]) line: 150 I'm using a modified version of Alex Vasseur's LTW plugin for a Java 1.4 VM although I haven't tested on the JRockIt plugin for a 1.4 VM: my guess is that this would fail there too.
|
resolved fixed
|
82e3e13
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-15T11:51:21Z | 2006-08-11T07:06:40Z |
weaver5/java5-testsrc/org/aspectj/weaver/reflect/ReflectionBasedReferenceTypeDelegateTest.java
|
}
public void testGetModifiers() {
assertEquals(Object.class.getModifiers(),objectType.getModifiers());
}
public void testGetSuperclass() {
assertTrue("Superclass of object should be null, but it is: "+objectType.getSuperclass(),objectType.getSuperclass()==null);
assertEquals(objectType,world.resolve("java.lang.Class").getSuperclass());
ResolvedType d = world.resolve("reflect.tests.D");
assertEquals(world.resolve("reflect.tests.C"),d.getSuperclass());
}
protected int findMethod(String name, ResolvedMember[] methods) {
for (int i=0; i<methods.length; i++) {
if (name.equals(methods[i].getName())) {
return i;
}
}
return -1;
}
protected int findMethod(String name, int numArgs, ResolvedMember[] methods) {
for (int i=0; i<methods.length; i++) {
if (name.equals(methods[i].getName()) && (methods[i].getParameterTypes().length == numArgs)) {
return i;
}
}
return -1;
}
|
153,535 |
Bug 153535 Bug in reflection delegate signature for array of object type
|
The following problem is interesting because the advice weaves correctly with Java 1.5 LTW and also using Java 1.4 with build-time weaving. However, the following call pointcut isn't matching the expected call site in Java 1.4 load-time weaving (*). Pointcut: private pointcut inExecQuery() : (within(uk.ltd.getahead.dwr.impl.ExecuteQuery) || within(uk.ltd.getahead.dwr.ExecuteQuery)); public pointcut dwrQuery(Method method, Object receiver, Object[] params) : inExecQuery() && withincode(* execute(..)) && call(* Method.invoke(..)) && args(receiver, params) && target(method); protected pointcut monitorEnd() : dwrQuery(*, *, *); Matching call site: Object reply = method.invoke(object, params); I've tracked it down to failing to find the method in ResolvedType.matches. On line 405: "m1.getSignature()"= "(Ljava/lang/Object;[Ljava.lang.Object;)Ljava/lang/Object;" "m2.getSignature()"= "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;" Note the difference between . and / ^ ^ It looks to me like the signature for array types in the reflection delegate is erroneously using . instead of /. I have attached a patch to the ReflectionBasedReferenceTypeDelegateTest that isolates this unexpected signature return. Hopefully you agree that this is not correct. If not, some more information follows. Here's the stack trace where the match fails: ResolvedType.matches(Member, Member) line: 405 ReferenceType(ResolvedType).lookupMember(Member, Iterator) line: 347 ReferenceType(ResolvedType).lookupMethod(Member) line: 326 LTWWorld(World).resolve(Member) line: 504 MemberImpl.resolve(World) line: 93 JoinPointSignatureIterator.addSignaturesUpToFirstDefiningMember() line: 109 JoinPointSignatureIterator.<init>(Member, World) line: 51 MemberImpl.getJoinPointSignatures(World) line: 943 SignaturePattern.matches(Member, World, boolean) line: 286 KindedPointcut.matchInternal(Shadow) line: 106 KindedPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 53 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 OrPointcut.matchInternal(Shadow) line: 50 OrPointcut(Pointcut).match(Shadow) line: 146 BcelAdvice(ShadowMunger).match(Shadow, World) line: 71 BcelAdvice(Advice).match(Shadow, World) line: 112 BcelAdvice.match(Shadow, World) line: 107 BcelClassWeaver.match(BcelShadow, List) line: 2806 BcelClassWeaver.matchInvokeInstruction(LazyMethodGen, InstructionHandle, InvokeInstruction, BcelShadow, List) line: 2768 BcelClassWeaver.match(LazyMethodGen, InstructionHandle, BcelShadow, List) line: 2506 BcelClassWeaver.match(LazyMethodGen) line: 2332 BcelClassWeaver.weave() line: 494 BcelClassWeaver.weave(BcelWorld, LazyClassGen, List, List, List) line: 119 BcelWeaver.weave(UnwovenClassFile, BcelObjectType, boolean) line: 1613 BcelWeaver.weaveWithoutDump(UnwovenClassFile, BcelObjectType) line: 1564 BcelWeaver.weaveAndNotify(UnwovenClassFile, BcelObjectType, IWeaveRequestor) line: 1341 BcelWeaver.weave(IClassFileProvider) line: 1163 ClassLoaderWeavingAdaptor(WeavingAdaptor).getWovenBytes(String, byte[]) line: 319 ClassLoaderWeavingAdaptor(WeavingAdaptor).weaveClass(String, byte[]) line: 225 Aj.preProcess(String, byte[], ClassLoader) line: 77 ClassPreProcessorAdapter.preProcess(String, byte[], ClassLoader) line: 67 ClassPreProcessorHelper.defineClass0Pre(ClassLoader, String, byte[], int, int, ProtectionDomain) line: 107 WebappClassLoader(ClassLoader).defineClass(String, byte[], int, int, ProtectionDomain) line: 539 WebappClassLoader(SecureClassLoader).defineClass(String, byte[], int, int, CodeSource) line: 123 WebappClassLoader.findClassInternal(String) line: 1786 WebappClassLoader.findClass(String) line: 1048 WebappClassLoader.loadClass(String, boolean) line: 1506 WebappClassLoader.loadClass(String) line: 1385 WebappClassLoader(ClassLoader).loadClassInternal(String) line: 302 Class.forName0(String, boolean, ClassLoader) line: not available [native method] Class.forName(String) line: 141 InitializeLog.setWarnLogging(String) line: 121 InitializeLog.initializeLogging() line: 96 ContextLoaderServlet.init() line: 13 ContextLoaderServlet(GenericServlet).init(ServletConfig) line: 212 StandardWrapper.loadServlet() line: 879 StandardWrapper.load() line: 767 StandardContext.loadOnStartup(Container[]) line: 3483 StandardContext.start() line: 3709 StandardHost(ContainerBase).addChildInternal(Container) line: 776 StandardHost(ContainerBase).addChild(Container) line: 759 StandardHost.addChild(Container) line: 537 StandardHostDeployer.install(String, URL) line: 260 StandardHost.install(String, URL) line: 730 HostConfig.deployWARs(File, String[]) line: 558 HostConfig.deployApps() line: 373 HostConfig.start() line: 784 HostConfig.lifecycleEvent(LifecycleEvent) line: 330 LifecycleSupport.fireLifecycleEvent(String, Object) line: 119 StandardHost(ContainerBase).start() line: 1155 StandardHost.start() line: 696 StandardEngine(ContainerBase).start() line: 1147 StandardEngine.start() line: 310 StandardService.start() line: 449 StandardServer.start() line: 2212 Catalina.start() line: 458 Catalina.execute() line: 345 Catalina.process(String[]) line: 129 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 Method.invoke(Object, Object[]) line: 324 Bootstrap.main(String[]) line: 150 I'm using a modified version of Alex Vasseur's LTW plugin for a Java 1.4 VM although I haven't tested on the JRockIt plugin for a 1.4 VM: my guess is that this would fail there too.
|
resolved fixed
|
82e3e13
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-15T11:51:21Z | 2006-08-11T07:06:40Z |
weaver5/java5-testsrc/org/aspectj/weaver/reflect/ReflectionBasedReferenceTypeDelegateTest.java
|
public void testGetDeclaredMethods() {
ResolvedMember[] methods = objectType.getDeclaredMethods();
assertEquals(Object.class.getDeclaredMethods().length + Object.class.getDeclaredConstructors().length, methods.length);
ResolvedType c = world.resolve("reflect.tests.C");
methods = c.getDeclaredMethods();
assertEquals(3,methods.length);
int idx = findMethod("foo", methods);
assertTrue(idx > -1);
assertEquals(world.resolve("java.lang.String"),methods[idx].getReturnType());
assertEquals(1, methods[idx].getParameterTypes().length);
assertEquals(objectType,methods[idx].getParameterTypes()[0]);
assertEquals(1,methods[idx].getExceptions().length);
assertEquals(world.resolve("java.lang.Exception"),methods[idx].getExceptions()[0]);
int baridx = findMethod("bar", methods);
int initidx = findMethod("<init>", methods);
assertTrue(baridx > -1);
assertTrue(initidx > -1);
assertTrue(baridx != initidx && baridx != idx && idx <= 2 && initidx <= 2 && baridx <= 2);
ResolvedType d = world.resolve("reflect.tests.D");
methods = d.getDeclaredMethods();
assertEquals(2,methods.length);
classType = world.resolve("java.lang.Class");
methods = classType.getDeclaredMethods();
assertEquals(Class.class.getDeclaredMethods().length + Class.class.getDeclaredConstructors().length, methods.length);
}
|
153,535 |
Bug 153535 Bug in reflection delegate signature for array of object type
|
The following problem is interesting because the advice weaves correctly with Java 1.5 LTW and also using Java 1.4 with build-time weaving. However, the following call pointcut isn't matching the expected call site in Java 1.4 load-time weaving (*). Pointcut: private pointcut inExecQuery() : (within(uk.ltd.getahead.dwr.impl.ExecuteQuery) || within(uk.ltd.getahead.dwr.ExecuteQuery)); public pointcut dwrQuery(Method method, Object receiver, Object[] params) : inExecQuery() && withincode(* execute(..)) && call(* Method.invoke(..)) && args(receiver, params) && target(method); protected pointcut monitorEnd() : dwrQuery(*, *, *); Matching call site: Object reply = method.invoke(object, params); I've tracked it down to failing to find the method in ResolvedType.matches. On line 405: "m1.getSignature()"= "(Ljava/lang/Object;[Ljava.lang.Object;)Ljava/lang/Object;" "m2.getSignature()"= "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;" Note the difference between . and / ^ ^ It looks to me like the signature for array types in the reflection delegate is erroneously using . instead of /. I have attached a patch to the ReflectionBasedReferenceTypeDelegateTest that isolates this unexpected signature return. Hopefully you agree that this is not correct. If not, some more information follows. Here's the stack trace where the match fails: ResolvedType.matches(Member, Member) line: 405 ReferenceType(ResolvedType).lookupMember(Member, Iterator) line: 347 ReferenceType(ResolvedType).lookupMethod(Member) line: 326 LTWWorld(World).resolve(Member) line: 504 MemberImpl.resolve(World) line: 93 JoinPointSignatureIterator.addSignaturesUpToFirstDefiningMember() line: 109 JoinPointSignatureIterator.<init>(Member, World) line: 51 MemberImpl.getJoinPointSignatures(World) line: 943 SignaturePattern.matches(Member, World, boolean) line: 286 KindedPointcut.matchInternal(Shadow) line: 106 KindedPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 53 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 OrPointcut.matchInternal(Shadow) line: 50 OrPointcut(Pointcut).match(Shadow) line: 146 BcelAdvice(ShadowMunger).match(Shadow, World) line: 71 BcelAdvice(Advice).match(Shadow, World) line: 112 BcelAdvice.match(Shadow, World) line: 107 BcelClassWeaver.match(BcelShadow, List) line: 2806 BcelClassWeaver.matchInvokeInstruction(LazyMethodGen, InstructionHandle, InvokeInstruction, BcelShadow, List) line: 2768 BcelClassWeaver.match(LazyMethodGen, InstructionHandle, BcelShadow, List) line: 2506 BcelClassWeaver.match(LazyMethodGen) line: 2332 BcelClassWeaver.weave() line: 494 BcelClassWeaver.weave(BcelWorld, LazyClassGen, List, List, List) line: 119 BcelWeaver.weave(UnwovenClassFile, BcelObjectType, boolean) line: 1613 BcelWeaver.weaveWithoutDump(UnwovenClassFile, BcelObjectType) line: 1564 BcelWeaver.weaveAndNotify(UnwovenClassFile, BcelObjectType, IWeaveRequestor) line: 1341 BcelWeaver.weave(IClassFileProvider) line: 1163 ClassLoaderWeavingAdaptor(WeavingAdaptor).getWovenBytes(String, byte[]) line: 319 ClassLoaderWeavingAdaptor(WeavingAdaptor).weaveClass(String, byte[]) line: 225 Aj.preProcess(String, byte[], ClassLoader) line: 77 ClassPreProcessorAdapter.preProcess(String, byte[], ClassLoader) line: 67 ClassPreProcessorHelper.defineClass0Pre(ClassLoader, String, byte[], int, int, ProtectionDomain) line: 107 WebappClassLoader(ClassLoader).defineClass(String, byte[], int, int, ProtectionDomain) line: 539 WebappClassLoader(SecureClassLoader).defineClass(String, byte[], int, int, CodeSource) line: 123 WebappClassLoader.findClassInternal(String) line: 1786 WebappClassLoader.findClass(String) line: 1048 WebappClassLoader.loadClass(String, boolean) line: 1506 WebappClassLoader.loadClass(String) line: 1385 WebappClassLoader(ClassLoader).loadClassInternal(String) line: 302 Class.forName0(String, boolean, ClassLoader) line: not available [native method] Class.forName(String) line: 141 InitializeLog.setWarnLogging(String) line: 121 InitializeLog.initializeLogging() line: 96 ContextLoaderServlet.init() line: 13 ContextLoaderServlet(GenericServlet).init(ServletConfig) line: 212 StandardWrapper.loadServlet() line: 879 StandardWrapper.load() line: 767 StandardContext.loadOnStartup(Container[]) line: 3483 StandardContext.start() line: 3709 StandardHost(ContainerBase).addChildInternal(Container) line: 776 StandardHost(ContainerBase).addChild(Container) line: 759 StandardHost.addChild(Container) line: 537 StandardHostDeployer.install(String, URL) line: 260 StandardHost.install(String, URL) line: 730 HostConfig.deployWARs(File, String[]) line: 558 HostConfig.deployApps() line: 373 HostConfig.start() line: 784 HostConfig.lifecycleEvent(LifecycleEvent) line: 330 LifecycleSupport.fireLifecycleEvent(String, Object) line: 119 StandardHost(ContainerBase).start() line: 1155 StandardHost.start() line: 696 StandardEngine(ContainerBase).start() line: 1147 StandardEngine.start() line: 310 StandardService.start() line: 449 StandardServer.start() line: 2212 Catalina.start() line: 458 Catalina.execute() line: 345 Catalina.process(String[]) line: 129 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 Method.invoke(Object, Object[]) line: 324 Bootstrap.main(String[]) line: 150 I'm using a modified version of Alex Vasseur's LTW plugin for a Java 1.4 VM although I haven't tested on the JRockIt plugin for a 1.4 VM: my guess is that this would fail there too.
|
resolved fixed
|
82e3e13
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-15T11:51:21Z | 2006-08-11T07:06:40Z |
weaver5/java5-testsrc/org/aspectj/weaver/reflect/ReflectionBasedReferenceTypeDelegateTest.java
|
public void testGetDeclaredFields() {
ResolvedMember[] fields = objectType.getDeclaredFields();
assertEquals(0,fields.length);
ResolvedType c = world.resolve("reflect.tests.C");
fields = c.getDeclaredFields();
assertEquals(2,fields.length);
assertEquals("f",fields[0].getName());
assertEquals("s",fields[1].getName());
assertEquals(ResolvedType.INT,fields[0].getReturnType());
assertEquals(world.resolve("java.lang.String"),fields[1].getReturnType());
}
public void testGetDeclaredInterfaces() {
ResolvedType[] interfaces = objectType.getDeclaredInterfaces();
assertEquals(0,interfaces.length);
ResolvedType d = world.resolve("reflect.tests.D");
interfaces = d.getDeclaredInterfaces();
assertEquals(1,interfaces.length);
assertEquals(world.resolve("java.io.Serializable"),interfaces[0]);
}
public void testGetDeclaredPointcuts() {
ResolvedMember[] pointcuts = objectType.getDeclaredPointcuts();
assertEquals(0,pointcuts.length);
}
public void testSerializableSuperclass() {
|
153,535 |
Bug 153535 Bug in reflection delegate signature for array of object type
|
The following problem is interesting because the advice weaves correctly with Java 1.5 LTW and also using Java 1.4 with build-time weaving. However, the following call pointcut isn't matching the expected call site in Java 1.4 load-time weaving (*). Pointcut: private pointcut inExecQuery() : (within(uk.ltd.getahead.dwr.impl.ExecuteQuery) || within(uk.ltd.getahead.dwr.ExecuteQuery)); public pointcut dwrQuery(Method method, Object receiver, Object[] params) : inExecQuery() && withincode(* execute(..)) && call(* Method.invoke(..)) && args(receiver, params) && target(method); protected pointcut monitorEnd() : dwrQuery(*, *, *); Matching call site: Object reply = method.invoke(object, params); I've tracked it down to failing to find the method in ResolvedType.matches. On line 405: "m1.getSignature()"= "(Ljava/lang/Object;[Ljava.lang.Object;)Ljava/lang/Object;" "m2.getSignature()"= "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;" Note the difference between . and / ^ ^ It looks to me like the signature for array types in the reflection delegate is erroneously using . instead of /. I have attached a patch to the ReflectionBasedReferenceTypeDelegateTest that isolates this unexpected signature return. Hopefully you agree that this is not correct. If not, some more information follows. Here's the stack trace where the match fails: ResolvedType.matches(Member, Member) line: 405 ReferenceType(ResolvedType).lookupMember(Member, Iterator) line: 347 ReferenceType(ResolvedType).lookupMethod(Member) line: 326 LTWWorld(World).resolve(Member) line: 504 MemberImpl.resolve(World) line: 93 JoinPointSignatureIterator.addSignaturesUpToFirstDefiningMember() line: 109 JoinPointSignatureIterator.<init>(Member, World) line: 51 MemberImpl.getJoinPointSignatures(World) line: 943 SignaturePattern.matches(Member, World, boolean) line: 286 KindedPointcut.matchInternal(Shadow) line: 106 KindedPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 53 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 OrPointcut.matchInternal(Shadow) line: 50 OrPointcut(Pointcut).match(Shadow) line: 146 BcelAdvice(ShadowMunger).match(Shadow, World) line: 71 BcelAdvice(Advice).match(Shadow, World) line: 112 BcelAdvice.match(Shadow, World) line: 107 BcelClassWeaver.match(BcelShadow, List) line: 2806 BcelClassWeaver.matchInvokeInstruction(LazyMethodGen, InstructionHandle, InvokeInstruction, BcelShadow, List) line: 2768 BcelClassWeaver.match(LazyMethodGen, InstructionHandle, BcelShadow, List) line: 2506 BcelClassWeaver.match(LazyMethodGen) line: 2332 BcelClassWeaver.weave() line: 494 BcelClassWeaver.weave(BcelWorld, LazyClassGen, List, List, List) line: 119 BcelWeaver.weave(UnwovenClassFile, BcelObjectType, boolean) line: 1613 BcelWeaver.weaveWithoutDump(UnwovenClassFile, BcelObjectType) line: 1564 BcelWeaver.weaveAndNotify(UnwovenClassFile, BcelObjectType, IWeaveRequestor) line: 1341 BcelWeaver.weave(IClassFileProvider) line: 1163 ClassLoaderWeavingAdaptor(WeavingAdaptor).getWovenBytes(String, byte[]) line: 319 ClassLoaderWeavingAdaptor(WeavingAdaptor).weaveClass(String, byte[]) line: 225 Aj.preProcess(String, byte[], ClassLoader) line: 77 ClassPreProcessorAdapter.preProcess(String, byte[], ClassLoader) line: 67 ClassPreProcessorHelper.defineClass0Pre(ClassLoader, String, byte[], int, int, ProtectionDomain) line: 107 WebappClassLoader(ClassLoader).defineClass(String, byte[], int, int, ProtectionDomain) line: 539 WebappClassLoader(SecureClassLoader).defineClass(String, byte[], int, int, CodeSource) line: 123 WebappClassLoader.findClassInternal(String) line: 1786 WebappClassLoader.findClass(String) line: 1048 WebappClassLoader.loadClass(String, boolean) line: 1506 WebappClassLoader.loadClass(String) line: 1385 WebappClassLoader(ClassLoader).loadClassInternal(String) line: 302 Class.forName0(String, boolean, ClassLoader) line: not available [native method] Class.forName(String) line: 141 InitializeLog.setWarnLogging(String) line: 121 InitializeLog.initializeLogging() line: 96 ContextLoaderServlet.init() line: 13 ContextLoaderServlet(GenericServlet).init(ServletConfig) line: 212 StandardWrapper.loadServlet() line: 879 StandardWrapper.load() line: 767 StandardContext.loadOnStartup(Container[]) line: 3483 StandardContext.start() line: 3709 StandardHost(ContainerBase).addChildInternal(Container) line: 776 StandardHost(ContainerBase).addChild(Container) line: 759 StandardHost.addChild(Container) line: 537 StandardHostDeployer.install(String, URL) line: 260 StandardHost.install(String, URL) line: 730 HostConfig.deployWARs(File, String[]) line: 558 HostConfig.deployApps() line: 373 HostConfig.start() line: 784 HostConfig.lifecycleEvent(LifecycleEvent) line: 330 LifecycleSupport.fireLifecycleEvent(String, Object) line: 119 StandardHost(ContainerBase).start() line: 1155 StandardHost.start() line: 696 StandardEngine(ContainerBase).start() line: 1147 StandardEngine.start() line: 310 StandardService.start() line: 449 StandardServer.start() line: 2212 Catalina.start() line: 458 Catalina.execute() line: 345 Catalina.process(String[]) line: 129 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 Method.invoke(Object, Object[]) line: 324 Bootstrap.main(String[]) line: 150 I'm using a modified version of Alex Vasseur's LTW plugin for a Java 1.4 VM although I haven't tested on the JRockIt plugin for a 1.4 VM: my guess is that this would fail there too.
|
resolved fixed
|
82e3e13
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-15T11:51:21Z | 2006-08-11T07:06:40Z |
weaver5/java5-testsrc/org/aspectj/weaver/reflect/ReflectionBasedReferenceTypeDelegateTest.java
|
ResolvedType serializableType = world.resolve("java.io.Serializable");
ResolvedType superType = serializableType.getSuperclass();
assertTrue("Superclass of serializable should be Object but was "+superType,superType.equals(UnresolvedType.OBJECT));
BcelWorld bcelworld = new BcelWorld();
bcelworld.setBehaveInJava5Way(true);
ResolvedType bcelSupertype = bcelworld.resolve(UnresolvedType.SERIALIZABLE).getSuperclass();
assertTrue("Should be null but is "+bcelSupertype,bcelSupertype.equals(UnresolvedType.OBJECT));
}
public void testSubinterfaceSuperclass() {
ResolvedType ifaceType = world.resolve("java.security.Key");
ResolvedType superType = ifaceType.getSuperclass();
assertTrue("Superclass should be Object but was "+superType,superType.equals(UnresolvedType.OBJECT));
BcelWorld bcelworld = new BcelWorld();
bcelworld.setBehaveInJava5Way(true);
ResolvedType bcelSupertype = bcelworld.resolve("java.security.Key").getSuperclass();
assertTrue("Should be null but is "+bcelSupertype,bcelSupertype.equals(UnresolvedType.OBJECT));
}
public void testVoidSuperclass() {
ResolvedType voidType = world.resolve(Void.TYPE);
ResolvedType superType = voidType.getSuperclass();
assertNull(superType);
BcelWorld bcelworld = new BcelWorld();
bcelworld.setBehaveInJava5Way(true);
ResolvedType bcelSupertype = bcelworld.resolve("void").getSuperclass();
assertTrue("Should be null but is "+bcelSupertype,bcelSupertype==null);
}
public void testIntSuperclass() {
|
153,535 |
Bug 153535 Bug in reflection delegate signature for array of object type
|
The following problem is interesting because the advice weaves correctly with Java 1.5 LTW and also using Java 1.4 with build-time weaving. However, the following call pointcut isn't matching the expected call site in Java 1.4 load-time weaving (*). Pointcut: private pointcut inExecQuery() : (within(uk.ltd.getahead.dwr.impl.ExecuteQuery) || within(uk.ltd.getahead.dwr.ExecuteQuery)); public pointcut dwrQuery(Method method, Object receiver, Object[] params) : inExecQuery() && withincode(* execute(..)) && call(* Method.invoke(..)) && args(receiver, params) && target(method); protected pointcut monitorEnd() : dwrQuery(*, *, *); Matching call site: Object reply = method.invoke(object, params); I've tracked it down to failing to find the method in ResolvedType.matches. On line 405: "m1.getSignature()"= "(Ljava/lang/Object;[Ljava.lang.Object;)Ljava/lang/Object;" "m2.getSignature()"= "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;" Note the difference between . and / ^ ^ It looks to me like the signature for array types in the reflection delegate is erroneously using . instead of /. I have attached a patch to the ReflectionBasedReferenceTypeDelegateTest that isolates this unexpected signature return. Hopefully you agree that this is not correct. If not, some more information follows. Here's the stack trace where the match fails: ResolvedType.matches(Member, Member) line: 405 ReferenceType(ResolvedType).lookupMember(Member, Iterator) line: 347 ReferenceType(ResolvedType).lookupMethod(Member) line: 326 LTWWorld(World).resolve(Member) line: 504 MemberImpl.resolve(World) line: 93 JoinPointSignatureIterator.addSignaturesUpToFirstDefiningMember() line: 109 JoinPointSignatureIterator.<init>(Member, World) line: 51 MemberImpl.getJoinPointSignatures(World) line: 943 SignaturePattern.matches(Member, World, boolean) line: 286 KindedPointcut.matchInternal(Shadow) line: 106 KindedPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 53 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 OrPointcut.matchInternal(Shadow) line: 50 OrPointcut(Pointcut).match(Shadow) line: 146 BcelAdvice(ShadowMunger).match(Shadow, World) line: 71 BcelAdvice(Advice).match(Shadow, World) line: 112 BcelAdvice.match(Shadow, World) line: 107 BcelClassWeaver.match(BcelShadow, List) line: 2806 BcelClassWeaver.matchInvokeInstruction(LazyMethodGen, InstructionHandle, InvokeInstruction, BcelShadow, List) line: 2768 BcelClassWeaver.match(LazyMethodGen, InstructionHandle, BcelShadow, List) line: 2506 BcelClassWeaver.match(LazyMethodGen) line: 2332 BcelClassWeaver.weave() line: 494 BcelClassWeaver.weave(BcelWorld, LazyClassGen, List, List, List) line: 119 BcelWeaver.weave(UnwovenClassFile, BcelObjectType, boolean) line: 1613 BcelWeaver.weaveWithoutDump(UnwovenClassFile, BcelObjectType) line: 1564 BcelWeaver.weaveAndNotify(UnwovenClassFile, BcelObjectType, IWeaveRequestor) line: 1341 BcelWeaver.weave(IClassFileProvider) line: 1163 ClassLoaderWeavingAdaptor(WeavingAdaptor).getWovenBytes(String, byte[]) line: 319 ClassLoaderWeavingAdaptor(WeavingAdaptor).weaveClass(String, byte[]) line: 225 Aj.preProcess(String, byte[], ClassLoader) line: 77 ClassPreProcessorAdapter.preProcess(String, byte[], ClassLoader) line: 67 ClassPreProcessorHelper.defineClass0Pre(ClassLoader, String, byte[], int, int, ProtectionDomain) line: 107 WebappClassLoader(ClassLoader).defineClass(String, byte[], int, int, ProtectionDomain) line: 539 WebappClassLoader(SecureClassLoader).defineClass(String, byte[], int, int, CodeSource) line: 123 WebappClassLoader.findClassInternal(String) line: 1786 WebappClassLoader.findClass(String) line: 1048 WebappClassLoader.loadClass(String, boolean) line: 1506 WebappClassLoader.loadClass(String) line: 1385 WebappClassLoader(ClassLoader).loadClassInternal(String) line: 302 Class.forName0(String, boolean, ClassLoader) line: not available [native method] Class.forName(String) line: 141 InitializeLog.setWarnLogging(String) line: 121 InitializeLog.initializeLogging() line: 96 ContextLoaderServlet.init() line: 13 ContextLoaderServlet(GenericServlet).init(ServletConfig) line: 212 StandardWrapper.loadServlet() line: 879 StandardWrapper.load() line: 767 StandardContext.loadOnStartup(Container[]) line: 3483 StandardContext.start() line: 3709 StandardHost(ContainerBase).addChildInternal(Container) line: 776 StandardHost(ContainerBase).addChild(Container) line: 759 StandardHost.addChild(Container) line: 537 StandardHostDeployer.install(String, URL) line: 260 StandardHost.install(String, URL) line: 730 HostConfig.deployWARs(File, String[]) line: 558 HostConfig.deployApps() line: 373 HostConfig.start() line: 784 HostConfig.lifecycleEvent(LifecycleEvent) line: 330 LifecycleSupport.fireLifecycleEvent(String, Object) line: 119 StandardHost(ContainerBase).start() line: 1155 StandardHost.start() line: 696 StandardEngine(ContainerBase).start() line: 1147 StandardEngine.start() line: 310 StandardService.start() line: 449 StandardServer.start() line: 2212 Catalina.start() line: 458 Catalina.execute() line: 345 Catalina.process(String[]) line: 129 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 Method.invoke(Object, Object[]) line: 324 Bootstrap.main(String[]) line: 150 I'm using a modified version of Alex Vasseur's LTW plugin for a Java 1.4 VM although I haven't tested on the JRockIt plugin for a 1.4 VM: my guess is that this would fail there too.
|
resolved fixed
|
82e3e13
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-15T11:51:21Z | 2006-08-11T07:06:40Z |
weaver5/java5-testsrc/org/aspectj/weaver/reflect/ReflectionBasedReferenceTypeDelegateTest.java
|
ResolvedType voidType = world.resolve(Integer.TYPE);
ResolvedType superType = voidType.getSuperclass();
assertNull(superType);
BcelWorld bcelworld = new BcelWorld();
bcelworld.setBehaveInJava5Way(true);
ResolvedType bcelSupertype = bcelworld.resolve("int").getSuperclass();
assertTrue("Should be null but is "+bcelSupertype,bcelSupertype==null);
}
public void testGenericInterfaceSuperclass_BcelWorldResolution() {
BcelWorld bcelworld = new BcelWorld();
bcelworld.setBehaveInJava5Way(true);
UnresolvedType javaUtilMap = UnresolvedType.forName("java.util.Map");
ReferenceType rawType = (ReferenceType) bcelworld.resolve(javaUtilMap);
assertTrue("Should be the raw type ?!? "+rawType.getTypekind(),rawType.isRawType());
ReferenceType genericType = (ReferenceType)rawType.getGenericType();
assertTrue("Should be the generic type ?!? "+genericType.getTypekind(),genericType.isGenericType());
ResolvedType rt = rawType.getSuperclass();
assertTrue("Superclass for Map raw type should be Object but was "+rt,rt.equals(UnresolvedType.OBJECT));
ResolvedType rt2 = genericType.getSuperclass();
assertTrue("Superclass for Map generic type should be Object but was "+rt2,rt2.equals(UnresolvedType.OBJECT));
}
public void testCompareSubclassDelegates() {
|
153,535 |
Bug 153535 Bug in reflection delegate signature for array of object type
|
The following problem is interesting because the advice weaves correctly with Java 1.5 LTW and also using Java 1.4 with build-time weaving. However, the following call pointcut isn't matching the expected call site in Java 1.4 load-time weaving (*). Pointcut: private pointcut inExecQuery() : (within(uk.ltd.getahead.dwr.impl.ExecuteQuery) || within(uk.ltd.getahead.dwr.ExecuteQuery)); public pointcut dwrQuery(Method method, Object receiver, Object[] params) : inExecQuery() && withincode(* execute(..)) && call(* Method.invoke(..)) && args(receiver, params) && target(method); protected pointcut monitorEnd() : dwrQuery(*, *, *); Matching call site: Object reply = method.invoke(object, params); I've tracked it down to failing to find the method in ResolvedType.matches. On line 405: "m1.getSignature()"= "(Ljava/lang/Object;[Ljava.lang.Object;)Ljava/lang/Object;" "m2.getSignature()"= "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;" Note the difference between . and / ^ ^ It looks to me like the signature for array types in the reflection delegate is erroneously using . instead of /. I have attached a patch to the ReflectionBasedReferenceTypeDelegateTest that isolates this unexpected signature return. Hopefully you agree that this is not correct. If not, some more information follows. Here's the stack trace where the match fails: ResolvedType.matches(Member, Member) line: 405 ReferenceType(ResolvedType).lookupMember(Member, Iterator) line: 347 ReferenceType(ResolvedType).lookupMethod(Member) line: 326 LTWWorld(World).resolve(Member) line: 504 MemberImpl.resolve(World) line: 93 JoinPointSignatureIterator.addSignaturesUpToFirstDefiningMember() line: 109 JoinPointSignatureIterator.<init>(Member, World) line: 51 MemberImpl.getJoinPointSignatures(World) line: 943 SignaturePattern.matches(Member, World, boolean) line: 286 KindedPointcut.matchInternal(Shadow) line: 106 KindedPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 53 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 OrPointcut.matchInternal(Shadow) line: 50 OrPointcut(Pointcut).match(Shadow) line: 146 BcelAdvice(ShadowMunger).match(Shadow, World) line: 71 BcelAdvice(Advice).match(Shadow, World) line: 112 BcelAdvice.match(Shadow, World) line: 107 BcelClassWeaver.match(BcelShadow, List) line: 2806 BcelClassWeaver.matchInvokeInstruction(LazyMethodGen, InstructionHandle, InvokeInstruction, BcelShadow, List) line: 2768 BcelClassWeaver.match(LazyMethodGen, InstructionHandle, BcelShadow, List) line: 2506 BcelClassWeaver.match(LazyMethodGen) line: 2332 BcelClassWeaver.weave() line: 494 BcelClassWeaver.weave(BcelWorld, LazyClassGen, List, List, List) line: 119 BcelWeaver.weave(UnwovenClassFile, BcelObjectType, boolean) line: 1613 BcelWeaver.weaveWithoutDump(UnwovenClassFile, BcelObjectType) line: 1564 BcelWeaver.weaveAndNotify(UnwovenClassFile, BcelObjectType, IWeaveRequestor) line: 1341 BcelWeaver.weave(IClassFileProvider) line: 1163 ClassLoaderWeavingAdaptor(WeavingAdaptor).getWovenBytes(String, byte[]) line: 319 ClassLoaderWeavingAdaptor(WeavingAdaptor).weaveClass(String, byte[]) line: 225 Aj.preProcess(String, byte[], ClassLoader) line: 77 ClassPreProcessorAdapter.preProcess(String, byte[], ClassLoader) line: 67 ClassPreProcessorHelper.defineClass0Pre(ClassLoader, String, byte[], int, int, ProtectionDomain) line: 107 WebappClassLoader(ClassLoader).defineClass(String, byte[], int, int, ProtectionDomain) line: 539 WebappClassLoader(SecureClassLoader).defineClass(String, byte[], int, int, CodeSource) line: 123 WebappClassLoader.findClassInternal(String) line: 1786 WebappClassLoader.findClass(String) line: 1048 WebappClassLoader.loadClass(String, boolean) line: 1506 WebappClassLoader.loadClass(String) line: 1385 WebappClassLoader(ClassLoader).loadClassInternal(String) line: 302 Class.forName0(String, boolean, ClassLoader) line: not available [native method] Class.forName(String) line: 141 InitializeLog.setWarnLogging(String) line: 121 InitializeLog.initializeLogging() line: 96 ContextLoaderServlet.init() line: 13 ContextLoaderServlet(GenericServlet).init(ServletConfig) line: 212 StandardWrapper.loadServlet() line: 879 StandardWrapper.load() line: 767 StandardContext.loadOnStartup(Container[]) line: 3483 StandardContext.start() line: 3709 StandardHost(ContainerBase).addChildInternal(Container) line: 776 StandardHost(ContainerBase).addChild(Container) line: 759 StandardHost.addChild(Container) line: 537 StandardHostDeployer.install(String, URL) line: 260 StandardHost.install(String, URL) line: 730 HostConfig.deployWARs(File, String[]) line: 558 HostConfig.deployApps() line: 373 HostConfig.start() line: 784 HostConfig.lifecycleEvent(LifecycleEvent) line: 330 LifecycleSupport.fireLifecycleEvent(String, Object) line: 119 StandardHost(ContainerBase).start() line: 1155 StandardHost.start() line: 696 StandardEngine(ContainerBase).start() line: 1147 StandardEngine.start() line: 310 StandardService.start() line: 449 StandardServer.start() line: 2212 Catalina.start() line: 458 Catalina.execute() line: 345 Catalina.process(String[]) line: 129 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 Method.invoke(Object, Object[]) line: 324 Bootstrap.main(String[]) line: 150 I'm using a modified version of Alex Vasseur's LTW plugin for a Java 1.4 VM although I haven't tested on the JRockIt plugin for a 1.4 VM: my guess is that this would fail there too.
|
resolved fixed
|
82e3e13
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-15T11:51:21Z | 2006-08-11T07:06:40Z |
weaver5/java5-testsrc/org/aspectj/weaver/reflect/ReflectionBasedReferenceTypeDelegateTest.java
|
boolean barfIfClinitMissing = false;
world.setBehaveInJava5Way(true);
BcelWorld bcelWorld = new BcelWorld(getClass().getClassLoader(),IMessageHandler.THROW,null);
bcelWorld.setBehaveInJava5Way(true);
UnresolvedType javaUtilHashMap = UnresolvedType.forName("java.util.HashMap");
ReferenceType rawType =(ReferenceType)bcelWorld.resolve(javaUtilHashMap );
ReferenceType rawReflectType =(ReferenceType)world.resolve(javaUtilHashMap );
ResolvedMember[] rms1 = rawType.getDelegate().getDeclaredMethods();
ResolvedMember[] rms2 = rawReflectType.getDelegate().getDeclaredMethods();
StringBuffer errors = new StringBuffer();
Set one = new HashSet();
for (int i = 0; i < rms1.length; i++) {
one.add(rms1[i].toString());
}
Set two = new HashSet();
for (int i = 0; i < rms2.length; i++) {
two.add(rms2[i].toString());
}
for (int i = 0;i<rms2.length;i++) {
if (!one.contains(rms2[i].toString())) {
errors.append("Couldn't find "+rms2[i].toString()+" in the bcel set\n");
}
}
for (int i = 0;i<rms1.length;i++) {
if (!two.contains(rms1[i].toString())) {
if (!barfIfClinitMissing && rms1[i].getName().equals("<clinit>")) continue;
errors.append("Couldn't find "+rms1[i].toString()+" in the reflection set\n");
|
153,535 |
Bug 153535 Bug in reflection delegate signature for array of object type
|
The following problem is interesting because the advice weaves correctly with Java 1.5 LTW and also using Java 1.4 with build-time weaving. However, the following call pointcut isn't matching the expected call site in Java 1.4 load-time weaving (*). Pointcut: private pointcut inExecQuery() : (within(uk.ltd.getahead.dwr.impl.ExecuteQuery) || within(uk.ltd.getahead.dwr.ExecuteQuery)); public pointcut dwrQuery(Method method, Object receiver, Object[] params) : inExecQuery() && withincode(* execute(..)) && call(* Method.invoke(..)) && args(receiver, params) && target(method); protected pointcut monitorEnd() : dwrQuery(*, *, *); Matching call site: Object reply = method.invoke(object, params); I've tracked it down to failing to find the method in ResolvedType.matches. On line 405: "m1.getSignature()"= "(Ljava/lang/Object;[Ljava.lang.Object;)Ljava/lang/Object;" "m2.getSignature()"= "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;" Note the difference between . and / ^ ^ It looks to me like the signature for array types in the reflection delegate is erroneously using . instead of /. I have attached a patch to the ReflectionBasedReferenceTypeDelegateTest that isolates this unexpected signature return. Hopefully you agree that this is not correct. If not, some more information follows. Here's the stack trace where the match fails: ResolvedType.matches(Member, Member) line: 405 ReferenceType(ResolvedType).lookupMember(Member, Iterator) line: 347 ReferenceType(ResolvedType).lookupMethod(Member) line: 326 LTWWorld(World).resolve(Member) line: 504 MemberImpl.resolve(World) line: 93 JoinPointSignatureIterator.addSignaturesUpToFirstDefiningMember() line: 109 JoinPointSignatureIterator.<init>(Member, World) line: 51 MemberImpl.getJoinPointSignatures(World) line: 943 SignaturePattern.matches(Member, World, boolean) line: 286 KindedPointcut.matchInternal(Shadow) line: 106 KindedPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 53 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 AndPointcut.matchInternal(Shadow) line: 51 AndPointcut(Pointcut).match(Shadow) line: 146 OrPointcut.matchInternal(Shadow) line: 50 OrPointcut(Pointcut).match(Shadow) line: 146 BcelAdvice(ShadowMunger).match(Shadow, World) line: 71 BcelAdvice(Advice).match(Shadow, World) line: 112 BcelAdvice.match(Shadow, World) line: 107 BcelClassWeaver.match(BcelShadow, List) line: 2806 BcelClassWeaver.matchInvokeInstruction(LazyMethodGen, InstructionHandle, InvokeInstruction, BcelShadow, List) line: 2768 BcelClassWeaver.match(LazyMethodGen, InstructionHandle, BcelShadow, List) line: 2506 BcelClassWeaver.match(LazyMethodGen) line: 2332 BcelClassWeaver.weave() line: 494 BcelClassWeaver.weave(BcelWorld, LazyClassGen, List, List, List) line: 119 BcelWeaver.weave(UnwovenClassFile, BcelObjectType, boolean) line: 1613 BcelWeaver.weaveWithoutDump(UnwovenClassFile, BcelObjectType) line: 1564 BcelWeaver.weaveAndNotify(UnwovenClassFile, BcelObjectType, IWeaveRequestor) line: 1341 BcelWeaver.weave(IClassFileProvider) line: 1163 ClassLoaderWeavingAdaptor(WeavingAdaptor).getWovenBytes(String, byte[]) line: 319 ClassLoaderWeavingAdaptor(WeavingAdaptor).weaveClass(String, byte[]) line: 225 Aj.preProcess(String, byte[], ClassLoader) line: 77 ClassPreProcessorAdapter.preProcess(String, byte[], ClassLoader) line: 67 ClassPreProcessorHelper.defineClass0Pre(ClassLoader, String, byte[], int, int, ProtectionDomain) line: 107 WebappClassLoader(ClassLoader).defineClass(String, byte[], int, int, ProtectionDomain) line: 539 WebappClassLoader(SecureClassLoader).defineClass(String, byte[], int, int, CodeSource) line: 123 WebappClassLoader.findClassInternal(String) line: 1786 WebappClassLoader.findClass(String) line: 1048 WebappClassLoader.loadClass(String, boolean) line: 1506 WebappClassLoader.loadClass(String) line: 1385 WebappClassLoader(ClassLoader).loadClassInternal(String) line: 302 Class.forName0(String, boolean, ClassLoader) line: not available [native method] Class.forName(String) line: 141 InitializeLog.setWarnLogging(String) line: 121 InitializeLog.initializeLogging() line: 96 ContextLoaderServlet.init() line: 13 ContextLoaderServlet(GenericServlet).init(ServletConfig) line: 212 StandardWrapper.loadServlet() line: 879 StandardWrapper.load() line: 767 StandardContext.loadOnStartup(Container[]) line: 3483 StandardContext.start() line: 3709 StandardHost(ContainerBase).addChildInternal(Container) line: 776 StandardHost(ContainerBase).addChild(Container) line: 759 StandardHost.addChild(Container) line: 537 StandardHostDeployer.install(String, URL) line: 260 StandardHost.install(String, URL) line: 730 HostConfig.deployWARs(File, String[]) line: 558 HostConfig.deployApps() line: 373 HostConfig.start() line: 784 HostConfig.lifecycleEvent(LifecycleEvent) line: 330 LifecycleSupport.fireLifecycleEvent(String, Object) line: 119 StandardHost(ContainerBase).start() line: 1155 StandardHost.start() line: 696 StandardEngine(ContainerBase).start() line: 1147 StandardEngine.start() line: 310 StandardService.start() line: 449 StandardServer.start() line: 2212 Catalina.start() line: 458 Catalina.execute() line: 345 Catalina.process(String[]) line: 129 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 Method.invoke(Object, Object[]) line: 324 Bootstrap.main(String[]) line: 150 I'm using a modified version of Alex Vasseur's LTW plugin for a Java 1.4 VM although I haven't tested on the JRockIt plugin for a 1.4 VM: my guess is that this would fail there too.
|
resolved fixed
|
82e3e13
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-15T11:51:21Z | 2006-08-11T07:06:40Z |
weaver5/java5-testsrc/org/aspectj/weaver/reflect/ReflectionBasedReferenceTypeDelegateTest.java
|
}
}
assertTrue("Errors:"+errors.toString(),errors.length()==0);
if (rms1.length==rms2.length) return;
if (barfIfClinitMissing) {
assertEquals(rms1.length,rms2.length);
} else {
if (rms1.length!=(rms2.length+1)) {
for (int i = 0; i < rms1.length; i++) {
System.err.println("bcel"+i+" is "+rms1[i]);
}
for (int i = 0; i < rms2.length; i++) {
System.err.println("refl"+i+" is "+rms2[i]);
}
}
assertTrue("Should be one extra (clinit) in BCEL case, but bcel="+rms1.length+" reflect="+rms2.length,rms1.length==rms2.length+1);
}
}
protected void setUp() throws Exception {
world = new ReflectionWorld(getClass().getClassLoader());
objectType = world.resolve("java.lang.Object");
}
}
|
154,332 |
Bug 154332 [annotations] Incorrect handling of java.lang annotations when matching
|
As raised by Mr Bodkin on the list: Can anyone tell me why this compiling this program produces warnings for marker but not for deprecated (in a recent dev build of AJDT)? Is this just a bug? Both have runtime retention, so I would expect equivalent behavior. @Deprecated @Marker public aspect Annot { pointcut test() : within(@Marker *);// *); declare warning: staticinitialization(@Deprecated *): "deprecated"; declare warning: staticinitialization(@Marker *): "marker"; public static void main(String argz[]) { new Baz().foo(); } } @Deprecated @Marker class Baz { public void foo() {} } @Retention(RetentionPolicy.RUNTIME) public @interface Marker { }
|
resolved fixed
|
59123b0
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-18T08:21:58Z | 2006-08-18T08:33:20Z |
tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java
|
/*******************************************************************************
* Copyright (c) 2006 IBM
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Andy Clement - initial API and implementation
*******************************************************************************/
package org.aspectj.systemtest.ajc153;
import java.io.File;
import junit.framework.Test;
import org.aspectj.testing.Utils;
import org.aspectj.testing.XMLBasedAjcTestCase;
import org.aspectj.weaver.bcel.Utility;
public class Ajc153Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
|
154,332 |
Bug 154332 [annotations] Incorrect handling of java.lang annotations when matching
|
As raised by Mr Bodkin on the list: Can anyone tell me why this compiling this program produces warnings for marker but not for deprecated (in a recent dev build of AJDT)? Is this just a bug? Both have runtime retention, so I would expect equivalent behavior. @Deprecated @Marker public aspect Annot { pointcut test() : within(@Marker *);// *); declare warning: staticinitialization(@Deprecated *): "deprecated"; declare warning: staticinitialization(@Marker *): "marker"; public static void main(String argz[]) { new Baz().foo(); } } @Deprecated @Marker class Baz { public void foo() {} } @Retention(RetentionPolicy.RUNTIME) public @interface Marker { }
|
resolved fixed
|
59123b0
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-18T08:21:58Z | 2006-08-18T08:33:20Z |
tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java
|
public void testPipeliningProblemWithAnnotationsDecp_pr153380_1() { runTest("pipelining decps");}
public void testUnwantedPointcutWarning_pr148219() { runTest("unwanted warning for pointcut");}
public void testDecpAndCflowadderMungerClash_pr152631() { runTest("decp and cflowadder munger clash");}
public void testGenericInheritanceDecp_pr150095() { runTest("generics, inheritance and decp");}
public void testIllegalStateException_pr148737() { runTest("illegalstateexception for non generic type");}
public void testAtajInheritance_pr149305_1() { runTest("ataj inheritance - 1");}
public void testAtajInheritance_pr149305_2() { runTest("ataj inheritance - 2");}
public void testAtajInheritance_pr149305_3() { runTest("ataj inheritance - 3");}
public void testVerificationFailureForAspectOf_pr148693() {
runTest("verification problem");
Utils.verifyClass(ajc,"mypackage.MyAspect");
}
|
154,332 |
Bug 154332 [annotations] Incorrect handling of java.lang annotations when matching
|
As raised by Mr Bodkin on the list: Can anyone tell me why this compiling this program produces warnings for marker but not for deprecated (in a recent dev build of AJDT)? Is this just a bug? Both have runtime retention, so I would expect equivalent behavior. @Deprecated @Marker public aspect Annot { pointcut test() : within(@Marker *);// *); declare warning: staticinitialization(@Deprecated *): "deprecated"; declare warning: staticinitialization(@Marker *): "marker"; public static void main(String argz[]) { new Baz().foo(); } } @Deprecated @Marker class Baz { public void foo() {} } @Retention(RetentionPolicy.RUNTIME) public @interface Marker { }
|
resolved fixed
|
59123b0
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-18T08:21:58Z | 2006-08-18T08:33:20Z |
tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java
|
public void testIncorrectAnnotationValue_pr148537() { runTest("incorrect annotation value");}
public void testVerifyErrNoTypeCflowField_pr145693_1() { runTest("verifyErrNoTypeCflowField"); }
public void testVerifyErrInpathNoTypeCflowField_pr145693_2() { runTest("verifyErrInpathNoTypeCflowField"); }
public void testCpathNoTypeCflowField_pr145693_3() { runTest("cpathNoTypeCflowField"); }
public void testGenericSignatures_pr148409() { runTest("generic signature problem"); }
public void testCantFindType_pr149322_01() {runTest("can't find type on interface call 1");}
public void testCantFindType_pr149322_02() {runTest("can't find type on interface call 2");}
public void testCantFindType_pr149322_03() {runTest("can't find type on interface call 3");}
public void testParsingBytecodeLess_pr152871() {
Utility.testingParseCounter=0;
runTest("parsing bytecode less");
assertTrue("Should have called parse 5 times, not "+Utility.testingParseCounter+" times",Utility.testingParseCounter==5);
}
public void testMatchVolatileField_pr150671() {runTest("match volatile field");};
public void testDuplicateJVMTIAgents_pr151938() {runTest("Duplicate JVMTI agents");};
public static Test suite() {
return XMLBasedAjcTestCase.loadSuite(Ajc153Tests.class);
}
protected File getSpecFile() {
return new File("../tests/src/org/aspectj/systemtest/ajc153/ajc153.xml");
}
}
|
154,332 |
Bug 154332 [annotations] Incorrect handling of java.lang annotations when matching
|
As raised by Mr Bodkin on the list: Can anyone tell me why this compiling this program produces warnings for marker but not for deprecated (in a recent dev build of AJDT)? Is this just a bug? Both have runtime retention, so I would expect equivalent behavior. @Deprecated @Marker public aspect Annot { pointcut test() : within(@Marker *);// *); declare warning: staticinitialization(@Deprecated *): "deprecated"; declare warning: staticinitialization(@Marker *): "marker"; public static void main(String argz[]) { new Baz().foo(); } } @Deprecated @Marker class Baz { public void foo() {} } @Retention(RetentionPolicy.RUNTIME) public @interface Marker { }
|
resolved fixed
|
59123b0
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-18T08:21:58Z | 2006-08-18T08:33:20Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
/* *******************************************************************
* Copyright (c) 2002 Contributors
* All rights reserved.
* This program and the accompanying materials are made available
* under the terms of the Eclipse Public License v1.0
* which accompanies this distribution and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* PARC initial implementation
* RonBodkin/AndyClement optimizations for memory consumption/speed
* ******************************************************************/
package org.aspectj.weaver.bcel;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import org.aspectj.apache.bcel.classfile.Attribute;
import org.aspectj.apache.bcel.classfile.Field;
import org.aspectj.apache.bcel.classfile.JavaClass;
import org.aspectj.apache.bcel.classfile.Method;
import org.aspectj.apache.bcel.classfile.Signature;
import org.aspectj.apache.bcel.classfile.Signature.ClassSignature;
|
154,332 |
Bug 154332 [annotations] Incorrect handling of java.lang annotations when matching
|
As raised by Mr Bodkin on the list: Can anyone tell me why this compiling this program produces warnings for marker but not for deprecated (in a recent dev build of AJDT)? Is this just a bug? Both have runtime retention, so I would expect equivalent behavior. @Deprecated @Marker public aspect Annot { pointcut test() : within(@Marker *);// *); declare warning: staticinitialization(@Deprecated *): "deprecated"; declare warning: staticinitialization(@Marker *): "marker"; public static void main(String argz[]) { new Baz().foo(); } } @Deprecated @Marker class Baz { public void foo() {} } @Retention(RetentionPolicy.RUNTIME) public @interface Marker { }
|
resolved fixed
|
59123b0
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-18T08:21:58Z | 2006-08-18T08:33:20Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
import org.aspectj.apache.bcel.classfile.annotation.Annotation;
import org.aspectj.apache.bcel.classfile.annotation.ArrayElementValue;
import org.aspectj.apache.bcel.classfile.annotation.ElementNameValuePair;
import org.aspectj.apache.bcel.classfile.annotation.ElementValue;
import org.aspectj.bridge.IMessageHandler;
import org.aspectj.weaver.AbstractReferenceTypeDelegate;
import org.aspectj.weaver.AjAttribute;
import org.aspectj.weaver.AjcMemberMaker;
import org.aspectj.weaver.AnnotationTargetKind;
import org.aspectj.weaver.AnnotationX;
import org.aspectj.weaver.BCException;
import org.aspectj.weaver.ReferenceType;
import org.aspectj.weaver.ReferenceTypeDelegate;
import org.aspectj.weaver.ResolvedMember;
import org.aspectj.weaver.ResolvedPointcutDefinition;
import org.aspectj.weaver.ResolvedType;
import org.aspectj.weaver.SourceContextImpl;
import org.aspectj.weaver.TypeVariable;
import org.aspectj.weaver.UnresolvedType;
import org.aspectj.weaver.WeaverStateInfo;
import org.aspectj.weaver.World;
import org.aspectj.weaver.bcel.AtAjAttributes.BindingScope;
import org.aspectj.weaver.bcel.BcelGenericSignatureToTypeXConverter.GenericSignatureFormatException;
import org.aspectj.weaver.patterns.Declare;
import org.aspectj.weaver.patterns.DeclareErrorOrWarning;
import org.aspectj.weaver.patterns.DeclarePrecedence;
import org.aspectj.weaver.patterns.FormalBinding;
import org.aspectj.weaver.patterns.IScope;
import org.aspectj.weaver.patterns.PerClause;
public class BcelObjectType extends AbstractReferenceTypeDelegate {
|
154,332 |
Bug 154332 [annotations] Incorrect handling of java.lang annotations when matching
|
As raised by Mr Bodkin on the list: Can anyone tell me why this compiling this program produces warnings for marker but not for deprecated (in a recent dev build of AJDT)? Is this just a bug? Both have runtime retention, so I would expect equivalent behavior. @Deprecated @Marker public aspect Annot { pointcut test() : within(@Marker *);// *); declare warning: staticinitialization(@Deprecated *): "deprecated"; declare warning: staticinitialization(@Marker *): "marker"; public static void main(String argz[]) { new Baz().foo(); } } @Deprecated @Marker class Baz { public void foo() {} } @Retention(RetentionPolicy.RUNTIME) public @interface Marker { }
|
resolved fixed
|
59123b0
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-18T08:21:58Z | 2006-08-18T08:33:20Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
public JavaClass javaClass;
private LazyClassGen lazyClassGen = null;
private int modifiers;
private String className;
private String superclassSignature;
private String superclassName;
private String[] interfaceSignatures;
private ResolvedMember[] fields = null;
private ResolvedMember[] methods = null;
private ResolvedType[] annotationTypes = null;
private AnnotationX[] annotations = null;
private TypeVariable[] typeVars = null;
private String retentionPolicy;
private AnnotationTargetKind[] annotationTargetKinds;
private AjAttribute.WeaverVersionInfo wvInfo = AjAttribute.WeaverVersionInfo.UNKNOWN;
private ResolvedPointcutDefinition[] pointcuts = null;
|
154,332 |
Bug 154332 [annotations] Incorrect handling of java.lang annotations when matching
|
As raised by Mr Bodkin on the list: Can anyone tell me why this compiling this program produces warnings for marker but not for deprecated (in a recent dev build of AJDT)? Is this just a bug? Both have runtime retention, so I would expect equivalent behavior. @Deprecated @Marker public aspect Annot { pointcut test() : within(@Marker *);// *); declare warning: staticinitialization(@Deprecated *): "deprecated"; declare warning: staticinitialization(@Marker *): "marker"; public static void main(String argz[]) { new Baz().foo(); } } @Deprecated @Marker class Baz { public void foo() {} } @Retention(RetentionPolicy.RUNTIME) public @interface Marker { }
|
resolved fixed
|
59123b0
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-18T08:21:58Z | 2006-08-18T08:33:20Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
private ResolvedMember[] privilegedAccess = null;
private WeaverStateInfo weaverState = null;
private PerClause perClause = null;
private List typeMungers = Collections.EMPTY_LIST;
private List declares = Collections.EMPTY_LIST;
private Signature.FormalTypeParameter[] formalsForResolution = null;
private ClassSignature cachedGenericClassTypeSignature;
private String declaredSignature = null;
private boolean hasBeenWoven = false;
private boolean isGenericType = false;
private boolean isInterface;
private boolean isEnum;
private boolean isAnnotation;
private boolean isAnonymous;
private boolean isNested;
private boolean isObject = false;
private boolean isAnnotationStyleAspect = false;
private boolean isCodeStyleAspect = false;
private int bitflag = 0x0000;
private static final int DISCOVERED_ANNOTATION_RETENTION_POLICY = 0x0001;
private static final int UNPACKED_GENERIC_SIGNATURE = 0x0002;
private static final int UNPACKED_AJATTRIBUTES = 0x0004;
private static final int DISCOVERED_ANNOTATION_TARGET_KINDS = 0x0008;
private static final int DISCOVERED_DECLARED_SIGNATURE = 0x0010;
private static final int DISCOVERED_WHETHER_ANNOTATION_STYLE = 0x0020;
private static final int DAMAGED = 0x0040;
|
154,332 |
Bug 154332 [annotations] Incorrect handling of java.lang annotations when matching
|
As raised by Mr Bodkin on the list: Can anyone tell me why this compiling this program produces warnings for marker but not for deprecated (in a recent dev build of AJDT)? Is this just a bug? Both have runtime retention, so I would expect equivalent behavior. @Deprecated @Marker public aspect Annot { pointcut test() : within(@Marker *);// *); declare warning: staticinitialization(@Deprecated *): "deprecated"; declare warning: staticinitialization(@Marker *): "marker"; public static void main(String argz[]) { new Baz().foo(); } } @Deprecated @Marker class Baz { public void foo() {} } @Retention(RetentionPolicy.RUNTIME) public @interface Marker { }
|
resolved fixed
|
59123b0
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-18T08:21:58Z | 2006-08-18T08:33:20Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
/*
* Notes:
* note(1):
* in some cases (perclause inheritance) we encounter unpacked state when calling getPerClause
*
* note(2):
* A BcelObjectType is 'damaged' if it has been modified from what was original constructed from
* the bytecode. This currently happens if the parents are modified or an annotation is added -
* ideally BcelObjectType should be immutable but that's a bigger piece of work. XXX
*/
BcelObjectType(ReferenceType resolvedTypeX, JavaClass javaClass, boolean exposedToWeaver) {
super(resolvedTypeX, exposedToWeaver);
this.javaClass = javaClass;
initializeFromJavaclass();
resolvedTypeX.setDelegate(this);
if (resolvedTypeX.getSourceContext()==SourceContextImpl.UNKNOWN_SOURCE_CONTEXT) {
setSourceContext(new SourceContextImpl(this));
}
isObject = (javaClass.getSuperclassNameIndex() == 0);
ensureAspectJAttributesUnpacked();
setSourcefilename(javaClass.getSourceFileName());
}
|
154,332 |
Bug 154332 [annotations] Incorrect handling of java.lang annotations when matching
|
As raised by Mr Bodkin on the list: Can anyone tell me why this compiling this program produces warnings for marker but not for deprecated (in a recent dev build of AJDT)? Is this just a bug? Both have runtime retention, so I would expect equivalent behavior. @Deprecated @Marker public aspect Annot { pointcut test() : within(@Marker *);// *); declare warning: staticinitialization(@Deprecated *): "deprecated"; declare warning: staticinitialization(@Marker *): "marker"; public static void main(String argz[]) { new Baz().foo(); } } @Deprecated @Marker class Baz { public void foo() {} } @Retention(RetentionPolicy.RUNTIME) public @interface Marker { }
|
resolved fixed
|
59123b0
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-18T08:21:58Z | 2006-08-18T08:33:20Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
public void setJavaClass(JavaClass newclass) {
this.javaClass = newclass;
resetState();
initializeFromJavaclass();
}
private void initializeFromJavaclass() {
isInterface = javaClass.isInterface();
isEnum = javaClass.isEnum();
isAnnotation = javaClass.isAnnotation();
isAnonymous = javaClass.isAnonymous();
isNested = javaClass.isNested();
modifiers = javaClass.getAccessFlags();
superclassName = javaClass.getSuperclassName();
className = javaClass.getClassName();
cachedGenericClassTypeSignature = javaClass.getGenericClassTypeSignature();
}
public boolean isInterface() {return isInterface;}
public boolean isEnum() {return isEnum;}
public boolean isAnnotation() {return isAnnotation;}
public boolean isAnonymous() {return isAnonymous;}
public boolean isNested() {return isNested;}
public int getModifiers() {return modifiers;}
|
154,332 |
Bug 154332 [annotations] Incorrect handling of java.lang annotations when matching
|
As raised by Mr Bodkin on the list: Can anyone tell me why this compiling this program produces warnings for marker but not for deprecated (in a recent dev build of AJDT)? Is this just a bug? Both have runtime retention, so I would expect equivalent behavior. @Deprecated @Marker public aspect Annot { pointcut test() : within(@Marker *);// *); declare warning: staticinitialization(@Deprecated *): "deprecated"; declare warning: staticinitialization(@Marker *): "marker"; public static void main(String argz[]) { new Baz().foo(); } } @Deprecated @Marker class Baz { public void foo() {} } @Retention(RetentionPolicy.RUNTIME) public @interface Marker { }
|
resolved fixed
|
59123b0
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-18T08:21:58Z | 2006-08-18T08:33:20Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
/**
* Must take into account generic signature
*/
public ResolvedType getSuperclass() {
if (isObject) return null;
ensureGenericSignatureUnpacked();
if (superclassSignature == null) {
if (superclassName==null) superclassName = javaClass.getSuperclassName();
superclassSignature = getResolvedTypeX().getWorld().resolve(UnresolvedType.forName(superclassName)).getSignature();
}
ResolvedType res = getResolvedTypeX().getWorld().resolve(UnresolvedType.forSignature(superclassSignature));
return res;
}
/**
* Retrieves the declared interfaces - this allows for the generic signature on a type. If specified
* then the generic signature is used to work out the types - this gets around the results of
* erasure when the class was originally compiled.
*/
public ResolvedType[] getDeclaredInterfaces() {
ensureGenericSignatureUnpacked();
ResolvedType[] interfaceTypes = null;
if (interfaceSignatures == null) {
String[] names = javaClass.getInterfaceNames();
interfaceSignatures = new String[names.length];
interfaceTypes = new ResolvedType[names.length];
for (int i = 0, len = names.length; i < len; i++) {
|
154,332 |
Bug 154332 [annotations] Incorrect handling of java.lang annotations when matching
|
As raised by Mr Bodkin on the list: Can anyone tell me why this compiling this program produces warnings for marker but not for deprecated (in a recent dev build of AJDT)? Is this just a bug? Both have runtime retention, so I would expect equivalent behavior. @Deprecated @Marker public aspect Annot { pointcut test() : within(@Marker *);// *); declare warning: staticinitialization(@Deprecated *): "deprecated"; declare warning: staticinitialization(@Marker *): "marker"; public static void main(String argz[]) { new Baz().foo(); } } @Deprecated @Marker class Baz { public void foo() {} } @Retention(RetentionPolicy.RUNTIME) public @interface Marker { }
|
resolved fixed
|
59123b0
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-18T08:21:58Z | 2006-08-18T08:33:20Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
interfaceTypes[i] = getResolvedTypeX().getWorld().resolve(UnresolvedType.forName(names[i]));
interfaceSignatures[i] = interfaceTypes[i].getSignature();
}
} else {
interfaceTypes = new ResolvedType[interfaceSignatures.length];
for (int i = 0, len = interfaceSignatures.length; i < len; i++) {
interfaceTypes[i] = getResolvedTypeX().getWorld().resolve(UnresolvedType.forSignature(interfaceSignatures[i]));
}
}
return interfaceTypes;
}
public ResolvedMember[] getDeclaredMethods() {
ensureGenericSignatureUnpacked();
if (methods == null) {
Method[] ms = javaClass.getMethods();
methods = new ResolvedMember[ms.length];
for (int i = ms.length - 1; i >= 0; i--) {
methods[i] = new BcelMethod(this, ms[i]);
}
}
return methods;
}
public ResolvedMember[] getDeclaredFields() {
ensureGenericSignatureUnpacked();
if (fields == null) {
Field[] fs = javaClass.getFields();
fields = new ResolvedMember[fs.length];
for (int i = 0, len = fs.length; i < len; i++) {
|
154,332 |
Bug 154332 [annotations] Incorrect handling of java.lang annotations when matching
|
As raised by Mr Bodkin on the list: Can anyone tell me why this compiling this program produces warnings for marker but not for deprecated (in a recent dev build of AJDT)? Is this just a bug? Both have runtime retention, so I would expect equivalent behavior. @Deprecated @Marker public aspect Annot { pointcut test() : within(@Marker *);// *); declare warning: staticinitialization(@Deprecated *): "deprecated"; declare warning: staticinitialization(@Marker *): "marker"; public static void main(String argz[]) { new Baz().foo(); } } @Deprecated @Marker class Baz { public void foo() {} } @Retention(RetentionPolicy.RUNTIME) public @interface Marker { }
|
resolved fixed
|
59123b0
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-18T08:21:58Z | 2006-08-18T08:33:20Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
fields[i] = new BcelField(this, fs[i]);
}
}
return fields;
}
public TypeVariable[] getTypeVariables() {
if (!isGeneric()) return TypeVariable.NONE;
if (typeVars == null) {
Signature.ClassSignature classSig = cachedGenericClassTypeSignature;
typeVars = new TypeVariable[classSig.formalTypeParameters.length];
for (int i = 0; i < typeVars.length; i++) {
Signature.FormalTypeParameter ftp = classSig.formalTypeParameters[i];
try {
typeVars[i] = BcelGenericSignatureToTypeXConverter.formalTypeParameter2TypeVariable(
ftp,
classSig.formalTypeParameters,
getResolvedTypeX().getWorld());
} catch (GenericSignatureFormatException e) {
throw new IllegalStateException(
"While getting the type variables for type " + this.toString()
+ " with generic signature " + classSig +
" the following error condition was detected: " + e.getMessage());
}
}
}
return typeVars;
}
|
154,332 |
Bug 154332 [annotations] Incorrect handling of java.lang annotations when matching
|
As raised by Mr Bodkin on the list: Can anyone tell me why this compiling this program produces warnings for marker but not for deprecated (in a recent dev build of AJDT)? Is this just a bug? Both have runtime retention, so I would expect equivalent behavior. @Deprecated @Marker public aspect Annot { pointcut test() : within(@Marker *);// *); declare warning: staticinitialization(@Deprecated *): "deprecated"; declare warning: staticinitialization(@Marker *): "marker"; public static void main(String argz[]) { new Baz().foo(); } } @Deprecated @Marker class Baz { public void foo() {} } @Retention(RetentionPolicy.RUNTIME) public @interface Marker { }
|
resolved fixed
|
59123b0
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-18T08:21:58Z | 2006-08-18T08:33:20Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
public Collection getTypeMungers() {return typeMungers;}
public Collection getDeclares() {return declares;}
public Collection getPrivilegedAccesses() {
if (privilegedAccess == null) return Collections.EMPTY_LIST;
return Arrays.asList(privilegedAccess);
}
public ResolvedMember[] getDeclaredPointcuts() {
return pointcuts;
}
public boolean isAspect() {
return perClause != null;
}
/**
* Check if the type is an @AJ aspect (no matter if used from an LTW point of view).
* Such aspects are annotated with @Aspect
*
* @return true for @AJ aspect
*/
public boolean isAnnotationStyleAspect() {
if ((bitflag&DISCOVERED_WHETHER_ANNOTATION_STYLE)==0) {
bitflag|=DISCOVERED_WHETHER_ANNOTATION_STYLE;
isAnnotationStyleAspect = !isCodeStyleAspect && hasAnnotation(AjcMemberMaker.ASPECT_ANNOTATION);
}
return isAnnotationStyleAspect;
}
/**
* Process any org.aspectj.weaver attributes stored against the class.
|
154,332 |
Bug 154332 [annotations] Incorrect handling of java.lang annotations when matching
|
As raised by Mr Bodkin on the list: Can anyone tell me why this compiling this program produces warnings for marker but not for deprecated (in a recent dev build of AJDT)? Is this just a bug? Both have runtime retention, so I would expect equivalent behavior. @Deprecated @Marker public aspect Annot { pointcut test() : within(@Marker *);// *); declare warning: staticinitialization(@Deprecated *): "deprecated"; declare warning: staticinitialization(@Marker *): "marker"; public static void main(String argz[]) { new Baz().foo(); } } @Deprecated @Marker class Baz { public void foo() {} } @Retention(RetentionPolicy.RUNTIME) public @interface Marker { }
|
resolved fixed
|
59123b0
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-18T08:21:58Z | 2006-08-18T08:33:20Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
*/
private void ensureAspectJAttributesUnpacked() {
if ((bitflag&UNPACKED_AJATTRIBUTES)!=0) return;
bitflag|=UNPACKED_AJATTRIBUTES;
IMessageHandler msgHandler = getResolvedTypeX().getWorld().getMessageHandler();
List l = BcelAttributes.readAjAttributes(className,javaClass.getAttributes(), getResolvedTypeX().getSourceContext(),getResolvedTypeX().getWorld(),AjAttribute.WeaverVersionInfo.UNKNOWN);
List pointcuts = new ArrayList();
typeMungers = new ArrayList();
declares = new ArrayList();
processAttributes(l,pointcuts,false);
l = AtAjAttributes.readAj5ClassAttributes(javaClass, getResolvedTypeX(), getResolvedTypeX().getSourceContext(), msgHandler,isCodeStyleAspect);
AjAttribute.Aspect deferredAspectAttribute = processAttributes(l,pointcuts,true);
this.pointcuts = (ResolvedPointcutDefinition[])
pointcuts.toArray(new ResolvedPointcutDefinition[pointcuts.size()]);
resolveAnnotationDeclares(l);
if (deferredAspectAttribute != null) {
perClause = deferredAspectAttribute.reifyFromAtAspectJ(this.getResolvedTypeX());
}
}
private AjAttribute.Aspect processAttributes(List attributeList, List pointcuts, boolean fromAnnotations) {
AjAttribute.Aspect deferredAspectAttribute = null;
for (Iterator iter = attributeList.iterator(); iter.hasNext();) {
AjAttribute a = (AjAttribute) iter.next();
if (a instanceof AjAttribute.Aspect) {
if (fromAnnotations) {
|
154,332 |
Bug 154332 [annotations] Incorrect handling of java.lang annotations when matching
|
As raised by Mr Bodkin on the list: Can anyone tell me why this compiling this program produces warnings for marker but not for deprecated (in a recent dev build of AJDT)? Is this just a bug? Both have runtime retention, so I would expect equivalent behavior. @Deprecated @Marker public aspect Annot { pointcut test() : within(@Marker *);// *); declare warning: staticinitialization(@Deprecated *): "deprecated"; declare warning: staticinitialization(@Marker *): "marker"; public static void main(String argz[]) { new Baz().foo(); } } @Deprecated @Marker class Baz { public void foo() {} } @Retention(RetentionPolicy.RUNTIME) public @interface Marker { }
|
resolved fixed
|
59123b0
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-18T08:21:58Z | 2006-08-18T08:33:20Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
deferredAspectAttribute = (AjAttribute.Aspect) a;
} else {
perClause = ((AjAttribute.Aspect)a).reify(this.getResolvedTypeX());
isCodeStyleAspect = true;
}
} else if (a instanceof AjAttribute.PointcutDeclarationAttribute) {
pointcuts.add(((AjAttribute.PointcutDeclarationAttribute)a).reify());
} else if (a instanceof AjAttribute.WeaverState) {
weaverState = ((AjAttribute.WeaverState)a).reify();
} else if (a instanceof AjAttribute.TypeMunger) {
typeMungers.add(((AjAttribute.TypeMunger)a).reify(getResolvedTypeX().getWorld(), getResolvedTypeX()));
} else if (a instanceof AjAttribute.DeclareAttribute) {
declares.add(((AjAttribute.DeclareAttribute)a).getDeclare());
} else if (a instanceof AjAttribute.PrivilegedAttribute) {
privilegedAccess = ((AjAttribute.PrivilegedAttribute)a).getAccessedMembers();
} else if (a instanceof AjAttribute.SourceContextAttribute) {
if (getResolvedTypeX().getSourceContext() instanceof SourceContextImpl) {
AjAttribute.SourceContextAttribute sca = (AjAttribute.SourceContextAttribute)a;
((SourceContextImpl)getResolvedTypeX().getSourceContext()).configureFromAttribute(sca.getSourceFileName(),sca.getLineBreaks());
}
} else if (a instanceof AjAttribute.WeaverVersionInfo) {
wvInfo = (AjAttribute.WeaverVersionInfo)a;
} else {
throw new BCException("bad attribute " + a);
}
}
return deferredAspectAttribute;
}
/**
|
154,332 |
Bug 154332 [annotations] Incorrect handling of java.lang annotations when matching
|
As raised by Mr Bodkin on the list: Can anyone tell me why this compiling this program produces warnings for marker but not for deprecated (in a recent dev build of AJDT)? Is this just a bug? Both have runtime retention, so I would expect equivalent behavior. @Deprecated @Marker public aspect Annot { pointcut test() : within(@Marker *);// *); declare warning: staticinitialization(@Deprecated *): "deprecated"; declare warning: staticinitialization(@Marker *): "marker"; public static void main(String argz[]) { new Baz().foo(); } } @Deprecated @Marker class Baz { public void foo() {} } @Retention(RetentionPolicy.RUNTIME) public @interface Marker { }
|
resolved fixed
|
59123b0
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-18T08:21:58Z | 2006-08-18T08:33:20Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
* Extra processing step needed because declares that come from annotations are not pre-resolved.
* We can't do the resolution until *after* the pointcuts have been resolved.
* @param attributeList
*/
private void resolveAnnotationDeclares(List attributeList) {
FormalBinding[] bindings = new org.aspectj.weaver.patterns.FormalBinding[0];
IScope bindingScope = new BindingScope(
getResolvedTypeX(),
getResolvedTypeX().getSourceContext(),
bindings
);
for (Iterator iter = attributeList.iterator(); iter.hasNext();) {
AjAttribute a = (AjAttribute) iter.next();
if (a instanceof AjAttribute.DeclareAttribute) {
Declare decl = (((AjAttribute.DeclareAttribute)a).getDeclare());
if (decl instanceof DeclareErrorOrWarning ||
decl instanceof DeclarePrecedence) {
decl.resolve(bindingScope);
}
}
}
}
public PerClause getPerClause() {
ensureAspectJAttributesUnpacked();
return perClause;
}
public JavaClass getJavaClass() {
return javaClass;
}
|
154,332 |
Bug 154332 [annotations] Incorrect handling of java.lang annotations when matching
|
As raised by Mr Bodkin on the list: Can anyone tell me why this compiling this program produces warnings for marker but not for deprecated (in a recent dev build of AJDT)? Is this just a bug? Both have runtime retention, so I would expect equivalent behavior. @Deprecated @Marker public aspect Annot { pointcut test() : within(@Marker *);// *); declare warning: staticinitialization(@Deprecated *): "deprecated"; declare warning: staticinitialization(@Marker *): "marker"; public static void main(String argz[]) { new Baz().foo(); } } @Deprecated @Marker class Baz { public void foo() {} } @Retention(RetentionPolicy.RUNTIME) public @interface Marker { }
|
resolved fixed
|
59123b0
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-18T08:21:58Z | 2006-08-18T08:33:20Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
public void ensureDelegateConsistent() {
if ((bitflag&DAMAGED)!=0) {resetState();}
}
public void resetState() {
if (javaClass == null) {
throw new BCException("can't weave evicted type");
}
bitflag=0x0000;
this.annotationTypes = null;
this.annotations = null;
this.interfaceSignatures=null;
this.superclassSignature = null;
this.superclassName = null;
this.fields = null;
this.methods = null;
this.pointcuts = null;
this.perClause = null;
this.weaverState = null;
this.lazyClassGen = null;
hasBeenWoven=false;
isObject = (javaClass.getSuperclassNameIndex() == 0);
isAnnotationStyleAspect=false;
ensureAspectJAttributesUnpacked();
|
154,332 |
Bug 154332 [annotations] Incorrect handling of java.lang annotations when matching
|
As raised by Mr Bodkin on the list: Can anyone tell me why this compiling this program produces warnings for marker but not for deprecated (in a recent dev build of AJDT)? Is this just a bug? Both have runtime retention, so I would expect equivalent behavior. @Deprecated @Marker public aspect Annot { pointcut test() : within(@Marker *);// *); declare warning: staticinitialization(@Deprecated *): "deprecated"; declare warning: staticinitialization(@Marker *): "marker"; public static void main(String argz[]) { new Baz().foo(); } } @Deprecated @Marker class Baz { public void foo() {} } @Retention(RetentionPolicy.RUNTIME) public @interface Marker { }
|
resolved fixed
|
59123b0
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-18T08:21:58Z | 2006-08-18T08:33:20Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
}
public void finishedWith() {
}
public WeaverStateInfo getWeaverState() {
return weaverState;
}
void setWeaverState(WeaverStateInfo weaverState) {
this.weaverState = weaverState;
}
public void printWackyStuff(PrintStream out) {
if (typeMungers.size() > 0) out.println(" TypeMungers: " + typeMungers);
if (declares.size() > 0) out.println(" declares: " + declares);
}
/**
* Return the lazyClassGen associated with this type. For aspect types, this
* value will be cached, since it is used to inline advice. For non-aspect
* types, this lazyClassGen is always newly constructed.
*/
public LazyClassGen getLazyClassGen() {
LazyClassGen ret = lazyClassGen;
if (ret == null) {
ret = new LazyClassGen(this);
|
154,332 |
Bug 154332 [annotations] Incorrect handling of java.lang annotations when matching
|
As raised by Mr Bodkin on the list: Can anyone tell me why this compiling this program produces warnings for marker but not for deprecated (in a recent dev build of AJDT)? Is this just a bug? Both have runtime retention, so I would expect equivalent behavior. @Deprecated @Marker public aspect Annot { pointcut test() : within(@Marker *);// *); declare warning: staticinitialization(@Deprecated *): "deprecated"; declare warning: staticinitialization(@Marker *): "marker"; public static void main(String argz[]) { new Baz().foo(); } } @Deprecated @Marker class Baz { public void foo() {} } @Retention(RetentionPolicy.RUNTIME) public @interface Marker { }
|
resolved fixed
|
59123b0
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-18T08:21:58Z | 2006-08-18T08:33:20Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
if (isAspect()) {
lazyClassGen = ret;
}
}
return ret;
}
public boolean isSynthetic() {
return getResolvedTypeX().isSynthetic();
}
public AjAttribute.WeaverVersionInfo getWeaverVersionAttribute() {
return wvInfo;
}
public void addParent(ResolvedType newParent) {
bitflag|=DAMAGED;
if (newParent.isClass()) {
superclassSignature = newParent.getSignature();
superclassName = newParent.getName();
} else {
ResolvedType[] oldInterfaceNames = getDeclaredInterfaces();
int exists = -1;
for (int i = 0; i < oldInterfaceNames.length; i++) {
ResolvedType type = oldInterfaceNames[i];
if (type.equals(newParent)) {exists = i;break; }
}
if (exists==-1) {
int len = interfaceSignatures.length;
|
154,332 |
Bug 154332 [annotations] Incorrect handling of java.lang annotations when matching
|
As raised by Mr Bodkin on the list: Can anyone tell me why this compiling this program produces warnings for marker but not for deprecated (in a recent dev build of AJDT)? Is this just a bug? Both have runtime retention, so I would expect equivalent behavior. @Deprecated @Marker public aspect Annot { pointcut test() : within(@Marker *);// *); declare warning: staticinitialization(@Deprecated *): "deprecated"; declare warning: staticinitialization(@Marker *): "marker"; public static void main(String argz[]) { new Baz().foo(); } } @Deprecated @Marker class Baz { public void foo() {} } @Retention(RetentionPolicy.RUNTIME) public @interface Marker { }
|
resolved fixed
|
59123b0
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-18T08:21:58Z | 2006-08-18T08:33:20Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
String[] newInterfaceSignatures = new String[len+1];
System.arraycopy(interfaceSignatures, 0, newInterfaceSignatures, 0, len);
newInterfaceSignatures[len]=newParent.getSignature();
interfaceSignatures = newInterfaceSignatures;
}
}
}
public ResolvedType[] getAnnotationTypes() {
ensureAnnotationsUnpacked();
return annotationTypes;
}
public AnnotationX[] getAnnotations() {
ensureAnnotationsUnpacked();
return annotations;
}
public boolean hasAnnotation(UnresolvedType ofType) {
ensureAnnotationsUnpacked();
for (int i = 0; i < annotationTypes.length; i++) {
ResolvedType ax = annotationTypes[i];
if (ax.equals(ofType)) return true;
}
return false;
}
public void addAnnotation(AnnotationX annotation) {
bitflag|=DAMAGED;
|
154,332 |
Bug 154332 [annotations] Incorrect handling of java.lang annotations when matching
|
As raised by Mr Bodkin on the list: Can anyone tell me why this compiling this program produces warnings for marker but not for deprecated (in a recent dev build of AJDT)? Is this just a bug? Both have runtime retention, so I would expect equivalent behavior. @Deprecated @Marker public aspect Annot { pointcut test() : within(@Marker *);// *); declare warning: staticinitialization(@Deprecated *): "deprecated"; declare warning: staticinitialization(@Marker *): "marker"; public static void main(String argz[]) { new Baz().foo(); } } @Deprecated @Marker class Baz { public void foo() {} } @Retention(RetentionPolicy.RUNTIME) public @interface Marker { }
|
resolved fixed
|
59123b0
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-18T08:21:58Z | 2006-08-18T08:33:20Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
int len = annotations.length;
AnnotationX[] ret = new AnnotationX[len+1];
System.arraycopy(annotations, 0, ret, 0, len);
ret[len] = annotation;
annotations = ret;
len = annotationTypes.length;
ResolvedType[] ret2 = new ResolvedType[len+1];
System.arraycopy(annotationTypes,0,ret2,0,len);
ret2[len] = getResolvedTypeX().getWorld().resolve(UnresolvedType.forName(annotation.getTypeName()));
annotationTypes = ret2;
}
public boolean isAnnotationWithRuntimeRetention() {
return (getRetentionPolicy()==null?false:getRetentionPolicy().equals("RUNTIME"));
}
public String getRetentionPolicy() {
if ((bitflag&DISCOVERED_ANNOTATION_RETENTION_POLICY)==0) {
bitflag|=DISCOVERED_ANNOTATION_RETENTION_POLICY;
retentionPolicy=null;
if (isAnnotation()) {
ensureAnnotationsUnpacked();
for (int i = annotations.length-1; i>=0; i--) {
AnnotationX ax = annotations[i];
if (ax.getTypeName().equals(UnresolvedType.AT_RETENTION.getName())) {
List values = ax.getBcelAnnotation().getValues();
for (Iterator it = values.iterator(); it.hasNext();) {
ElementNameValuePair element = (ElementNameValuePair) it.next();
ElementValue v = element.getValue();
|
154,332 |
Bug 154332 [annotations] Incorrect handling of java.lang annotations when matching
|
As raised by Mr Bodkin on the list: Can anyone tell me why this compiling this program produces warnings for marker but not for deprecated (in a recent dev build of AJDT)? Is this just a bug? Both have runtime retention, so I would expect equivalent behavior. @Deprecated @Marker public aspect Annot { pointcut test() : within(@Marker *);// *); declare warning: staticinitialization(@Deprecated *): "deprecated"; declare warning: staticinitialization(@Marker *): "marker"; public static void main(String argz[]) { new Baz().foo(); } } @Deprecated @Marker class Baz { public void foo() {} } @Retention(RetentionPolicy.RUNTIME) public @interface Marker { }
|
resolved fixed
|
59123b0
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-18T08:21:58Z | 2006-08-18T08:33:20Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
retentionPolicy = v.stringifyValue();
return retentionPolicy;
}
}
}
}
}
return retentionPolicy;
}
public boolean canAnnotationTargetType() {
AnnotationTargetKind[] targetKinds = getAnnotationTargetKinds();
if (targetKinds == null) return true;
for (int i = 0; i < targetKinds.length; i++) {
if (targetKinds[i].equals(AnnotationTargetKind.TYPE)) {
return true;
}
}
return false;
}
public AnnotationTargetKind[] getAnnotationTargetKinds() {
if ((bitflag&DISCOVERED_ANNOTATION_TARGET_KINDS)!=0) return annotationTargetKinds;
bitflag|=DISCOVERED_ANNOTATION_TARGET_KINDS;
annotationTargetKinds = null;
List targetKinds = new ArrayList();
if (isAnnotation()) {
Annotation[] annotationsOnThisType = javaClass.getAnnotations();
for (int i = 0; i < annotationsOnThisType.length; i++) {
Annotation a = annotationsOnThisType[i];
|
154,332 |
Bug 154332 [annotations] Incorrect handling of java.lang annotations when matching
|
As raised by Mr Bodkin on the list: Can anyone tell me why this compiling this program produces warnings for marker but not for deprecated (in a recent dev build of AJDT)? Is this just a bug? Both have runtime retention, so I would expect equivalent behavior. @Deprecated @Marker public aspect Annot { pointcut test() : within(@Marker *);// *); declare warning: staticinitialization(@Deprecated *): "deprecated"; declare warning: staticinitialization(@Marker *): "marker"; public static void main(String argz[]) { new Baz().foo(); } } @Deprecated @Marker class Baz { public void foo() {} } @Retention(RetentionPolicy.RUNTIME) public @interface Marker { }
|
resolved fixed
|
59123b0
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-18T08:21:58Z | 2006-08-18T08:33:20Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
if (a.getTypeName().equals(UnresolvedType.AT_TARGET.getName())) {
ArrayElementValue arrayValue = (ArrayElementValue)((ElementNameValuePair)a.getValues().get(0)).getValue();
ElementValue[] evs = arrayValue.getElementValuesArray();
if (evs!=null) {
for (int j = 0; j < evs.length; j++) {
String targetKind = evs[j].stringifyValue();
if (targetKind.equals("ANNOTATION_TYPE")) { targetKinds.add(AnnotationTargetKind.ANNOTATION_TYPE);
} else if (targetKind.equals("CONSTRUCTOR")) { targetKinds.add(AnnotationTargetKind.CONSTRUCTOR);
} else if (targetKind.equals("FIELD")) { targetKinds.add(AnnotationTargetKind.FIELD);
} else if (targetKind.equals("LOCAL_VARIABLE")) { targetKinds.add(AnnotationTargetKind.LOCAL_VARIABLE);
} else if (targetKind.equals("METHOD")) { targetKinds.add(AnnotationTargetKind.METHOD);
} else if (targetKind.equals("PACKAGE")) { targetKinds.add(AnnotationTargetKind.PACKAGE);
} else if (targetKind.equals("PARAMETER")) { targetKinds.add(AnnotationTargetKind.PARAMETER);
} else if (targetKind.equals("TYPE")) { targetKinds.add(AnnotationTargetKind.TYPE);}
}
}
}
}
if (!targetKinds.isEmpty()) {
annotationTargetKinds = new AnnotationTargetKind[targetKinds.size()];
return (AnnotationTargetKind[]) targetKinds.toArray(annotationTargetKinds);
}
}
return annotationTargetKinds;
}
private void ensureAnnotationsUnpacked() {
if (annotationTypes == null) {
|
154,332 |
Bug 154332 [annotations] Incorrect handling of java.lang annotations when matching
|
As raised by Mr Bodkin on the list: Can anyone tell me why this compiling this program produces warnings for marker but not for deprecated (in a recent dev build of AJDT)? Is this just a bug? Both have runtime retention, so I would expect equivalent behavior. @Deprecated @Marker public aspect Annot { pointcut test() : within(@Marker *);// *); declare warning: staticinitialization(@Deprecated *): "deprecated"; declare warning: staticinitialization(@Marker *): "marker"; public static void main(String argz[]) { new Baz().foo(); } } @Deprecated @Marker class Baz { public void foo() {} } @Retention(RetentionPolicy.RUNTIME) public @interface Marker { }
|
resolved fixed
|
59123b0
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-18T08:21:58Z | 2006-08-18T08:33:20Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
Annotation annos[] = javaClass.getAnnotations();
if (annos==null || annos.length==0) {
annotationTypes = ResolvedType.NONE;
annotations = AnnotationX.NONE;
} else {
World w = getResolvedTypeX().getWorld();
annotationTypes = new ResolvedType[annos.length];
annotations = new AnnotationX[annos.length];
for (int i = 0; i < annos.length; i++) {
Annotation annotation = annos[i];
annotationTypes[i] = w.resolve(UnresolvedType.forName(annotation.getTypeName()));
annotations[i] = new AnnotationX(annotation,w);
}
}
}
}
public String getDeclaredGenericSignature() {
ensureGenericInfoProcessed();
return declaredSignature;
}
Signature.ClassSignature getGenericClassTypeSignature() {
return cachedGenericClassTypeSignature;
}
private void ensureGenericSignatureUnpacked() {
if ((bitflag&UNPACKED_GENERIC_SIGNATURE)!=0) return;
|
154,332 |
Bug 154332 [annotations] Incorrect handling of java.lang annotations when matching
|
As raised by Mr Bodkin on the list: Can anyone tell me why this compiling this program produces warnings for marker but not for deprecated (in a recent dev build of AJDT)? Is this just a bug? Both have runtime retention, so I would expect equivalent behavior. @Deprecated @Marker public aspect Annot { pointcut test() : within(@Marker *);// *); declare warning: staticinitialization(@Deprecated *): "deprecated"; declare warning: staticinitialization(@Marker *): "marker"; public static void main(String argz[]) { new Baz().foo(); } } @Deprecated @Marker class Baz { public void foo() {} } @Retention(RetentionPolicy.RUNTIME) public @interface Marker { }
|
resolved fixed
|
59123b0
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-18T08:21:58Z | 2006-08-18T08:33:20Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
bitflag|=UNPACKED_GENERIC_SIGNATURE;
if (!getResolvedTypeX().getWorld().isInJava5Mode()) return;
Signature.ClassSignature cSig = getGenericClassTypeSignature();
if (cSig != null) {
formalsForResolution = cSig.formalTypeParameters;
if (isNestedClass()) {
Signature.FormalTypeParameter[] extraFormals = getFormalTypeParametersFromOuterClass();
if (extraFormals.length > 0) {
List allFormals = new ArrayList();
for (int i = 0; i < formalsForResolution.length; i++) {
allFormals.add(formalsForResolution[i]);
}
for (int i = 0; i < extraFormals.length; i++) {
allFormals.add(extraFormals[i]);
}
formalsForResolution = new Signature.FormalTypeParameter[allFormals.size()];
allFormals.toArray(formalsForResolution);
}
}
Signature.ClassTypeSignature superSig = cSig.superclassSignature;
try {
ResolvedType rt =
BcelGenericSignatureToTypeXConverter.classTypeSignature2TypeX(
superSig, formalsForResolution, getResolvedTypeX().getWorld());
this.superclassSignature = rt.getSignature();
this.superclassName = rt.getName();
|
154,332 |
Bug 154332 [annotations] Incorrect handling of java.lang annotations when matching
|
As raised by Mr Bodkin on the list: Can anyone tell me why this compiling this program produces warnings for marker but not for deprecated (in a recent dev build of AJDT)? Is this just a bug? Both have runtime retention, so I would expect equivalent behavior. @Deprecated @Marker public aspect Annot { pointcut test() : within(@Marker *);// *); declare warning: staticinitialization(@Deprecated *): "deprecated"; declare warning: staticinitialization(@Marker *): "marker"; public static void main(String argz[]) { new Baz().foo(); } } @Deprecated @Marker class Baz { public void foo() {} } @Retention(RetentionPolicy.RUNTIME) public @interface Marker { }
|
resolved fixed
|
59123b0
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-18T08:21:58Z | 2006-08-18T08:33:20Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
} catch (GenericSignatureFormatException e) {
throw new IllegalStateException(
"While determining the generic superclass of " + this.className
+ " with generic signature " + getDeclaredGenericSignature()+ " the following error was detected: "
+ e.getMessage());
}
this.interfaceSignatures = new String[cSig.superInterfaceSignatures.length];
for (int i = 0; i < cSig.superInterfaceSignatures.length; i++) {
try {
this.interfaceSignatures[i] =
BcelGenericSignatureToTypeXConverter.classTypeSignature2TypeX(
cSig.superInterfaceSignatures[i],
formalsForResolution,
getResolvedTypeX().getWorld()).getSignature();
} catch (GenericSignatureFormatException e) {
throw new IllegalStateException(
"While determing the generic superinterfaces of " + this.className
+ " with generic signature " + getDeclaredGenericSignature() +" the following error was detected: "
+ e.getMessage());
}
}
}
if (isGeneric()) {
ReferenceType genericType = (ReferenceType) this.resolvedTypeX.getGenericType();
|
154,332 |
Bug 154332 [annotations] Incorrect handling of java.lang annotations when matching
|
As raised by Mr Bodkin on the list: Can anyone tell me why this compiling this program produces warnings for marker but not for deprecated (in a recent dev build of AJDT)? Is this just a bug? Both have runtime retention, so I would expect equivalent behavior. @Deprecated @Marker public aspect Annot { pointcut test() : within(@Marker *);// *); declare warning: staticinitialization(@Deprecated *): "deprecated"; declare warning: staticinitialization(@Marker *): "marker"; public static void main(String argz[]) { new Baz().foo(); } } @Deprecated @Marker class Baz { public void foo() {} } @Retention(RetentionPolicy.RUNTIME) public @interface Marker { }
|
resolved fixed
|
59123b0
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-18T08:21:58Z | 2006-08-18T08:33:20Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
genericType.setStartPos(this.resolvedTypeX.getStartPos());
this.resolvedTypeX = genericType;
}
}
public Signature.FormalTypeParameter[] getAllFormals() {
ensureGenericSignatureUnpacked();
if (formalsForResolution == null) {
return new Signature.FormalTypeParameter[0];
} else {
return formalsForResolution;
}
}
private boolean isNestedClass() {
return className.indexOf('$') != -1;
}
private ReferenceType getOuterClass() {
if (!isNestedClass()) throw new IllegalStateException("Can't get the outer class of a non-nested type");
int lastDollar = className.lastIndexOf('$');
String superClassName = className.substring(0,lastDollar);
UnresolvedType outer = UnresolvedType.forName(superClassName);
return (ReferenceType) outer.resolve(getResolvedTypeX().getWorld());
}
private Signature.FormalTypeParameter[] getFormalTypeParametersFromOuterClass() {
List typeParameters = new ArrayList();
ReferenceType outer = getOuterClass();
ReferenceTypeDelegate outerDelegate = outer.getDelegate();
|
154,332 |
Bug 154332 [annotations] Incorrect handling of java.lang annotations when matching
|
As raised by Mr Bodkin on the list: Can anyone tell me why this compiling this program produces warnings for marker but not for deprecated (in a recent dev build of AJDT)? Is this just a bug? Both have runtime retention, so I would expect equivalent behavior. @Deprecated @Marker public aspect Annot { pointcut test() : within(@Marker *);// *); declare warning: staticinitialization(@Deprecated *): "deprecated"; declare warning: staticinitialization(@Marker *): "marker"; public static void main(String argz[]) { new Baz().foo(); } } @Deprecated @Marker class Baz { public void foo() {} } @Retention(RetentionPolicy.RUNTIME) public @interface Marker { }
|
resolved fixed
|
59123b0
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-18T08:21:58Z | 2006-08-18T08:33:20Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
if (!(outerDelegate instanceof BcelObjectType)) {
throw new IllegalStateException("How come we're in BcelObjectType resolving an inner type of something that is NOT a BcelObjectType??");
}
BcelObjectType outerObjectType = (BcelObjectType) outerDelegate;
if (outerObjectType.isNestedClass()) {
Signature.FormalTypeParameter[] parentParams = outerObjectType.getFormalTypeParametersFromOuterClass();
for (int i = 0; i < parentParams.length; i++) {
typeParameters.add(parentParams[i]);
}
}
Signature.ClassSignature outerSig = outerObjectType.getGenericClassTypeSignature();
if (outerSig != null) {
for (int i = 0; i < outerSig.formalTypeParameters .length; i++) {
typeParameters.add(outerSig.formalTypeParameters[i]);
}
}
Signature.FormalTypeParameter[] ret = new Signature.FormalTypeParameter[typeParameters.size()];
typeParameters.toArray(ret);
return ret;
}
private void ensureGenericInfoProcessed() {
if ((bitflag & DISCOVERED_DECLARED_SIGNATURE)!=0) return;
bitflag |= DISCOVERED_DECLARED_SIGNATURE;
Attribute[] as = javaClass.getAttributes();
for (int i = 0; i < as.length && declaredSignature==null; i++) {
Attribute attribute = as[i];
if (attribute instanceof Signature) declaredSignature = ((Signature)attribute).getSignature();
}
|
154,332 |
Bug 154332 [annotations] Incorrect handling of java.lang annotations when matching
|
As raised by Mr Bodkin on the list: Can anyone tell me why this compiling this program produces warnings for marker but not for deprecated (in a recent dev build of AJDT)? Is this just a bug? Both have runtime retention, so I would expect equivalent behavior. @Deprecated @Marker public aspect Annot { pointcut test() : within(@Marker *);// *); declare warning: staticinitialization(@Deprecated *): "deprecated"; declare warning: staticinitialization(@Marker *): "marker"; public static void main(String argz[]) { new Baz().foo(); } } @Deprecated @Marker class Baz { public void foo() {} } @Retention(RetentionPolicy.RUNTIME) public @interface Marker { }
|
resolved fixed
|
59123b0
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-18T08:21:58Z | 2006-08-18T08:33:20Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
if (declaredSignature!=null) isGenericType= (declaredSignature.charAt(0)=='<');
}
public boolean isGeneric() {
ensureGenericInfoProcessed();
return isGenericType;
}
public String toString() {
return (javaClass==null?"BcelObjectType":"BcelObjectTypeFor:"+className);
}
public void evictWeavingState() {
if (getResolvedTypeX().getWorld().couldIncrementalCompileFollow()) return;
if (javaClass != null) {
ensureAnnotationsUnpacked();
ensureGenericInfoProcessed();
getDeclaredInterfaces();
getDeclaredFields();
getDeclaredMethods();
if (getResolvedTypeX().getWorld().isXnoInline()) lazyClassGen=null;
|
154,332 |
Bug 154332 [annotations] Incorrect handling of java.lang annotations when matching
|
As raised by Mr Bodkin on the list: Can anyone tell me why this compiling this program produces warnings for marker but not for deprecated (in a recent dev build of AJDT)? Is this just a bug? Both have runtime retention, so I would expect equivalent behavior. @Deprecated @Marker public aspect Annot { pointcut test() : within(@Marker *);// *); declare warning: staticinitialization(@Deprecated *): "deprecated"; declare warning: staticinitialization(@Marker *): "marker"; public static void main(String argz[]) { new Baz().foo(); } } @Deprecated @Marker class Baz { public void foo() {} } @Retention(RetentionPolicy.RUNTIME) public @interface Marker { }
|
resolved fixed
|
59123b0
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-18T08:21:58Z | 2006-08-18T08:33:20Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
if (weaverState != null) {
weaverState.setReweavable(false);
weaverState.setUnwovenClassFileData(null);
}
for (int i = methods.length - 1; i >= 0; i--) methods[i].evictWeavingState();
for (int i = fields.length - 1; i >= 0; i--) fields[i].evictWeavingState();
javaClass = null;
}
}
public void weavingCompleted() {
hasBeenWoven = true;
if (getResolvedTypeX().getWorld().isRunMinimalMemory()) evictWeavingState();
if (getSourceContext()!=null && !getResolvedTypeX().isAspect()) getSourceContext().tidy();
}
public AjAttribute[] getAttributes(String name) {
List results = new ArrayList();
List l = BcelAttributes.readAjAttributes(javaClass.getClassName(),javaClass.getAttributes(), getResolvedTypeX().getSourceContext(),getResolvedTypeX().getWorld(),AjAttribute.WeaverVersionInfo.UNKNOWN);
for (Iterator iter = l.iterator(); iter.hasNext();) {
AjAttribute element = (AjAttribute) iter.next();
if (element.getNameString().equals(name)) results.add(element);
}
if (results.size()>0) {
return (AjAttribute[])results.toArray(new AjAttribute[]{});
}
|
154,332 |
Bug 154332 [annotations] Incorrect handling of java.lang annotations when matching
|
As raised by Mr Bodkin on the list: Can anyone tell me why this compiling this program produces warnings for marker but not for deprecated (in a recent dev build of AJDT)? Is this just a bug? Both have runtime retention, so I would expect equivalent behavior. @Deprecated @Marker public aspect Annot { pointcut test() : within(@Marker *);// *); declare warning: staticinitialization(@Deprecated *): "deprecated"; declare warning: staticinitialization(@Marker *): "marker"; public static void main(String argz[]) { new Baz().foo(); } } @Deprecated @Marker class Baz { public void foo() {} } @Retention(RetentionPolicy.RUNTIME) public @interface Marker { }
|
resolved fixed
|
59123b0
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-18T08:21:58Z | 2006-08-18T08:33:20Z |
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
|
return null;
}
public String[] getAttributeNames() {
Attribute[] as = javaClass.getAttributes();
String[] strs = new String[as.length];
for (int j = 0; j < as.length; j++) {
strs[j] = as[j].getName();
}
return strs;
}
public void addPointcutDefinition(ResolvedPointcutDefinition d) {
bitflag|=DAMAGED;
int len = pointcuts.length;
ResolvedPointcutDefinition[] ret = new ResolvedPointcutDefinition[len+1];
System.arraycopy(pointcuts, 0, ret, 0, len);
ret[len] = d;
pointcuts = ret;
}
public boolean hasBeenWoven() {
return hasBeenWoven;
}
}
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java
|
/*******************************************************************************
* Copyright (c) 2006 IBM
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Andy Clement - initial API and implementation
*******************************************************************************/
package org.aspectj.systemtest.ajc153;
import java.io.File;
import junit.framework.Test;
import org.aspectj.testing.Utils;
import org.aspectj.testing.XMLBasedAjcTestCase;
import org.aspectj.weaver.bcel.Utility;
public class Ajc153Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java
|
public void testIncorrectDeprecatedAnnotationProcessing_pr154332() { runTest("incorrect deprecated annotation processing");}
public void testPipeliningProblemWithAnnotationsDecp_pr153380_1() { runTest("pipelining decps");}
public void testUnwantedPointcutWarning_pr148219() { runTest("unwanted warning for pointcut");}
public void testDecpAndCflowadderMungerClash_pr152631() { runTest("decp and cflowadder munger clash");}
public void testGenericInheritanceDecp_pr150095() { runTest("generics, inheritance and decp");}
public void testIllegalStateException_pr148737() { runTest("illegalstateexception for non generic type");}
public void testAtajInheritance_pr149305_1() { runTest("ataj inheritance - 1");}
public void testAtajInheritance_pr149305_2() { runTest("ataj inheritance - 2");}
public void testAtajInheritance_pr149305_3() { runTest("ataj inheritance - 3");}
public void testVerificationFailureForAspectOf_pr148693() {
runTest("verification problem");
Utils.verifyClass(ajc,"mypackage.MyAspect");
}
public void testIncorrectAnnotationValue_pr148537() { runTest("incorrect annotation value");}
public void testVerifyErrNoTypeCflowField_pr145693_1() { runTest("verifyErrNoTypeCflowField"); }
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java
|
public void testVerifyErrInpathNoTypeCflowField_pr145693_2() { runTest("verifyErrInpathNoTypeCflowField"); }
public void testCpathNoTypeCflowField_pr145693_3() { runTest("cpathNoTypeCflowField"); }
public void testGenericSignatures_pr148409() { runTest("generic signature problem"); }
public void testCantFindType_pr149322_01() {runTest("can't find type on interface call 1");}
public void testCantFindType_pr149322_02() {runTest("can't find type on interface call 2");}
public void testCantFindType_pr149322_03() {runTest("can't find type on interface call 3");}
public void testParsingBytecodeLess_pr152871() {
Utility.testingParseCounter=0;
runTest("parsing bytecode less");
assertTrue("Should have called parse 5 times, not "+Utility.testingParseCounter+" times",Utility.testingParseCounter==5);
}
public void testMatchVolatileField_pr150671() {runTest("match volatile field");};
public void testDuplicateJVMTIAgents_pr151938() {runTest("Duplicate JVMTI agents");};
public void testLTWWorldWithAnnotationMatching_pr153572() { runTest("LTWWorld with annotation matching");}
public static Test suite() {
return XMLBasedAjcTestCase.loadSuite(Ajc153Tests.class);
}
protected File getSpecFile() {
return new File("../tests/src/org/aspectj/systemtest/ajc153/ajc153.xml");
}
}
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
/* *******************************************************************
* Copyright (c) 2005 Contributors.
* All rights reserved.
* This program and the accompanying materials are made available
* under the terms of the Eclipse Public License v1.0
* which accompanies this distribution and is available at
* http://eclipse.org/legal/epl-v10.html
*
* Contributors:
* Andy Clement initial implementation
* ******************************************************************/
package org.aspectj.systemtest.incremental.tools;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory;
import org.aspectj.ajdt.internal.core.builder.AjState;
import org.aspectj.ajdt.internal.core.builder.IncrementalStateManager;
import org.aspectj.asm.AsmManager;
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
import org.aspectj.asm.IElementHandleProvider;
import org.aspectj.asm.IHierarchy;
import org.aspectj.asm.IProgramElement;
import org.aspectj.asm.IRelationship;
import org.aspectj.asm.IRelationshipMap;
import org.aspectj.asm.internal.JDTLikeHandleProvider;
import org.aspectj.asm.internal.Relationship;
import org.aspectj.bridge.IMessage;
import org.aspectj.bridge.IMessageHandler;
import org.aspectj.bridge.IMessageHolder;
import org.aspectj.tools.ajc.Ajc;
import org.aspectj.weaver.LintMessage;
/**
* The superclass knows all about talking through Ajde to the compiler.
* The superclass isn't in charge of knowing how to simulate overlays
* for incremental builds, that is in here. As is the ability to
* generate valid build configs based on a directory structure. To
* support this we just need access to a sandbox directory - this
* sandbox is managed by the superclass (it only assumes all builds occur
* in <sandboxDir>/<projectName>/ )
*
* The idea is you can initialize multiple projects in the sandbox and
* they can all be built independently, hopefully exploiting
* incremental compilation. Between builds you can alter the contents
* of a project using the alter() method that overlays some set of
* new files onto the current set (adding new files/changing existing
* ones) - you can then drive a new build and check it behaves as
* expected.
*/
public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementalAjdeInteractionTestbed {
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
/*
A.aj
package pack;
public aspect A {
pointcut p() : call(* C.method
before() : p() { // line 7
}
}
C.java
package pack;
public class C {
public void method1() {
method2(); // line 6
}
public void method2() { }
public void method3() {
method2(); // line 13
}
}*/
public void testDontLoseAdviceMarkers_pr134471() {
try {
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
configureBuildStructureModel(true);
initialiseProject("P4");
build("P4");
Ajc.dumpAJDEStructureModel("after full build where advice is applying");
alter("P4","inc1");
build("P4");
checkWasntFullBuild();
Ajc.dumpAJDEStructureModel("after inc build where first advised line is gone");
IProgramElement codeElement = findCode(checkForNode("pack","C",true));
IProgramElement advice = findAdvice(checkForNode("pack","A",true));
IRelationshipMap asmRelMap = AsmManager.getDefault().getRelationshipMap();
assertEquals("There should be two relationships in the relationship map",
2,asmRelMap.getEntries().size());
for (Iterator iter = asmRelMap.getEntries().iterator(); iter.hasNext();) {
String sourceOfRelationship = (String) iter.next();
IProgramElement ipe = AsmManager.getDefault().getHierarchy()
.findElementForHandle(sourceOfRelationship);
assertNotNull("expected to find IProgramElement with handle "
+ sourceOfRelationship + " but didn't",ipe);
if (ipe.getKind().equals(IProgramElement.Kind.ADVICE)) {
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
assertEquals("expected source of relationship to be " +
advice.toString() + " but found " +
ipe.toString(),advice,ipe);
} else if (ipe.getKind().equals(IProgramElement.Kind.CODE)) {
assertEquals("expected source of relationship to be " +
codeElement.toString() + " but found " +
ipe.toString(),codeElement,ipe);
} else {
fail("found unexpected relationship source " + ipe
+ " with kind " + ipe.getKind()+" when looking up handle: "+sourceOfRelationship);
}
List relationships = asmRelMap.get(ipe);
assertNotNull("expected " + ipe.getName() +" to have some " +
"relationships",relationships);
for (Iterator iterator = relationships.iterator(); iterator.hasNext();) {
Relationship rel = (Relationship) iterator.next();
List targets = rel.getTargets();
for (Iterator iterator2 = targets.iterator(); iterator2.hasNext();) {
String t = (String) iterator2.next();
IProgramElement link = AsmManager.getDefault().getHierarchy().findElementForHandle(t);
if (ipe.getKind().equals(IProgramElement.Kind.ADVICE)) {
assertEquals("expected target of relationship to be " +
codeElement.toString() + " but found " +
link.toString(),codeElement,link);
} else if (ipe.getKind().equals(IProgramElement.Kind.CODE)) {
assertEquals("expected target of relationship to be " +
advice.toString() + " but found " +
link.toString(),advice,link);
} else {
fail("found unexpected relationship source " + ipe.getName()
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
+ " with kind " + ipe.getKind());
}
}
}
}
} finally {
configureBuildStructureModel(false);
}
}
public void testTheBasics() {
initialiseProject("P1");
build("P1");
build("P1");
checkWasntFullBuild();
checkCompileWeaveCount(0,0);
}
public void testInvalidAspectpath_pr121395() {
initialiseProject("P1");
File f = new File("foo.jar");
Set s = new HashSet();
s.add(f);
configureAspectPath(s);
build("P1");
checkForError("invalid aspectpath entry");
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
}
/**
* Build a project containing a resource - then mark the resource readOnly(), then
* do an inc-compile, it will report an error about write access to the resource
* in the output folder being denied
*/
/*public void testProblemCopyingResources_pr138171() {
initialiseProject("PR138171");
File f=getProjectRelativePath("PR138171","res.txt");
Map m = new HashMap();
m.put("res.txt",f);
AjdeInteractionTestbed.MyProjectPropertiesAdapter.getInstance().setSourcePathResources(m);
build("PR138171");
File f2 = getProjectOutputRelativePath("PR138171","res.txt");
boolean successful = f2.setReadOnly();
alter("PR138171","inc1");
AjdeInteractionTestbed.MyProjectPropertiesAdapter.getInstance().setSourcePathResources(m);
build("PR138171");
List msgs = MyTaskListManager.getErrorMessages();
assertTrue("there should be one message but there are "+(msgs==null?0:msgs.size())+":\n"+msgs,msgs!=null && msgs.size()==1);
IMessage msg = (IMessage)msgs.get(0);
String exp = "unable to copy resource to output folder: 'res.txt'";
assertTrue("Expected message to include this text ["+exp+"] but it does not: "+msg,msg.toString().indexOf(exp)!=-1);
}*/
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
public void testSimpleChanges() {
initialiseProject("P1");
build("P1");
alter("P1","inc1");
build("P1");
checkCompileWeaveCount(1,-1);
build("P1");
checkCompileWeaveCount(0,-1);
}
public void testAddingAnAspect() {
initialiseProject("P1");
build("P1");
alter("P1","inc1");
alter("P1","inc2");
build("P1");
long timeTakenForFullBuildAndWeave = getTimeTakenForBuild();
checkWasFullBuild();
checkCompileWeaveCount(5,3);
build("P1");
long timeTakenForSimpleIncBuild = getTimeTakenForBuild();
assertTrue("Should not take longer for the trivial incremental build! first="+timeTakenForFullBuildAndWeave+
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
"ms second="+timeTakenForSimpleIncBuild+"ms",
timeTakenForSimpleIncBuild<timeTakenForFullBuildAndWeave);
}
public void testBuildingTwoProjectsInTurns() {
configureBuildStructureModel(true);
initialiseProject("P1");
initialiseProject("P2");
build("P1");
build("P2");
build("P1");
checkWasntFullBuild();
build("P2");
checkWasntFullBuild();
}
/*
public void testRefactoring_pr148285() {
configureBuildStructureModel(true);
initialiseProject("PR148285");
build("PR148285");
System.err.println("xxx");
alter("PR148285","inc1");
build("PR148285");
}
*/
/**
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
* In order for this next test to run, I had to move the weaver/world pair we keep in the
* AjBuildManager instance down into the state object - this makes perfect sense - otherwise
* when reusing the state for another project we'd not be switching to the right weaver/world
* for that project.
*/
public void testBuildingTwoProjectsMakingSmallChanges() {
configureBuildStructureModel(true);
initialiseProject("P1");
initialiseProject("P2");
build("P1");
build("P2");
build("P1");
checkWasntFullBuild();
build("P2");
checkWasntFullBuild();
alter("P1","inc1");
alter("P1","inc2");
build("P1");
checkWasFullBuild();
}
public void testPr134371() {
initialiseProject("PR134371");
build("PR134371");
alter("PR134371","inc1");
build("PR134371");
assertTrue("There should be no exceptions handled:\n"+MyErrorHandler.getErrorMessages(),
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
MyErrorHandler.getErrorMessages().isEmpty());
}
/**
* Setup up two simple projects and build them in turn - check the
* structure model is right after each build
*/
public void testBuildingTwoProjectsAndVerifyingModel() {
configureBuildStructureModel(true);
initialiseProject("P1");
initialiseProject("P2");
build("P1");
checkForNode("pkg","C",true);
build("P2");
checkForNode("pkg","C",false);
build("P1");
checkForNode("pkg","C",true);
build("P2");
checkForNode("pkg","C",false);
}
public void testBuildingTwoProjectsAndVerifyingStuff() {
configureBuildStructureModel(true);
initialiseProject("P1");
initialiseProject("P2");
|
149,560 |
Bug 149560 [@AspectJ] Incorrect weaving of static initialization join point
|
This error occurs if static initialization of one aspect class is woven with an advice from another aspect. It worked fine in version 1.5.0 - see the decompiled code snippet: static { Object obj = new Factory("ItoMonitoringAspect.java", Class.forName("cz.kb.usermanagement.ito.ItoMonitoringAspect")); ajc$tjp_0 = ((Factory) (obj)).makeSJP("staticinitialization", ((Factory) (obj)).makeInitializerSig("8", "cz.kb.usermanagement.ito.ItoMonitoringAspect"), 0); obj = Factory.makeJP(ajc$tjp_0, null, null); // the static initialization of this aspect class is deliberately woven using // advice from another aspect defined elsewhere. try { UserManagementLogAspect.aspectOf().beforeClassInit(((org.aspectj.lang.JoinPoint) (obj))); } catch(Throwable throwable) { if(throwable instanceof ExceptionInInitializerError) { throw (ExceptionInInitializerError)throwable; } else { UserManagementLogAspect.aspectOf().afterClassInit(); throw throwable; } } UserManagementLogAspect.aspectOf().afterClassInit(); // this line below was there when compiling using AspectJ 1.5.0 // but is missing in when using AJC 1.5.2. (Note: the line is, however, present if the static // initialization of this aspect class is NOT woven by advice from the other aspect). ajc$postClinit(); } As a result of the missing call to ajc$postClinit() the aspect instance is not created and it's method .aspectOf() throws org.aspectj.lang.NoAspectBoundException.
|
resolved fixed
|
945a257
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-08-22T15:22:06Z | 2006-07-04T10:46:40Z |
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
|
build("P1");
checkForNode("pkg","C",true);
build("P2");
checkForNode("pkg","C",false);
build("P1");
checkForNode("pkg","C",true);
build("P2");
checkForNode("pkg","C",false);
}
/**
* Complex. Here we are testing that a state object records structural changes since
* the last full build correctly. We build a simple project from scratch - this will
* be a full build and so the structural changes since last build count should be 0.
* We then alter a class, adding a new method and check structural changes is 1.
*/
public void testStateManagement1() {
File binDirectoryForP1 = new File(getFile("P1","bin"));
initialiseProject("P1");
build("P1");
AjState ajs = IncrementalStateManager.findStateManagingOutputLocation(binDirectoryForP1);
assertTrue("There should be a state object for project P1",ajs!=null);
assertTrue("Should be no structural changes as it was a full build but found: "+
ajs.getNumberOfStructuralChangesSinceLastFullBuild(),
ajs.getNumberOfStructuralChangesSinceLastFullBuild()==0);
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.