Skip to content

Commit

Permalink
Tidy up
Browse files Browse the repository at this point in the history
  • Loading branch information
rnorth committed Apr 10, 2017
1 parent 1531349 commit 52fcaf0
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 15 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ public class MountableFile implements Transferable {
@Getter(lazy = true)
private final String resolvedPath = resolvePath();

@Getter(lazy = true)
private final String resolvedPathWithShellEscaping = resolvePathWithShellEscaping();

/**
* Obtains a {@link MountableFile} corresponding to a resource on the classpath (including resources in JAR files)
*
Expand Down Expand Up @@ -132,10 +129,6 @@ private String resolvePath() {
return result;
}

private String resolvePathWithShellEscaping() {
return getResolvedPath().replaceAll(" ", "\\\\ ");
}

/**
* Extract a file or directory tree from a JAR file to a temporary location.
* This allows Docker to mount classpath resources as files.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ public void forHostPathWithSpaces() throws Exception {

performChecks(mountableFile);

assertTrue("The resolved path contains the original space", mountableFile.getResolvedPath().contains(" "));assertFalse("The resolved path does not contain an escaped space", mountableFile.getResolvedPath().contains("\\ "));
assertTrue("The resolved path contains the original space", mountableFile.getResolvedPath().contains(" "));
assertFalse("The resolved path does not contain an escaped space", mountableFile.getResolvedPath().contains("\\ "));
}

/*
Expand Down

0 comments on commit 52fcaf0

Please sign in to comment.