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

[ISSUE-1110] handle null in java plugin #1111

Merged

Conversation

hkoosha
Copy link
Contributor

@hkoosha hkoosha commented Dec 7, 2023

Resolves #1110

@hkoosha hkoosha force-pushed the issue-1110/java-plugin-image-type-null-values branch from ab1f173 to 2293918 Compare December 7, 2023 18:02
@hkoosha hkoosha marked this pull request as ready for review December 7, 2023 18:03
@@ -239,7 +239,9 @@ impl JavaPlugin {
.http
.json::<Vec<JavaMetadata>, _>(url)?
.into_iter()
.filter(|m| JAVA_FILE_TYPES.contains(&m.file_type))
.filter(|m| {
m.file_type.is_some() && JAVA_FILE_TYPES.contains(&m.file_type.clone().unwrap())
Copy link
Owner

@jdx jdx Dec 7, 2023

Choose a reason for hiding this comment

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

use is_some_and for this and the next change

@hkoosha hkoosha force-pushed the issue-1110/java-plugin-image-type-null-values branch from 2293918 to ef20859 Compare December 7, 2023 18:15
@hkoosha hkoosha force-pushed the issue-1110/java-plugin-image-type-null-values branch from ef20859 to 70d127d Compare December 7, 2023 18:21
Copy link

codecov bot commented Dec 7, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (3eebf1e) 87.37% compared to head (70d127d) 85.37%.

Files Patch % Lines
src/plugins/core/java.rs 94.44% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1111      +/-   ##
==========================================
- Coverage   87.37%   85.37%   -2.01%     
==========================================
  Files         137      137              
  Lines       12551    12564      +13     
==========================================
- Hits        10967    10727     -240     
- Misses       1584     1837     +253     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jdx jdx merged commit eead151 into jdx:main Dec 7, 2023
7 of 8 checks passed
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.

[JAVA] file_type and image_type can be null
2 participants