Skip to content
Permalink
Browse files
tweak
  • Loading branch information
mbenson committed Mar 10, 2022
1 parent 71ed6a9 commit 0a571c367c37b188c55d92181682cd39324801fe
Showing 1 changed file with 28 additions and 6 deletions.
@@ -49,7 +49,7 @@ public class Put extends CopyResources {
*
* @param s3
*/
public void addConfigured(final Client s3) {
public void addConfigured(Client s3) {
if (this.s3 != null) {
throw new BuildException("S3 client already specified");
}
@@ -61,7 +61,7 @@ public void addConfigured(final Client s3) {
*
* @param refid
*/
public void setClientRefid(final String refid) {
public void setClientRefid(String refid) {
Objects.requireNonNull(StringUtils.trimToNull(refid), "@clientrefid must not be null/empty/blank");

addConfigured(getProject().<Client> getReference(refid));
@@ -81,7 +81,7 @@ public String getBucket() {
*
* @param bucket
*/
public void setBucket(final String bucket) {
public void setBucket(String bucket) {
this.bucket = StringUtils.trimToNull(bucket);
}

@@ -93,7 +93,7 @@ public void setBucket(final String bucket) {
* if {@code append == true}
*/
@Override
public void setAppend(final boolean append) {
public void setAppend(boolean append) {
Exceptions.raiseIf(append, buildExceptionAt(getLocation()), "@append not supported by %s", getTaskName());
}

@@ -105,11 +105,33 @@ public void setAppend(final boolean append) {
* if {@code preserveLastModified == true}
*/
@Override
public void setPreserveLastModified(final boolean preserveLastModified) {
public void setPreserveLastModified(boolean preserveLastModified) {
Exceptions.raiseIf(preserveLastModified, buildExceptionAt(getLocation()),
"@preserveLastModified not supported by %s", getTaskName());
}

/**
* Enforce "always overwrite."
* @return {@code true}
*/
@Override
public boolean isOverwrite() {
return true;
}

/**
* Disable {@code overwrite}.
*
* @param overwrite
* @throws BuildException
* if {@code overwrite == false}
*/
@Override
public void setOverwrite(boolean overwrite) {
Exceptions.raiseUnless(overwrite, buildExceptionAt(getLocation()), "%s only operates in overwrite mode",
getTaskName());
}

/**
* {@inheritDoc}
*/
@@ -136,7 +158,7 @@ public String toString() {
* {@inheritDoc}
*/
@Override
protected void copyResource(final Resource source, final Resource dest, final FilterSetCollection filters,
protected void copyResource(Resource source, Resource dest, FilterSetCollection filters,
final Vector<FilterChain> filterChains) throws IOException {

while (filterChains.isEmpty() && !filters.hasFilters()) {

0 comments on commit 0a571c3

Please sign in to comment.