axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tommi Vainikainen (JIRA)" <j...@apache.org>
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
                 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: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Mime
View raw message