Skip to content

Commit

Permalink
ALFREDAPI-562: SonarCloud suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
WimCrols committed Dec 12, 2024
1 parent 6134dd5 commit 70c1032
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -630,10 +630,9 @@ public eu.xenit.alfred.api.data.ContentData createContent(InputStream inputStrea
writer.setMimetype(mimeType);
writer.setEncoding(encoding);
writer.putContent(inputStream);
eu.xenit.alfred.api.data.ContentData result = new eu.xenit.alfred.api.data.ContentData(
return new eu.xenit.alfred.api.data.ContentData(
writer.getContentUrl(),
writer.getMimetype(), writer.getSize(), writer.getEncoding(), writer.getLocale());
return result;
} finally {
IOUtils.closeQuietly(inputStream);
}
Expand Down Expand Up @@ -718,11 +717,7 @@ public eu.xenit.alfred.api.data.NodeRef checkin(eu.xenit.alfred.api.data.NodeRef
HashMap props = new HashMap(2, 1.0F);
props.put("description", comment);
props.put("versionType", majorVersion ? VersionType.MAJOR : VersionType.MINOR);

eu.xenit.alfred.api.data.NodeRef original = c.alfredApi(
this.checkoutCheckinService.checkin(c.alfresco(nodeRef), props));

return original;
return c.alfredApi(this.checkoutCheckinService.checkin(c.alfresco(nodeRef), props));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ private static boolean IsIntProperty(String prop) {
return integerProperties.contains(prop);
}

public AbstractAlfredApiAlfrescoWorkflowConvertor(
protected AbstractAlfredApiAlfrescoWorkflowConvertor(
ServiceRegistry serviceRegistry,
IPeopleService peopleService,
AlfredApiToAlfrescoConversion alfredApiToAlfrescoConversion) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public abstract class AbstractAlfredApiWorkflowConvertor {
private IPeopleService peopleService;
private AuthorityService authorityService;

public AbstractAlfredApiWorkflowConvertor(ServiceRegistry serviceRegistry, IPeopleService peopleService) {
protected AbstractAlfredApiWorkflowConvertor(ServiceRegistry serviceRegistry, IPeopleService peopleService) {
this.peopleService = peopleService;
authorityService = serviceRegistry.getAuthorityService();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public void setup() {
alfNodeService.setProperty(nodeForbidden, PROP_QNAME_VERSION_LABEL, PROPERTY_VALUE);

} catch (FileExistsException e) {
logger.warn("Test folder already created. Skipping", e);
logger.warn("'Forbidden' folder already created. Skipping", e);
}

try {
Expand All @@ -104,7 +104,7 @@ public void setup() {
alfNodeService.setProperty(nodeAllowed, PROP_QNAME_VERSION_LABEL, PROPERTY_VALUE);

} catch (FileExistsException e) {
logger.warn("Test folder already created. Skipping", e);
logger.warn("'Allowed' folder already created. Skipping", e);
}
}

Expand Down

0 comments on commit 70c1032

Please sign in to comment.