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

Rm 84612 - implement support of th2 transport #52

Merged
merged 12 commits into from
Apr 10, 2024
Merged

Rm 84612 - implement support of th2 transport #52

merged 12 commits into from
Apr 10, 2024

Conversation

Nikita-Smirnov-Exactpro
Copy link
Member

No description provided.

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@Nikita-Smirnov-Exactpro Nikita-Smirnov-Exactpro marked this pull request as ready for review February 12, 2024 11:00
}

tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
kotlinOptions.jvmTarget = "11"
Copy link
Member

Choose a reason for hiding this comment

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

This part can be replaced with the following code as top-level declaration

kotlin {
  jvmToolchain(11)
}

src/main/java/com/exactpro/th2/hand/HandServer.java Outdated Show resolved Hide resolved

import java.nio.file.Path;
import java.util.Map;

public interface MessageStoreBuilder<T> {
ObjectMapper MAPPER = new ObjectMapper();
Copy link
Member

Choose a reason for hiding this comment

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

Do we serialize/deserialize any kotlin classes using this mapper? If we do it is better to register a Kotlin module here as well

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think so

Comment on lines 146 to 149
private static <E extends Throwable> void sneakyThrow(Throwable e) throws E {
//noinspection unchecked
throw (E) e;
}
Copy link
Member

Choose a reason for hiding this comment

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

And why would we use this hack in java? How will anybody know that this method might throw a checked exception?
Even Kotlin provides annotations to help Java understand if a checked exception might be thrown by the method. But we use this hack to hide this information. Why don't we just wrap the exception in runtime exception in this case?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think you are right because gRPC StatusRuntimeException isn't handled in act-win-core

Copy link

Test Results

0 tests   0 ✅  0s ⏱️
0 suites  0 💤
0 files    0 ❌

Results for commit af0bdfa.

@lumber1000 lumber1000 merged commit a34dde5 into master Apr 10, 2024
7 of 9 checks passed
@lumber1000 lumber1000 deleted the RM-84612 branch April 10, 2024 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants