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
336,997
Bug 336997 IllegalStateException for generic ITD usage
java.lang.IllegalStateException: Can't answer binding questions prior to resolving at org.aspectj.weaver.TypeVariable.canBeBoundTo(TypeVariable.java:175) at org.aspectj.weaver.ReferenceType.isAssignableFrom(ReferenceType.java:496) at org.aspectj.weaver.ReferenceType.isAssignableFrom(ReferenceType.java:399) at org.aspectj.weaver.ResolvedType.checkLegalOverride(ResolvedType.java:1999) at org.aspectj.weaver.ResolvedType.clashesWithExistingMember(ResolvedType.java:1843) at org.aspectj.weaver.ResolvedType.addInterTypeMunger(ResolvedType.java:1699) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:795) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:652) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.createBinaryTypeFrom(AjLookupEnvironment.java:1398) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.createBinaryTypeFrom(LookupEnvironment.java:599) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.accept(Compiler.java:276) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(LookupEnvironment.java:113) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.UnresolvedReferenceBinding.resolve(UnresolvedReferenceBinding.java:49) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveType(BinaryTypeBinding.java:99) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.getType(LookupEnvironment.java:971) at org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory.lookupBinding(EclipseFactory.java:749) at org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory.makeTypeBinding1(EclipseFactory.java:743) at org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory.makeTypeBinding(EclipseFactory.java:605) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.addParent(AjLookupEnvironment.java:1314) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareParents(AjLookupEnvironment.java:902) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:730) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:418) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.completeTypeBindings(AjLookupEnvironment.java:255) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.internalBeginToCompile(Compiler.java:616) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:357) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:371) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performCompilation(AjBuildManager.java:1021) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performBuild(AjBuildManager.java:268) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:181) at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112) at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60) at org.aspectj.tools.ajc.Main.run(Main.java:371) at org.aspectj.tools.ajc.Main.runMain(Main.java:248) at org.codehaus.mojo.aspectj.AbstractAjcCompiler.execute(AbstractAjcCompiler.java:360) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
resolved fixed
80785bf
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-02-11T19:03:13Z
2011-02-11T18:46:40Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
} s = p.getProperty(xsetTIMERS_PER_FASTMATCH_CALL, "250"); try { timersPerType = Integer.parseInt(s); } catch (Exception e) { getMessageHandler().handleMessage(MessageUtil.error("unable to process timersPerType value of " + s)); timersPerType = 250; } } try { String value = System.getProperty("aspectj.overweaving", "false"); if (value.equalsIgnoreCase("true")) { System.out.println("ASPECTJ: aspectj.overweaving=true: overweaving switched ON"); overWeaving = true; } value = System.getProperty("aspectj.typeDemotion", "false"); if (value.equalsIgnoreCase("true")) { System.out.println("ASPECTJ: aspectj.typeDemotion=true: type demotion switched ON"); typeMap.demotionSystemActive = true; } value = System.getProperty("aspectj.minimalModel", "false"); if (value.equalsIgnoreCase("true")) { System.out.println("ASPECTJ: aspectj.minimalModel=true: minimal model switched ON"); minimalModel = true; } } catch (Throwable t) { System.err.println("ASPECTJ: Unable to read system properties"); t.printStackTrace(); } checkedAdvancedConfiguration = true;
336,997
Bug 336997 IllegalStateException for generic ITD usage
java.lang.IllegalStateException: Can't answer binding questions prior to resolving at org.aspectj.weaver.TypeVariable.canBeBoundTo(TypeVariable.java:175) at org.aspectj.weaver.ReferenceType.isAssignableFrom(ReferenceType.java:496) at org.aspectj.weaver.ReferenceType.isAssignableFrom(ReferenceType.java:399) at org.aspectj.weaver.ResolvedType.checkLegalOverride(ResolvedType.java:1999) at org.aspectj.weaver.ResolvedType.clashesWithExistingMember(ResolvedType.java:1843) at org.aspectj.weaver.ResolvedType.addInterTypeMunger(ResolvedType.java:1699) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:795) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:652) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.createBinaryTypeFrom(AjLookupEnvironment.java:1398) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.createBinaryTypeFrom(LookupEnvironment.java:599) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.accept(Compiler.java:276) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(LookupEnvironment.java:113) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.UnresolvedReferenceBinding.resolve(UnresolvedReferenceBinding.java:49) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveType(BinaryTypeBinding.java:99) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.getType(LookupEnvironment.java:971) at org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory.lookupBinding(EclipseFactory.java:749) at org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory.makeTypeBinding1(EclipseFactory.java:743) at org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory.makeTypeBinding(EclipseFactory.java:605) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.addParent(AjLookupEnvironment.java:1314) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareParents(AjLookupEnvironment.java:902) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:730) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:418) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.completeTypeBindings(AjLookupEnvironment.java:255) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.internalBeginToCompile(Compiler.java:616) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:357) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:371) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performCompilation(AjBuildManager.java:1021) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performBuild(AjBuildManager.java:268) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:181) at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112) at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60) at org.aspectj.tools.ajc.Main.run(Main.java:371) at org.aspectj.tools.ajc.Main.runMain(Main.java:248) at org.codehaus.mojo.aspectj.AbstractAjcCompiler.execute(AbstractAjcCompiler.java:360) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
resolved fixed
80785bf
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-02-11T19:03:13Z
2011-02-11T18:46:40Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
} } public boolean isRunMinimalMemory() { ensureAdvancedConfigurationProcessed(); return runMinimalMemory; } public boolean isRunMinimalMemorySet() { ensureAdvancedConfigurationProcessed(); return runMinimalMemorySet; } public boolean shouldFastPackMethods() { ensureAdvancedConfigurationProcessed(); return fastMethodPacking; } public boolean shouldPipelineCompilation() { ensureAdvancedConfigurationProcessed(); return shouldPipelineCompilation; } public boolean shouldGenerateStackMaps() { ensureAdvancedConfigurationProcessed(); return shouldGenerateStackMaps; } public void setIncrementalCompileCouldFollow(boolean b) { incrementalCompileCouldFollow = b; } public boolean couldIncrementalCompileFollow() { return incrementalCompileCouldFollow; } public void setSynchronizationPointcutsInUse() { if (trace.isTraceEnabled()) {
336,997
Bug 336997 IllegalStateException for generic ITD usage
java.lang.IllegalStateException: Can't answer binding questions prior to resolving at org.aspectj.weaver.TypeVariable.canBeBoundTo(TypeVariable.java:175) at org.aspectj.weaver.ReferenceType.isAssignableFrom(ReferenceType.java:496) at org.aspectj.weaver.ReferenceType.isAssignableFrom(ReferenceType.java:399) at org.aspectj.weaver.ResolvedType.checkLegalOverride(ResolvedType.java:1999) at org.aspectj.weaver.ResolvedType.clashesWithExistingMember(ResolvedType.java:1843) at org.aspectj.weaver.ResolvedType.addInterTypeMunger(ResolvedType.java:1699) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:795) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:652) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.createBinaryTypeFrom(AjLookupEnvironment.java:1398) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.createBinaryTypeFrom(LookupEnvironment.java:599) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.accept(Compiler.java:276) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(LookupEnvironment.java:113) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.UnresolvedReferenceBinding.resolve(UnresolvedReferenceBinding.java:49) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveType(BinaryTypeBinding.java:99) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.getType(LookupEnvironment.java:971) at org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory.lookupBinding(EclipseFactory.java:749) at org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory.makeTypeBinding1(EclipseFactory.java:743) at org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory.makeTypeBinding(EclipseFactory.java:605) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.addParent(AjLookupEnvironment.java:1314) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareParents(AjLookupEnvironment.java:902) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:730) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:418) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.completeTypeBindings(AjLookupEnvironment.java:255) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.internalBeginToCompile(Compiler.java:616) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:357) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:371) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performCompilation(AjBuildManager.java:1021) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performBuild(AjBuildManager.java:268) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:181) at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112) at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60) at org.aspectj.tools.ajc.Main.run(Main.java:371) at org.aspectj.tools.ajc.Main.runMain(Main.java:248) at org.codehaus.mojo.aspectj.AbstractAjcCompiler.execute(AbstractAjcCompiler.java:360) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
resolved fixed
80785bf
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-02-11T19:03:13Z
2011-02-11T18:46:40Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
trace.enter("setSynchronizationPointcutsInUse", this); } synchronizationPointcutsInUse = true; if (trace.isTraceEnabled()) { trace.exit("setSynchronizationPointcutsInUse"); } } public boolean areSynchronizationPointcutsInUse() { return synchronizationPointcutsInUse; } /** * Register a new pointcut designator handler with the world - this can be used by any pointcut parsers attached to the world. * * @param designatorHandler handler for the new pointcut */ public void registerPointcutHandler(PointcutDesignatorHandler designatorHandler) { if (pointcutDesignators == null) { pointcutDesignators = new HashSet<PointcutDesignatorHandler>(); } pointcutDesignators.add(designatorHandler); } public Set<PointcutDesignatorHandler> getRegisteredPointcutHandlers() { if (pointcutDesignators == null) { return Collections.emptySet(); } return pointcutDesignators; } public void reportMatch(ShadowMunger munger, Shadow shadow) { } public boolean isOverWeaving() {
336,997
Bug 336997 IllegalStateException for generic ITD usage
java.lang.IllegalStateException: Can't answer binding questions prior to resolving at org.aspectj.weaver.TypeVariable.canBeBoundTo(TypeVariable.java:175) at org.aspectj.weaver.ReferenceType.isAssignableFrom(ReferenceType.java:496) at org.aspectj.weaver.ReferenceType.isAssignableFrom(ReferenceType.java:399) at org.aspectj.weaver.ResolvedType.checkLegalOverride(ResolvedType.java:1999) at org.aspectj.weaver.ResolvedType.clashesWithExistingMember(ResolvedType.java:1843) at org.aspectj.weaver.ResolvedType.addInterTypeMunger(ResolvedType.java:1699) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:795) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:652) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.createBinaryTypeFrom(AjLookupEnvironment.java:1398) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.createBinaryTypeFrom(LookupEnvironment.java:599) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.accept(Compiler.java:276) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(LookupEnvironment.java:113) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.UnresolvedReferenceBinding.resolve(UnresolvedReferenceBinding.java:49) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveType(BinaryTypeBinding.java:99) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.getType(LookupEnvironment.java:971) at org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory.lookupBinding(EclipseFactory.java:749) at org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory.makeTypeBinding1(EclipseFactory.java:743) at org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory.makeTypeBinding(EclipseFactory.java:605) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.addParent(AjLookupEnvironment.java:1314) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareParents(AjLookupEnvironment.java:902) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:730) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:418) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.completeTypeBindings(AjLookupEnvironment.java:255) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.internalBeginToCompile(Compiler.java:616) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:357) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:371) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performCompilation(AjBuildManager.java:1021) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performBuild(AjBuildManager.java:268) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:181) at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112) at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60) at org.aspectj.tools.ajc.Main.run(Main.java:371) at org.aspectj.tools.ajc.Main.runMain(Main.java:248) at org.codehaus.mojo.aspectj.AbstractAjcCompiler.execute(AbstractAjcCompiler.java:360) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
resolved fixed
80785bf
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-02-11T19:03:13Z
2011-02-11T18:46:40Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
return overWeaving; } public void reportCheckerMatch(Checker checker, Shadow shadow) { } /** * @return true if this world has the activation and scope of application of the aspects controlled via aop.xml files */ public boolean isXmlConfigured() { return false; } public boolean isAspectIncluded(ResolvedType aspectType) { return true; } /** * Determine if the named aspect requires a particular type around in order to be useful. The type is named in the aop.xml file * against the aspect. * * @return true if there is a type missing that this aspect really needed around */ public boolean hasUnsatisfiedDependency(ResolvedType aspectType) { return false; } public TypePattern getAspectScope(ResolvedType declaringType) { return null; } public Map<String, ResolvedType> getFixed() { return typeMap.tMap; } public Map<String, Reference<ResolvedType>> getExpendable() { return typeMap.expendableMap;
336,997
Bug 336997 IllegalStateException for generic ITD usage
java.lang.IllegalStateException: Can't answer binding questions prior to resolving at org.aspectj.weaver.TypeVariable.canBeBoundTo(TypeVariable.java:175) at org.aspectj.weaver.ReferenceType.isAssignableFrom(ReferenceType.java:496) at org.aspectj.weaver.ReferenceType.isAssignableFrom(ReferenceType.java:399) at org.aspectj.weaver.ResolvedType.checkLegalOverride(ResolvedType.java:1999) at org.aspectj.weaver.ResolvedType.clashesWithExistingMember(ResolvedType.java:1843) at org.aspectj.weaver.ResolvedType.addInterTypeMunger(ResolvedType.java:1699) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:795) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:652) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.createBinaryTypeFrom(AjLookupEnvironment.java:1398) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.createBinaryTypeFrom(LookupEnvironment.java:599) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.accept(Compiler.java:276) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(LookupEnvironment.java:113) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.UnresolvedReferenceBinding.resolve(UnresolvedReferenceBinding.java:49) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveType(BinaryTypeBinding.java:99) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.getType(LookupEnvironment.java:971) at org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory.lookupBinding(EclipseFactory.java:749) at org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory.makeTypeBinding1(EclipseFactory.java:743) at org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory.makeTypeBinding(EclipseFactory.java:605) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.addParent(AjLookupEnvironment.java:1314) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareParents(AjLookupEnvironment.java:902) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:730) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:418) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.completeTypeBindings(AjLookupEnvironment.java:255) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.internalBeginToCompile(Compiler.java:616) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:357) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:371) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performCompilation(AjBuildManager.java:1021) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performBuild(AjBuildManager.java:268) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:181) at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112) at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60) at org.aspectj.tools.ajc.Main.run(Main.java:371) at org.aspectj.tools.ajc.Main.runMain(Main.java:248) at org.codehaus.mojo.aspectj.AbstractAjcCompiler.execute(AbstractAjcCompiler.java:360) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
resolved fixed
80785bf
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-02-11T19:03:13Z
2011-02-11T18:46:40Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
} /** * Ask the type map to demote any types it can - we don't want them anchored forever. */ public void demote() { typeMap.demote(); } /** * Reference types we don't intend to weave may be ejected from the cache if we need the space. */ protected boolean isExpendable(ResolvedType type) { return (!type.equals(UnresolvedType.OBJECT) && (!type.isExposedToWeaver()) && (!type.isPrimitiveType())); } private Map<ResolvedType, Set<ResolvedType>> exclusionMap = new HashMap<ResolvedType, Set<ResolvedType>>(); public Map<ResolvedType, Set<ResolvedType>> getExclusionMap() { return exclusionMap; }
336,997
Bug 336997 IllegalStateException for generic ITD usage
java.lang.IllegalStateException: Can't answer binding questions prior to resolving at org.aspectj.weaver.TypeVariable.canBeBoundTo(TypeVariable.java:175) at org.aspectj.weaver.ReferenceType.isAssignableFrom(ReferenceType.java:496) at org.aspectj.weaver.ReferenceType.isAssignableFrom(ReferenceType.java:399) at org.aspectj.weaver.ResolvedType.checkLegalOverride(ResolvedType.java:1999) at org.aspectj.weaver.ResolvedType.clashesWithExistingMember(ResolvedType.java:1843) at org.aspectj.weaver.ResolvedType.addInterTypeMunger(ResolvedType.java:1699) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:795) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:652) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.createBinaryTypeFrom(AjLookupEnvironment.java:1398) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.createBinaryTypeFrom(LookupEnvironment.java:599) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.accept(Compiler.java:276) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(LookupEnvironment.java:113) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.UnresolvedReferenceBinding.resolve(UnresolvedReferenceBinding.java:49) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveType(BinaryTypeBinding.java:99) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.getType(LookupEnvironment.java:971) at org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory.lookupBinding(EclipseFactory.java:749) at org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory.makeTypeBinding1(EclipseFactory.java:743) at org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory.makeTypeBinding(EclipseFactory.java:605) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.addParent(AjLookupEnvironment.java:1314) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareParents(AjLookupEnvironment.java:902) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:730) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:418) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.completeTypeBindings(AjLookupEnvironment.java:255) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.internalBeginToCompile(Compiler.java:616) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:357) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:371) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performCompilation(AjBuildManager.java:1021) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performBuild(AjBuildManager.java:268) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:181) at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112) at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60) at org.aspectj.tools.ajc.Main.run(Main.java:371) at org.aspectj.tools.ajc.Main.runMain(Main.java:248) at org.codehaus.mojo.aspectj.AbstractAjcCompiler.execute(AbstractAjcCompiler.java:360) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
resolved fixed
80785bf
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-02-11T19:03:13Z
2011-02-11T18:46:40Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
private TimeCollector timeCollector = null; /** * Record the time spent matching a pointcut - this will accumulate over the lifetime of this world/weaver and be reported every * 25000 join points. */ public void record(Pointcut pointcut, long timetaken) { if (timeCollector == null) { ensureAdvancedConfigurationProcessed(); timeCollector = new TimeCollector(this); } timeCollector.record(pointcut, timetaken); } /** * Record the time spent fastmatching a pointcut - this will accumulate over the lifetime of this world/weaver and be reported * every 250 types. */ public void recordFastMatch(Pointcut pointcut, long timetaken) { if (timeCollector == null) { ensureAdvancedConfigurationProcessed(); timeCollector = new TimeCollector(this); } timeCollector.recordFastMatch(pointcut, timetaken); } public void reportTimers() { if (timeCollector != null && !timingPeriodically) { timeCollector.report(); timeCollector = new TimeCollector(this); } } private static class TimeCollector {
336,997
Bug 336997 IllegalStateException for generic ITD usage
java.lang.IllegalStateException: Can't answer binding questions prior to resolving at org.aspectj.weaver.TypeVariable.canBeBoundTo(TypeVariable.java:175) at org.aspectj.weaver.ReferenceType.isAssignableFrom(ReferenceType.java:496) at org.aspectj.weaver.ReferenceType.isAssignableFrom(ReferenceType.java:399) at org.aspectj.weaver.ResolvedType.checkLegalOverride(ResolvedType.java:1999) at org.aspectj.weaver.ResolvedType.clashesWithExistingMember(ResolvedType.java:1843) at org.aspectj.weaver.ResolvedType.addInterTypeMunger(ResolvedType.java:1699) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:795) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:652) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.createBinaryTypeFrom(AjLookupEnvironment.java:1398) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.createBinaryTypeFrom(LookupEnvironment.java:599) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.accept(Compiler.java:276) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(LookupEnvironment.java:113) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.UnresolvedReferenceBinding.resolve(UnresolvedReferenceBinding.java:49) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveType(BinaryTypeBinding.java:99) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.getType(LookupEnvironment.java:971) at org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory.lookupBinding(EclipseFactory.java:749) at org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory.makeTypeBinding1(EclipseFactory.java:743) at org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory.makeTypeBinding(EclipseFactory.java:605) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.addParent(AjLookupEnvironment.java:1314) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareParents(AjLookupEnvironment.java:902) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:730) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:418) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.completeTypeBindings(AjLookupEnvironment.java:255) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.internalBeginToCompile(Compiler.java:616) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:357) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:371) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performCompilation(AjBuildManager.java:1021) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performBuild(AjBuildManager.java:268) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:181) at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112) at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60) at org.aspectj.tools.ajc.Main.run(Main.java:371) at org.aspectj.tools.ajc.Main.runMain(Main.java:248) at org.codehaus.mojo.aspectj.AbstractAjcCompiler.execute(AbstractAjcCompiler.java:360) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
resolved fixed
80785bf
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-02-11T19:03:13Z
2011-02-11T18:46:40Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
private World world; long joinpointCount; long typeCount; long perJoinpointCount; long perTypes; Map<String, Long> joinpointsPerPointcut = new HashMap<String, Long>(); Map<String, Long> timePerPointcut = new HashMap<String, Long>(); Map<String, Long> fastMatchTimesPerPointcut = new HashMap<String, Long>(); Map<String, Long> fastMatchTypesPerPointcut = new HashMap<String, Long>(); TimeCollector(World world) { this.perJoinpointCount = world.timersPerJoinpoint; this.perTypes = world.timersPerType; this.world = world; this.joinpointCount = 0; this.typeCount = 0; this.joinpointsPerPointcut = new HashMap<String, Long>(); this.timePerPointcut = new HashMap<String, Long>(); } public void report() { long totalTime = 0L; for (String p : joinpointsPerPointcut.keySet()) { totalTime += timePerPointcut.get(p);
336,997
Bug 336997 IllegalStateException for generic ITD usage
java.lang.IllegalStateException: Can't answer binding questions prior to resolving at org.aspectj.weaver.TypeVariable.canBeBoundTo(TypeVariable.java:175) at org.aspectj.weaver.ReferenceType.isAssignableFrom(ReferenceType.java:496) at org.aspectj.weaver.ReferenceType.isAssignableFrom(ReferenceType.java:399) at org.aspectj.weaver.ResolvedType.checkLegalOverride(ResolvedType.java:1999) at org.aspectj.weaver.ResolvedType.clashesWithExistingMember(ResolvedType.java:1843) at org.aspectj.weaver.ResolvedType.addInterTypeMunger(ResolvedType.java:1699) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:795) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:652) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.createBinaryTypeFrom(AjLookupEnvironment.java:1398) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.createBinaryTypeFrom(LookupEnvironment.java:599) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.accept(Compiler.java:276) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(LookupEnvironment.java:113) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.UnresolvedReferenceBinding.resolve(UnresolvedReferenceBinding.java:49) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveType(BinaryTypeBinding.java:99) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.getType(LookupEnvironment.java:971) at org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory.lookupBinding(EclipseFactory.java:749) at org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory.makeTypeBinding1(EclipseFactory.java:743) at org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory.makeTypeBinding(EclipseFactory.java:605) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.addParent(AjLookupEnvironment.java:1314) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareParents(AjLookupEnvironment.java:902) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:730) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:418) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.completeTypeBindings(AjLookupEnvironment.java:255) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.internalBeginToCompile(Compiler.java:616) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:357) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:371) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performCompilation(AjBuildManager.java:1021) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performBuild(AjBuildManager.java:268) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:181) at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112) at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60) at org.aspectj.tools.ajc.Main.run(Main.java:371) at org.aspectj.tools.ajc.Main.runMain(Main.java:248) at org.codehaus.mojo.aspectj.AbstractAjcCompiler.execute(AbstractAjcCompiler.java:360) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
resolved fixed
80785bf
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-02-11T19:03:13Z
2011-02-11T18:46:40Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
} world.getMessageHandler().handleMessage( MessageUtil.info("Pointcut matching cost (total=" + (totalTime / 1000000) + "ms for " + joinpointCount + " joinpoint match calls):")); for (String p : joinpointsPerPointcut.keySet()) { StringBuffer sb = new StringBuffer(); sb.append("Time:" + (timePerPointcut.get(p) / 1000000) + "ms (jps:#" + joinpointsPerPointcut.get(p) + ") matching against " + p); world.getMessageHandler().handleMessage(MessageUtil.info(sb.toString())); } world.getMessageHandler().handleMessage(MessageUtil.info("---")); totalTime = 0L; for (String p : fastMatchTimesPerPointcut.keySet()) { totalTime += fastMatchTimesPerPointcut.get(p); } world.getMessageHandler().handleMessage( MessageUtil.info("Pointcut fast matching cost (total=" + (totalTime / 1000000) + "ms for " + typeCount + " fast match calls):")); for (String p : fastMatchTimesPerPointcut.keySet()) { StringBuffer sb = new StringBuffer(); sb.append("Time:" + (fastMatchTimesPerPointcut.get(p) / 1000000) + "ms (types:#" + fastMatchTypesPerPointcut.get(p) + ") fast matching against " + p); world.getMessageHandler().handleMessage(MessageUtil.info(sb.toString())); } world.getMessageHandler().handleMessage(MessageUtil.info("---")); } void record(Pointcut pointcut, long timetakenInNs) { joinpointCount++; String pointcutText = pointcut.toString(); Long jpcounter = joinpointsPerPointcut.get(pointcutText);
336,997
Bug 336997 IllegalStateException for generic ITD usage
java.lang.IllegalStateException: Can't answer binding questions prior to resolving at org.aspectj.weaver.TypeVariable.canBeBoundTo(TypeVariable.java:175) at org.aspectj.weaver.ReferenceType.isAssignableFrom(ReferenceType.java:496) at org.aspectj.weaver.ReferenceType.isAssignableFrom(ReferenceType.java:399) at org.aspectj.weaver.ResolvedType.checkLegalOverride(ResolvedType.java:1999) at org.aspectj.weaver.ResolvedType.clashesWithExistingMember(ResolvedType.java:1843) at org.aspectj.weaver.ResolvedType.addInterTypeMunger(ResolvedType.java:1699) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:795) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:652) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.createBinaryTypeFrom(AjLookupEnvironment.java:1398) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.createBinaryTypeFrom(LookupEnvironment.java:599) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.accept(Compiler.java:276) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(LookupEnvironment.java:113) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.UnresolvedReferenceBinding.resolve(UnresolvedReferenceBinding.java:49) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveType(BinaryTypeBinding.java:99) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.getType(LookupEnvironment.java:971) at org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory.lookupBinding(EclipseFactory.java:749) at org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory.makeTypeBinding1(EclipseFactory.java:743) at org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory.makeTypeBinding(EclipseFactory.java:605) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.addParent(AjLookupEnvironment.java:1314) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareParents(AjLookupEnvironment.java:902) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:730) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:418) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.completeTypeBindings(AjLookupEnvironment.java:255) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.internalBeginToCompile(Compiler.java:616) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:357) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:371) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performCompilation(AjBuildManager.java:1021) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performBuild(AjBuildManager.java:268) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:181) at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112) at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60) at org.aspectj.tools.ajc.Main.run(Main.java:371) at org.aspectj.tools.ajc.Main.runMain(Main.java:248) at org.codehaus.mojo.aspectj.AbstractAjcCompiler.execute(AbstractAjcCompiler.java:360) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
resolved fixed
80785bf
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-02-11T19:03:13Z
2011-02-11T18:46:40Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
if (jpcounter == null) { jpcounter = 1L; } else { jpcounter++; } joinpointsPerPointcut.put(pointcutText, jpcounter); Long time = timePerPointcut.get(pointcutText); if (time == null) { time = timetakenInNs; } else { time += timetakenInNs; } timePerPointcut.put(pointcutText, time); if (world.timingPeriodically) { if ((joinpointCount % perJoinpointCount) == 0) { long totalTime = 0L; for (String p : joinpointsPerPointcut.keySet()) { totalTime += timePerPointcut.get(p); } world.getMessageHandler().handleMessage( MessageUtil.info("Pointcut matching cost (total=" + (totalTime / 1000000) + "ms for " + joinpointCount + " joinpoint match calls):")); for (String p : joinpointsPerPointcut.keySet()) { StringBuffer sb = new StringBuffer(); sb.append("Time:" + (timePerPointcut.get(p) / 1000000) + "ms (jps:#" + joinpointsPerPointcut.get(p) + ") matching against " + p); world.getMessageHandler().handleMessage(MessageUtil.info(sb.toString())); } world.getMessageHandler().handleMessage(MessageUtil.info("---")); }
336,997
Bug 336997 IllegalStateException for generic ITD usage
java.lang.IllegalStateException: Can't answer binding questions prior to resolving at org.aspectj.weaver.TypeVariable.canBeBoundTo(TypeVariable.java:175) at org.aspectj.weaver.ReferenceType.isAssignableFrom(ReferenceType.java:496) at org.aspectj.weaver.ReferenceType.isAssignableFrom(ReferenceType.java:399) at org.aspectj.weaver.ResolvedType.checkLegalOverride(ResolvedType.java:1999) at org.aspectj.weaver.ResolvedType.clashesWithExistingMember(ResolvedType.java:1843) at org.aspectj.weaver.ResolvedType.addInterTypeMunger(ResolvedType.java:1699) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:795) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:652) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.createBinaryTypeFrom(AjLookupEnvironment.java:1398) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.createBinaryTypeFrom(LookupEnvironment.java:599) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.accept(Compiler.java:276) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(LookupEnvironment.java:113) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.UnresolvedReferenceBinding.resolve(UnresolvedReferenceBinding.java:49) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveType(BinaryTypeBinding.java:99) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.getType(LookupEnvironment.java:971) at org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory.lookupBinding(EclipseFactory.java:749) at org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory.makeTypeBinding1(EclipseFactory.java:743) at org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory.makeTypeBinding(EclipseFactory.java:605) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.addParent(AjLookupEnvironment.java:1314) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareParents(AjLookupEnvironment.java:902) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:730) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:418) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.completeTypeBindings(AjLookupEnvironment.java:255) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.internalBeginToCompile(Compiler.java:616) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:357) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:371) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performCompilation(AjBuildManager.java:1021) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performBuild(AjBuildManager.java:268) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:181) at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112) at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60) at org.aspectj.tools.ajc.Main.run(Main.java:371) at org.aspectj.tools.ajc.Main.runMain(Main.java:248) at org.codehaus.mojo.aspectj.AbstractAjcCompiler.execute(AbstractAjcCompiler.java:360) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
resolved fixed
80785bf
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-02-11T19:03:13Z
2011-02-11T18:46:40Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
} } void recordFastMatch(Pointcut pointcut, long timetakenInNs) { typeCount++; String pointcutText = pointcut.toString(); Long typecounter = fastMatchTypesPerPointcut.get(pointcutText); if (typecounter == null) { typecounter = 1L; } else { typecounter++; } fastMatchTypesPerPointcut.put(pointcutText, typecounter); Long time = fastMatchTimesPerPointcut.get(pointcutText); if (time == null) { time = timetakenInNs; } else { time += timetakenInNs; } fastMatchTimesPerPointcut.put(pointcutText, time); if (world.timingPeriodically) { if ((typeCount % perTypes) == 0) { long totalTime = 0L; for (String p : fastMatchTimesPerPointcut.keySet()) { totalTime += fastMatchTimesPerPointcut.get(p); } world.getMessageHandler().handleMessage( MessageUtil.info("Pointcut fast matching cost (total=" + (totalTime / 1000000) + "ms for " + typeCount + " fast match calls):")); for (String p : fastMatchTimesPerPointcut.keySet()) { StringBuffer sb = new StringBuffer();
336,997
Bug 336997 IllegalStateException for generic ITD usage
java.lang.IllegalStateException: Can't answer binding questions prior to resolving at org.aspectj.weaver.TypeVariable.canBeBoundTo(TypeVariable.java:175) at org.aspectj.weaver.ReferenceType.isAssignableFrom(ReferenceType.java:496) at org.aspectj.weaver.ReferenceType.isAssignableFrom(ReferenceType.java:399) at org.aspectj.weaver.ResolvedType.checkLegalOverride(ResolvedType.java:1999) at org.aspectj.weaver.ResolvedType.clashesWithExistingMember(ResolvedType.java:1843) at org.aspectj.weaver.ResolvedType.addInterTypeMunger(ResolvedType.java:1699) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:795) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:652) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.createBinaryTypeFrom(AjLookupEnvironment.java:1398) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.createBinaryTypeFrom(LookupEnvironment.java:599) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.accept(Compiler.java:276) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(LookupEnvironment.java:113) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.UnresolvedReferenceBinding.resolve(UnresolvedReferenceBinding.java:49) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveType(BinaryTypeBinding.java:99) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.getType(LookupEnvironment.java:971) at org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory.lookupBinding(EclipseFactory.java:749) at org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory.makeTypeBinding1(EclipseFactory.java:743) at org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory.makeTypeBinding(EclipseFactory.java:605) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.addParent(AjLookupEnvironment.java:1314) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareParents(AjLookupEnvironment.java:902) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:730) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:418) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.completeTypeBindings(AjLookupEnvironment.java:255) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.internalBeginToCompile(Compiler.java:616) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:357) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:371) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performCompilation(AjBuildManager.java:1021) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performBuild(AjBuildManager.java:268) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:181) at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112) at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60) at org.aspectj.tools.ajc.Main.run(Main.java:371) at org.aspectj.tools.ajc.Main.runMain(Main.java:248) at org.codehaus.mojo.aspectj.AbstractAjcCompiler.execute(AbstractAjcCompiler.java:360) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
resolved fixed
80785bf
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-02-11T19:03:13Z
2011-02-11T18:46:40Z
org.aspectj.matcher/src/org/aspectj/weaver/World.java
sb.append("Time:" + (fastMatchTimesPerPointcut.get(p) / 1000000) + "ms (types:#" + fastMatchTypesPerPointcut.get(p) + ") fast matching against " + p); world.getMessageHandler().handleMessage(MessageUtil.info(sb.toString())); } world.getMessageHandler().handleMessage(MessageUtil.info("---")); } } } } public TypeMap getTypeMap() { return typeMap; } public static void reset() { ResolvedType.resetPrimitives(); } /** * Returns the version of ITD that this world wants to create. The default is the new style (2) but in some cases where there * might be a clash, the old style can be used. It is set through the option -Xset:itdVersion=1 * * @return the ITD version this world wants to create - 1=oldstyle 2=new, transparent style */ public int getItdVersion() { return itdVersion; } public abstract boolean isLoadtimeWeaving(); public void classWriteEvent(char[][] compoundName) { } }
339,300
Bug 339300 problem weaving anonymous inner (member owned) classes in scala library
Reported by Ramnivas. Due to the use of numerous $ chars in scala classnames, some of the AspectJ handling of inner classes breaks down. It should be possible to correctly use the available class attributes rather than mess around with attributes. A while back one use did contribute a change to enable scala weaving which tried to use the InnerClasses attribute before falling back on string chopping. However we have now hit another case. In the scenario we are dealing with the class scala.Predef$$anon$3 in the scala library (a 2.9.0-SNAPSHOT version). What we normally do here is in that type we discover the InnerClass attribute and refer to the outerclass index it holds. Unfortunately, due to it being an anonymous inner inside a method, the index is 0. So we fail to process the attribute and with string chopping come up with a stupid guessed name for the outer. The solution is to use the EnclosingMethod attribute in these situations. The EnclosingMethod attribute is an optional attribute. A class must have an EnclosingMethod attribute if and only if it is a local class or an anonymous class. A class may have no more than one EnclosingMethod attribute. The EnclosingMethod attribute includes a pointer to the containing outerclass (that had the method in which encloses this inner type).
resolved fixed
945402f
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-09T01:14:39Z
2011-03-09T00:20:00Z
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.lang.ref.WeakReference; import java.lang.reflect.Modifier; import java.util.ArrayList; import java.util.Arrays;
339,300
Bug 339300 problem weaving anonymous inner (member owned) classes in scala library
Reported by Ramnivas. Due to the use of numerous $ chars in scala classnames, some of the AspectJ handling of inner classes breaks down. It should be possible to correctly use the available class attributes rather than mess around with attributes. A while back one use did contribute a change to enable scala weaving which tried to use the InnerClasses attribute before falling back on string chopping. However we have now hit another case. In the scenario we are dealing with the class scala.Predef$$anon$3 in the scala library (a 2.9.0-SNAPSHOT version). What we normally do here is in that type we discover the InnerClass attribute and refer to the outerclass index it holds. Unfortunately, due to it being an anonymous inner inside a method, the index is 0. So we fail to process the attribute and with string chopping come up with a stupid guessed name for the outer. The solution is to use the EnclosingMethod attribute in these situations. The EnclosingMethod attribute is an optional attribute. A class must have an EnclosingMethod attribute if and only if it is a local class or an anonymous class. A class may have no more than one EnclosingMethod attribute. The EnclosingMethod attribute includes a pointer to the containing outerclass (that had the method in which encloses this inner type).
resolved fixed
945402f
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-09T01:14:39Z
2011-03-09T00:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
import java.util.Collection; import java.util.Collections; import java.util.Iterator; import java.util.List; import java.util.Set; import org.aspectj.apache.bcel.classfile.Attribute; import org.aspectj.apache.bcel.classfile.AttributeUtils; import org.aspectj.apache.bcel.classfile.ConstantClass; import org.aspectj.apache.bcel.classfile.ConstantPool; import org.aspectj.apache.bcel.classfile.Field; import org.aspectj.apache.bcel.classfile.InnerClass; import org.aspectj.apache.bcel.classfile.InnerClasses; 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.annotation.AnnotationGen; import org.aspectj.apache.bcel.classfile.annotation.EnumElementValue; import org.aspectj.apache.bcel.classfile.annotation.NameValuePair; import org.aspectj.asm.AsmManager; import org.aspectj.bridge.IMessageHandler; import org.aspectj.bridge.MessageUtil; import org.aspectj.util.GenericSignature; import org.aspectj.util.GenericSignature.FormalTypeParameter; import org.aspectj.weaver.AbstractReferenceTypeDelegate; import org.aspectj.weaver.AjAttribute; import org.aspectj.weaver.AjcMemberMaker; import org.aspectj.weaver.AnnotationAJ; import org.aspectj.weaver.AnnotationTargetKind; import org.aspectj.weaver.BCException; import org.aspectj.weaver.BindingScope;
339,300
Bug 339300 problem weaving anonymous inner (member owned) classes in scala library
Reported by Ramnivas. Due to the use of numerous $ chars in scala classnames, some of the AspectJ handling of inner classes breaks down. It should be possible to correctly use the available class attributes rather than mess around with attributes. A while back one use did contribute a change to enable scala weaving which tried to use the InnerClasses attribute before falling back on string chopping. However we have now hit another case. In the scenario we are dealing with the class scala.Predef$$anon$3 in the scala library (a 2.9.0-SNAPSHOT version). What we normally do here is in that type we discover the InnerClass attribute and refer to the outerclass index it holds. Unfortunately, due to it being an anonymous inner inside a method, the index is 0. So we fail to process the attribute and with string chopping come up with a stupid guessed name for the outer. The solution is to use the EnclosingMethod attribute in these situations. The EnclosingMethod attribute is an optional attribute. A class must have an EnclosingMethod attribute if and only if it is a local class or an anonymous class. A class may have no more than one EnclosingMethod attribute. The EnclosingMethod attribute includes a pointer to the containing outerclass (that had the method in which encloses this inner type).
resolved fixed
945402f
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-09T01:14:39Z
2011-03-09T00:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
import org.aspectj.weaver.ConcreteTypeMunger; import org.aspectj.weaver.ISourceContext; import org.aspectj.weaver.ReferenceType; 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.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 { public JavaClass javaClass; private boolean artificial; 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;
339,300
Bug 339300 problem weaving anonymous inner (member owned) classes in scala library
Reported by Ramnivas. Due to the use of numerous $ chars in scala classnames, some of the AspectJ handling of inner classes breaks down. It should be possible to correctly use the available class attributes rather than mess around with attributes. A while back one use did contribute a change to enable scala weaving which tried to use the InnerClasses attribute before falling back on string chopping. However we have now hit another case. In the scenario we are dealing with the class scala.Predef$$anon$3 in the scala library (a 2.9.0-SNAPSHOT version). What we normally do here is in that type we discover the InnerClass attribute and refer to the outerclass index it holds. Unfortunately, due to it being an anonymous inner inside a method, the index is 0. So we fail to process the attribute and with string chopping come up with a stupid guessed name for the outer. The solution is to use the EnclosingMethod attribute in these situations. The EnclosingMethod attribute is an optional attribute. A class must have an EnclosingMethod attribute if and only if it is a local class or an anonymous class. A class may have no more than one EnclosingMethod attribute. The EnclosingMethod attribute includes a pointer to the containing outerclass (that had the method in which encloses this inner type).
resolved fixed
945402f
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-09T01:14:39Z
2011-03-09T00:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
private AnnotationAJ[] annotations = null; private TypeVariable[] typeVars = null; private String retentionPolicy; private AnnotationTargetKind[] annotationTargetKinds; private AjAttribute.WeaverVersionInfo wvInfo = AjAttribute.WeaverVersionInfo.UNKNOWN; private ResolvedPointcutDefinition[] pointcuts = null; private ResolvedMember[] privilegedAccess = null; private WeaverStateInfo weaverState = null; private PerClause perClause = null; private List<ConcreteTypeMunger> typeMungers = Collections.emptyList(); private List<Declare> declares = Collections.emptyList(); private GenericSignature.FormalTypeParameter[] formalsForResolution = null; 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 WeakReference<ResolvedType> superTypeReference = new WeakReference<ResolvedType>(null); private WeakReference<ResolvedType[]> superInterfaceReferences = new WeakReference<ResolvedType[]>(null); private int bitflag = 0x0000; private static final int DISCOVERED_ANNOTATION_RETENTION_POLICY = 0x0001;
339,300
Bug 339300 problem weaving anonymous inner (member owned) classes in scala library
Reported by Ramnivas. Due to the use of numerous $ chars in scala classnames, some of the AspectJ handling of inner classes breaks down. It should be possible to correctly use the available class attributes rather than mess around with attributes. A while back one use did contribute a change to enable scala weaving which tried to use the InnerClasses attribute before falling back on string chopping. However we have now hit another case. In the scenario we are dealing with the class scala.Predef$$anon$3 in the scala library (a 2.9.0-SNAPSHOT version). What we normally do here is in that type we discover the InnerClass attribute and refer to the outerclass index it holds. Unfortunately, due to it being an anonymous inner inside a method, the index is 0. So we fail to process the attribute and with string chopping come up with a stupid guessed name for the outer. The solution is to use the EnclosingMethod attribute in these situations. The EnclosingMethod attribute is an optional attribute. A class must have an EnclosingMethod attribute if and only if it is a local class or an anonymous class. A class may have no more than one EnclosingMethod attribute. The EnclosingMethod attribute includes a pointer to the containing outerclass (that had the method in which encloses this inner type).
resolved fixed
945402f
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-09T01:14:39Z
2011-03-09T00:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
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 ANNOTATION_UNPACK_IN_PROGRESS = 0x0100; private static final String[] NO_INTERFACE_SIGS = new String[] {}; /* * 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 artificial, boolean exposedToWeaver) { super(resolvedTypeX, exposedToWeaver); this.javaClass = javaClass; this.artificial = artificial; initializeFromJavaclass(); resolvedTypeX.setDelegate(this); ISourceContext sourceContext = resolvedTypeX.getSourceContext(); if (sourceContext == SourceContextImpl.UNKNOWN_SOURCE_CONTEXT) { sourceContext = new SourceContextImpl(this); setSourceContext(sourceContext); }
339,300
Bug 339300 problem weaving anonymous inner (member owned) classes in scala library
Reported by Ramnivas. Due to the use of numerous $ chars in scala classnames, some of the AspectJ handling of inner classes breaks down. It should be possible to correctly use the available class attributes rather than mess around with attributes. A while back one use did contribute a change to enable scala weaving which tried to use the InnerClasses attribute before falling back on string chopping. However we have now hit another case. In the scenario we are dealing with the class scala.Predef$$anon$3 in the scala library (a 2.9.0-SNAPSHOT version). What we normally do here is in that type we discover the InnerClass attribute and refer to the outerclass index it holds. Unfortunately, due to it being an anonymous inner inside a method, the index is 0. So we fail to process the attribute and with string chopping come up with a stupid guessed name for the outer. The solution is to use the EnclosingMethod attribute in these situations. The EnclosingMethod attribute is an optional attribute. A class must have an EnclosingMethod attribute if and only if it is a local class or an anonymous class. A class may have no more than one EnclosingMethod attribute. The EnclosingMethod attribute includes a pointer to the containing outerclass (that had the method in which encloses this inner type).
resolved fixed
945402f
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-09T01:14:39Z
2011-03-09T00:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
isObject = (javaClass.getSuperclassNameIndex() == 0); ensureAspectJAttributesUnpacked(); setSourcefilename(javaClass.getSourceFileName()); } public void setJavaClass(JavaClass newclass, boolean artificial) { this.javaClass = newclass; this.artificial = artificial; resetState(); initializeFromJavaclass(); } @Override public boolean isCacheable() { return true; } private void initializeFromJavaclass() { isInterface = javaClass.isInterface(); isEnum = javaClass.isEnum(); isAnnotation = javaClass.isAnnotation(); isAnonymous = javaClass.isAnonymous(); isNested = javaClass.isNested(); modifiers = javaClass.getModifiers(); superclassName = javaClass.getSuperclassName(); className = javaClass.getClassName(); cachedGenericClassTypeSignature = null;
339,300
Bug 339300 problem weaving anonymous inner (member owned) classes in scala library
Reported by Ramnivas. Due to the use of numerous $ chars in scala classnames, some of the AspectJ handling of inner classes breaks down. It should be possible to correctly use the available class attributes rather than mess around with attributes. A while back one use did contribute a change to enable scala weaving which tried to use the InnerClasses attribute before falling back on string chopping. However we have now hit another case. In the scenario we are dealing with the class scala.Predef$$anon$3 in the scala library (a 2.9.0-SNAPSHOT version). What we normally do here is in that type we discover the InnerClass attribute and refer to the outerclass index it holds. Unfortunately, due to it being an anonymous inner inside a method, the index is 0. So we fail to process the attribute and with string chopping come up with a stupid guessed name for the outer. The solution is to use the EnclosingMethod attribute in these situations. The EnclosingMethod attribute is an optional attribute. A class must have an EnclosingMethod attribute if and only if it is a local class or an anonymous class. A class may have no more than one EnclosingMethod attribute. The EnclosingMethod attribute includes a pointer to the containing outerclass (that had the method in which encloses this inner type).
resolved fixed
945402f
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-09T01:14:39Z
2011-03-09T00:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
} 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; } /** * Must take into account generic signature */ public ResolvedType getSuperclass() { if (isObject) { return null; } ResolvedType supertype = superTypeReference.get(); if (supertype == null) {
339,300
Bug 339300 problem weaving anonymous inner (member owned) classes in scala library
Reported by Ramnivas. Due to the use of numerous $ chars in scala classnames, some of the AspectJ handling of inner classes breaks down. It should be possible to correctly use the available class attributes rather than mess around with attributes. A while back one use did contribute a change to enable scala weaving which tried to use the InnerClasses attribute before falling back on string chopping. However we have now hit another case. In the scenario we are dealing with the class scala.Predef$$anon$3 in the scala library (a 2.9.0-SNAPSHOT version). What we normally do here is in that type we discover the InnerClass attribute and refer to the outerclass index it holds. Unfortunately, due to it being an anonymous inner inside a method, the index is 0. So we fail to process the attribute and with string chopping come up with a stupid guessed name for the outer. The solution is to use the EnclosingMethod attribute in these situations. The EnclosingMethod attribute is an optional attribute. A class must have an EnclosingMethod attribute if and only if it is a local class or an anonymous class. A class may have no more than one EnclosingMethod attribute. The EnclosingMethod attribute includes a pointer to the containing outerclass (that had the method in which encloses this inner type).
resolved fixed
945402f
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-09T01:14:39Z
2011-03-09T00:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
ensureGenericSignatureUnpacked(); if (superclassSignature == null) { if (superclassName == null) { superclassName = javaClass.getSuperclassName(); } superclassSignature = getResolvedTypeX().getWorld().resolve(UnresolvedType.forName(superclassName)).getSignature(); } World world = getResolvedTypeX().getWorld(); supertype = world.resolve(UnresolvedType.forSignature(superclassSignature)); superTypeReference = new WeakReference<ResolvedType>(supertype); } return supertype; } public World getWorld() { return getResolvedTypeX().getWorld(); } /** * 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() { ResolvedType[] cachedInterfaceTypes = superInterfaceReferences.get(); if (cachedInterfaceTypes == null) { ensureGenericSignatureUnpacked(); ResolvedType[] interfaceTypes = null; if (interfaceSignatures == null) { String[] names = javaClass.getInterfaceNames(); if (names.length == 0) { interfaceSignatures = NO_INTERFACE_SIGS; interfaceTypes = ResolvedType.NONE;
339,300
Bug 339300 problem weaving anonymous inner (member owned) classes in scala library
Reported by Ramnivas. Due to the use of numerous $ chars in scala classnames, some of the AspectJ handling of inner classes breaks down. It should be possible to correctly use the available class attributes rather than mess around with attributes. A while back one use did contribute a change to enable scala weaving which tried to use the InnerClasses attribute before falling back on string chopping. However we have now hit another case. In the scenario we are dealing with the class scala.Predef$$anon$3 in the scala library (a 2.9.0-SNAPSHOT version). What we normally do here is in that type we discover the InnerClass attribute and refer to the outerclass index it holds. Unfortunately, due to it being an anonymous inner inside a method, the index is 0. So we fail to process the attribute and with string chopping come up with a stupid guessed name for the outer. The solution is to use the EnclosingMethod attribute in these situations. The EnclosingMethod attribute is an optional attribute. A class must have an EnclosingMethod attribute if and only if it is a local class or an anonymous class. A class may have no more than one EnclosingMethod attribute. The EnclosingMethod attribute includes a pointer to the containing outerclass (that had the method in which encloses this inner type).
resolved fixed
945402f
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-09T01:14:39Z
2011-03-09T00:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
} else { interfaceSignatures = new String[names.length]; interfaceTypes = new ResolvedType[names.length]; for (int i = 0, len = names.length; i < len; i++) { 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])); } } superInterfaceReferences = new WeakReference<ResolvedType[]>(interfaceTypes); return interfaceTypes; } else { return cachedInterfaceTypes; } } 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;
339,300
Bug 339300 problem weaving anonymous inner (member owned) classes in scala library
Reported by Ramnivas. Due to the use of numerous $ chars in scala classnames, some of the AspectJ handling of inner classes breaks down. It should be possible to correctly use the available class attributes rather than mess around with attributes. A while back one use did contribute a change to enable scala weaving which tried to use the InnerClasses attribute before falling back on string chopping. However we have now hit another case. In the scenario we are dealing with the class scala.Predef$$anon$3 in the scala library (a 2.9.0-SNAPSHOT version). What we normally do here is in that type we discover the InnerClass attribute and refer to the outerclass index it holds. Unfortunately, due to it being an anonymous inner inside a method, the index is 0. So we fail to process the attribute and with string chopping come up with a stupid guessed name for the outer. The solution is to use the EnclosingMethod attribute in these situations. The EnclosingMethod attribute is an optional attribute. A class must have an EnclosingMethod attribute if and only if it is a local class or an anonymous class. A class may have no more than one EnclosingMethod attribute. The EnclosingMethod attribute includes a pointer to the containing outerclass (that had the method in which encloses this inner type).
resolved fixed
945402f
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-09T01:14:39Z
2011-03-09T00:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
} 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++) { fields[i] = new BcelField(this, fs[i]); } } return fields; } public TypeVariable[] getTypeVariables() { if (!isGeneric()) { return TypeVariable.NONE; } if (typeVars == null) { GenericSignature.ClassSignature classSig = getGenericClassTypeSignature(); typeVars = new TypeVariable[classSig.formalTypeParameters.length]; for (int i = 0; i < typeVars.length; i++) { GenericSignature.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()); }
339,300
Bug 339300 problem weaving anonymous inner (member owned) classes in scala library
Reported by Ramnivas. Due to the use of numerous $ chars in scala classnames, some of the AspectJ handling of inner classes breaks down. It should be possible to correctly use the available class attributes rather than mess around with attributes. A while back one use did contribute a change to enable scala weaving which tried to use the InnerClasses attribute before falling back on string chopping. However we have now hit another case. In the scenario we are dealing with the class scala.Predef$$anon$3 in the scala library (a 2.9.0-SNAPSHOT version). What we normally do here is in that type we discover the InnerClass attribute and refer to the outerclass index it holds. Unfortunately, due to it being an anonymous inner inside a method, the index is 0. So we fail to process the attribute and with string chopping come up with a stupid guessed name for the outer. The solution is to use the EnclosingMethod attribute in these situations. The EnclosingMethod attribute is an optional attribute. A class must have an EnclosingMethod attribute if and only if it is a local class or an anonymous class. A class may have no more than one EnclosingMethod attribute. The EnclosingMethod attribute includes a pointer to the containing outerclass (that had the method in which encloses this inner type).
resolved fixed
945402f
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-09T01:14:39Z
2011-03-09T00:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
} } return typeVars; } public Collection<ConcreteTypeMunger> getTypeMungers() { return typeMungers; } public Collection<Declare> getDeclares() { return declares; } public Collection<ResolvedMember> getPrivilegedAccesses() { if (privilegedAccess == null) { return Collections.emptyList(); } 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;
339,300
Bug 339300 problem weaving anonymous inner (member owned) classes in scala library
Reported by Ramnivas. Due to the use of numerous $ chars in scala classnames, some of the AspectJ handling of inner classes breaks down. It should be possible to correctly use the available class attributes rather than mess around with attributes. A while back one use did contribute a change to enable scala weaving which tried to use the InnerClasses attribute before falling back on string chopping. However we have now hit another case. In the scenario we are dealing with the class scala.Predef$$anon$3 in the scala library (a 2.9.0-SNAPSHOT version). What we normally do here is in that type we discover the InnerClass attribute and refer to the outerclass index it holds. Unfortunately, due to it being an anonymous inner inside a method, the index is 0. So we fail to process the attribute and with string chopping come up with a stupid guessed name for the outer. The solution is to use the EnclosingMethod attribute in these situations. The EnclosingMethod attribute is an optional attribute. A class must have an EnclosingMethod attribute if and only if it is a local class or an anonymous class. A class may have no more than one EnclosingMethod attribute. The EnclosingMethod attribute includes a pointer to the containing outerclass (that had the method in which encloses this inner type).
resolved fixed
945402f
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-09T01:14:39Z
2011-03-09T00:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
isAnnotationStyleAspect = !isCodeStyleAspect && hasAnnotation(AjcMemberMaker.ASPECT_ANNOTATION); } return isAnnotationStyleAspect; } /** * Process any org.aspectj.weaver attributes stored against the class. */ private void ensureAspectJAttributesUnpacked() { if ((bitflag & UNPACKED_AJATTRIBUTES) != 0) { return; } bitflag |= UNPACKED_AJATTRIBUTES; IMessageHandler msgHandler = getResolvedTypeX().getWorld().getMessageHandler(); List<AjAttribute> l = null; try { l = Utility.readAjAttributes(className, javaClass.getAttributes(), getResolvedTypeX().getSourceContext(), getResolvedTypeX().getWorld(), AjAttribute.WeaverVersionInfo.UNKNOWN, new BcelConstantPoolReader(javaClass.getConstantPool())); } catch (RuntimeException re) { throw new RuntimeException("Problem processing attributes in " + javaClass.getFileName(), re); } List<ResolvedPointcutDefinition> pointcuts = new ArrayList<ResolvedPointcutDefinition>(); typeMungers = new ArrayList<ConcreteTypeMunger>(); declares = new ArrayList<Declare>(); processAttributes(l, pointcuts, false); ReferenceType type = getResolvedTypeX(); AsmManager asmManager = ((BcelWorld) type.getWorld()).getModelAsAsmManager(); l = AtAjAttributes.readAj5ClassAttributes(asmManager, javaClass, type, type.getSourceContext(), msgHandler, isCodeStyleAspect);
339,300
Bug 339300 problem weaving anonymous inner (member owned) classes in scala library
Reported by Ramnivas. Due to the use of numerous $ chars in scala classnames, some of the AspectJ handling of inner classes breaks down. It should be possible to correctly use the available class attributes rather than mess around with attributes. A while back one use did contribute a change to enable scala weaving which tried to use the InnerClasses attribute before falling back on string chopping. However we have now hit another case. In the scenario we are dealing with the class scala.Predef$$anon$3 in the scala library (a 2.9.0-SNAPSHOT version). What we normally do here is in that type we discover the InnerClass attribute and refer to the outerclass index it holds. Unfortunately, due to it being an anonymous inner inside a method, the index is 0. So we fail to process the attribute and with string chopping come up with a stupid guessed name for the outer. The solution is to use the EnclosingMethod attribute in these situations. The EnclosingMethod attribute is an optional attribute. A class must have an EnclosingMethod attribute if and only if it is a local class or an anonymous class. A class may have no more than one EnclosingMethod attribute. The EnclosingMethod attribute includes a pointer to the containing outerclass (that had the method in which encloses this inner type).
resolved fixed
945402f
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-09T01:14:39Z
2011-03-09T00:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
AjAttribute.Aspect deferredAspectAttribute = processAttributes(l, pointcuts, true); if (pointcuts.size() == 0) { this.pointcuts = ResolvedPointcutDefinition.NO_POINTCUTS; } else { this.pointcuts = pointcuts.toArray(new ResolvedPointcutDefinition[pointcuts.size()]); } resolveAnnotationDeclares(l); if (deferredAspectAttribute != null) { perClause = deferredAspectAttribute.reifyFromAtAspectJ(this.getResolvedTypeX()); } if (isAspect() && !Modifier.isAbstract(getModifiers()) && isGeneric()) { msgHandler.handleMessage(MessageUtil.error("The generic aspect '" + getResolvedTypeX().getName() + "' must be declared abstract", getResolvedTypeX().getSourceLocation())); } } private AjAttribute.Aspect processAttributes(List<AjAttribute> attributeList, List<ResolvedPointcutDefinition> pointcuts, boolean fromAnnotations) { AjAttribute.Aspect deferredAspectAttribute = null; for (AjAttribute a : attributeList) { if (a instanceof AjAttribute.Aspect) { if (fromAnnotations) { 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) {
339,300
Bug 339300 problem weaving anonymous inner (member owned) classes in scala library
Reported by Ramnivas. Due to the use of numerous $ chars in scala classnames, some of the AspectJ handling of inner classes breaks down. It should be possible to correctly use the available class attributes rather than mess around with attributes. A while back one use did contribute a change to enable scala weaving which tried to use the InnerClasses attribute before falling back on string chopping. However we have now hit another case. In the scenario we are dealing with the class scala.Predef$$anon$3 in the scala library (a 2.9.0-SNAPSHOT version). What we normally do here is in that type we discover the InnerClass attribute and refer to the outerclass index it holds. Unfortunately, due to it being an anonymous inner inside a method, the index is 0. So we fail to process the attribute and with string chopping come up with a stupid guessed name for the outer. The solution is to use the EnclosingMethod attribute in these situations. The EnclosingMethod attribute is an optional attribute. A class must have an EnclosingMethod attribute if and only if it is a local class or an anonymous class. A class may have no more than one EnclosingMethod attribute. The EnclosingMethod attribute includes a pointer to the containing outerclass (that had the method in which encloses this inner type).
resolved fixed
945402f
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-09T01:14:39Z
2011-03-09T00:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
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) { AjAttribute.PrivilegedAttribute privAttribute = (AjAttribute.PrivilegedAttribute) a; privilegedAccess = privAttribute.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()); setSourcefilename(sca.getSourceFileName()); } } else if (a instanceof AjAttribute.WeaverVersionInfo) { wvInfo = (AjAttribute.WeaverVersionInfo) a; } else { throw new BCException("bad attribute " + a); } } return deferredAspectAttribute; } /** * 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. */ private void resolveAnnotationDeclares(List<AjAttribute> attributeList) { FormalBinding[] bindings = new org.aspectj.weaver.patterns.FormalBinding[0];
339,300
Bug 339300 problem weaving anonymous inner (member owned) classes in scala library
Reported by Ramnivas. Due to the use of numerous $ chars in scala classnames, some of the AspectJ handling of inner classes breaks down. It should be possible to correctly use the available class attributes rather than mess around with attributes. A while back one use did contribute a change to enable scala weaving which tried to use the InnerClasses attribute before falling back on string chopping. However we have now hit another case. In the scenario we are dealing with the class scala.Predef$$anon$3 in the scala library (a 2.9.0-SNAPSHOT version). What we normally do here is in that type we discover the InnerClass attribute and refer to the outerclass index it holds. Unfortunately, due to it being an anonymous inner inside a method, the index is 0. So we fail to process the attribute and with string chopping come up with a stupid guessed name for the outer. The solution is to use the EnclosingMethod attribute in these situations. The EnclosingMethod attribute is an optional attribute. A class must have an EnclosingMethod attribute if and only if it is a local class or an anonymous class. A class may have no more than one EnclosingMethod attribute. The EnclosingMethod attribute includes a pointer to the containing outerclass (that had the method in which encloses this inner type).
resolved fixed
945402f
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-09T01:14:39Z
2011-03-09T00:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
IScope bindingScope = new BindingScope(getResolvedTypeX(), getResolvedTypeX().getSourceContext(), bindings); for (Iterator<AjAttribute> iter = attributeList.iterator(); iter.hasNext();) { AjAttribute a = iter.next(); if (a instanceof AjAttribute.DeclareAttribute) { Declare decl = (((AjAttribute.DeclareAttribute) a).getDeclare()); if (decl instanceof DeclareErrorOrWarning) { decl.resolve(bindingScope); } else if (decl instanceof DeclarePrecedence) { ((DeclarePrecedence) decl).setScopeForResolution(bindingScope); } } } } public PerClause getPerClause() { ensureAspectJAttributesUnpacked(); return perClause; } public JavaClass getJavaClass() { return javaClass; } public boolean isArtificial() { return artificial; } public void resetState() { if (javaClass == null) { throw new BCException("can't weave evicted type"); }
339,300
Bug 339300 problem weaving anonymous inner (member owned) classes in scala library
Reported by Ramnivas. Due to the use of numerous $ chars in scala classnames, some of the AspectJ handling of inner classes breaks down. It should be possible to correctly use the available class attributes rather than mess around with attributes. A while back one use did contribute a change to enable scala weaving which tried to use the InnerClasses attribute before falling back on string chopping. However we have now hit another case. In the scenario we are dealing with the class scala.Predef$$anon$3 in the scala library (a 2.9.0-SNAPSHOT version). What we normally do here is in that type we discover the InnerClass attribute and refer to the outerclass index it holds. Unfortunately, due to it being an anonymous inner inside a method, the index is 0. So we fail to process the attribute and with string chopping come up with a stupid guessed name for the outer. The solution is to use the EnclosingMethod attribute in these situations. The EnclosingMethod attribute is an optional attribute. A class must have an EnclosingMethod attribute if and only if it is a local class or an anonymous class. A class may have no more than one EnclosingMethod attribute. The EnclosingMethod attribute includes a pointer to the containing outerclass (that had the method in which encloses this inner type).
resolved fixed
945402f
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-09T01:14:39Z
2011-03-09T00:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
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(); } public void finishedWith() {
339,300
Bug 339300 problem weaving anonymous inner (member owned) classes in scala library
Reported by Ramnivas. Due to the use of numerous $ chars in scala classnames, some of the AspectJ handling of inner classes breaks down. It should be possible to correctly use the available class attributes rather than mess around with attributes. A while back one use did contribute a change to enable scala weaving which tried to use the InnerClasses attribute before falling back on string chopping. However we have now hit another case. In the scenario we are dealing with the class scala.Predef$$anon$3 in the scala library (a 2.9.0-SNAPSHOT version). What we normally do here is in that type we discover the InnerClass attribute and refer to the outerclass index it holds. Unfortunately, due to it being an anonymous inner inside a method, the index is 0. So we fail to process the attribute and with string chopping come up with a stupid guessed name for the outer. The solution is to use the EnclosingMethod attribute in these situations. The EnclosingMethod attribute is an optional attribute. A class must have an EnclosingMethod attribute if and only if it is a local class or an anonymous class. A class may have no more than one EnclosingMethod attribute. The EnclosingMethod attribute includes a pointer to the containing outerclass (that had the method in which encloses this inner type).
resolved fixed
945402f
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-09T01:14:39Z
2011-03-09T00:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
} 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); if (isAspect()) { lazyClassGen = ret;
339,300
Bug 339300 problem weaving anonymous inner (member owned) classes in scala library
Reported by Ramnivas. Due to the use of numerous $ chars in scala classnames, some of the AspectJ handling of inner classes breaks down. It should be possible to correctly use the available class attributes rather than mess around with attributes. A while back one use did contribute a change to enable scala weaving which tried to use the InnerClasses attribute before falling back on string chopping. However we have now hit another case. In the scenario we are dealing with the class scala.Predef$$anon$3 in the scala library (a 2.9.0-SNAPSHOT version). What we normally do here is in that type we discover the InnerClass attribute and refer to the outerclass index it holds. Unfortunately, due to it being an anonymous inner inside a method, the index is 0. So we fail to process the attribute and with string chopping come up with a stupid guessed name for the outer. The solution is to use the EnclosingMethod attribute in these situations. The EnclosingMethod attribute is an optional attribute. A class must have an EnclosingMethod attribute if and only if it is a local class or an anonymous class. A class may have no more than one EnclosingMethod attribute. The EnclosingMethod attribute includes a pointer to the containing outerclass (that had the method in which encloses this inner type).
resolved fixed
945402f
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-09T01:14:39Z
2011-03-09T00:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
} } return ret; } public boolean isSynthetic() { return getResolvedTypeX().isSynthetic(); } public AjAttribute.WeaverVersionInfo getWeaverVersionAttribute() { return wvInfo; } public ResolvedType[] getAnnotationTypes() { ensureAnnotationsUnpacked(); return annotationTypes; } public AnnotationAJ[] getAnnotations() { ensureAnnotationsUnpacked(); return annotations; } public boolean hasAnnotation(UnresolvedType ofType) { if (isUnpackingAnnotations()) { AnnotationGen annos[] = javaClass.getAnnotations(); if (annos == null || annos.length == 0) { return false; } else { String lookingForSignature = ofType.getSignature(); for (int a = 0; a < annos.length; a++) { AnnotationGen annotation = annos[a];
339,300
Bug 339300 problem weaving anonymous inner (member owned) classes in scala library
Reported by Ramnivas. Due to the use of numerous $ chars in scala classnames, some of the AspectJ handling of inner classes breaks down. It should be possible to correctly use the available class attributes rather than mess around with attributes. A while back one use did contribute a change to enable scala weaving which tried to use the InnerClasses attribute before falling back on string chopping. However we have now hit another case. In the scenario we are dealing with the class scala.Predef$$anon$3 in the scala library (a 2.9.0-SNAPSHOT version). What we normally do here is in that type we discover the InnerClass attribute and refer to the outerclass index it holds. Unfortunately, due to it being an anonymous inner inside a method, the index is 0. So we fail to process the attribute and with string chopping come up with a stupid guessed name for the outer. The solution is to use the EnclosingMethod attribute in these situations. The EnclosingMethod attribute is an optional attribute. A class must have an EnclosingMethod attribute if and only if it is a local class or an anonymous class. A class may have no more than one EnclosingMethod attribute. The EnclosingMethod attribute includes a pointer to the containing outerclass (that had the method in which encloses this inner type).
resolved fixed
945402f
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-09T01:14:39Z
2011-03-09T00:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
if (lookingForSignature.equals(annotation.getTypeSignature())) { return true; } } } return false; } ensureAnnotationsUnpacked(); for (int i = 0, max = annotationTypes.length; i < max; i++) { UnresolvedType ax = annotationTypes[i]; if (ax == null) { throw new RuntimeException("Annotation entry " + i + " on type " + this.getResolvedTypeX().getName() + " is null!"); } if (ax.equals(ofType)) { return true; } } return false; } 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--) { AnnotationAJ ax = annotations[i];
339,300
Bug 339300 problem weaving anonymous inner (member owned) classes in scala library
Reported by Ramnivas. Due to the use of numerous $ chars in scala classnames, some of the AspectJ handling of inner classes breaks down. It should be possible to correctly use the available class attributes rather than mess around with attributes. A while back one use did contribute a change to enable scala weaving which tried to use the InnerClasses attribute before falling back on string chopping. However we have now hit another case. In the scenario we are dealing with the class scala.Predef$$anon$3 in the scala library (a 2.9.0-SNAPSHOT version). What we normally do here is in that type we discover the InnerClass attribute and refer to the outerclass index it holds. Unfortunately, due to it being an anonymous inner inside a method, the index is 0. So we fail to process the attribute and with string chopping come up with a stupid guessed name for the outer. The solution is to use the EnclosingMethod attribute in these situations. The EnclosingMethod attribute is an optional attribute. A class must have an EnclosingMethod attribute if and only if it is a local class or an anonymous class. A class may have no more than one EnclosingMethod attribute. The EnclosingMethod attribute includes a pointer to the containing outerclass (that had the method in which encloses this inner type).
resolved fixed
945402f
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-09T01:14:39Z
2011-03-09T00:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
if (ax.getTypeName().equals(UnresolvedType.AT_RETENTION.getName())) { List<NameValuePair> values = ((BcelAnnotation) ax).getBcelAnnotation().getValues(); for (Iterator<NameValuePair> it = values.iterator(); it.hasNext();) { NameValuePair element = it.next(); EnumElementValue v = (EnumElementValue) element.getValue(); retentionPolicy = v.getEnumValueString(); 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; }
339,300
Bug 339300 problem weaving anonymous inner (member owned) classes in scala library
Reported by Ramnivas. Due to the use of numerous $ chars in scala classnames, some of the AspectJ handling of inner classes breaks down. It should be possible to correctly use the available class attributes rather than mess around with attributes. A while back one use did contribute a change to enable scala weaving which tried to use the InnerClasses attribute before falling back on string chopping. However we have now hit another case. In the scenario we are dealing with the class scala.Predef$$anon$3 in the scala library (a 2.9.0-SNAPSHOT version). What we normally do here is in that type we discover the InnerClass attribute and refer to the outerclass index it holds. Unfortunately, due to it being an anonymous inner inside a method, the index is 0. So we fail to process the attribute and with string chopping come up with a stupid guessed name for the outer. The solution is to use the EnclosingMethod attribute in these situations. The EnclosingMethod attribute is an optional attribute. A class must have an EnclosingMethod attribute if and only if it is a local class or an anonymous class. A class may have no more than one EnclosingMethod attribute. The EnclosingMethod attribute includes a pointer to the containing outerclass (that had the method in which encloses this inner type).
resolved fixed
945402f
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-09T01:14:39Z
2011-03-09T00:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
bitflag |= DISCOVERED_ANNOTATION_TARGET_KINDS; annotationTargetKinds = null; List<AnnotationTargetKind> targetKinds = new ArrayList<AnnotationTargetKind>(); if (isAnnotation()) { AnnotationAJ[] annotationsOnThisType = getAnnotations(); for (int i = 0; i < annotationsOnThisType.length; i++) { AnnotationAJ a = annotationsOnThisType[i]; if (a.getTypeName().equals(UnresolvedType.AT_TARGET.getName())) { Set<String> targets = a.getTargets(); if (targets != null) { for (String targetKind : targets) { 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); } }
339,300
Bug 339300 problem weaving anonymous inner (member owned) classes in scala library
Reported by Ramnivas. Due to the use of numerous $ chars in scala classnames, some of the AspectJ handling of inner classes breaks down. It should be possible to correctly use the available class attributes rather than mess around with attributes. A while back one use did contribute a change to enable scala weaving which tried to use the InnerClasses attribute before falling back on string chopping. However we have now hit another case. In the scenario we are dealing with the class scala.Predef$$anon$3 in the scala library (a 2.9.0-SNAPSHOT version). What we normally do here is in that type we discover the InnerClass attribute and refer to the outerclass index it holds. Unfortunately, due to it being an anonymous inner inside a method, the index is 0. So we fail to process the attribute and with string chopping come up with a stupid guessed name for the outer. The solution is to use the EnclosingMethod attribute in these situations. The EnclosingMethod attribute is an optional attribute. A class must have an EnclosingMethod attribute if and only if it is a local class or an anonymous class. A class may have no more than one EnclosingMethod attribute. The EnclosingMethod attribute includes a pointer to the containing outerclass (that had the method in which encloses this inner type).
resolved fixed
945402f
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-09T01:14:39Z
2011-03-09T00:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
} } } if (!targetKinds.isEmpty()) { annotationTargetKinds = new AnnotationTargetKind[targetKinds.size()]; return targetKinds.toArray(annotationTargetKinds); } } return annotationTargetKinds; } private boolean isUnpackingAnnotations() { return (bitflag & ANNOTATION_UNPACK_IN_PROGRESS) != 0; } private void ensureAnnotationsUnpacked() { if (isUnpackingAnnotations()) { throw new BCException("Re-entered weaver instance whilst unpacking annotations on " + this.className); } if (annotationTypes == null) { try { bitflag |= ANNOTATION_UNPACK_IN_PROGRESS; AnnotationGen annos[] = javaClass.getAnnotations(); if (annos == null || annos.length == 0) { annotationTypes = ResolvedType.NONE; annotations = AnnotationAJ.EMPTY_ARRAY; } else { World w = getResolvedTypeX().getWorld(); annotationTypes = new ResolvedType[annos.length]; annotations = new AnnotationAJ[annos.length]; for (int i = 0; i < annos.length; i++) {
339,300
Bug 339300 problem weaving anonymous inner (member owned) classes in scala library
Reported by Ramnivas. Due to the use of numerous $ chars in scala classnames, some of the AspectJ handling of inner classes breaks down. It should be possible to correctly use the available class attributes rather than mess around with attributes. A while back one use did contribute a change to enable scala weaving which tried to use the InnerClasses attribute before falling back on string chopping. However we have now hit another case. In the scenario we are dealing with the class scala.Predef$$anon$3 in the scala library (a 2.9.0-SNAPSHOT version). What we normally do here is in that type we discover the InnerClass attribute and refer to the outerclass index it holds. Unfortunately, due to it being an anonymous inner inside a method, the index is 0. So we fail to process the attribute and with string chopping come up with a stupid guessed name for the outer. The solution is to use the EnclosingMethod attribute in these situations. The EnclosingMethod attribute is an optional attribute. A class must have an EnclosingMethod attribute if and only if it is a local class or an anonymous class. A class may have no more than one EnclosingMethod attribute. The EnclosingMethod attribute includes a pointer to the containing outerclass (that had the method in which encloses this inner type).
resolved fixed
945402f
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-09T01:14:39Z
2011-03-09T00:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
AnnotationGen annotation = annos[i]; String typeSignature = annotation.getTypeSignature(); ResolvedType rType = w.resolve(UnresolvedType.forSignature(typeSignature)); if (rType == null) { throw new RuntimeException("Whilst unpacking annotations on '" + getResolvedTypeX().getName() + "', failed to resolve type '" + typeSignature + "'"); } annotationTypes[i] = rType; annotations[i] = new BcelAnnotation(annotation, rType); } } } finally { bitflag &= ~ANNOTATION_UNPACK_IN_PROGRESS; } } } public String getDeclaredGenericSignature() { ensureGenericInfoProcessed(); return declaredSignature; } private void ensureGenericSignatureUnpacked() { if ((bitflag & UNPACKED_GENERIC_SIGNATURE) != 0) { return; } bitflag |= UNPACKED_GENERIC_SIGNATURE; if (!getResolvedTypeX().getWorld().isInJava5Mode()) { return; } GenericSignature.ClassSignature cSig = getGenericClassTypeSignature();
339,300
Bug 339300 problem weaving anonymous inner (member owned) classes in scala library
Reported by Ramnivas. Due to the use of numerous $ chars in scala classnames, some of the AspectJ handling of inner classes breaks down. It should be possible to correctly use the available class attributes rather than mess around with attributes. A while back one use did contribute a change to enable scala weaving which tried to use the InnerClasses attribute before falling back on string chopping. However we have now hit another case. In the scenario we are dealing with the class scala.Predef$$anon$3 in the scala library (a 2.9.0-SNAPSHOT version). What we normally do here is in that type we discover the InnerClass attribute and refer to the outerclass index it holds. Unfortunately, due to it being an anonymous inner inside a method, the index is 0. So we fail to process the attribute and with string chopping come up with a stupid guessed name for the outer. The solution is to use the EnclosingMethod attribute in these situations. The EnclosingMethod attribute is an optional attribute. A class must have an EnclosingMethod attribute if and only if it is a local class or an anonymous class. A class may have no more than one EnclosingMethod attribute. The EnclosingMethod attribute includes a pointer to the containing outerclass (that had the method in which encloses this inner type).
resolved fixed
945402f
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-09T01:14:39Z
2011-03-09T00:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
if (cSig != null) { formalsForResolution = cSig.formalTypeParameters; if (isNested()) { GenericSignature.FormalTypeParameter[] extraFormals = getFormalTypeParametersFromOuterClass(); if (extraFormals.length > 0) { List<FormalTypeParameter> allFormals = new ArrayList<FormalTypeParameter>(); 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 GenericSignature.FormalTypeParameter[allFormals.size()]; allFormals.toArray(formalsForResolution); } } GenericSignature.ClassTypeSignature superSig = cSig.superclassSignature; try { ResolvedType rt = BcelGenericSignatureToTypeXConverter.classTypeSignature2TypeX(superSig, formalsForResolution, getResolvedTypeX().getWorld()); this.superclassSignature = rt.getSignature(); this.superclassName = rt.getName(); } catch (GenericSignatureFormatException e) {
339,300
Bug 339300 problem weaving anonymous inner (member owned) classes in scala library
Reported by Ramnivas. Due to the use of numerous $ chars in scala classnames, some of the AspectJ handling of inner classes breaks down. It should be possible to correctly use the available class attributes rather than mess around with attributes. A while back one use did contribute a change to enable scala weaving which tried to use the InnerClasses attribute before falling back on string chopping. However we have now hit another case. In the scenario we are dealing with the class scala.Predef$$anon$3 in the scala library (a 2.9.0-SNAPSHOT version). What we normally do here is in that type we discover the InnerClass attribute and refer to the outerclass index it holds. Unfortunately, due to it being an anonymous inner inside a method, the index is 0. So we fail to process the attribute and with string chopping come up with a stupid guessed name for the outer. The solution is to use the EnclosingMethod attribute in these situations. The EnclosingMethod attribute is an optional attribute. A class must have an EnclosingMethod attribute if and only if it is a local class or an anonymous class. A class may have no more than one EnclosingMethod attribute. The EnclosingMethod attribute includes a pointer to the containing outerclass (that had the method in which encloses this inner type).
resolved fixed
945402f
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-09T01:14:39Z
2011-03-09T00:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
throw new IllegalStateException("While determining the generic superclass of " + this.className + " with generic signature " + getDeclaredGenericSignature() + " the following error was detected: " + e.getMessage()); } if (cSig.superInterfaceSignatures.length == 0) { this.interfaceSignatures = NO_INTERFACE_SIGS; } else { 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()); } } } }
339,300
Bug 339300 problem weaving anonymous inner (member owned) classes in scala library
Reported by Ramnivas. Due to the use of numerous $ chars in scala classnames, some of the AspectJ handling of inner classes breaks down. It should be possible to correctly use the available class attributes rather than mess around with attributes. A while back one use did contribute a change to enable scala weaving which tried to use the InnerClasses attribute before falling back on string chopping. However we have now hit another case. In the scenario we are dealing with the class scala.Predef$$anon$3 in the scala library (a 2.9.0-SNAPSHOT version). What we normally do here is in that type we discover the InnerClass attribute and refer to the outerclass index it holds. Unfortunately, due to it being an anonymous inner inside a method, the index is 0. So we fail to process the attribute and with string chopping come up with a stupid guessed name for the outer. The solution is to use the EnclosingMethod attribute in these situations. The EnclosingMethod attribute is an optional attribute. A class must have an EnclosingMethod attribute if and only if it is a local class or an anonymous class. A class may have no more than one EnclosingMethod attribute. The EnclosingMethod attribute includes a pointer to the containing outerclass (that had the method in which encloses this inner type).
resolved fixed
945402f
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-09T01:14:39Z
2011-03-09T00:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
if (isGeneric()) { ReferenceType genericType = (ReferenceType) this.resolvedTypeX.getGenericType(); if (genericType != null) { genericType.setStartPos(this.resolvedTypeX.getStartPos()); this.resolvedTypeX = genericType; } } } public GenericSignature.FormalTypeParameter[] getAllFormals() { ensureGenericSignatureUnpacked(); if (formalsForResolution == null) { return new GenericSignature.FormalTypeParameter[0]; } else { return formalsForResolution; } } public ResolvedType getOuterClass() { if (!isNested()) { throw new IllegalStateException("Can't get the outer class of a non-nested type"); } for (Attribute attr : javaClass.getAttributes()) { if (attr instanceof InnerClasses) { InnerClass[] innerClss = ((InnerClasses) attr).getInnerClasses(); ConstantPool cpool = javaClass.getConstantPool();
339,300
Bug 339300 problem weaving anonymous inner (member owned) classes in scala library
Reported by Ramnivas. Due to the use of numerous $ chars in scala classnames, some of the AspectJ handling of inner classes breaks down. It should be possible to correctly use the available class attributes rather than mess around with attributes. A while back one use did contribute a change to enable scala weaving which tried to use the InnerClasses attribute before falling back on string chopping. However we have now hit another case. In the scenario we are dealing with the class scala.Predef$$anon$3 in the scala library (a 2.9.0-SNAPSHOT version). What we normally do here is in that type we discover the InnerClass attribute and refer to the outerclass index it holds. Unfortunately, due to it being an anonymous inner inside a method, the index is 0. So we fail to process the attribute and with string chopping come up with a stupid guessed name for the outer. The solution is to use the EnclosingMethod attribute in these situations. The EnclosingMethod attribute is an optional attribute. A class must have an EnclosingMethod attribute if and only if it is a local class or an anonymous class. A class may have no more than one EnclosingMethod attribute. The EnclosingMethod attribute includes a pointer to the containing outerclass (that had the method in which encloses this inner type).
resolved fixed
945402f
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-09T01:14:39Z
2011-03-09T00:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
for (InnerClass innerCls : innerClss) { if (innerCls.getInnerClassIndex() == 0 || innerCls.getOuterClassIndex() == 0) { continue; } ConstantClass innerClsInfo = (ConstantClass) cpool.getConstant(innerCls.getInnerClassIndex()); String innerClsName = cpool.getConstantUtf8(innerClsInfo.getNameIndex()).getValue().replace('/', '.'); if (innerClsName.compareTo(className) == 0) { ConstantClass outerClsInfo = (ConstantClass) cpool.getConstant(innerCls.getOuterClassIndex()); String outerClsName = cpool.getConstantUtf8(outerClsInfo.getNameIndex()).getValue().replace('/', '.'); UnresolvedType outer = UnresolvedType.forName(outerClsName); return outer.resolve(getResolvedTypeX().getWorld()); } } } } int lastDollar = className.lastIndexOf('$'); String superClassName = className.substring(0, lastDollar); UnresolvedType outer = UnresolvedType.forName(superClassName); return outer.resolve(getResolvedTypeX().getWorld()); } private void ensureGenericInfoProcessed() { if ((bitflag & DISCOVERED_DECLARED_SIGNATURE) != 0) { return; }
339,300
Bug 339300 problem weaving anonymous inner (member owned) classes in scala library
Reported by Ramnivas. Due to the use of numerous $ chars in scala classnames, some of the AspectJ handling of inner classes breaks down. It should be possible to correctly use the available class attributes rather than mess around with attributes. A while back one use did contribute a change to enable scala weaving which tried to use the InnerClasses attribute before falling back on string chopping. However we have now hit another case. In the scenario we are dealing with the class scala.Predef$$anon$3 in the scala library (a 2.9.0-SNAPSHOT version). What we normally do here is in that type we discover the InnerClass attribute and refer to the outerclass index it holds. Unfortunately, due to it being an anonymous inner inside a method, the index is 0. So we fail to process the attribute and with string chopping come up with a stupid guessed name for the outer. The solution is to use the EnclosingMethod attribute in these situations. The EnclosingMethod attribute is an optional attribute. A class must have an EnclosingMethod attribute if and only if it is a local class or an anonymous class. A class may have no more than one EnclosingMethod attribute. The EnclosingMethod attribute includes a pointer to the containing outerclass (that had the method in which encloses this inner type).
resolved fixed
945402f
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-09T01:14:39Z
2011-03-09T00:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
bitflag |= DISCOVERED_DECLARED_SIGNATURE; Signature sigAttr = AttributeUtils.getSignatureAttribute(javaClass.getAttributes()); declaredSignature = (sigAttr == null ? null : sigAttr.getSignature()); if (declaredSignature != null) { isGenericType = (declaredSignature.charAt(0) == '<'); } } public boolean isGeneric() { ensureGenericInfoProcessed(); return isGenericType; } @Override 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();
339,300
Bug 339300 problem weaving anonymous inner (member owned) classes in scala library
Reported by Ramnivas. Due to the use of numerous $ chars in scala classnames, some of the AspectJ handling of inner classes breaks down. It should be possible to correctly use the available class attributes rather than mess around with attributes. A while back one use did contribute a change to enable scala weaving which tried to use the InnerClasses attribute before falling back on string chopping. However we have now hit another case. In the scenario we are dealing with the class scala.Predef$$anon$3 in the scala library (a 2.9.0-SNAPSHOT version). What we normally do here is in that type we discover the InnerClass attribute and refer to the outerclass index it holds. Unfortunately, due to it being an anonymous inner inside a method, the index is 0. So we fail to process the attribute and with string chopping come up with a stupid guessed name for the outer. The solution is to use the EnclosingMethod attribute in these situations. The EnclosingMethod attribute is an optional attribute. A class must have an EnclosingMethod attribute if and only if it is a local class or an anonymous class. A class may have no more than one EnclosingMethod attribute. The EnclosingMethod attribute includes a pointer to the containing outerclass (that had the method in which encloses this inner type).
resolved fixed
945402f
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-09T01:14:39Z
2011-03-09T00:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
if (getResolvedTypeX().getWorld().isXnoInline()) { lazyClassGen = null; } 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; this.artificial = true; } } public void weavingCompleted() { hasBeenWoven = true;
339,300
Bug 339300 problem weaving anonymous inner (member owned) classes in scala library
Reported by Ramnivas. Due to the use of numerous $ chars in scala classnames, some of the AspectJ handling of inner classes breaks down. It should be possible to correctly use the available class attributes rather than mess around with attributes. A while back one use did contribute a change to enable scala weaving which tried to use the InnerClasses attribute before falling back on string chopping. However we have now hit another case. In the scenario we are dealing with the class scala.Predef$$anon$3 in the scala library (a 2.9.0-SNAPSHOT version). What we normally do here is in that type we discover the InnerClass attribute and refer to the outerclass index it holds. Unfortunately, due to it being an anonymous inner inside a method, the index is 0. So we fail to process the attribute and with string chopping come up with a stupid guessed name for the outer. The solution is to use the EnclosingMethod attribute in these situations. The EnclosingMethod attribute is an optional attribute. A class must have an EnclosingMethod attribute if and only if it is a local class or an anonymous class. A class may have no more than one EnclosingMethod attribute. The EnclosingMethod attribute includes a pointer to the containing outerclass (that had the method in which encloses this inner type).
resolved fixed
945402f
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-09T01:14:39Z
2011-03-09T00:20:00Z
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java
if (getResolvedTypeX().getWorld().isRunMinimalMemory()) { evictWeavingState(); } if (getSourceContext() != null && !getResolvedTypeX().isAspect()) { getSourceContext().tidy(); } } public boolean hasBeenWoven() { return hasBeenWoven; } @Override public boolean copySourceContext() { return false; } public void setExposedToWeaver(boolean b) { exposedToWeaver = b; } @Override public int getCompilerVersion() { return wvInfo.getMajorVersion(); } public void ensureConsistent() { superTypeReference.clear(); superInterfaceReferences.clear(); } public boolean isWeavable() { return true; } }
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.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 * Alexandre Vasseur @AspectJ ITDs * ******************************************************************/
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
package org.aspectj.weaver.bcel; import java.lang.reflect.Modifier; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; import org.aspectj.apache.bcel.Constants; import org.aspectj.apache.bcel.classfile.ConstantPool; import org.aspectj.apache.bcel.classfile.Signature; import org.aspectj.apache.bcel.classfile.annotation.AnnotationGen; import org.aspectj.apache.bcel.generic.FieldGen; import org.aspectj.apache.bcel.generic.InstructionBranch; import org.aspectj.apache.bcel.generic.InstructionConstants; import org.aspectj.apache.bcel.generic.InstructionFactory; import org.aspectj.apache.bcel.generic.InstructionHandle; import org.aspectj.apache.bcel.generic.InstructionList; import org.aspectj.apache.bcel.generic.InvokeInstruction; import org.aspectj.apache.bcel.generic.Type; import org.aspectj.asm.AsmManager; import org.aspectj.asm.IProgramElement; import org.aspectj.bridge.IMessage; import org.aspectj.bridge.ISourceLocation; import org.aspectj.bridge.Message; import org.aspectj.bridge.MessageUtil; import org.aspectj.bridge.WeaveMessage; import org.aspectj.bridge.context.CompilationAndWeavingContext; import org.aspectj.bridge.context.ContextToken;
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
import org.aspectj.weaver.AjcMemberMaker; import org.aspectj.weaver.AnnotationAJ; import org.aspectj.weaver.AnnotationOnTypeMunger; import org.aspectj.weaver.BCException; import org.aspectj.weaver.ConcreteTypeMunger; import org.aspectj.weaver.Member; import org.aspectj.weaver.MemberUtils; import org.aspectj.weaver.MethodDelegateTypeMunger; import org.aspectj.weaver.NameMangler; import org.aspectj.weaver.NewConstructorTypeMunger; import org.aspectj.weaver.NewFieldTypeMunger; import org.aspectj.weaver.NewMemberClassTypeMunger; import org.aspectj.weaver.NewMethodTypeMunger; import org.aspectj.weaver.NewParentTypeMunger; import org.aspectj.weaver.PerObjectInterfaceTypeMunger; import org.aspectj.weaver.PrivilegedAccessMunger; import org.aspectj.weaver.ResolvedMember; import org.aspectj.weaver.ResolvedMemberImpl; import org.aspectj.weaver.ResolvedType; import org.aspectj.weaver.ResolvedTypeMunger; import org.aspectj.weaver.Shadow; import org.aspectj.weaver.TypeVariableReference; import org.aspectj.weaver.UnresolvedType; import org.aspectj.weaver.WeaverMessages; import org.aspectj.weaver.WeaverStateInfo; import org.aspectj.weaver.World; import org.aspectj.weaver.model.AsmRelationshipProvider; import org.aspectj.weaver.patterns.DeclareAnnotation; import org.aspectj.weaver.patterns.Pointcut; public class BcelTypeMunger extends ConcreteTypeMunger {
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
public BcelTypeMunger(ResolvedTypeMunger munger, ResolvedType aspectType) { super(munger, aspectType); } @Override public String toString() { return "(BcelTypeMunger " + getMunger() + ")"; } @Override public boolean shouldOverwrite() { return false; } public boolean munge(BcelClassWeaver weaver) { ContextToken tok = CompilationAndWeavingContext.enteringPhase(CompilationAndWeavingContext.MUNGING_WITH, this); boolean changed = false; boolean worthReporting = true; if (weaver.getWorld().isOverWeaving()) { WeaverStateInfo typeWeaverState = weaver.getLazyClassGen().getType().getWeaverState(); if (typeWeaverState != null && typeWeaverState.isAspectAlreadyApplied(getAspectType())) { return false;
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
} } if (munger.getKind() == ResolvedTypeMunger.Field) { changed = mungeNewField(weaver, (NewFieldTypeMunger) munger); } else if (munger.getKind() == ResolvedTypeMunger.Method) { changed = mungeNewMethod(weaver, (NewMethodTypeMunger) munger); } else if (munger.getKind() == ResolvedTypeMunger.InnerClass) { changed = mungeNewMemberType(weaver, (NewMemberClassTypeMunger) munger); } else if (munger.getKind() == ResolvedTypeMunger.MethodDelegate2) { changed = mungeMethodDelegate(weaver, (MethodDelegateTypeMunger) munger); } else if (munger.getKind() == ResolvedTypeMunger.FieldHost) { changed = mungeFieldHost(weaver, (MethodDelegateTypeMunger.FieldHostTypeMunger) munger); } else if (munger.getKind() == ResolvedTypeMunger.PerObjectInterface) { changed = mungePerObjectInterface(weaver, (PerObjectInterfaceTypeMunger) munger); worthReporting = false; } else if (munger.getKind() == ResolvedTypeMunger.PerTypeWithinInterface) { changed = mungePerTypeWithinTransformer(weaver); worthReporting = false; } else if (munger.getKind() == ResolvedTypeMunger.PrivilegedAccess) { changed = mungePrivilegedAccess(weaver, (PrivilegedAccessMunger) munger); worthReporting = false; } else if (munger.getKind() == ResolvedTypeMunger.Constructor) { changed = mungeNewConstructor(weaver, (NewConstructorTypeMunger) munger); } else if (munger.getKind() == ResolvedTypeMunger.Parent) { changed = mungeNewParent(weaver, (NewParentTypeMunger) munger); } else if (munger.getKind() == ResolvedTypeMunger.AnnotationOnType) { changed = mungeNewAnnotationOnType(weaver, (AnnotationOnTypeMunger) munger); worthReporting = false; } else {
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
throw new RuntimeException("unimplemented"); } if (changed && munger.changesPublicSignature()) { WeaverStateInfo info = weaver.getLazyClassGen().getOrCreateWeaverStateInfo(weaver.getReweavableMode()); info.addConcreteMunger(this); } if (changed && worthReporting) { ResolvedType declaringAspect = null; AsmManager model = ((BcelWorld) getWorld()).getModelAsAsmManager(); if (model != null) { if (munger instanceof NewParentTypeMunger) { NewParentTypeMunger nptMunger = (NewParentTypeMunger) munger; declaringAspect = nptMunger.getDeclaringType(); if (declaringAspect.isParameterizedOrGenericType()) { declaringAspect = declaringAspect.getRawType(); } ResolvedType thisAspect = getAspectType(); AsmRelationshipProvider.addRelationship(model, weaver.getLazyClassGen().getType(), munger, thisAspect); if (!thisAspect.equals(declaringAspect)) { ResolvedType target = weaver.getLazyClassGen().getType(); ResolvedType newParent = nptMunger.getNewParent(); IProgramElement thisAspectNode = model.getHierarchy().findElementForType(thisAspect.getPackageName(), thisAspect.getClassName()); Map<String, List<String>> declareParentsMap = thisAspectNode.getDeclareParentsMap(); if (declareParentsMap == null) { declareParentsMap = new HashMap<String, List<String>>(); thisAspectNode.setDeclareParentsMap(declareParentsMap);
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
} String tname = target.getName(); String pname = newParent.getName(); List<String> newparents = declareParentsMap.get(tname); if (newparents == null) { newparents = new ArrayList<String>(); declareParentsMap.put(tname, newparents); } newparents.add(pname); AsmRelationshipProvider.addRelationship(model, weaver.getLazyClassGen().getType(), munger, declaringAspect); } } else { declaringAspect = getAspectType(); AsmRelationshipProvider.addRelationship(model, weaver.getLazyClassGen().getType(), munger, declaringAspect); } } } if (changed && worthReporting && munger != null && !weaver.getWorld().getMessageHandler().isIgnoring(IMessage.WEAVEINFO)) { String tName = weaver.getLazyClassGen().getType().getSourceLocation().getSourceFile().getName(); if (tName.indexOf("no debug info available") != -1) { tName = "no debug info available"; } else { tName = getShortname(weaver.getLazyClassGen().getType().getSourceLocation().getSourceFile().getPath()); } String fName = getShortname(getAspectType().getSourceLocation().getSourceFile().getPath()); if (munger.getKind().equals(ResolvedTypeMunger.Parent)) { NewParentTypeMunger parentTM = (NewParentTypeMunger) munger;
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
if (parentTM.isMixin()) { weaver.getWorld() .getMessageHandler() .handleMessage( WeaveMessage.constructWeavingMessage(WeaveMessage.WEAVEMESSAGE_MIXIN, new String[] { parentTM.getNewParent().getName(), fName, weaver.getLazyClassGen().getType().getName(), tName }, weaver.getLazyClassGen().getClassName(), getAspectType().getName())); } else { if (parentTM.getNewParent().isInterface()) { weaver.getWorld() .getMessageHandler() .handleMessage( WeaveMessage.constructWeavingMessage(WeaveMessage.WEAVEMESSAGE_DECLAREPARENTSIMPLEMENTS, new String[] { weaver.getLazyClassGen().getType().getName(), tName, parentTM.getNewParent().getName(), fName }, weaver.getLazyClassGen() .getClassName(), getAspectType().getName())); } else { weaver.getWorld() .getMessageHandler() .handleMessage( WeaveMessage.constructWeavingMessage(WeaveMessage.WEAVEMESSAGE_DECLAREPARENTSEXTENDS, new String[] { weaver.getLazyClassGen().getType().getName(), tName, parentTM.getNewParent().getName(), fName })); } } } else if (munger.getKind().equals(ResolvedTypeMunger.FieldHost)) {
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
} else { ResolvedMember declaredSig = munger.getSignature(); String fromString = fName + ":'" + declaredSig + "'"; String kindString = munger.getKind().toString().toLowerCase(); if (kindString.equals("innerclass")) { kindString = "member class"; fromString = fName; } weaver.getWorld() .getMessageHandler() .handleMessage( WeaveMessage.constructWeavingMessage(WeaveMessage.WEAVEMESSAGE_ITD, new String[] { weaver.getLazyClassGen().getType().getName(), tName, kindString, getAspectType().getName(), fromString }, weaver.getLazyClassGen().getClassName(), getAspectType().getName())); } } CompilationAndWeavingContext.leavingPhase(tok); return changed; } private String getShortname(String path) { int takefrom = path.lastIndexOf('/'); if (takefrom == -1) { takefrom = path.lastIndexOf('\\'); } return path.substring(takefrom + 1); } private boolean mungeNewAnnotationOnType(BcelClassWeaver weaver, AnnotationOnTypeMunger munger) {
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
weaver.getLazyClassGen().addAnnotation(((BcelAnnotation) munger.getNewAnnotation()).getBcelAnnotation()); return true; } /** * For a long time, AspectJ did not allow binary weaving of declare parents. This restriction is now lifted but could do with * more testing! */ private boolean mungeNewParent(BcelClassWeaver weaver, NewParentTypeMunger typeTransformer) { LazyClassGen newParentTarget = weaver.getLazyClassGen(); ResolvedType newParent = typeTransformer.getNewParent(); boolean performChange = true; performChange = enforceDecpRule1_abstractMethodsImplemented(weaver, typeTransformer.getSourceLocation(), newParentTarget, newParent); performChange = enforceDecpRule2_cantExtendFinalClass(weaver, typeTransformer.getSourceLocation(), newParentTarget, newParent) && performChange; List<ResolvedMember> methods = newParent.getMethodsWithoutIterator(false, true, false); for (ResolvedMember method : methods) { if (!method.getName().equals("<init>")) { LazyMethodGen subMethod = findMatchingMethod(newParentTarget, method); if (subMethod != null && !subMethod.isBridgeMethod()) { if (!(subMethod.isSynthetic() && method.isSynthetic())) { if (!(subMethod.isStatic() && subMethod.getName().startsWith("access$"))) { performChange = enforceDecpRule3_visibilityChanges(weaver, newParent, method, subMethod) && performChange; performChange = enforceDecpRule4_compatibleReturnTypes(weaver, method, subMethod) && performChange; performChange = enforceDecpRule5_cantChangeFromStaticToNonstatic(weaver, typeTransformer.getSourceLocation(), method, subMethod) && performChange;
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
} } } } } if (!performChange) { return false; } if (newParent.isClass()) { if (!attemptToModifySuperCalls(weaver, newParentTarget, newParent)) { return false; } newParentTarget.setSuperClass(newParent); } else { newParentTarget.addInterface(newParent, getSourceLocation()); } return true; } /** * Rule 1: For the declare parents to be allowed, the target type must override and implement inherited abstract methods (if the * type is not declared abstract) */ private boolean enforceDecpRule1_abstractMethodsImplemented(BcelClassWeaver weaver, ISourceLocation mungerLoc, LazyClassGen newParentTarget, ResolvedType newParent) { if (newParentTarget.isAbstract() || newParentTarget.isInterface()) { return true;
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
} boolean ruleCheckingSucceeded = true; List<ResolvedMember> newParentMethods = newParent.getMethodsWithoutIterator(false, true, false); for (ResolvedMember newParentMethod : newParentMethods) { String newParentMethodName = newParentMethod.getName(); if (newParentMethod.isAbstract() && !newParentMethodName.startsWith("ajc$interField")) { ResolvedMember discoveredImpl = null; List<ResolvedMember> targetMethods = newParentTarget.getType().getMethodsWithoutIterator(false, true, false); for (ResolvedMember targetMethod : targetMethods) { if (!targetMethod.isAbstract() && targetMethod.getName().equals(newParentMethodName)) { String newParentMethodSig = newParentMethod.getParameterSignature(); String targetMethodSignature = targetMethod.getParameterSignature(); if (targetMethodSignature.equals(newParentMethodSig)) { discoveredImpl = targetMethod; } else { if (targetMethod.hasBackingGenericMember() && targetMethod.getBackingGenericMember().getParameterSignature().equals(newParentMethodSig)) { discoveredImpl = targetMethod; } else if (newParentMethod.hasBackingGenericMember()) { if (newParentMethod.getBackingGenericMember().getParameterSignature().equals(targetMethodSignature)) { discoveredImpl = targetMethod; } } } if (discoveredImpl != null) { break;
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
} } } if (discoveredImpl == null) { boolean satisfiedByITD = false; for (ConcreteTypeMunger m : newParentTarget.getType().getInterTypeMungersIncludingSupers()) { if (m.getMunger() != null && m.getMunger().getKind() == ResolvedTypeMunger.Method) { ResolvedMember sig = m.getSignature(); if (!Modifier.isAbstract(sig.getModifiers())) { if (m.isTargetTypeParameterized()) { ResolvedType genericOnType = getWorld().resolve(sig.getDeclaringType()).getGenericType(); m = m.parameterizedFor(newParent.discoverActualOccurrenceOfTypeInHierarchy(genericOnType)); sig = m.getSignature(); } if (ResolvedType.matches( AjcMemberMaker.interMethod(sig, m.getAspectType(), sig.getDeclaringType().resolve(weaver.getWorld()).isInterface()), newParentMethod)) { satisfiedByITD = true; } } } else if (m.getMunger() != null && m.getMunger().getKind() == ResolvedTypeMunger.MethodDelegate2) { satisfiedByITD = true; } }
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
if (!satisfiedByITD) { error(weaver, "The type " + newParentTarget.getName() + " must implement the inherited abstract method " + newParentMethod.getDeclaringType() + "." + newParentMethodName + newParentMethod.getParameterSignature(), newParentTarget.getType().getSourceLocation(), new ISourceLocation[] { newParentMethod.getSourceLocation(), mungerLoc }); ruleCheckingSucceeded = false; } } } } return ruleCheckingSucceeded; } /** * Rule 2. Can't extend final types */ private boolean enforceDecpRule2_cantExtendFinalClass(BcelClassWeaver weaver, ISourceLocation transformerLoc, LazyClassGen targetType, ResolvedType newParent) { if (newParent.isFinal()) { error(weaver, "Cannot make type " + targetType.getName() + " extend final class " + newParent.getName(), targetType .getType().getSourceLocation(), new ISourceLocation[] { transformerLoc }); return false; } return true; } /** * Rule 3. Can't narrow visibility of methods when overriding */ private boolean enforceDecpRule3_visibilityChanges(BcelClassWeaver weaver, ResolvedType newParent, ResolvedMember superMethod, LazyMethodGen subMethod) {
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
boolean cont = true; if (Modifier.isPublic(superMethod.getModifiers())) { if (subMethod.isProtected() || subMethod.isDefault() || subMethod.isPrivate()) { weaver.getWorld() .getMessageHandler() .handleMessage( MessageUtil.error("Cannot reduce the visibility of the inherited method '" + superMethod + "' from " + newParent.getName(), superMethod.getSourceLocation())); cont = false; } } else if (Modifier.isProtected(superMethod.getModifiers())) { if (subMethod.isDefault() || subMethod.isPrivate()) { weaver.getWorld() .getMessageHandler() .handleMessage( MessageUtil.error("Cannot reduce the visibility of the inherited method '" + superMethod + "' from " + newParent.getName(), superMethod.getSourceLocation())); cont = false; } } else if (superMethod.isDefault()) { if (subMethod.isPrivate()) { weaver.getWorld() .getMessageHandler() .handleMessage( MessageUtil.error("Cannot reduce the visibility of the inherited method '" + superMethod + "' from " + newParent.getName(), superMethod.getSourceLocation())); cont = false; } } return cont;
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
} /** * Rule 4. Can't have incompatible return types */ private boolean enforceDecpRule4_compatibleReturnTypes(BcelClassWeaver weaver, ResolvedMember superMethod, LazyMethodGen subMethod) { boolean cont = true; String superReturnTypeSig = superMethod.getGenericReturnType().getSignature(); String subReturnTypeSig = subMethod.getGenericReturnTypeSignature(); superReturnTypeSig = superReturnTypeSig.replace('.', '/'); subReturnTypeSig = subReturnTypeSig.replace('.', '/'); if (!superReturnTypeSig.equals(subReturnTypeSig)) { ResolvedType subType = weaver.getWorld().resolve(subMethod.getReturnType()); ResolvedType superType = weaver.getWorld().resolve(superMethod.getReturnType()); if (!superType.isAssignableFrom(subType)) { weaver.getWorld() .getMessageHandler() .handleMessage( MessageUtil.error("The return type is incompatible with " + superMethod.getDeclaringType() + "." + superMethod.getName() + superMethod.getParameterSignature(), subMethod.getSourceLocation())); cont = false; }
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
} return cont; } /** * Rule5. Method overrides can't change the staticality (word?) - you can't override and make an instance method static or * override and make a static method an instance method. */ private boolean enforceDecpRule5_cantChangeFromStaticToNonstatic(BcelClassWeaver weaver, ISourceLocation mungerLoc, ResolvedMember superMethod, LazyMethodGen subMethod) { boolean superMethodStatic = Modifier.isStatic(superMethod.getModifiers()); if (superMethodStatic && !subMethod.isStatic()) { error(weaver, "This instance method " + subMethod.getName() + subMethod.getParameterSignature() + " cannot override the static method from " + superMethod.getDeclaringType().getName(), subMethod.getSourceLocation(), new ISourceLocation[] { mungerLoc }); return false; } else if (!superMethodStatic && subMethod.isStatic()) { error(weaver, "The static method " + subMethod.getName() + subMethod.getParameterSignature() + " cannot hide the instance method from " + superMethod.getDeclaringType().getName(), subMethod.getSourceLocation(), new ISourceLocation[] { mungerLoc }); return false; } return true; } public void error(BcelClassWeaver weaver, String text, ISourceLocation primaryLoc, ISourceLocation[] extraLocs) { IMessage msg = new Message(text, primaryLoc, true, extraLocs); weaver.getWorld().getMessageHandler().handleMessage(msg); } /** * Search the specified type for a particular method - do not use the return value in the comparison as it is not considered for * overriding.
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
*/ private LazyMethodGen findMatchingMethod(LazyClassGen type, ResolvedMember searchMethod) { String searchName = searchMethod.getName(); String searchSig = searchMethod.getParameterSignature(); for (LazyMethodGen method : type.getMethodGens()) { if (method.getName().equals(searchName) && method.getParameterSignature().equals(searchSig)) { return method; } } return null; } /** * The main part of implementing declare parents extends. Modify super ctor calls to target the new type. */ public boolean attemptToModifySuperCalls(BcelClassWeaver weaver, LazyClassGen newParentTarget, ResolvedType newParent) { ResolvedType currentParentType = newParentTarget.getSuperClass(); if (currentParentType.getGenericType() != null) { currentParentType = currentParentType.getGenericType(); } String currentParent = currentParentType.getName(); if (newParent.getGenericType() != null) { newParent = newParent.getGenericType(); } List<LazyMethodGen> mgs = newParentTarget.getMethodGens(); for (LazyMethodGen aMethod : mgs) { if (LazyMethodGen.isConstructor(aMethod)) { InstructionList insList = aMethod.getBody(); InstructionHandle handle = insList.getStart();
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
while (handle != null) { if (handle.getInstruction().opcode == Constants.INVOKESPECIAL) { ConstantPool cpg = newParentTarget.getConstantPool(); InvokeInstruction invokeSpecial = (InvokeInstruction) handle.getInstruction(); if (invokeSpecial.getClassName(cpg).equals(currentParent) && invokeSpecial.getMethodName(cpg).equals("<init>")) { ResolvedMember newCtor = getConstructorWithSignature(newParent, invokeSpecial.getSignature(cpg)); if (newCtor == null) { boolean satisfiedByITDC = false; for (Iterator<ConcreteTypeMunger> ii = newParentTarget.getType() .getInterTypeMungersIncludingSupers().iterator(); ii.hasNext() && !satisfiedByITDC;) { ConcreteTypeMunger m = ii.next(); if (m.getMunger() instanceof NewConstructorTypeMunger) { if (m.getSignature().getSignature().equals(invokeSpecial.getSignature(cpg))) { satisfiedByITDC = true; } } } if (!satisfiedByITDC) { String csig = createReadableCtorSig(newParent, cpg, invokeSpecial); weaver.getWorld() .getMessageHandler() .handleMessage( MessageUtil.error( "Unable to modify hierarchy for " + newParentTarget.getClassName() + " - the constructor " + csig + " is missing",
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
this.getSourceLocation())); return false; } } int idx = cpg.addMethodref(newParent.getName(), invokeSpecial.getMethodName(cpg), invokeSpecial.getSignature(cpg)); invokeSpecial.setIndex(idx); } } handle = handle.getNext(); } } } return true; } /** * Creates a nice signature for the ctor, something like "(int,Integer,String)" */ private String createReadableCtorSig(ResolvedType newParent, ConstantPool cpg, InvokeInstruction invokeSpecial) { StringBuffer sb = new StringBuffer(); Type[] ctorArgs = invokeSpecial.getArgumentTypes(cpg); sb.append(newParent.getClassName()); sb.append("("); for (int i = 0; i < ctorArgs.length; i++) { String argtype = ctorArgs[i].toString(); if (argtype.lastIndexOf(".") != -1) { sb.append(argtype.substring(argtype.lastIndexOf(".") + 1)); } else { sb.append(argtype); }
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
if (i + 1 < ctorArgs.length) { sb.append(","); } } sb.append(")"); return sb.toString(); } private ResolvedMember getConstructorWithSignature(ResolvedType type, String searchSig) { for (ResolvedMember method : type.getDeclaredJavaMethods()) { if (MemberUtils.isConstructor(method)) { if (method.getSignature().equals(searchSig)) { return method; } } } return null; } private boolean mungePrivilegedAccess(BcelClassWeaver weaver, PrivilegedAccessMunger munger) { LazyClassGen gen = weaver.getLazyClassGen(); ResolvedMember member = munger.getMember(); ResolvedType onType = weaver.getWorld().resolve(member.getDeclaringType(), munger.getSourceLocation()); if (onType.isRawType()) { onType = onType.getGenericType(); } if (onType.equals(gen.getType())) { if (member.getKind() == Member.FIELD) { addFieldGetter(gen, member, AjcMemberMaker.privilegedAccessMethodForFieldGet(aspectType, member, munger.shortSyntax));
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
addFieldSetter(gen, member, AjcMemberMaker.privilegedAccessMethodForFieldSet(aspectType, member, munger.shortSyntax)); return true; } else if (member.getKind() == Member.METHOD) { addMethodDispatch(gen, member, AjcMemberMaker.privilegedAccessMethodForMethod(aspectType, member)); return true; } else if (member.getKind() == Member.CONSTRUCTOR) { for (Iterator<LazyMethodGen> i = gen.getMethodGens().iterator(); i.hasNext();) { LazyMethodGen m = i.next(); if (m.getMemberView() != null && m.getMemberView().getKind() == Member.CONSTRUCTOR) { m.forcePublic(); } } return true; } else if (member.getKind() == Member.STATIC_INITIALIZATION) { gen.forcePublic(); return true; } else { throw new RuntimeException("unimplemented"); } } return false; } private void addFieldGetter(LazyClassGen gen, ResolvedMember field, ResolvedMember accessMethod) { LazyMethodGen mg = makeMethodGen(gen, accessMethod); InstructionList il = new InstructionList();
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
InstructionFactory fact = gen.getFactory(); if (Modifier.isStatic(field.getModifiers())) { il.append(fact.createFieldAccess(gen.getClassName(), field.getName(), BcelWorld.makeBcelType(field.getType()), Constants.GETSTATIC)); } else { il.append(InstructionConstants.ALOAD_0); il.append(fact.createFieldAccess(gen.getClassName(), field.getName(), BcelWorld.makeBcelType(field.getType()), Constants.GETFIELD)); } il.append(InstructionFactory.createReturn(BcelWorld.makeBcelType(field.getType()))); mg.getBody().insert(il); gen.addMethodGen(mg, getSignature().getSourceLocation()); } private void addFieldSetter(LazyClassGen gen, ResolvedMember field, ResolvedMember accessMethod) { LazyMethodGen mg = makeMethodGen(gen, accessMethod); InstructionList il = new InstructionList(); InstructionFactory fact = gen.getFactory(); Type fieldType = BcelWorld.makeBcelType(field.getType()); if (Modifier.isStatic(field.getModifiers())) { il.append(InstructionFactory.createLoad(fieldType, 0)); il.append(fact.createFieldAccess(gen.getClassName(), field.getName(), fieldType, Constants.PUTSTATIC)); } else { il.append(InstructionConstants.ALOAD_0); il.append(InstructionFactory.createLoad(fieldType, 1)); il.append(fact.createFieldAccess(gen.getClassName(), field.getName(), fieldType, Constants.PUTFIELD)); } il.append(InstructionFactory.createReturn(Type.VOID)); mg.getBody().insert(il); gen.addMethodGen(mg, getSignature().getSourceLocation()); }
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
private void addMethodDispatch(LazyClassGen gen, ResolvedMember method, ResolvedMember accessMethod) { LazyMethodGen mg = makeMethodGen(gen, accessMethod); InstructionList il = new InstructionList(); InstructionFactory fact = gen.getFactory(); Type[] paramTypes = BcelWorld.makeBcelTypes(method.getParameterTypes()); int pos = 0; if (!Modifier.isStatic(method.getModifiers())) { il.append(InstructionConstants.ALOAD_0); pos++; } for (int i = 0, len = paramTypes.length; i < len; i++) { Type paramType = paramTypes[i]; il.append(InstructionFactory.createLoad(paramType, pos)); pos += paramType.getSize(); } il.append(Utility.createInvoke(fact, (BcelWorld) aspectType.getWorld(), method)); il.append(InstructionFactory.createReturn(BcelWorld.makeBcelType(method.getReturnType()))); mg.getBody().insert(il); gen.addMethodGen(mg); } protected LazyMethodGen makeMethodGen(LazyClassGen gen, ResolvedMember member) { LazyMethodGen ret = new LazyMethodGen(member.getModifiers(), BcelWorld.makeBcelType(member.getReturnType()), member.getName(), BcelWorld.makeBcelTypes(member.getParameterTypes()), UnresolvedType.getNames(member .getExceptions()), gen); return ret; } protected FieldGen makeFieldGen(LazyClassGen gen, ResolvedMember member) {
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
return new FieldGen(member.getModifiers(), BcelWorld.makeBcelType(member.getReturnType()), member.getName(), gen.getConstantPool()); } private boolean mungePerObjectInterface(BcelClassWeaver weaver, PerObjectInterfaceTypeMunger munger) { LazyClassGen gen = weaver.getLazyClassGen(); if (couldMatch(gen.getBcelObjectType(), munger.getTestPointcut())) { FieldGen fg = makeFieldGen(gen, AjcMemberMaker.perObjectField(gen.getType(), aspectType)); gen.addField(fg, getSourceLocation()); Type fieldType = BcelWorld.makeBcelType(aspectType); LazyMethodGen mg = new LazyMethodGen(Modifier.PUBLIC, fieldType, NameMangler.perObjectInterfaceGet(aspectType), new Type[0], new String[0], gen); InstructionList il = new InstructionList(); InstructionFactory fact = gen.getFactory(); il.append(InstructionConstants.ALOAD_0); il.append(fact.createFieldAccess(gen.getClassName(), fg.getName(), fieldType, Constants.GETFIELD)); il.append(InstructionFactory.createReturn(fieldType)); mg.getBody().insert(il); gen.addMethodGen(mg); LazyMethodGen mg1 = new LazyMethodGen(Modifier.PUBLIC, Type.VOID, NameMangler.perObjectInterfaceSet(aspectType), new Type[] { fieldType, }, new String[0], gen); InstructionList il1 = new InstructionList(); il1.append(InstructionConstants.ALOAD_0); il1.append(InstructionFactory.createLoad(fieldType, 1)); il1.append(fact.createFieldAccess(gen.getClassName(), fg.getName(), fieldType, Constants.PUTFIELD)); il1.append(InstructionFactory.createReturn(Type.VOID)); mg1.getBody().insert(il1); gen.addMethodGen(mg1); gen.addInterface(munger.getInterfaceType().resolve(weaver.getWorld()), getSourceLocation());
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
return true; } else { return false; } } private boolean mungePerTypeWithinTransformer(BcelClassWeaver weaver) { LazyClassGen gen = weaver.getLazyClassGen(); FieldGen fg = makeFieldGen(gen, AjcMemberMaker.perTypeWithinField(gen.getType(), aspectType)); gen.addField(fg, getSourceLocation()); Type fieldType = BcelWorld.makeBcelType(aspectType); LazyMethodGen mg = new LazyMethodGen(Modifier.PUBLIC | Modifier.STATIC, fieldType, NameMangler.perTypeWithinLocalAspectOf(aspectType), new Type[0], new String[0], gen); InstructionList il = new InstructionList(); InstructionFactory fact = gen.getFactory(); il.append(fact.createFieldAccess(gen.getClassName(), fg.getName(), fieldType, Constants.GETSTATIC)); il.append(InstructionFactory.createReturn(fieldType)); mg.getBody().insert(il); gen.addMethodGen(mg); return true;
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
} private boolean couldMatch(BcelObjectType bcelObjectType, Pointcut pointcut) { return !bcelObjectType.isInterface(); } private boolean mungeNewMemberType(BcelClassWeaver classWeaver, NewMemberClassTypeMunger munger) { World world = classWeaver.getWorld(); ResolvedType onType = world.resolve(munger.getTargetType()); if (onType.isRawType()) { onType = onType.getGenericType(); } return onType.equals(classWeaver.getLazyClassGen().getType()); } private boolean mungeNewMethod(BcelClassWeaver classWeaver, NewMethodTypeMunger munger) { World world = classWeaver.getWorld(); ResolvedMember unMangledInterMethod = munger.getSignature().resolve(world); ResolvedMember interMethodBody = munger.getDeclaredInterMethodBody(aspectType, world); ResolvedMember interMethodDispatcher = munger.getDeclaredInterMethodDispatcher(aspectType, world); ResolvedMember memberHoldingAnyAnnotations = interMethodDispatcher; LazyClassGen classGen = classWeaver.getLazyClassGen(); ResolvedType onType = world.resolve(unMangledInterMethod.getDeclaringType(), munger.getSourceLocation()); if (onType.isRawType()) { onType = onType.getGenericType(); }
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
if (onType.isAnnotation()) { signalError(WeaverMessages.ITDM_ON_ANNOTATION_NOT_ALLOWED, classWeaver, onType); return false; } if (onType.isEnum()) { signalError(WeaverMessages.ITDM_ON_ENUM_NOT_ALLOWED, classWeaver, onType); return false; } boolean mungingInterface = classGen.isInterface(); boolean onInterface = onType.isInterface(); if (onInterface && classGen.getLazyMethodGen(unMangledInterMethod.getName(), unMangledInterMethod.getSignature(), true) != null) { return false; } if (onType.equals(classGen.getType())) { ResolvedMember mangledInterMethod = AjcMemberMaker.interMethod(unMangledInterMethod, aspectType, onInterface); LazyMethodGen newMethod = makeMethodGen(classGen, mangledInterMethod); if (mungingInterface) { newMethod.setAccessFlags(Modifier.PUBLIC | Modifier.ABSTRACT); } if (classWeaver.getWorld().isInJava5Mode()) {
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
AnnotationAJ annotationsOnRealMember[] = null; ResolvedType toLookOn = aspectType; if (aspectType.isRawType()) { toLookOn = aspectType.getGenericType(); } ResolvedMember realMember = getRealMemberForITDFromAspect(toLookOn, memberHoldingAnyAnnotations, false); if (realMember == null) { } else { annotationsOnRealMember = realMember.getAnnotations(); } Set<ResolvedType> addedAnnotations = new HashSet<ResolvedType>(); if (annotationsOnRealMember != null) { for (AnnotationAJ anno : annotationsOnRealMember) { AnnotationGen a = ((BcelAnnotation) anno).getBcelAnnotation(); AnnotationGen ag = new AnnotationGen(a, classGen.getConstantPool(), true); newMethod.addAnnotation(new BcelAnnotation(ag, classWeaver.getWorld())); addedAnnotations.add(anno.getType()); } } if (realMember != null) { copyOverParameterAnnotations(newMethod, realMember); }
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
List<DeclareAnnotation> allDecams = world.getDeclareAnnotationOnMethods(); for (DeclareAnnotation declareAnnotationMC : allDecams) { if (declareAnnotationMC.matches(unMangledInterMethod, world)) { AnnotationAJ annotation = declareAnnotationMC.getAnnotation(); if (!addedAnnotations.contains(annotation.getType())) { newMethod.addAnnotation(annotation); } } } } if (!onInterface && !Modifier.isAbstract(mangledInterMethod.getModifiers())) { InstructionList body = newMethod.getBody(); InstructionFactory fact = classGen.getFactory(); int pos = 0; if (!Modifier.isStatic(unMangledInterMethod.getModifiers())) { body.append(InstructionFactory.createThis()); pos++; } Type[] paramTypes = BcelWorld.makeBcelTypes(mangledInterMethod.getParameterTypes()); for (int i = 0, len = paramTypes.length; i < len; i++) { Type paramType = paramTypes[i]; body.append(InstructionFactory.createLoad(paramType, pos)); pos += paramType.getSize(); } body.append(Utility.createInvoke(fact, classWeaver.getWorld(), interMethodBody)); body.append(InstructionFactory.createReturn(BcelWorld.makeBcelType(mangledInterMethod.getReturnType()))); if (classWeaver.getWorld().isInJava5Mode()) {
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
createAnyBridgeMethodsForCovariance(classWeaver, munger, unMangledInterMethod, onType, classGen, paramTypes); } } else { } if (world.isInJava5Mode()) { String basicSignature = mangledInterMethod.getSignature(); String genericSignature = ((ResolvedMemberImpl) mangledInterMethod).getSignatureForAttribute(); if (!basicSignature.equals(genericSignature)) { newMethod.addAttribute(createSignatureAttribute(classGen.getConstantPool(), genericSignature)); } } classWeaver.addLazyMethodGen(newMethod); classWeaver.getLazyClassGen().warnOnAddedMethod(newMethod.getMethod(), getSignature().getSourceLocation()); addNeededSuperCallMethods(classWeaver, onType, munger.getSuperMethodsCalled()); return true; } else if (onInterface && !Modifier.isAbstract(unMangledInterMethod.getModifiers())) { if (!classGen.getType().isTopmostImplementor(onType)) { ResolvedType rtx = classGen.getType().getTopmostImplementor(onType); if (rtx == null) {
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
ResolvedType rt = classGen.getType(); if (rt.isInterface()) { ISourceLocation sloc = munger.getSourceLocation(); classWeaver .getWorld() .getMessageHandler() .handleMessage( MessageUtil.error( "ITD target " + rt.getName() + " is an interface but has been incorrectly determined to be the topmost implementor of " + onType.getName() + ". ITD is " + this.getSignature(), sloc)); } if (!onType.isAssignableFrom(rt)) { ISourceLocation sloc = munger.getSourceLocation(); classWeaver .getWorld() .getMessageHandler() .handleMessage( MessageUtil.error( "ITD target " + rt.getName() + " doesn't appear to implement " + onType.getName() + " why did we consider it the top most implementor? ITD is " + this.getSignature(), sloc)); } } else if (!rtx.isExposedToWeaver()) { ISourceLocation sLoc = munger.getSourceLocation(); classWeaver .getWorld()
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
.getMessageHandler() .handleMessage( MessageUtil.error(WeaverMessages.format(WeaverMessages.ITD_NON_EXPOSED_IMPLEMENTOR, rtx, getAspectType().getName()), (sLoc == null ? getAspectType().getSourceLocation() : sLoc))); } else { } return false; } else { ResolvedMember mangledInterMethod = AjcMemberMaker.interMethod(unMangledInterMethod, aspectType, false); LazyMethodGen mg = makeMethodGen(classGen, mangledInterMethod); if (classWeaver.getWorld().isInJava5Mode()) { AnnotationAJ annotationsOnRealMember[] = null; ResolvedType toLookOn = aspectType; if (aspectType.isRawType()) { toLookOn = aspectType.getGenericType(); } ResolvedMember realMember = getRealMemberForITDFromAspect(toLookOn, memberHoldingAnyAnnotations, false); if (realMember == null) { throw new BCException("Couldn't find ITD holder member '" + memberHoldingAnyAnnotations + "' on aspect " + aspectType); } annotationsOnRealMember = realMember.getAnnotations(); if (annotationsOnRealMember != null) { for (AnnotationAJ annotationX : annotationsOnRealMember) { AnnotationGen a = ((BcelAnnotation) annotationX).getBcelAnnotation();
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
AnnotationGen ag = new AnnotationGen(a, classWeaver.getLazyClassGen().getConstantPool(), true); mg.addAnnotation(new BcelAnnotation(ag, classWeaver.getWorld())); } } copyOverParameterAnnotations(mg, realMember); } if (mungingInterface) { mg.setAccessFlags(Modifier.PUBLIC | Modifier.ABSTRACT); } Type[] paramTypes = BcelWorld.makeBcelTypes(mangledInterMethod.getParameterTypes()); Type returnType = BcelWorld.makeBcelType(mangledInterMethod.getReturnType()); InstructionList body = mg.getBody(); InstructionFactory fact = classGen.getFactory(); int pos = 0; if (!Modifier.isStatic(mangledInterMethod.getModifiers())) { body.append(InstructionFactory.createThis()); pos++; } for (int i = 0, len = paramTypes.length; i < len; i++) { Type paramType = paramTypes[i]; body.append(InstructionFactory.createLoad(paramType, pos)); pos += paramType.getSize(); } body.append(Utility.createInvoke(fact, classWeaver.getWorld(), interMethodBody)); Type t = BcelWorld.makeBcelType(interMethodBody.getReturnType()); if (!t.equals(returnType)) {
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
body.append(fact.createCast(t, returnType)); } body.append(InstructionFactory.createReturn(returnType)); mg.definingType = onType; if (world.isInJava5Mode()) { String basicSignature = mangledInterMethod.getSignature(); String genericSignature = ((ResolvedMemberImpl) mangledInterMethod).getSignatureForAttribute(); if (!basicSignature.equals(genericSignature)) { mg.addAttribute(createSignatureAttribute(classGen.getConstantPool(), genericSignature)); } } classWeaver.addOrReplaceLazyMethodGen(mg); addNeededSuperCallMethods(classWeaver, onType, munger.getSuperMethodsCalled()); createBridgeIfNecessary(classWeaver, munger, unMangledInterMethod, classGen); return true; } } else { return false; } } private void createBridgeIfNecessary(BcelClassWeaver classWeaver, NewMethodTypeMunger munger, ResolvedMember unMangledInterMethod, LazyClassGen classGen) { if (munger.getDeclaredSignature() != null) { boolean needsbridging = false; ResolvedMember mungerSignature = munger.getSignature(); ResolvedMember toBridgeTo = munger.getDeclaredSignature().parameterizedWith(null, mungerSignature.getDeclaringType().resolve(getWorld()), false, munger.getTypeVariableAliases());
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
if (!toBridgeTo.getReturnType().getErasureSignature().equals(mungerSignature.getReturnType().getErasureSignature())) { needsbridging = true; } UnresolvedType[] originalParams = toBridgeTo.getParameterTypes(); UnresolvedType[] newParams = mungerSignature.getParameterTypes(); for (int ii = 0; ii < originalParams.length; ii++) { if (!originalParams[ii].getErasureSignature().equals(newParams[ii].getErasureSignature())) { needsbridging = true; } } if (needsbridging) { createBridge(classWeaver, unMangledInterMethod, classGen, toBridgeTo); } } } private void copyOverParameterAnnotations(LazyMethodGen receiverMethod, ResolvedMember donorMethod) { AnnotationAJ[][] pAnnos = donorMethod.getParameterAnnotations(); if (pAnnos != null) { int offset = receiverMethod.isStatic() ? 0 : 1; int param = 0; for (int i = offset; i < pAnnos.length; i++) { AnnotationAJ[] annosOnParam = pAnnos[i]; if (annosOnParam != null) { for (AnnotationAJ anno : annosOnParam) { receiverMethod.addParameterAnnotation(param, anno); } } param++; } }
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
} private void createBridge(BcelClassWeaver weaver, ResolvedMember unMangledInterMethod, LazyClassGen classGen, ResolvedMember toBridgeTo) { Type[] paramTypes; Type returnType; InstructionList body; InstructionFactory fact; int pos; ResolvedMember bridgerMethod = AjcMemberMaker.bridgerToInterMethod(unMangledInterMethod, classGen.getType()); ResolvedMember bridgingSetter = AjcMemberMaker.interMethodBridger(toBridgeTo, aspectType, false); LazyMethodGen bridgeMethod = makeMethodGen(classGen, bridgingSetter); paramTypes = BcelWorld.makeBcelTypes(bridgingSetter.getParameterTypes()); Type[] bridgingToParms = BcelWorld.makeBcelTypes(unMangledInterMethod.getParameterTypes()); returnType = BcelWorld.makeBcelType(bridgingSetter.getReturnType()); body = bridgeMethod.getBody(); fact = classGen.getFactory(); pos = 0; if (!Modifier.isStatic(bridgingSetter.getModifiers())) { body.append(InstructionFactory.createThis()); pos++; } for (int i = 0, len = paramTypes.length; i < len; i++) { Type paramType = paramTypes[i]; body.append(InstructionFactory.createLoad(paramType, pos)); if (!bridgingSetter.getParameterTypes()[i].getErasureSignature().equals( unMangledInterMethod.getParameterTypes()[i].getErasureSignature())) { body.append(fact.createCast(paramType, bridgingToParms[i])); }
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
pos += paramType.getSize(); } body.append(Utility.createInvoke(fact, weaver.getWorld(), bridgerMethod)); body.append(InstructionFactory.createReturn(returnType)); classGen.addMethodGen(bridgeMethod); } /** * Helper method to create a signature attribute based on a string signature: e.g. "Ljava/lang/Object;LI<Ljava/lang/Double;>;" */ private Signature createSignatureAttribute(ConstantPool cp, String signature) { int nameIndex = cp.addUtf8("Signature"); int sigIndex = cp.addUtf8(signature); return new Signature(nameIndex, 2, sigIndex, cp); } /** * Create any bridge method required because of covariant returns being used. This method is used in the case where an ITD is * applied to some type and it may be in an override relationship with a method from the supertype - but due to covariance there * is a mismatch in return values. Example of when required: Super defines: Object m(String s) Sub defines: String m(String s) * then we need a bridge method in Sub called 'Object m(String s)' that forwards to 'String m(String s)' */ private void createAnyBridgeMethodsForCovariance(BcelClassWeaver weaver, NewMethodTypeMunger munger, ResolvedMember unMangledInterMethod, ResolvedType onType, LazyClassGen gen, Type[] paramTypes) {
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
boolean quitRightNow = false; String localMethodName = unMangledInterMethod.getName(); String localParameterSig = unMangledInterMethod.getParameterSignature(); String localReturnTypeESig = unMangledInterMethod.getReturnType().getErasureSignature(); boolean alreadyDone = false; ResolvedMember[] localMethods = onType.getDeclaredMethods(); for (int i = 0; i < localMethods.length; i++) { ResolvedMember member = localMethods[i]; if (member.getName().equals(localMethodName)) { if (member.getParameterSignature().equals(localParameterSig)) { alreadyDone = true; } } } if (!alreadyDone) { for (Iterator<ResolvedMember> iter = onType.getSuperclass().getMethods(true, true); iter.hasNext() && !quitRightNow;) { ResolvedMember aMethod = iter.next(); if (aMethod.getName().equals(localMethodName) && aMethod.getParameterSignature().equals(localParameterSig)) { if (!aMethod.getReturnType().getErasureSignature().equals(localReturnTypeESig) && !Modifier.isPrivate(aMethod.getModifiers())) {
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
createBridgeMethod(weaver.getWorld(), munger, unMangledInterMethod, gen, paramTypes, aMethod); quitRightNow = true; } } } } } /** * Create a bridge method for a particular munger. * * @param world * @param munger * @param unMangledInterMethod the method to bridge 'to' that we have already created in the 'subtype' * @param clazz the class in which to put the bridge method * @param paramTypes Parameter types for the bridge method, passed in as an optimization since the caller is likely to have * already created them. * @param theBridgeMethod */ private void createBridgeMethod(BcelWorld world, NewMethodTypeMunger munger, ResolvedMember unMangledInterMethod, LazyClassGen clazz, Type[] paramTypes, ResolvedMember theBridgeMethod) { InstructionList body; InstructionFactory fact; int pos = 0; LazyMethodGen bridgeMethod = makeMethodGen(clazz, theBridgeMethod);
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
bridgeMethod.setAccessFlags(bridgeMethod.getAccessFlags() | 0x00000040 /* * BRIDGE = 0x00000040 */); Type returnType = BcelWorld.makeBcelType(theBridgeMethod.getReturnType()); body = bridgeMethod.getBody(); fact = clazz.getFactory(); if (!Modifier.isStatic(unMangledInterMethod.getModifiers())) { body.append(InstructionFactory.createThis()); pos++; } for (int i = 0, len = paramTypes.length; i < len; i++) { Type paramType = paramTypes[i]; body.append(InstructionFactory.createLoad(paramType, pos));
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
pos += paramType.getSize(); } body.append(Utility.createInvoke(fact, world, unMangledInterMethod)); body.append(InstructionFactory.createReturn(returnType)); clazz.addMethodGen(bridgeMethod); } private String stringifyMember(ResolvedMember member) { StringBuffer buf = new StringBuffer(); buf.append(member.getReturnType().getName()); buf.append(' '); buf.append(member.getName()); if (member.getKind() != Member.FIELD) { buf.append("("); UnresolvedType[] params = member.getParameterTypes(); if (params.length != 0) { buf.append(params[0]); for (int i = 1, len = params.length; i < len; i++) { buf.append(", "); buf.append(params[i].getName()); } } buf.append(")"); } return buf.toString(); } private boolean mungeMethodDelegate(BcelClassWeaver weaver, MethodDelegateTypeMunger munger) {
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
World world = weaver.getWorld(); LazyClassGen gen = weaver.getLazyClassGen(); if (gen.getType().isAnnotation() || gen.getType().isEnum()) { return false; } ResolvedMember introduced = munger.getSignature(); ResolvedType fromType = world.resolve(introduced.getDeclaringType(), munger.getSourceLocation()); if (fromType.isRawType()) { fromType = fromType.getGenericType(); } boolean shouldApply = munger.matches(weaver.getLazyClassGen().getType(), aspectType); if (shouldApply) { Type bcelReturnType = BcelWorld.makeBcelType(introduced.getReturnType()); if (munger.getImplClassName() == null && !munger.specifiesDelegateFactoryMethod()) { boolean isOK = false; List<LazyMethodGen> existingMethods = gen.getMethodGens(); for (LazyMethodGen m : existingMethods) { if (m.getName().equals(introduced.getName()) && m.getParameterSignature().equals(introduced.getParameterSignature()) && m.getReturnType().equals(bcelReturnType)) { isOK = true; } } if (!isOK) {
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
IMessage msg = new Message("@DeclareParents: No defaultImpl was specified but the type '" + gen.getName() + "' does not implement the method '" + stringifyMember(introduced) + "' defined on the interface '" + introduced.getDeclaringType() + "'", weaver.getLazyClassGen().getType().getSourceLocation(), true, new ISourceLocation[] { munger.getSourceLocation() }); weaver.getWorld().getMessageHandler().handleMessage(msg); return false; } return true; } LazyMethodGen mg = new LazyMethodGen(introduced.getModifiers() - Modifier.ABSTRACT, bcelReturnType, introduced.getName(), BcelWorld.makeBcelTypes(introduced.getParameterTypes()), BcelWorld.makeBcelTypesAsClassNames(introduced.getExceptions()), gen); if (weaver.getWorld().isInJava5Mode()) { AnnotationAJ annotationsOnRealMember[] = null; ResolvedType toLookOn = weaver.getWorld().lookupOrCreateName(introduced.getDeclaringType()); if (fromType.isRawType()) { toLookOn = fromType.getGenericType(); } ResolvedMember[] ms = toLookOn.getDeclaredJavaMethods(); for (ResolvedMember m : ms) { if (introduced.getName().equals(m.getName()) && introduced.getSignature().equals(m.getSignature())) { annotationsOnRealMember = m.getAnnotations(); break; } } if (annotationsOnRealMember != null) { for (AnnotationAJ anno : annotationsOnRealMember) { AnnotationGen a = ((BcelAnnotation) anno).getBcelAnnotation();
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
AnnotationGen ag = new AnnotationGen(a, weaver.getLazyClassGen().getConstantPool(), true); mg.addAnnotation(new BcelAnnotation(ag, weaver.getWorld())); } } } InstructionList body = new InstructionList(); InstructionFactory fact = gen.getFactory(); body.append(InstructionConstants.ALOAD_0); body.append(Utility.createGet(fact, munger.getDelegate(weaver.getLazyClassGen().getType()))); InstructionBranch ifNonNull = InstructionFactory.createBranchInstruction(Constants.IFNONNULL, null); body.append(ifNonNull); body.append(InstructionConstants.ALOAD_0); if (munger.specifiesDelegateFactoryMethod()) { ResolvedMember rm = munger.getDelegateFactoryMethod(weaver.getWorld()); if (rm.getArity() != 0) { ResolvedType parameterType = rm.getParameterTypes()[0].resolve(weaver.getWorld()); if (!parameterType.isAssignableFrom(weaver.getLazyClassGen().getType())) { signalError("For mixin factory method '" + rm + "': Instance type '" + weaver.getLazyClassGen().getType() + "' is not compatible with factory parameter type '" + parameterType + "'", weaver); return false; } } if (Modifier.isStatic(rm.getModifiers())) { if (rm.getArity() != 0) {
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
body.append(InstructionConstants.ALOAD_0); } body.append(fact.createInvoke(rm.getDeclaringType().getName(), rm.getName(), rm.getSignature(), Constants.INVOKESTATIC)); body.append(Utility.createSet(fact, munger.getDelegate(weaver.getLazyClassGen().getType()))); } else { UnresolvedType theAspect = munger.getAspect(); body.append(fact.createInvoke(theAspect.getName(), "aspectOf", "()" + theAspect.getSignature(), Constants.INVOKESTATIC)); if (rm.getArity() != 0) { body.append(InstructionConstants.ALOAD_0); } body.append(fact.createInvoke(rm.getDeclaringType().getName(), rm.getName(), rm.getSignature(), Constants.INVOKEVIRTUAL)); body.append(Utility.createSet(fact, munger.getDelegate(weaver.getLazyClassGen().getType()))); } } else { body.append(fact.createNew(munger.getImplClassName())); body.append(InstructionConstants.DUP); body.append(fact.createInvoke(munger.getImplClassName(), "<init>", Type.VOID, Type.NO_ARGS, Constants.INVOKESPECIAL)); body.append(Utility.createSet(fact, munger.getDelegate(weaver.getLazyClassGen().getType()))); } InstructionHandle ifNonNullElse = body.append(InstructionConstants.ALOAD_0); ifNonNull.setTarget(ifNonNullElse); body.append(Utility.createGet(fact, munger.getDelegate(weaver.getLazyClassGen().getType()))); int pos = 0; if (!Modifier.isStatic(introduced.getModifiers())) {
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
pos++; } Type[] paramTypes = BcelWorld.makeBcelTypes(introduced.getParameterTypes()); for (int i = 0, len = paramTypes.length; i < len; i++) { Type paramType = paramTypes[i]; body.append(InstructionFactory.createLoad(paramType, pos)); pos += paramType.getSize(); } body.append(Utility.createInvoke(fact, Constants.INVOKEINTERFACE, introduced)); body.append(InstructionFactory.createReturn(bcelReturnType)); mg.getBody().append(body); weaver.addLazyMethodGen(mg); weaver.getLazyClassGen().warnOnAddedMethod(mg.getMethod(), getSignature().getSourceLocation()); return true; } return false; } private boolean mungeFieldHost(BcelClassWeaver weaver, MethodDelegateTypeMunger.FieldHostTypeMunger munger) { LazyClassGen gen = weaver.getLazyClassGen(); if (gen.getType().isAnnotation() || gen.getType().isEnum()) { return false; } munger.matches(weaver.getLazyClassGen().getType(), aspectType);
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
ResolvedMember host = AjcMemberMaker.itdAtDeclareParentsField(weaver.getLazyClassGen().getType(), munger.getSignature() .getType(), aspectType); FieldGen field = makeFieldGen(weaver.getLazyClassGen(), host); field.setModifiers(field.getModifiers() | BcelField.AccSynthetic); weaver.getLazyClassGen().addField(field, null); return true; } private ResolvedMember getRealMemberForITDFromAspect(ResolvedType aspectType, ResolvedMember lookingFor, boolean isCtorRelated) { World world = aspectType.getWorld(); boolean debug = false; if (debug) { System.err.println("Searching for a member on type: " + aspectType); System.err.println("Member we are looking for: " + lookingFor); } ResolvedMember aspectMethods[] = aspectType.getDeclaredMethods(); UnresolvedType[] lookingForParams = lookingFor.getParameterTypes(); ResolvedMember realMember = null; for (int i = 0; realMember == null && i < aspectMethods.length; i++) { ResolvedMember member = aspectMethods[i]; if (member.getName().equals(lookingFor.getName())) { UnresolvedType[] memberParams = member.getGenericParameterTypes(); if (memberParams.length == lookingForParams.length) { if (debug) { System.err.println("Reviewing potential candidates: " + member); } boolean matchOK = true;
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
if (isCtorRelated) { for (int j = 0; j < memberParams.length && matchOK; j++) { ResolvedType pMember = memberParams[j].resolve(world); ResolvedType pLookingFor = lookingForParams[j].resolve(world); if (pMember.isTypeVariableReference()) { pMember = ((TypeVariableReference) pMember).getTypeVariable().getFirstBound().resolve(world); } if (pMember.isParameterizedType() || pMember.isGenericType()) { pMember = pMember.getRawType().resolve(aspectType.getWorld()); } if (pLookingFor.isTypeVariableReference()) { pLookingFor = ((TypeVariableReference) pLookingFor).getTypeVariable().getFirstBound() .resolve(world); } if (pLookingFor.isParameterizedType() || pLookingFor.isGenericType()) { pLookingFor = pLookingFor.getRawType().resolve(world); } if (debug) { System.err.println("Comparing parameter " + j + " member=" + pMember + " lookingFor=" + pLookingFor); } if (!pMember.equals(pLookingFor)) { matchOK = false; } } } if (matchOK) { realMember = member; }
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
} } } if (debug && realMember == null) { System.err.println("Didn't find a match"); } return realMember; } private void addNeededSuperCallMethods(BcelClassWeaver weaver, ResolvedType onType, Set<ResolvedMember> neededSuperCalls) { LazyClassGen gen = weaver.getLazyClassGen(); for (Iterator<ResolvedMember> iter = neededSuperCalls.iterator(); iter.hasNext();) { ResolvedMember superMethod = iter.next(); if (weaver.addDispatchTarget(superMethod)) { boolean isSuper = !superMethod.getDeclaringType().equals(gen.getType()); String dispatchName; if (isSuper) { dispatchName = NameMangler.superDispatchMethod(onType, superMethod.getName()); } else { dispatchName = NameMangler.protectedDispatchMethod(onType, superMethod.getName()); } superMethod = superMethod.resolve(weaver.getWorld()); LazyMethodGen dispatcher = makeDispatcher(gen, dispatchName, superMethod, weaver.getWorld(), isSuper); weaver.addLazyMethodGen(dispatcher); } } } private void signalError(String msgid, BcelClassWeaver weaver, UnresolvedType onType) { IMessage msg = MessageUtil.error(WeaverMessages.format(msgid, onType.getName()), getSourceLocation());
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
weaver.getWorld().getMessageHandler().handleMessage(msg); } private void signalError(String msgString, BcelClassWeaver weaver) { IMessage msg = MessageUtil.error(msgString, getSourceLocation()); weaver.getWorld().getMessageHandler().handleMessage(msg); } private boolean mungeNewConstructor(BcelClassWeaver weaver, NewConstructorTypeMunger newConstructorTypeMunger) { final LazyClassGen currentClass = weaver.getLazyClassGen(); final InstructionFactory fact = currentClass.getFactory(); ResolvedMember newConstructorMember = newConstructorTypeMunger.getSyntheticConstructor(); ResolvedType onType = newConstructorMember.getDeclaringType().resolve(weaver.getWorld()); if (onType.isRawType()) { onType = onType.getGenericType(); } if (onType.isAnnotation()) { signalError(WeaverMessages.ITDC_ON_ANNOTATION_NOT_ALLOWED, weaver, onType); return false; } if (onType.isEnum()) { signalError(WeaverMessages.ITDC_ON_ENUM_NOT_ALLOWED, weaver, onType); return false; } if (!onType.equals(currentClass.getType())) { return false; } ResolvedMember explicitConstructor = newConstructorTypeMunger.getExplicitConstructor();
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
LazyMethodGen mg = makeMethodGen(currentClass, newConstructorMember); mg.setEffectiveSignature(newConstructorTypeMunger.getSignature(), Shadow.ConstructorExecution, true); if (weaver.getWorld().isInJava5Mode()) { ResolvedMember interMethodDispatcher = AjcMemberMaker.postIntroducedConstructor(aspectType, onType, newConstructorTypeMunger.getSignature().getParameterTypes()); AnnotationAJ annotationsOnRealMember[] = null; ResolvedMember realMember = getRealMemberForITDFromAspect(aspectType, interMethodDispatcher, true); if (realMember == null) { } else { annotationsOnRealMember = realMember.getAnnotations(); } if (annotationsOnRealMember != null) { for (int i = 0; i < annotationsOnRealMember.length; i++) { AnnotationAJ annotationX = annotationsOnRealMember[i]; AnnotationGen a = ((BcelAnnotation) annotationX).getBcelAnnotation(); AnnotationGen ag = new AnnotationGen(a, weaver.getLazyClassGen().getConstantPool(), true); mg.addAnnotation(new BcelAnnotation(ag, weaver.getWorld())); } }
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
List<DeclareAnnotation> allDecams = weaver.getWorld().getDeclareAnnotationOnMethods(); for (Iterator<DeclareAnnotation> i = allDecams.iterator(); i.hasNext();) { DeclareAnnotation decaMC = i.next(); if (decaMC.matches(explicitConstructor, weaver.getWorld()) && mg.getEnclosingClass().getType() == aspectType) { mg.addAnnotation(decaMC.getAnnotation()); } } } if (mg.getArgumentTypes().length == 0) { LazyMethodGen toRemove = null; for (LazyMethodGen object : currentClass.getMethodGens()) { if (object.getName().equals("<init>") && object.getArgumentTypes().length == 0) { toRemove = object; } } if (toRemove != null) { currentClass.removeMethodGen(toRemove); } } currentClass.addMethodGen(mg); InstructionList body = mg.getBody(); UnresolvedType[] declaredParams = newConstructorTypeMunger.getSignature().getParameterTypes(); Type[] paramTypes = mg.getArgumentTypes();
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
int frameIndex = 1; for (int i = 0, len = declaredParams.length; i < len; i++) { body.append(InstructionFactory.createLoad(paramTypes[i], frameIndex)); frameIndex += paramTypes[i].getSize(); } Member preMethod = AjcMemberMaker.preIntroducedConstructor(aspectType, onType, declaredParams); body.append(Utility.createInvoke(fact, null, preMethod)); int arraySlot = mg.allocateLocal(1); body.append(InstructionFactory.createStore(Type.OBJECT, arraySlot)); body.append(InstructionConstants.ALOAD_0); UnresolvedType[] superParamTypes = explicitConstructor.getParameterTypes(); for (int i = 0, len = superParamTypes.length; i < len; i++) { body.append(InstructionFactory.createLoad(Type.OBJECT, arraySlot)); body.append(Utility.createConstant(fact, i)); body.append(InstructionFactory.createArrayLoad(Type.OBJECT)); body.append(Utility.createConversion(fact, Type.OBJECT, BcelWorld.makeBcelType(superParamTypes[i]))); } body.append(Utility.createInvoke(fact, null, explicitConstructor)); body.append(InstructionConstants.ALOAD_0); Member postMethod = AjcMemberMaker.postIntroducedConstructor(aspectType, onType, declaredParams); UnresolvedType[] postParamTypes = postMethod.getParameterTypes(); for (int i = 1, len = postParamTypes.length; i < len; i++) { body.append(InstructionFactory.createLoad(Type.OBJECT, arraySlot));
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
body.append(Utility.createConstant(fact, superParamTypes.length + i - 1)); body.append(InstructionFactory.createArrayLoad(Type.OBJECT)); body.append(Utility.createConversion(fact, Type.OBJECT, BcelWorld.makeBcelType(postParamTypes[i]))); } body.append(Utility.createInvoke(fact, null, postMethod)); body.append(InstructionConstants.RETURN); return true; } private static LazyMethodGen makeDispatcher(LazyClassGen onGen, String dispatchName, ResolvedMember superMethod, BcelWorld world, boolean isSuper) { Type[] paramTypes = BcelWorld.makeBcelTypes(superMethod.getParameterTypes()); Type returnType = BcelWorld.makeBcelType(superMethod.getReturnType()); int modifiers = Modifier.PUBLIC; if (onGen.isInterface()) { modifiers |= Modifier.ABSTRACT; } LazyMethodGen mg = new LazyMethodGen(modifiers, returnType, dispatchName, paramTypes, UnresolvedType.getNames(superMethod .getExceptions()), onGen); InstructionList body = mg.getBody(); if (onGen.isInterface()) { return mg; } InstructionFactory fact = onGen.getFactory(); int pos = 0; body.append(InstructionFactory.createThis()); pos++; for (int i = 0, len = paramTypes.length; i < len; i++) {
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
Type paramType = paramTypes[i]; body.append(InstructionFactory.createLoad(paramType, pos)); pos += paramType.getSize(); } if (isSuper) { body.append(Utility.createSuperInvoke(fact, world, superMethod)); } else { body.append(Utility.createInvoke(fact, world, superMethod)); } body.append(InstructionFactory.createReturn(returnType)); return mg; } private boolean mungeNewField(BcelClassWeaver weaver, NewFieldTypeMunger munger) { munger.getInitMethod(aspectType); LazyClassGen gen = weaver.getLazyClassGen(); ResolvedMember field = munger.getSignature(); ResolvedType onType = weaver.getWorld().resolve(field.getDeclaringType(), munger.getSourceLocation()); if (onType.isRawType()) { onType = onType.getGenericType(); } boolean onInterface = onType.isInterface(); if (onType.isAnnotation()) { signalError(WeaverMessages.ITDF_ON_ANNOTATION_NOT_ALLOWED, weaver, onType); return false; } if (onType.isEnum()) { signalError(WeaverMessages.ITDF_ON_ENUM_NOT_ALLOWED, weaver, onType); return false; } ResolvedMember interMethodBody = munger.getInitMethod(aspectType);
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
AnnotationAJ annotationsOnRealMember[] = null; if (weaver.getWorld().isInJava5Mode()) { ResolvedType toLookOn = aspectType; if (aspectType.isRawType()) { toLookOn = aspectType.getGenericType(); } ResolvedMember realMember = getRealMemberForITDFromAspect(toLookOn, interMethodBody, false); if (realMember == null) { } else { annotationsOnRealMember = realMember.getAnnotations(); } } if (onType.equals(gen.getType())) { if (onInterface) { ResolvedMember itdfieldGetter = AjcMemberMaker.interFieldInterfaceGetter(field, onType, aspectType); LazyMethodGen mg = makeMethodGen(gen, itdfieldGetter); gen.addMethodGen(mg); LazyMethodGen mg1 = makeMethodGen(gen, AjcMemberMaker.interFieldInterfaceSetter(field, onType, aspectType)); gen.addMethodGen(mg1); } else { weaver.addInitializer(this); ResolvedMember newField = AjcMemberMaker.interFieldClassField(field, aspectType,
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
munger.version == NewFieldTypeMunger.VersionTwo); FieldGen fg = makeFieldGen(gen, newField); if (annotationsOnRealMember != null) { for (int i = 0; i < annotationsOnRealMember.length; i++) { AnnotationAJ annotationX = annotationsOnRealMember[i]; AnnotationGen a = ((BcelAnnotation) annotationX).getBcelAnnotation(); AnnotationGen ag = new AnnotationGen(a, weaver.getLazyClassGen().getConstantPool(), true); fg.addAnnotation(ag); } } if (weaver.getWorld().isInJava5Mode()) { String basicSignature = field.getSignature(); String genericSignature = field.getReturnType().resolve(weaver.getWorld()).getSignatureForAttribute(); if (!basicSignature.equals(genericSignature)) { fg.addAttribute(createSignatureAttribute(gen.getConstantPool(), genericSignature)); } } gen.addField(fg, getSourceLocation()); } return true; } else if (onInterface && gen.getType().isTopmostImplementor(onType)) { if (Modifier.isStatic(field.getModifiers())) { throw new RuntimeException("unimplemented"); } weaver.addInitializer(this);
340,323
Bug 340323 NPE when weaving java.lang.Object at org.aspectj.weaver.bcel.BcelTypeMunger.createAnyBridgeMethodsForCovariance(BcelTypeMunger.java:1251)
null
resolved fixed
a8e6797
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2011-03-28T19:37:01Z
2011-03-17T13:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
Type fieldType = BcelWorld.makeBcelType(field.getType()); FieldGen fg = makeFieldGen(gen, AjcMemberMaker.interFieldInterfaceField(field, onType, aspectType)); if (annotationsOnRealMember != null) { for (int i = 0; i < annotationsOnRealMember.length; i++) { AnnotationAJ annotationX = annotationsOnRealMember[i]; AnnotationGen a = ((BcelAnnotation) annotationX).getBcelAnnotation(); AnnotationGen ag = new AnnotationGen(a, weaver.getLazyClassGen().getConstantPool(), true); fg.addAnnotation(ag); } } gen.addField(fg, getSourceLocation()); ResolvedMember itdfieldGetter = AjcMemberMaker.interFieldInterfaceGetter(field, gen.getType(), aspectType); LazyMethodGen mg = makeMethodGen(gen, itdfieldGetter); InstructionList il = new InstructionList(); InstructionFactory fact = gen.getFactory(); if (Modifier.isStatic(field.getModifiers())) { il.append(fact.createFieldAccess(gen.getClassName(), fg.getName(), fieldType, Constants.GETSTATIC)); } else { il.append(InstructionConstants.ALOAD_0); il.append(fact.createFieldAccess(gen.getClassName(), fg.getName(), fieldType, Constants.GETFIELD)); } il.append(InstructionFactory.createReturn(fieldType)); mg.getBody().insert(il); gen.addMethodGen(mg);