aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/skyframe/FileStateValue.java
diff options
context:
space:
mode:
authorGravatar Janak Ramakrishnan <janakr@google.com>2015-05-06 18:17:49 +0000
committerGravatar Lukacs Berki <lberki@google.com>2015-05-07 14:04:29 +0000
commitb4d2d1a57d302c487675c58b6b2c0a2d9e453090 (patch)
tree445847209400ccfc7c104d21bf06ece0f6c1f2e6 /src/main/java/com/google/devtools/build/lib/skyframe/FileStateValue.java
parent5dec20de5dae83179771e95ed5664f9c8efc686d (diff)
Clean up some overly permissive permissions in FileStateValue.
-- MOS_MIGRATED_REVID=92944321
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skyframe/FileStateValue.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/skyframe/FileStateValue.java31
1 files changed, 15 insertions, 16 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/FileStateValue.java b/src/main/java/com/google/devtools/build/lib/skyframe/FileStateValue.java
index 8631ff3249..030b50bd86 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/FileStateValue.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/FileStateValue.java
@@ -51,11 +51,10 @@ import javax.annotation.Nullable;
*/
abstract class FileStateValue implements SkyValue {
- public static final FileStateValue DIRECTORY_FILE_STATE_NODE = DirectoryFileStateValue.INSTANCE;
- public static final FileStateValue NONEXISTENT_FILE_STATE_NODE =
- NonexistentFileStateValue.INSTANCE;
+ static final FileStateValue DIRECTORY_FILE_STATE_NODE = DirectoryFileStateValue.INSTANCE;
+ static final FileStateValue NONEXISTENT_FILE_STATE_NODE = NonexistentFileStateValue.INSTANCE;
- public enum Type {
+ enum Type {
FILE,
DIRECTORY,
SYMLINK,
@@ -65,7 +64,7 @@ abstract class FileStateValue implements SkyValue {
protected FileStateValue() {
}
- public static FileStateValue create(RootedPath rootedPath,
+ static FileStateValue create(RootedPath rootedPath,
@Nullable TimestampGranularityMonitor tsgm) throws InconsistentFilesystemException,
IOException {
Path path = rootedPath.asPath();
@@ -78,7 +77,7 @@ abstract class FileStateValue implements SkyValue {
return createWithStatNoFollow(rootedPath, FileStatusWithDigestAdapter.adapt(stat), tsgm);
}
- public static FileStateValue createWithStatNoFollow(RootedPath rootedPath,
+ static FileStateValue createWithStatNoFollow(RootedPath rootedPath,
FileStatusWithDigest statNoFollow, @Nullable TimestampGranularityMonitor tsgm)
throws InconsistentFilesystemException, IOException {
Path path = rootedPath.asPath();
@@ -145,7 +144,7 @@ abstract class FileStateValue implements SkyValue {
* Create a FileFileStateValue instance corresponding to the given existing file.
* @param stat must be of type "File". (Not a symlink).
*/
- public static FileFileStateValue fromPath(Path path, FileStatusWithDigest stat,
+ private static FileFileStateValue fromPath(Path path, FileStatusWithDigest stat,
@Nullable TimestampGranularityMonitor tsgm)
throws InconsistentFilesystemException {
Preconditions.checkState(stat.isFile(), path);
@@ -179,18 +178,18 @@ abstract class FileStateValue implements SkyValue {
}
@Override
- public Type getType() {
+ Type getType() {
return Type.FILE;
}
@Override
- public long getSize() {
+ long getSize() {
return size;
}
@Override
@Nullable
- public byte[] getDigest() {
+ byte[] getDigest() {
return digest;
}
@@ -219,13 +218,13 @@ abstract class FileStateValue implements SkyValue {
/** Implementation of {@link FileStateValue} for directories that exist. */
private static final class DirectoryFileStateValue extends FileStateValue {
- public static final DirectoryFileStateValue INSTANCE = new DirectoryFileStateValue();
+ static final DirectoryFileStateValue INSTANCE = new DirectoryFileStateValue();
private DirectoryFileStateValue() {
}
@Override
- public Type getType() {
+ Type getType() {
return Type.DIRECTORY;
}
@@ -256,12 +255,12 @@ abstract class FileStateValue implements SkyValue {
}
@Override
- public Type getType() {
+ Type getType() {
return Type.SYMLINK;
}
@Override
- public PathFragment getSymlinkTarget() {
+ PathFragment getSymlinkTarget() {
return symlinkTarget;
}
@@ -288,13 +287,13 @@ abstract class FileStateValue implements SkyValue {
/** Implementation of {@link FileStateValue} for nonexistent files. */
private static final class NonexistentFileStateValue extends FileStateValue {
- public static final NonexistentFileStateValue INSTANCE = new NonexistentFileStateValue();
+ static final NonexistentFileStateValue INSTANCE = new NonexistentFileStateValue();
private NonexistentFileStateValue() {
}
@Override
- public Type getType() {
+ Type getType() {
return Type.NONEXISTENT;
}