Skip to content

Commit

Permalink
apply spotless formatting
Browse files Browse the repository at this point in the history
* on top of Hans Schulz  "mask off non-permission bits"
  • Loading branch information
anthonydahanne committed Feb 12, 2024
1 parent c8ba81a commit 5c19b6b
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 112 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1491,10 +1491,7 @@ void pushDomainNotFound() throws IOException {
this.cloudFoundryClient,
Arrays.asList(
new ResourceMatchingUtils.ArtifactMetadata(
"da39a3ee5e6b4b0d3255bfef95601890afd80709",
"Staticfile",
"644",
0),
"da39a3ee5e6b4b0d3255bfef95601890afd80709", "Staticfile", "644", 0),
new ResourceMatchingUtils.ArtifactMetadata(
"45044a6ddbfe11415a8f8a6219de68a2c66b496b",
"index.html",
Expand Down Expand Up @@ -1544,10 +1541,7 @@ void pushExistingApplication() throws IOException {
this.cloudFoundryClient,
Arrays.asList(
new ResourceMatchingUtils.ArtifactMetadata(
"da39a3ee5e6b4b0d3255bfef95601890afd80709",
"Staticfile",
"644",
0),
"da39a3ee5e6b4b0d3255bfef95601890afd80709", "Staticfile", "644", 0),
new ResourceMatchingUtils.ArtifactMetadata(
"45044a6ddbfe11415a8f8a6219de68a2c66b496b",
"index.html",
Expand Down Expand Up @@ -1615,10 +1609,7 @@ void pushExistingApplicationWithEnvironmentVariables() throws IOException {
this.cloudFoundryClient,
Arrays.asList(
new ResourceMatchingUtils.ArtifactMetadata(
"da39a3ee5e6b4b0d3255bfef95601890afd80709",
"Staticfile",
"644",
0),
"da39a3ee5e6b4b0d3255bfef95601890afd80709", "Staticfile", "644", 0),
new ResourceMatchingUtils.ArtifactMetadata(
"45044a6ddbfe11415a8f8a6219de68a2c66b496b",
"index.html",
Expand Down Expand Up @@ -1688,10 +1679,7 @@ void pushExistingApplicationWithNullEnvironment() throws IOException {
this.cloudFoundryClient,
Arrays.asList(
new ResourceMatchingUtils.ArtifactMetadata(
"da39a3ee5e6b4b0d3255bfef95601890afd80709",
"Staticfile",
"644",
0),
"da39a3ee5e6b4b0d3255bfef95601890afd80709", "Staticfile", "644", 0),
new ResourceMatchingUtils.ArtifactMetadata(
"45044a6ddbfe11415a8f8a6219de68a2c66b496b",
"index.html",
Expand Down Expand Up @@ -1767,10 +1755,7 @@ void pushExistingRouteWithHost() throws IOException {
this.cloudFoundryClient,
Arrays.asList(
new ResourceMatchingUtils.ArtifactMetadata(
"da39a3ee5e6b4b0d3255bfef95601890afd80709",
"Staticfile",
"644",
0),
"da39a3ee5e6b4b0d3255bfef95601890afd80709", "Staticfile", "644", 0),
new ResourceMatchingUtils.ArtifactMetadata(
"45044a6ddbfe11415a8f8a6219de68a2c66b496b",
"index.html",
Expand Down Expand Up @@ -1826,10 +1811,7 @@ void pushExistingRouteWithNoHost() throws IOException {
this.cloudFoundryClient,
Arrays.asList(
new ResourceMatchingUtils.ArtifactMetadata(
"da39a3ee5e6b4b0d3255bfef95601890afd80709",
"Staticfile",
"644",
0),
"da39a3ee5e6b4b0d3255bfef95601890afd80709", "Staticfile", "644", 0),
new ResourceMatchingUtils.ArtifactMetadata(
"45044a6ddbfe11415a8f8a6219de68a2c66b496b",
"index.html",
Expand Down Expand Up @@ -1908,10 +1890,7 @@ void pushMultipleRoutes() throws IOException {
this.cloudFoundryClient,
Arrays.asList(
new ResourceMatchingUtils.ArtifactMetadata(
"da39a3ee5e6b4b0d3255bfef95601890afd80709",
"Staticfile",
"644",
0),
"da39a3ee5e6b4b0d3255bfef95601890afd80709", "Staticfile", "644", 0),
new ResourceMatchingUtils.ArtifactMetadata(
"45044a6ddbfe11415a8f8a6219de68a2c66b496b",
"index.html",
Expand Down Expand Up @@ -1991,10 +1970,7 @@ void pushNewApplication() throws IOException {
this.cloudFoundryClient,
Arrays.asList(
new ResourceMatchingUtils.ArtifactMetadata(
"da39a3ee5e6b4b0d3255bfef95601890afd80709",
"Staticfile",
"644",
0),
"da39a3ee5e6b4b0d3255bfef95601890afd80709", "Staticfile", "644", 0),
new ResourceMatchingUtils.ArtifactMetadata(
"45044a6ddbfe11415a8f8a6219de68a2c66b496b",
"index.html",
Expand Down Expand Up @@ -2059,10 +2035,7 @@ void pushNewApplicationWithEnvironmentVariables() throws IOException {
this.cloudFoundryClient,
Arrays.asList(
new ResourceMatchingUtils.ArtifactMetadata(
"da39a3ee5e6b4b0d3255bfef95601890afd80709",
"Staticfile",
"644",
0),
"da39a3ee5e6b4b0d3255bfef95601890afd80709", "Staticfile", "644", 0),
new ResourceMatchingUtils.ArtifactMetadata(
"45044a6ddbfe11415a8f8a6219de68a2c66b496b",
"index.html",
Expand Down Expand Up @@ -2136,10 +2109,7 @@ void pushNewRouteWithHost() throws IOException {
this.cloudFoundryClient,
Arrays.asList(
new ResourceMatchingUtils.ArtifactMetadata(
"da39a3ee5e6b4b0d3255bfef95601890afd80709",
"Staticfile",
"644",
0),
"da39a3ee5e6b4b0d3255bfef95601890afd80709", "Staticfile", "644", 0),
new ResourceMatchingUtils.ArtifactMetadata(
"45044a6ddbfe11415a8f8a6219de68a2c66b496b",
"index.html",
Expand Down Expand Up @@ -2202,10 +2172,7 @@ void pushNewRouteWithNoHost() throws IOException {
this.cloudFoundryClient,
Arrays.asList(
new ResourceMatchingUtils.ArtifactMetadata(
"da39a3ee5e6b4b0d3255bfef95601890afd80709",
"Staticfile",
"644",
0),
"da39a3ee5e6b4b0d3255bfef95601890afd80709", "Staticfile", "644", 0),
new ResourceMatchingUtils.ArtifactMetadata(
"45044a6ddbfe11415a8f8a6219de68a2c66b496b",
"index.html",
Expand Down Expand Up @@ -2260,10 +2227,7 @@ void pushNoDomainNoneFound() throws IOException {
this.cloudFoundryClient,
Arrays.asList(
new ResourceMatchingUtils.ArtifactMetadata(
"da39a3ee5e6b4b0d3255bfef95601890afd80709",
"Staticfile",
"644",
0),
"da39a3ee5e6b4b0d3255bfef95601890afd80709", "Staticfile", "644", 0),
new ResourceMatchingUtils.ArtifactMetadata(
"45044a6ddbfe11415a8f8a6219de68a2c66b496b",
"index.html",
Expand Down Expand Up @@ -2305,10 +2269,7 @@ void pushNoDomainPrivate() throws IOException {
this.cloudFoundryClient,
Arrays.asList(
new ResourceMatchingUtils.ArtifactMetadata(
"da39a3ee5e6b4b0d3255bfef95601890afd80709",
"Staticfile",
"644",
0),
"da39a3ee5e6b4b0d3255bfef95601890afd80709", "Staticfile", "644", 0),
new ResourceMatchingUtils.ArtifactMetadata(
"45044a6ddbfe11415a8f8a6219de68a2c66b496b",
"index.html",
Expand Down Expand Up @@ -2352,10 +2313,7 @@ void pushNoDomainShared() throws IOException {
this.cloudFoundryClient,
Arrays.asList(
new ResourceMatchingUtils.ArtifactMetadata(
"da39a3ee5e6b4b0d3255bfef95601890afd80709",
"Staticfile",
"644",
0),
"da39a3ee5e6b4b0d3255bfef95601890afd80709", "Staticfile", "644", 0),
new ResourceMatchingUtils.ArtifactMetadata(
"45044a6ddbfe11415a8f8a6219de68a2c66b496b",
"index.html",
Expand Down Expand Up @@ -2414,10 +2372,7 @@ void pushNoHostnameFlag() throws IOException {
this.cloudFoundryClient,
Arrays.asList(
new ResourceMatchingUtils.ArtifactMetadata(
"da39a3ee5e6b4b0d3255bfef95601890afd80709",
"Staticfile",
"644",
0),
"da39a3ee5e6b4b0d3255bfef95601890afd80709", "Staticfile", "644", 0),
new ResourceMatchingUtils.ArtifactMetadata(
"45044a6ddbfe11415a8f8a6219de68a2c66b496b",
"index.html",
Expand Down Expand Up @@ -2483,10 +2438,7 @@ void pushNoInstances() throws IOException {
this.cloudFoundryClient,
Arrays.asList(
new ResourceMatchingUtils.ArtifactMetadata(
"da39a3ee5e6b4b0d3255bfef95601890afd80709",
"Staticfile",
"644",
0),
"da39a3ee5e6b4b0d3255bfef95601890afd80709", "Staticfile", "644", 0),
new ResourceMatchingUtils.ArtifactMetadata(
"45044a6ddbfe11415a8f8a6219de68a2c66b496b",
"index.html",
Expand Down Expand Up @@ -2543,10 +2495,7 @@ void pushNoRoute() throws IOException {
this.cloudFoundryClient,
Arrays.asList(
new ResourceMatchingUtils.ArtifactMetadata(
"da39a3ee5e6b4b0d3255bfef95601890afd80709",
"Staticfile",
"644",
0),
"da39a3ee5e6b4b0d3255bfef95601890afd80709", "Staticfile", "644", 0),
new ResourceMatchingUtils.ArtifactMetadata(
"45044a6ddbfe11415a8f8a6219de68a2c66b496b",
"index.html",
Expand Down Expand Up @@ -2597,10 +2546,7 @@ void pushNoRouteFlag() throws IOException {
this.cloudFoundryClient,
Arrays.asList(
new ResourceMatchingUtils.ArtifactMetadata(
"da39a3ee5e6b4b0d3255bfef95601890afd80709",
"Staticfile",
"644",
0),
"da39a3ee5e6b4b0d3255bfef95601890afd80709", "Staticfile", "644", 0),
new ResourceMatchingUtils.ArtifactMetadata(
"45044a6ddbfe11415a8f8a6219de68a2c66b496b",
"index.html",
Expand Down Expand Up @@ -2654,10 +2600,7 @@ void pushNoStart() throws IOException {
this.cloudFoundryClient,
Arrays.asList(
new ResourceMatchingUtils.ArtifactMetadata(
"da39a3ee5e6b4b0d3255bfef95601890afd80709",
"Staticfile",
"644",
0),
"da39a3ee5e6b4b0d3255bfef95601890afd80709", "Staticfile", "644", 0),
new ResourceMatchingUtils.ArtifactMetadata(
"45044a6ddbfe11415a8f8a6219de68a2c66b496b",
"index.html",
Expand Down Expand Up @@ -2717,10 +2660,7 @@ void pushPrivateDomain() throws IOException {
this.cloudFoundryClient,
Arrays.asList(
new ResourceMatchingUtils.ArtifactMetadata(
"da39a3ee5e6b4b0d3255bfef95601890afd80709",
"Staticfile",
"644",
0),
"da39a3ee5e6b4b0d3255bfef95601890afd80709", "Staticfile", "644", 0),
new ResourceMatchingUtils.ArtifactMetadata(
"45044a6ddbfe11415a8f8a6219de68a2c66b496b",
"index.html",
Expand Down Expand Up @@ -2788,10 +2728,7 @@ void pushRandomRoute() throws IOException {
this.cloudFoundryClient,
Arrays.asList(
new ResourceMatchingUtils.ArtifactMetadata(
"da39a3ee5e6b4b0d3255bfef95601890afd80709",
"Staticfile",
"644",
0),
"da39a3ee5e6b4b0d3255bfef95601890afd80709", "Staticfile", "644", 0),
new ResourceMatchingUtils.ArtifactMetadata(
"45044a6ddbfe11415a8f8a6219de68a2c66b496b",
"index.html",
Expand Down Expand Up @@ -2854,10 +2791,7 @@ void pushSharedDomain() throws IOException {
this.cloudFoundryClient,
Arrays.asList(
new ResourceMatchingUtils.ArtifactMetadata(
"da39a3ee5e6b4b0d3255bfef95601890afd80709",
"Staticfile",
"644",
0),
"da39a3ee5e6b4b0d3255bfef95601890afd80709", "Staticfile", "644", 0),
new ResourceMatchingUtils.ArtifactMetadata(
"45044a6ddbfe11415a8f8a6219de68a2c66b496b",
"index.html",
Expand Down Expand Up @@ -2919,10 +2853,7 @@ void pushStartFailsRunning() throws IOException {
this.cloudFoundryClient,
Arrays.asList(
new ResourceMatchingUtils.ArtifactMetadata(
"da39a3ee5e6b4b0d3255bfef95601890afd80709",
"Staticfile",
"644",
0),
"da39a3ee5e6b4b0d3255bfef95601890afd80709", "Staticfile", "644", 0),
new ResourceMatchingUtils.ArtifactMetadata(
"45044a6ddbfe11415a8f8a6219de68a2c66b496b",
"index.html",
Expand Down Expand Up @@ -2989,10 +2920,7 @@ void pushStartFailsStaging() throws IOException {
this.cloudFoundryClient,
Arrays.asList(
new ResourceMatchingUtils.ArtifactMetadata(
"da39a3ee5e6b4b0d3255bfef95601890afd80709",
"Staticfile",
"644",
0),
"da39a3ee5e6b4b0d3255bfef95601890afd80709", "Staticfile", "644", 0),
new ResourceMatchingUtils.ArtifactMetadata(
"45044a6ddbfe11415a8f8a6219de68a2c66b496b",
"index.html",
Expand Down Expand Up @@ -3053,10 +2981,7 @@ void pushTcpRandomRoute() throws IOException {
this.cloudFoundryClient,
Arrays.asList(
new ResourceMatchingUtils.ArtifactMetadata(
"da39a3ee5e6b4b0d3255bfef95601890afd80709",
"Staticfile",
"644",
0),
"da39a3ee5e6b4b0d3255bfef95601890afd80709", "Staticfile", "644", 0),
new ResourceMatchingUtils.ArtifactMetadata(
"45044a6ddbfe11415a8f8a6219de68a2c66b496b",
"index.html",
Expand Down Expand Up @@ -3116,10 +3041,7 @@ void pushTcpRoute() throws IOException {
this.cloudFoundryClient,
Arrays.asList(
new ResourceMatchingUtils.ArtifactMetadata(
"da39a3ee5e6b4b0d3255bfef95601890afd80709",
"Staticfile",
"644",
0),
"da39a3ee5e6b4b0d3255bfef95601890afd80709", "Staticfile", "644", 0),
new ResourceMatchingUtils.ArtifactMetadata(
"45044a6ddbfe11415a8f8a6219de68a2c66b496b",
"index.html",
Expand Down Expand Up @@ -3189,10 +3111,7 @@ void pushUploadFails() throws IOException {
this.cloudFoundryClient,
Arrays.asList(
new ResourceMatchingUtils.ArtifactMetadata(
"da39a3ee5e6b4b0d3255bfef95601890afd80709",
"Staticfile",
"644",
0),
"da39a3ee5e6b4b0d3255bfef95601890afd80709", "Staticfile", "644", 0),
new ResourceMatchingUtils.ArtifactMetadata(
"45044a6ddbfe11415a8f8a6219de68a2c66b496b",
"index.html",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,11 @@ public static String permissions(Path path) {
* @return a {@link String} representation of the permissions
*/
public static String permissions(int mode) {
return Integer.toOctalString(mode == 0 ?
DEFAULT_PERMISSIONS :
mode & 07777 // only use permission bits, not the file type
);
return Integer.toOctalString(
mode == 0
? DEFAULT_PERMISSIONS
: mode & 07777 // only use permission bits, not the file type
);
}

/**
Expand Down

0 comments on commit 5c19b6b

Please sign in to comment.