diff --git a/Examples/java/variables/runme.java b/Examples/java/variables/runme.java index 361a30fa6..a53cc543c 100644 --- a/Examples/java/variables/runme.java +++ b/Examples/java/variables/runme.java @@ -76,7 +76,7 @@ public class runme { System.out.println( " Trying to set 'status'" ); try { Method m = example.class.getDeclaredMethod("setStatus", new Class[] {Integer.class}); - m.invoke(example.class, new Object[] {new Integer(0)} ); + m.invoke(example.class, new Object[] {Integer.valueOf(0)} ); System.out.println( "Hey, what's going on?!?! This shouldn't work" ); } catch (NoSuchMethodException e) { diff --git a/Examples/test-suite/doxygen_translate.i b/Examples/test-suite/doxygen_translate.i index 348b2e9a8..bb0af1c14 100644 --- a/Examples/test-suite/doxygen_translate.i +++ b/Examples/test-suite/doxygen_translate.i @@ -1,5 +1,9 @@ %module doxygen_translate +#if defined(SWIGJAVA) +%javamethodmodifiers function "@Deprecated\npublic" +#endif + %inline %{ /** diff --git a/Examples/test-suite/doxygen_translate_all_tags.i b/Examples/test-suite/doxygen_translate_all_tags.i index ba348fd50..6e96a57c5 100644 --- a/Examples/test-suite/doxygen_translate_all_tags.i +++ b/Examples/test-suite/doxygen_translate_all_tags.i @@ -1,5 +1,9 @@ %module doxygen_translate_all_tags +#if defined(SWIGJAVA) +%javamethodmodifiers func02 "@Deprecated\npublic" +#endif + %inline %{ /** diff --git a/Examples/test-suite/java/li_std_list_runme.java b/Examples/test-suite/java/li_std_list_runme.java index e45b8968b..94bcada02 100644 --- a/Examples/test-suite/java/li_std_list_runme.java +++ b/Examples/test-suite/java/li_std_list_runme.java @@ -47,11 +47,11 @@ public class li_std_list_runme { } catch (java.util.NoSuchElementException e) { } - if (v1.remove(new Integer(123))) throw new RuntimeException("v1 test (13) failed"); - if (!v1.remove(new Integer(456))) throw new RuntimeException("v1 test (14) failed"); + if (v1.remove(Integer.valueOf(123))) throw new RuntimeException("v1 test (13) failed"); + if (!v1.remove(Integer.valueOf(456))) throw new RuntimeException("v1 test (14) failed"); if (!v1.isEmpty()) throw new RuntimeException("v1 test (15) failed"); if (v1.size() != 0) throw new RuntimeException("v1 test (16) failed"); - if (v1.remove(new Integer(456))) throw new RuntimeException("v1 test (17) failed"); + if (v1.remove(Integer.valueOf(456))) throw new RuntimeException("v1 test (17) failed"); if (new IntList(3).size() != 3) throw new RuntimeException("constructor initial size test failed"); for (int n : new IntList(10, 999)) @@ -136,7 +136,7 @@ public class li_std_list_runme { v9.add(60); v9.add(70); if (v9.size() != 7) throw new RuntimeException("v9 test (1) failed"); - if (!v9.remove(new Integer(60))) throw new RuntimeException("v9 test (2) failed"); + if (!v9.remove(Integer.valueOf(60))) throw new RuntimeException("v9 test (2) failed"); if (v9.size() != 6) throw new RuntimeException("v9 test (3) failed"); v9.addFirst(-10); v9.addLast(80); diff --git a/Examples/test-suite/java/li_std_vector_runme.java b/Examples/test-suite/java/li_std_vector_runme.java index d23bbe7cd..ba0648562 100644 --- a/Examples/test-suite/java/li_std_vector_runme.java +++ b/Examples/test-suite/java/li_std_vector_runme.java @@ -48,11 +48,11 @@ public class li_std_vector_runme { } catch (java.util.NoSuchElementException e) { } - if (v1.remove(new Integer(123))) throw new RuntimeException("v1 test (13) failed"); - if (!v1.remove(new Integer(456))) throw new RuntimeException("v1 test (14) failed"); + if (v1.remove(Integer.valueOf(123))) throw new RuntimeException("v1 test (13) failed"); + if (!v1.remove(Integer.valueOf(456))) throw new RuntimeException("v1 test (14) failed"); if (!v1.isEmpty()) throw new RuntimeException("v1 test (15) failed"); if (v1.size() != 0) throw new RuntimeException("v1 test (16) failed"); - if (v1.remove(new Integer(456))) throw new RuntimeException("v1 test (17) failed"); + if (v1.remove(Integer.valueOf(456))) throw new RuntimeException("v1 test (17) failed"); if (new IntVector(3).size() != 3) throw new RuntimeException("constructor initial size test failed"); for (int n : new IntVector(10, 999)) @@ -137,7 +137,7 @@ public class li_std_vector_runme { v9.add(60); v9.add(70); if (v9.size() != 7) throw new RuntimeException("v9 test (1) failed"); - if (!v9.remove(new Integer(60))) throw new RuntimeException("v9 test (2) failed"); + if (!v9.remove(Integer.valueOf(60))) throw new RuntimeException("v9 test (2) failed"); if (v9.size() != 6) throw new RuntimeException("v9 test (3) failed"); IntVector v10 = new IntVector(java.util.Arrays.asList(10, 20, 30, 40, 50)); diff --git a/Examples/test-suite/java/long_long_runme.java b/Examples/test-suite/java/long_long_runme.java index 76aa0705d..65a0e79b3 100644 --- a/Examples/test-suite/java/long_long_runme.java +++ b/Examples/test-suite/java/long_long_runme.java @@ -84,14 +84,14 @@ public class long_long_runme { ArrayList bigIntegers = new ArrayList(); for (int i=0; i