MCPcopy Create free account
hub / github.com/apache/tomcat / testImportStatic04

Method testImportStatic04

test/jakarta/el/TestImportHandler.java:241–254  ·  view source on GitHub ↗

Import an invalid static field - conflict.

()

Source from the content-addressed store, hash-verified

239 * Import an invalid static field - conflict.
240 */
241 @Test
242 public void testImportStatic04() {
243 ImportHandler handler = new ImportHandler();
244
245 handler.importStatic("org.apache.tomcat.util.scan.Constants.Package");
246 for (int i = 1; i <= 3; i++) {
247 try {
248 handler.importStatic("org.apache.tomcat.util.threads.Constants.Package");
249 Assert.fail("Expected ELException but got none on iteration " + i);
250 } catch (ELException ex) {
251 // Expected
252 }
253 }
254 }
255
256
257 /**

Callers

nothing calls this directly

Calls 2

importStaticMethod · 0.95
failMethod · 0.80

Tested by

no test coverage detected