Skip to content

Conversation

@Thrameos
Copy link
Contributor

@Thrameos Thrameos commented Aug 5, 2020

This is a draft PR which adds support for representing Generics in JPype.

In the PR we make is so that Java class with generics according to reflection can be used like

JA = java.util.ArrayList
JAS = java.util.ArrayList[java.lang.String]
JAS@['yes','no'] # works
JAS@['yes', 1'] # fails 1 is not castable to string.

The intent is to make is so when converting to the generic type the arguments will be checked.

Currently this PR just adds the types to the class. We need to update the converters to make use of them.

@codecov
Copy link

codecov bot commented Aug 5, 2020

Codecov Report

❌ Patch coverage is 25.42373% with 44 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.77%. Comparing base (aa31348) to head (796556f).
⚠️ Report is 1026 commits behind head on master.

Files with missing lines Patch % Lines
native/python/pyjp_class.cpp 20.00% 36 Missing and 4 partials ⚠️
native/common/include/jp_class.h 0.00% 2 Missing ⚠️
native/common/include/jp_modifier.h 0.00% 2 Missing ⚠️

❌ Your project check has failed because the head coverage (68.50%) is below the target coverage (75.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #835      +/-   ##
============================================
- Coverage     83.06%   82.77%   -0.30%     
- Complexity      442      443       +1     
============================================
  Files           142      142              
  Lines         11822    11875      +53     
  Branches       4462     4496      +34     
============================================
+ Hits           9820     9829       +9     
- Misses         1249     1289      +40     
- Partials        753      757       +4     
Files with missing lines Coverage Δ
native/java/org/jpype/manager/ModifierCode.java 100.00% <100.00%> (ø)
native/java/org/jpype/manager/TypeManager.java 90.32% <100.00%> (+0.04%) ⬆️
native/python/include/pyjp.h 100.00% <ø> (ø)
native/python/pyjp_module.cpp 83.09% <100.00%> (+0.09%) ⬆️
native/common/include/jp_class.h 93.33% <0.00%> (-6.67%) ⬇️
native/common/include/jp_modifier.h 87.50% <0.00%> (-5.84%) ⬇️
native/python/pyjp_class.cpp 80.23% <20.00%> (-4.98%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Thrameos Thrameos added the enhancement Improvement in capability planned for future release label Nov 26, 2020
@Thrameos
Copy link
Contributor Author

This will be revisited post 1.6.

@Thrameos Thrameos added the on-hold Problem requiring further user input to address label Apr 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Improvement in capability planned for future release on-hold Problem requiring further user input to address

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant