diff options
author | jhugunin <jhugunin> | 2003-05-19 20:46:49 +0000 |
---|---|---|
committer | jhugunin <jhugunin> | 2003-05-19 20:46:49 +0000 |
commit | 2ed2ba65b2e99e5e11f675d875c23fac67a51021 (patch) | |
tree | 93fe7f2d151639399c7ba01f5825d0684e1ba11b /tests | |
parent | 2072ac11448e493e26ab7ff818ce26c6ef33c19c (diff) | |
download | aspectj-2ed2ba65b2e99e5e11f675d875c23fac67a51021.tar.gz aspectj-2ed2ba65b2e99e5e11f675d875c23fac67a51021.zip |
added test for Bugzilla Bug 37304
public static fields being ignored
this test is passing in 1.1rc2
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ajcTests.xml | 7 | ||||
-rw-r--r-- | tests/bugs/FinalFields.java | 18 |
2 files changed, 25 insertions, 0 deletions
diff --git a/tests/ajcTests.xml b/tests/ajcTests.xml index c5ebe2575..7cce70cb9 100644 --- a/tests/ajcTests.xml +++ b/tests/ajcTests.xml @@ -6232,5 +6232,12 @@ </compile> <run class="CatchSig"/> </ajc-test> + + + <ajc-test dir="bugs" pr="37304" + title="public static fields being ignored"> + <compile files="FinalFields.java"/> + <run class="FinalFields"/> + </ajc-test> </suite> diff --git a/tests/bugs/FinalFields.java b/tests/bugs/FinalFields.java new file mode 100644 index 000000000..9bc19c84c --- /dev/null +++ b/tests/bugs/FinalFields.java @@ -0,0 +1,18 @@ + +import java.io.Serializable; + +import java.lang.reflect.*; + +public class FinalFields implements Serializable { + public static final Integer SUCCESS = new Integer(0); + + public static void main(String[] args) throws Exception { + Class c = FinalFields.class; + Field f = c.getDeclaredField("SUCCESS"); + int mods = f.getModifiers(); + System.out.println("modifers are: " + Modifier.toString(mods)); + if (!Modifier.isFinal(mods)) throw new RuntimeException("modifier should be final"); + if (!Modifier.isPublic(mods)) throw new RuntimeException("modifier should be public"); + if (!Modifier.isStatic(mods)) throw new RuntimeException("modifier should be static"); + } +} |