--- /dev/null
+package test;
+public class VerifyErrorOnSet {
+
+ class Node {
+ int value;
+
+ Node(int v)
+ {
+ value = v;
+ }
+ }
+
+
+ public VerifyErrorOnSet()
+ {
+ new Node(1);
+ }
+
+ public static void main(String[] args) {
+ VerifyErrorOnSet l = new VerifyErrorOnSet();
+ }
+
+}
+
+
+aspect ListAspect {
+
+ pointcut setField(Object t) : target(t) && set(* VerifyErrorOnSet.Node+.*);
+
+ before(Object t) : setField(t) {
+ System.out.println("WRITE");
+ // Do something with t...
+ }
+
+}
public void testNoUnusedParameterWarningsForSyntheticAdviceArgs() {
runTest("no unused parameter warnings for synthetic advice args");
}
+
+ public void testNoVerifyErrorWithSetOnInnerType() {
+ runTest("no verify error with set on inner type");
+ }
// helper methods.....
public SyntheticRepository createRepos(File cpentry) {
<compile files="pr109042.aj" options="-warn:+unusedArgument -warn:+unusedPrivate -warn:+unusedImport -1.5">
</compile>
</ajc-test>
+
+ <ajc-test dir="bugs150" pr="109124" title="no verify error with set on inner type">
+ <compile files="VerifyErrorOnSet.aj" options="-1.5" >
+ </compile>
+ <run class="test.VerifyErrorOnSet"/>
+ </ajc-test>
+
+
<!-- ============================================================================ -->
<!-- ============================================================================ -->
final class BcelField extends ResolvedMemberImpl {
+ private static int AccSynthetic = 0x1000;
+
private Field field;
private boolean isAjSynthetic;
private boolean isSynthetic = false;
for (int i = attrs.length - 1; i >= 0; i--) {
if (attrs[i] instanceof Synthetic) isSynthetic = true;
}
+
+ // in 1.5, synthetic is a modifier, not an attribute
+ if ((field.getModifiers() & AccSynthetic) != 0) {
+ isSynthetic = true;
+ }
+
}