ASF Bugzilla – Attachment 32140 Details for
Bug 56425
Unable to find unambiguous method in class String
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Test
test.diff (text/plain), 1.85 KB, created by
Violeta Georgieva
on 2014-10-23 08:44:59 UTC
(
hide
)
Description:
Test
Filename:
MIME Type:
Creator:
Violeta Georgieva
Created:
2014-10-23 08:44:59 UTC
Size:
1.85 KB
patch
obsolete
>Index: java/org/apache/el/lang/ELSupport.java >=================================================================== >--- java/org/apache/el/lang/ELSupport.java (revision 1633767) >+++ java/org/apache/el/lang/ELSupport.java (working copy) >@@ -480,7 +480,7 @@ > } > > // Handle arrays >- if (type.isArray()) { >+ if (obj.getClass().isArray() && type.isArray()) { > return coerceToArray(obj, type); > } > >Index: test/javax/el/TesterBean.java >=================================================================== >--- test/javax/el/TesterBean.java (revision 1633767) >+++ test/javax/el/TesterBean.java (working copy) >@@ -40,4 +40,12 @@ > public String getValueA() throws Exception { > throw new Exception(); > } >+ >+ public String setValueInt(Integer value) { >+ return "Invoke setValueInt(Integer value) with :" + value; >+ } >+ >+ public String setValueInt(int value) throws Exception { >+ return "Invoke setValueInt(int value) with :" + value; >+ } > } >Index: test/javax/el/TestUtil.java >=================================================================== >--- test/javax/el/TestUtil.java (revision 1633767) >+++ test/javax/el/TestUtil.java (working copy) >@@ -41,9 +41,17 @@ > > > @Test >- public void testBug56425() { >+ public void testBug56425a() { > ELProcessor processor = new ELProcessor(); > processor.defineBean("string", "a-b-c-d"); > Assert.assertEquals("a_b_c_d", processor.eval("string.replace(\"-\",\"_\")")); >+ Assert.assertEquals("5", processor.eval("string.valueOf(5)")); > } >+ >+ @Test >+ public void testBug56425b() { >+ ELProcessor processor = new ELProcessor(); >+ processor.defineBean("test", new TesterBean("test")); >+ Assert.assertEquals("Invoke setValueInt(int value) with :5", processor.eval("test.setValueInt(5)")); >+ } > }
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 56425
:
32137
| 32140