Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java/http api #676

Open
wants to merge 25 commits into
base: main
Choose a base branch
from
Open

Java/http api #676

wants to merge 25 commits into from

Conversation

doxthree
Copy link
Contributor

No description provided.

@doxthree doxthree marked this pull request as ready for review January 7, 2025 15:43
@doxthree doxthree added the Java Pull requests that update Java code label Jan 8, 2025
.github/workflows/ci-java.yaml Show resolved Hide resolved
java/src/main/java/de/gdata/vaas/IVaas.java Outdated Show resolved Hide resolved
java/src/main/java/de/gdata/vaas/VaasConfig.java Outdated Show resolved Hide resolved
java/src/main/java/de/gdata/vaas/Vaas.java Outdated Show resolved Hide resolved
java/src/main/java/de/gdata/vaas/Vaas.java Outdated Show resolved Hide resolved

return forSha256(sha256, forSha256Options)
.thenCompose(handleException(vaasVerdict -> {
var verdictWithoutDetection = vaasVerdict.getVerdict() == Verdict.MALICIOUS
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This and the following if are strange. Please compare to golang.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part is inspired by the csharp implementation. When requesting forSha256, two cases can happen:

  1. Cached Sha256 with detection, mimetype, etc.
  2. Hashlookup without detection

This condition is for case 1

java/src/main/java/de/gdata/vaas/Vaas.java Outdated Show resolved Hide resolved
java/src/main/java/de/gdata/vaas/Vaas.java Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Java Pull requests that update Java code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants