You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bo...@apache.org on 2016/05/16 09:47:43 UTC
[3/3] ant git commit: whitespace
whitespace
Project: http://git-wip-us.apache.org/repos/asf/ant/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant/commit/24f3afe7
Tree: http://git-wip-us.apache.org/repos/asf/ant/tree/24f3afe7
Diff: http://git-wip-us.apache.org/repos/asf/ant/diff/24f3afe7
Branch: refs/heads/master
Commit: 24f3afe7920e414a0ef83732fe4ea5aa58d17bce
Parents: 04b9e2b
Author: Stefan Bodewig <bo...@apache.org>
Authored: Mon May 16 11:46:04 2016 +0200
Committer: Stefan Bodewig <bo...@apache.org>
Committed: Mon May 16 11:46:04 2016 +0200
----------------------------------------------------------------------
.../tools/ant/taskdefs/SetPermissions.java | 36 ++++++++++----------
1 file changed, 18 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ant/blob/24f3afe7/src/main/org/apache/tools/ant/taskdefs/SetPermissions.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/taskdefs/SetPermissions.java b/src/main/org/apache/tools/ant/taskdefs/SetPermissions.java
index e78914b..8716bee 100644
--- a/src/main/org/apache/tools/ant/taskdefs/SetPermissions.java
+++ b/src/main/org/apache/tools/ant/taskdefs/SetPermissions.java
@@ -143,29 +143,29 @@ public class SetPermissions extends Task {
}
Resource currentResource = null;
try {
- for (Resource r : resources) {
- currentResource = r;
- try {
- PermissionUtils.setPermissions(r, permissions, this::posixPermissionsNotSupported);
- } catch (IOException ioe) {
- maybeThrowException(ioe, "Failed to set permissions on '%s' due to %s", r, ioe.getMessage());
- }
- }
+ for (Resource r : resources) {
+ currentResource = r;
+ try {
+ PermissionUtils.setPermissions(r, permissions, this::posixPermissionsNotSupported);
+ } catch (IOException ioe) {
+ maybeThrowException(ioe, "Failed to set permissions on '%s' due to %s", r, ioe.getMessage());
+ }
+ }
} catch (ClassCastException uoe) {
- maybeThrowException(null, "some specified permissions are not of type PosixFilePermission: %s", StringUtils.join(permissions, ", "));
+ maybeThrowException(null, "some specified permissions are not of type PosixFilePermission: %s", StringUtils.join(permissions, ", "));
} catch (SecurityException uoe) {
- maybeThrowException(null, "the SecurityManager denies role accessUserInformation or write access for SecurityManager.checkWrite for resource '%s'", currentResource);
+ maybeThrowException(null, "the SecurityManager denies role accessUserInformation or write access for SecurityManager.checkWrite for resource '%s'", currentResource);
}
}
- private void maybeThrowException(Exception ioe, String msgFormat, Object... msgArgs) {
- String msg = String.format(msgFormat, msgArgs);
- if (failonerror) {
- throw new BuildException(msg, ioe);
- } else {
- log("Warning: " + msg, Project.MSG_ERR);
- }
- }
+ private void maybeThrowException(Exception ioe, String msgFormat, Object... msgArgs) {
+ String msg = String.format(msgFormat, msgArgs);
+ if (failonerror) {
+ throw new BuildException(msg, ioe);
+ } else {
+ log("Warning: " + msg, Project.MSG_ERR);
+ }
+ }
private void posixPermissionsNotSupported(Path p) {
String msg = String.format("the associated path '%s' does"