OfficeDev/ews-java-api — pull request #55 by jimdunkerton (2014-09-07 22:22:52+00:00)
Title: Fix for issue #8 : MeetingMessage returns the wrong schema

MeetingMessage.getSchema() returns an EmailMessageSchema when it should return the MeetingMessageSchema. This affects the child classes of MeetingCancellation and MeetingResponse. MeetingRequest is not affected.

The issue is that both aforementioned child classes rely on MeetingMessage to return a schema. MeetingMessage.getSchema() calls MeetingMessageSchema.getInstance(). This method is not present on MeetingMessageSchema and goes up to EmailMessageSchema.getInstance(), which returns an EmailMessageSchema for the two classes, omitting additional properties from MeetingMessageSchema.

MeetingMessageSchema should return its own instance directly and not rely on its parent class.

The fix is to override getInstance() in MeetingMessageSchema, so that its superclass' implementation is no longer called.