diff --git a/src/main/java/com/github/sardine/impl/SardineImpl.java b/src/main/java/com/github/sardine/impl/SardineImpl.java index 022bc856..1b5a724a 100644 --- a/src/main/java/com/github/sardine/impl/SardineImpl.java +++ b/src/main/java/com/github/sardine/impl/SardineImpl.java @@ -367,7 +367,7 @@ public List list(String url, int depth, boolean allProp) throws IOE } else { - return list(url, depth, Collections.emptySet()); + return list(url, depth, Collections.emptySet()); } } @@ -378,7 +378,7 @@ public List versionsList(String url) throws IOException { @Override public List versionsList(String url, int depth) throws IOException { - return versionsList(url, depth, Collections.emptySet()); + return versionsList(url, depth, Collections.emptySet()); } @Override @@ -431,7 +431,7 @@ protected List propfind(String url, int depth, Propfind body) throw entity.setEntity(new StringEntity(SardineUtil.toXml(body), StandardCharsets.UTF_8)); Multistatus multistatus = this.execute(entity, new MultiStatusResponseHandler()); List responses = multistatus.getResponse(); - List resources = new ArrayList(responses.size()); + List resources = new ArrayList<>(responses.size()); for (Response response : responses) { try @@ -463,7 +463,7 @@ public List search(String url, String language, String query) throw search.setEntity(createEntity(body)); Multistatus multistatus = this.execute(search, new MultiStatusResponseHandler()); List responses = multistatus.getResponse(); - List resources = new ArrayList(responses.size()); + List resources = new ArrayList<>(responses.size()); for (Response response : responses) { try @@ -487,7 +487,7 @@ public void setCustomProps(String url, Map set, List rem @Override public List patch(String url, Map setProps) throws IOException { - return this.patch(url, setProps, Collections.emptyList()); + return this.patch(url, setProps, Collections.emptyList()); } /** @@ -498,7 +498,7 @@ public List patch(String url, Map setProps) throws I @Override public List patch(String url, Map setProps, List removeProps) throws IOException { - List setPropsElements = new ArrayList(); + List setPropsElements = new ArrayList<>(); for (Entry entry : setProps.entrySet()) { Element element = SardineUtil.createElement(entry.getKey()); @@ -562,7 +562,7 @@ public List patch(String url, List setProps, List r entity.setEntity(createEntity(body)); Multistatus multistatus = this.execute(entity, new MultiStatusResponseHandler()); List responses = multistatus.getResponse(); - List resources = new ArrayList(responses.size()); + List resources = new ArrayList<>(responses.size()); for (Response response : responses) { try @@ -629,7 +629,7 @@ public void setAcl(String url, List aces) throws IOException HttpAcl entity = new HttpAcl(url); // Build WebDAV ACL entity. Acl body = new Acl(); - body.setAce(new ArrayList()); + body.setAce(new ArrayList<>()); for (DavAce davAce : aces) { // protected and inherited acl must not be part of ACL http request @@ -720,7 +720,7 @@ public List getPrincipals(String url) throws IOException } else { - List collections = new ArrayList(); + List collections = new ArrayList<>(); for (Response r : responses) { if (r.getPropstat() != null) @@ -760,7 +760,7 @@ public List getPrincipalCollectionSet(String url) throws IOException } else { - List collections = new ArrayList(); + List collections = new ArrayList<>(); for (Response r : responses) { if (r.getPropstat() != null) @@ -788,7 +788,7 @@ public void enableHttp2() { @Override public ContentLengthInputStream get(String url) throws IOException { - return this.get(url, Collections.emptyMap()); + return this.get(url, Collections.emptyMap()); } @Override @@ -801,7 +801,7 @@ public ContentLengthInputStream get(String url, String version) throws IOExcepti @Override public ContentLengthInputStream get(String url, Map headers) throws IOException { - List
list = new ArrayList
(); + List
list = new ArrayList<>(); for (Map.Entry h : headers.entrySet()) { list.add(new BasicHeader(h.getKey(), h.getValue())); @@ -875,7 +875,7 @@ public void put(String url, InputStream dataStream, String contentType, boolean @Override public void put(String url, InputStream dataStream, String contentType, Map headers) throws IOException { - List
list = new ArrayList
(); + List
list = new ArrayList<>(); for (Map.Entry h : headers.entrySet()) { list.add(new BasicHeader(h.getKey(), h.getValue())); @@ -900,7 +900,7 @@ public void put(String url, InputStream dataStream, String contentType, List headers = new ArrayList
(); + List
headers = new ArrayList<>(); if (contentType != null) { headers.add(new BasicHeader(HttpHeaders.CONTENT_TYPE, contentType));