Tommi Vainikainen created AXIS2-5455:
----------------------------------------
Summary: org.apache.axis2.wsdl.databinding.CUtils method
isCKeyword is buggy
Key: AXIS2-5455
URL: https://issues.apache.org/jira/browse/AXIS2-5455
Project: Axis2
Issue Type: Bug
Components: databinding
Affects Versions: 1.6.2
Reporter: Tommi Vainikainen
Priority: Minor
org.apache.axis2.wsdl.databinding.CUtils has method isCKeyword which assumes
that CUtils.keywords is sorted array.
However CUtils.keywords is not sorted array and therefore Arrays.binarySearch
fails for example with keyword "friend" (possibly depends on Java
version/implementation used).
It seems that originally CUtils.keywords contained only a short list of C/C++
keywords in sorter array but later there was added list of Microsoft C++
compiler's keywords, which contains also duplicates from previous list of
keywords, but overall result is that full array is no longer sorted.
Here is a JUinit test for you which fails currently if it helps:
@Test
public void test() {
for (String kw : CUtils.keywords) {
assertTrue(kw, CUtils.isCKeyword(kw));
}
}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]