[jboss-jira] [JBoss JIRA] Closed: (JBAOP-181) Invocation on wrong field when running standalone aop
Kabir Khan (JIRA)
jira-events at lists.jboss.org
Tue Dec 9 05:51:37 EST 2008
[ https://jira.jboss.org/jira/browse/JBAOP-181?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kabir Khan closed JBAOP-181.
----------------------------
Resolution: Done
> Invocation on wrong field when running standalone aop
> -----------------------------------------------------
>
> Key: JBAOP-181
> URL: https://jira.jboss.org/jira/browse/JBAOP-181
> Project: JBoss AOP
> Issue Type: Bug
> Environment: jdk1.5.0_04
> jboss-aop 1.3.1
> fedora core 4
> Reporter: Galen Dunkleberger
> Assignee: Kabir Khan
>
> excerpt from included forum post on jboss-aop forum
> line 89 in org.jboss.aop.instrument.FieldAccessTransformer i think should pass fieldINdex instead of index to doBuildFieldWrappers
> Code:
> // Public --------------------------------------------------------
> protected void buildFieldWrappers(CtClass clazz, ClassAdvisor advisor) throws NotFoundException,
> CannotCompileException
> {
> List fields = Instrumentor.getAdvisableFields(clazz);
> int fieldIndex = fieldOffset(clazz.getSuperclass());
> JoinpointClassification[] classificationGet = classifyFieldGet(clazz, advisor);
> JoinpointClassification[] classificationSet = classifyFieldSet(clazz, advisor);
> Iterator it = fields.iterator();
> boolean skipFieldInterception = true;
> for (int index = 0; it.hasNext(); index++, fieldIndex++)
> {
> CtField field = (CtField) it.next();
> if (!isPrepared(classificationGet[index]) && !isPrepared(classificationSet[index]))
> {
> continue;
> }
>
> if (!javassist.Modifier.isPrivate(field.getModifiers()))
> {
> skipFieldInterception = false;
> }
>
> Shouldn't we be passing field index instead of
> index? --> doBuildFieldWrappers(clazz, field, index, classificationGet[index], classificationSet[index]);
> }
>
> if (skipFieldInterception)
> {
> advisor.getManager().skipFieldAccess(clazz.getName());
> }
> else
> {
> advisor.getManager().addFieldInterceptionMarker(clazz.getName());
> }
>
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list