fix: closed reader during java binary detection (#4129)

Signed-off-by: Keith Zantow <kzantow@gmail.com>
This commit is contained in:
Keith Zantow
2025-08-12 08:58:28 -04:00
committed by GitHub
parent 6452a19009
commit 9f956dca8f
11 changed files with 121 additions and 78 deletions
@@ -31,7 +31,7 @@ func BranchingEvidenceMatcher(classifiers ...Classifier) EvidenceMatcher {
if err != nil {
return nil, err
}
return rdr, nil
return &nonClosingUnionReader{rdr}, nil
},
})
if len(pkgs) > 0 || err != nil {
@@ -41,3 +41,11 @@ func BranchingEvidenceMatcher(classifiers ...Classifier) EvidenceMatcher {
return nil, nil
}
}
type nonClosingUnionReader struct {
unionreader.UnionReader
}
func (c *nonClosingUnionReader) Close() error {
return nil
}