return skinDocument != null ? skinDocument.getXObject(SKINCLASS_REFERENCE) : null;
}
private TemplateContent getTemplateContentFromSkin(String template, String skin)
{
TemplateContent content;
<BUG>XWikiDocument skinDocument = getSkinDocument(skin);
if (skinDocument != null) {</BUG>
content = getTemplateContentFromDocumentSkin(template, skinDocument);
} else {
content = getResourceAsStringContent("/skins/" + skin + '/', template);

return skinDocument != null ? skinDocument.getXObject(SKINCLASS_REFERENCE) : null;
}
private TemplateContent getTemplateContentFromSkin(String template, String skin)
{
TemplateContent content;
XWikiDocument skinDocument = template.equals("macros.vm") ? null : getSkinDocument(skin);
if (skinDocument != null) {
content = getTemplateContentFromDocumentSkin(template, skinDocument);
} else {
content = getResourceAsStringContent("/skins/" + skin + '/', template);
