axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tommi Vainikainen (JIRA)" <>
Subject [jira] [Created] (AXIS2-5455) org.apache.axis2.wsdl.databinding.CUtils method isCKeyword is buggy
Date Wed, 14 Nov 2012 09:34:12 GMT
Tommi Vainikainen created AXIS2-5455:

             Summary: org.apache.axis2.wsdl.databinding.CUtils method isCKeyword is buggy
                 Key: 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:

	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:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message