Skip to content

Commit

Permalink
Remove redundant type arguments.
Browse files Browse the repository at this point in the history
  • Loading branch information
dkocher committed Jan 10, 2025
1 parent 2bac00e commit 7dbd51d
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/main/java/com/github/sardine/impl/SardineImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ public List<DavResource> list(String url, int depth, boolean allProp) throws IOE
}
else
{
return list(url, depth, Collections.<QName>emptySet());
return list(url, depth, Collections.emptySet());
}
}

Expand All @@ -378,7 +378,7 @@ public List<DavResource> versionsList(String url) throws IOException {

@Override
public List<DavResource> versionsList(String url, int depth) throws IOException {
return versionsList(url, depth, Collections.<QName>emptySet());
return versionsList(url, depth, Collections.emptySet());
}

@Override
Expand Down Expand Up @@ -431,7 +431,7 @@ protected List<DavResource> 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<Response> responses = multistatus.getResponse();
List<DavResource> resources = new ArrayList<DavResource>(responses.size());
List<DavResource> resources = new ArrayList<>(responses.size());
for (Response response : responses)
{
try
Expand Down Expand Up @@ -463,7 +463,7 @@ public List<DavResource> search(String url, String language, String query) throw
search.setEntity(createEntity(body));
Multistatus multistatus = this.execute(search, new MultiStatusResponseHandler());
List<Response> responses = multistatus.getResponse();
List<DavResource> resources = new ArrayList<DavResource>(responses.size());
List<DavResource> resources = new ArrayList<>(responses.size());
for (Response response : responses)
{
try
Expand All @@ -487,7 +487,7 @@ public void setCustomProps(String url, Map<String, String> set, List<String> rem
@Override
public List<DavResource> patch(String url, Map<QName, String> setProps) throws IOException
{
return this.patch(url, setProps, Collections.<QName>emptyList());
return this.patch(url, setProps, Collections.emptyList());
}

/**
Expand All @@ -498,7 +498,7 @@ public List<DavResource> patch(String url, Map<QName, String> setProps) throws I
@Override
public List<DavResource> patch(String url, Map<QName, String> setProps, List<QName> removeProps) throws IOException
{
List<Element> setPropsElements = new ArrayList<Element>();
List<Element> setPropsElements = new ArrayList<>();
for (Entry<QName, String> entry : setProps.entrySet())
{
Element element = SardineUtil.createElement(entry.getKey());
Expand Down Expand Up @@ -562,7 +562,7 @@ public List<DavResource> patch(String url, List<Element> setProps, List<QName> r
entity.setEntity(createEntity(body));
Multistatus multistatus = this.execute(entity, new MultiStatusResponseHandler());
List<Response> responses = multistatus.getResponse();
List<DavResource> resources = new ArrayList<DavResource>(responses.size());
List<DavResource> resources = new ArrayList<>(responses.size());
for (Response response : responses)
{
try
Expand Down Expand Up @@ -629,7 +629,7 @@ public void setAcl(String url, List<DavAce> aces) throws IOException
HttpAcl entity = new HttpAcl(url);
// Build WebDAV <code>ACL</code> entity.
Acl body = new Acl();
body.setAce(new ArrayList<Ace>());
body.setAce(new ArrayList<>());
for (DavAce davAce : aces)
{
// protected and inherited acl must not be part of ACL http request
Expand Down Expand Up @@ -720,7 +720,7 @@ public List<DavPrincipal> getPrincipals(String url) throws IOException
}
else
{
List<DavPrincipal> collections = new ArrayList<DavPrincipal>();
List<DavPrincipal> collections = new ArrayList<>();
for (Response r : responses)
{
if (r.getPropstat() != null)
Expand Down Expand Up @@ -760,7 +760,7 @@ public List<String> getPrincipalCollectionSet(String url) throws IOException
}
else
{
List<String> collections = new ArrayList<String>();
List<String> collections = new ArrayList<>();
for (Response r : responses)
{
if (r.getPropstat() != null)
Expand Down Expand Up @@ -788,7 +788,7 @@ public void enableHttp2() {
@Override
public ContentLengthInputStream get(String url) throws IOException
{
return this.get(url, Collections.<String, String>emptyMap());
return this.get(url, Collections.emptyMap());
}

@Override
Expand All @@ -801,7 +801,7 @@ public ContentLengthInputStream get(String url, String version) throws IOExcepti
@Override
public ContentLengthInputStream get(String url, Map<String, String> headers) throws IOException
{
List<Header> list = new ArrayList<Header>();
List<Header> list = new ArrayList<>();
for (Map.Entry<String, String> h : headers.entrySet())
{
list.add(new BasicHeader(h.getKey(), h.getValue()));
Expand Down Expand Up @@ -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<String, String> headers) throws IOException
{
List<Header> list = new ArrayList<Header>();
List<Header> list = new ArrayList<>();
for (Map.Entry<String, String> h : headers.entrySet())
{
list.add(new BasicHeader(h.getKey(), h.getValue()));
Expand All @@ -900,7 +900,7 @@ public void put(String url, InputStream dataStream, String contentType, List<Hea
*/
public void put(String url, HttpEntity entity, String contentType, boolean expectContinue) throws IOException
{
List<Header> headers = new ArrayList<Header>();
List<Header> headers = new ArrayList<>();
if (contentType != null)
{
headers.add(new BasicHeader(HttpHeaders.CONTENT_TYPE, contentType));
Expand Down

0 comments on commit 7dbd51d

Please sign in to comment.