Bug Reports: EWS JAVA API 1.2 RRS feed

  • Question

  • <text>EWS JAVA API 1.2 is from</text> line 958

    Here is the code from line 950 to 958

    protected static TimeSpan getXSDurationToTimeSpan(String xsDuration) {
    		// TODO: Need to check whether this should be the equivalent or not
    		Pattern timeSpanParser = Pattern.compile("-P");
    		Matcher m = timeSpanParser.matcher(xsDuration);
    		boolean negative = false;
    		if (m.find())
    			negative = true;

    According to the comments, xsDuration should follow the pattern of W3C Recommendation(


    That line will try to find a negative time span. Whereas if it can't find negative pattern, this line


    will throw a  java.lang.IllegalStateException

    I know it's weird to send a java API bug to Microsoft, however, it's still the API that Microsoft developed.

    Thank you for your attention to this matter. 

    Another question: Since the EWS JAVA API 1.2 has some issue, if I change the source code to use it, is that violating license agreement?

    BTW, I have enconter the same issue in 1.2 as

    and my solution is also to modify the source code.

    Thursday, January 24, 2013 11:55 PM


  • Hello Yancy Qin,

    Any bugs or proposed updates to the official API can be submitted to Include a problem definition, the fix description, and the modified source files.

    Please review this blog post. You can modify the source code and distribute your private updated binaries with your product. You cannot distribute the updated source code. Please read the license terms for an authoritative statement on terms of use.

    With regards,

    Michael | Microsoft Exchange Developer Content

    The Exchange Development Forum Guide has useful information for using the Exchange Development Forum.

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    • Marked as answer by Yancy Qin Tuesday, February 12, 2013 7:25 PM
    Tuesday, February 12, 2013 7:07 PM