diff -r baf88aa4f5db -r 0ef79bd7fb5c src/jdk.jfr/share/classes/jdk/jfr/internal/consumer/RepositoryFiles.java --- a/src/jdk.jfr/share/classes/jdk/jfr/internal/consumer/RepositoryFiles.java Tue Sep 17 19:37:49 2019 +0200 +++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/consumer/RepositoryFiles.java Wed Sep 18 03:45:46 2019 +0200 @@ -59,24 +59,24 @@ private volatile boolean closed; private final Object waitObject; - public RepositoryFiles(FileAccess fileAccess, Path repository) { + RepositoryFiles(FileAccess fileAccess, Path repository) { this.repository = repository; this.fileAccess = fileAccess; this.waitObject = repository == null ? WAIT_OBJECT : new Object(); } - public long getTimestamp(Path p) { + long getTimestamp(Path p) { return pathLookup.get(p); } - public Path lastPath() { + Path lastPath() { if (waitForPaths()) { return pathSet.lastEntry().getValue(); } return null; // closed } - public Path firstPath(long startTimeNanos) { + Path firstPath(long startTimeNanos) { if (waitForPaths()) { // Pick closest chunk before timestamp Long time = pathSet.floorKey(startTimeNanos); @@ -106,7 +106,7 @@ return !closed; } - public Path nextPath(long startTimeNanos) { + Path nextPath(long startTimeNanos) { return path(startTimeNanos); } @@ -182,7 +182,7 @@ // Only add files that have a complete header // as the JVM may be in progress writing the file long size = fileAccess.fileSize(p); - if (size >= ChunkHeader.HEADER_SIZE) { + if (size >= ChunkHeader.headerSize()) { long startNanos = readStartTime(p); pathSet.put(startNanos, p); pathLookup.put(p, startNanos); @@ -200,7 +200,7 @@ } } - public void close() { + void close() { synchronized (waitObject) { this.closed = true; waitObject.notify();