reactor / reactor/BlockHound

Not detected call to `Files.readString(path)`

Open
#192 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
1.5k
Forks
95
Avg merge
1d 14m
Merged PRs (30d)
6

Description

Expected Behavior

public static void main(String[] args) {
    BlockHound.install();
    Mono.fromCallable(() -> {
        try {
            return Files.readString(testFilePath);
        } catch (IOException e) {
            throw new RuntimeException("Could not read file: " + testFilePath, e);
        }
    })
            .subscribeOn(Schedulers.parallel())
            .block();
    // Expected blocking call error
}

Actual Behavior

BlockHound does not detect call Files.readString(path).

Steps to Reproduce

I created small project to test this issue.

Your Environment

  • Reactor version(s) used: 3.4.5
  • JVM version: OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.7+10, mixed mode)
  • OS and version: Linux 5.8.0-49-generic 20.04.1-Ubuntu x86_64

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reproduction in test/src/test/java/com/coditory/sandbox/BlockingSamplesSpec.java and the Files.readString(path) call shown in the issue. Trace how BlockHound.install() handles this call on Schedulers.parallel(), then add coverage showing that the blocking call produces the expected error.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.