Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 65659 Details for
Bug 185182
Fup of 126712, the two regressions tests in RuntimeTests should be rewritten
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix
patch_185182.txt (text/plain), 2.99 KB, created by
Olivier Thomann
on 2007-05-02 14:07:27 EDT
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2007-05-02 14:07:27 EDT
Size:
2.99 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core.tests.compiler >Index: src/org/eclipse/jdt/core/tests/compiler/regression/RuntimeTests.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/RuntimeTests.java,v >retrieving revision 1.11 >diff -u -r1.11 RuntimeTests.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/RuntimeTests.java 2 May 2007 17:11:58 -0000 1.11 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/RuntimeTests.java 2 May 2007 18:08:34 -0000 >@@ -126,7 +126,8 @@ > // https://bugs.eclipse.org/bugs/show_bug.cgi?id=126712 > // reflection - access to a public method of a package visible > // class through a public extending class >-public void _test0600_reflection() { >+// ** >+public void test0600_reflection() { > this.runConformTest( > new String[] { > "X.java", >@@ -139,13 +140,15 @@ > " Method foo = Y.class.getMethod(\"foo\", (Class []) null);\n" + > " y.foo();\n" + > " foo.invoke(y, (Object []) null);\n" + >- " }\n" + >- " catch (Throwable t) {\n" + >- " System.out.println(\"FAILURE: \" + t.getMessage());\n" + >- " t.printStackTrace(System.out);\n" + >+ " } catch (NoSuchMethodException e) {\n" + >+ " //ignore\n" + >+ " } catch (InvocationTargetException e) {\n" + >+ " //ignore\n" + >+ " } catch (IllegalAccessException e) {\n" + >+ " System.out.print(\"FAILURE: IllegalAccessException\");\n" + > " }\n" + >- "}\n" + >- "}\n", >+ "}\n" + >+ "}", > "p/Y.java", > "package p;\n" + > "public class Y extends Z {\n" + >@@ -158,14 +161,16 @@ > " System.out.println(\"SUCCESS\"); //$NON-NLS-1$\n" + > " }\n" + > "}\n"}, >- "SUCCESS\nSUCCESS" >+ "SUCCESS\n" + >+ "FAILURE: IllegalAccessException" > ); > } > > // https://bugs.eclipse.org/bugs/show_bug.cgi?id=126712 > // reflection - access to a public field of a package visible > // class through a public extending class >-public void _test0601_reflection() { >+// ** >+public void test0601_reflection() { > this.runConformTest( > new String[] { > "X.java", >@@ -178,13 +183,13 @@ > " Field f = Y.class.getField(\"m\");\n" + > " System.out.println(y.m);\n" + > " System.out.println(f.get(y));\n" + >- " }\n" + >- " catch (Throwable t) {\n" + >- " System.out.println(\"FAILURE: \" + t.getMessage());\n" + >- " t.printStackTrace(System.out);\n" + >+ " } catch (NoSuchFieldException e) {\n" + >+ " //ignore\n" + >+ " } catch (IllegalAccessException e) {\n" + >+ " System.out.print(\"FAILURE: IllegalAccessException\");\n" + > " }\n" + >- "}\n" + >- "}\n", >+ "}\n" + >+ "}", > "p/Y.java", > "package p;\n" + > "public class Y extends Z {\n" + >@@ -195,7 +200,8 @@ > "class Z {\n" + > " public String m = \"SUCCESS\";\n" + > "}\n"}, >- "SUCCESS\nSUCCESS" >+ "SUCCESS\n" + >+ "FAILURE: IllegalAccessException" > ); > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 185182
: 65659