Skip to content

Commit

Permalink
Merge pull request #3354 from LorenzoBettini/lb_3350
Browse files Browse the repository at this point in the history
Flaky QuickDebugSourceInstallingCompilationParticipantTest
  • Loading branch information
LorenzoBettini authored Feb 21, 2025
2 parents 21cfd56 + cb7a990 commit b9963ee
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import org.objectweb.asm.ClassVisitor;
import org.objectweb.asm.Opcodes;

import com.google.common.io.ByteStreams;
import com.google.inject.Inject;

/**
Expand Down Expand Up @@ -66,12 +65,11 @@ def dosomething() {
final AtomicBoolean debugInfoFound = new AtomicBoolean(false);
Path classFile = clazz.getLocation().toPath();
try (var in = Files.newInputStream(classFile)) {
final byte[] bytes = ByteStreams.toByteArray(in);
final ClassReader r = new ClassReader(bytes);
final ClassReader r = new ClassReader(in);
r.accept(new ClassVisitor(Opcodes.ASM9) {
@Override
public void visitSource(final String source, final String debug) {
if ("Outer.java".equals(source)) {
if ("Outer.java".equals(source) && debug != null) {
assertEquals("""
SMAP
Outer.java
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ public AbsoluteURI getPath() {
}

@Override
public long getTimestamp() {
return file.getLocalTimeStamp();
public long getModificationStamp() {
return file.getModificationStamp();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public abstract class AbstractTraceForURIProvider<SomeFile, Trace extends Abstra

protected interface PersistedTrace {
AbsoluteURI getPath();
long getTimestamp();
long getModificationStamp();
InputStream openStream() throws IOException;
boolean exists();
}
Expand All @@ -69,7 +69,7 @@ private static class CacheKey {

public CacheKey(PersistedTrace source) {
this.path = source.getPath();
this.timestamp = source.getTimestamp();
this.timestamp = source.getModificationStamp();
}

@Override
Expand Down

0 comments on commit b9963ee

Please sign in to comment.