sergiogonzalez/liferay-portal — comment on commit a31f2700db2fa27ace9f40fd358b5f88f2eaa112
File: portal-impl/src/com/liferay/portlet/documentlibrary/lar/DLPortletDataHandlerImpl.java line 1094
By sergiogonzalez:

I think that setting the xsd in the serviceContext shouldn't be necessary because all the structures have already been imported. However, when calling the metods DLFileEntryTypeLocalServiceUtil.addFileEntryType or DLFileEntryTypeLocalServiceUtil.updateFileEntryType it ends up calling to updateDynamicStructure in DLFileEntryTypeLocalServiceImpl.java and it needs the xsd attribute in the service context, because otherwise it will throw an exception when trying to add or update the DDMStructure.