none
Bug Reports: EWS JAVA API 1.2 RRS feed

  • Question

  • <text>EWS JAVA API 1.2 is from http://archive.msdn.microsoft.com/ewsjavaapi</text>

    EwsUtilities.java 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;
    		System.out.println(m.find());
    		if (m.find())
    			negative = true;
    		System.out.println(m.group());
                    ...
    }

    According to the comments, xsDuration should follow the pattern of W3C Recommendation(http://www.w3.org/TR/xmlschema-2/#duration).

    Pattern.compile("-P");

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

    System.out.println(m.group());

    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 http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/c6684b26-92f3-4381-9862-6187859b8d1b/#497e6df1-75ee-4358-afb2-c6e526f4ef0c

    and my solution is also to modify the source code.

    Thursday, January 24, 2013 11:55 PM

Answers

  • Hello Yancy Qin,

    Any bugs or proposed updates to the official API can be submitted to ewsjavaapi@sqlserver.org. 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
    Moderator