aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorehilsdal <ehilsdal>2004-01-29 12:24:02 +0000
committerehilsdal <ehilsdal>2004-01-29 12:24:02 +0000
commitbece4680e604416148871e60cef77f0cd0808aba (patch)
treeae9f293efac52ceb2ea3808c94e7f61042c2367a
parent3233d98b34b312ceda4e469e52d41629698ca077 (diff)
downloadaspectj-bece4680e604416148871e60cef77f0cd0808aba.tar.gz
aspectj-bece4680e604416148871e60cef77f0cd0808aba.zip
Fix for Bugzilla Bug 43792: Illegal Opcode Detected
-rw-r--r--weaver/testsrc/BcweaverModuleTests.java1
-rw-r--r--weaver/testsrc/LocaleTest.java41
2 files changed, 42 insertions, 0 deletions
diff --git a/weaver/testsrc/BcweaverModuleTests.java b/weaver/testsrc/BcweaverModuleTests.java
index 2544a545f..82ea4979f 100644
--- a/weaver/testsrc/BcweaverModuleTests.java
+++ b/weaver/testsrc/BcweaverModuleTests.java
@@ -22,6 +22,7 @@ public class BcweaverModuleTests extends TestCase {
suite.addTest(org.aspectj.weaver.bcel.BcelTests.suite());
suite.addTest(org.aspectj.weaver.BcweaverTests.suite());
suite.addTest(org.aspectj.weaver.patterns.PatternsTests.suite());
+ suite.addTestSuite(LocaleTest.class);
return suite;
}
diff --git a/weaver/testsrc/LocaleTest.java b/weaver/testsrc/LocaleTest.java
new file mode 100644
index 000000000..1dba3f79f
--- /dev/null
+++ b/weaver/testsrc/LocaleTest.java
@@ -0,0 +1,41 @@
+import java.io.IOException;
+import java.util.Locale;
+
+import junit.framework.TestCase;
+
+import org.apache.bcel.generic.Instruction;
+import org.apache.bcel.util.ByteSequence;
+
+public class LocaleTest extends TestCase {
+
+ public LocaleTest(String name) {
+ super(name);
+ }
+
+ public void testNormalLocale() {
+ doBipush();
+ }
+
+ public void testTurkishLocale() {
+ Locale def = Locale.getDefault();
+ Locale.setDefault(new Locale("tr"));
+ try {
+ doBipush();
+ } finally {
+ Locale.setDefault(def);
+ }
+ }
+
+ private static void doBipush() {
+ try {
+ Instruction.readInstruction(
+ new ByteSequence(new byte[] {
+ (byte)16, // bipush
+ (byte) 3 // data for bipush
+ }));
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ }
+}
+