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 #382: Warning when PEAR contains a JCAS class that is used as a feature range outside the PEAR #383

Conversation

reckart
Copy link
Member

@reckart reckart commented Aug 21, 2024

What's in the PR

  • Added a "test" which reproduces the warning although there is no assert that checks if the warning is logged
  • Some cleaning up

How to test manually

  • Run test and check if the warning is logged

Automatic testing

  • PR adds/updates unit tests

Documentation

  • PR adds/updates documentation

Organizational

  • PR adds/updates dependencies.
    Only dependencies under approved licenses are allowed. LICENSE and NOTICE files in the respective modules where dependencies have been added as well as in the project root have been updated.

Let's assume we have:

  • Type X with a feature X.a of type A
  • Type X1 that is a subtype of X

Ok, so what can happen...

Scenario Global PEAR Description
1 X, A X, A PEAR can use X.setA(A)
2 X, A A PEAR can use cas.createFS('X').setFeatureValue('a', 'A'); The rule is that the PEARs must embed all classes they uses at compile time - ergo - the PEAR cannot use X.getA() or X.setA() because it does not embed X.
3 X, A, X1 X PEAR can cas.select(X.class) but will get a ClassCastException when it encounters a X1 - see #384

… feature range outside the PEAR

- Added a "test" which reproduces the warning although there is no assert that checks if the warning is logged
- Some cleaning up
@reckart reckart added the 🦟 Bug Something isn't working label Aug 21, 2024
@reckart reckart added this to the 3.5.1 milestone Aug 21, 2024
@reckart reckart self-assigned this Aug 21, 2024
@reckart reckart changed the base branch from main to release/3.5.x August 21, 2024 15:49
… feature range outside the PEAR

- Improved tests
- The test still does not fail because there is warning though...
… feature range outside the PEAR

- Do not issue warning on range mismatch if range class was loaded from a PEAR classloader
- Clean up
@reckart
Copy link
Member Author

reckart commented Aug 26, 2024

Jenkins, can you test this please?

@reckart reckart force-pushed the bugfix/382-Warning-when-PEAR-contains-a-JCAS-class-that-is-used-as-a-feature-range-outside-the-PEAR branch from 2a42834 to 2be2168 Compare August 26, 2024 13:50
… feature range outside the PEAR

- Make sure tests close files so temporary test folders can be deleted
@reckart reckart force-pushed the bugfix/382-Warning-when-PEAR-contains-a-JCAS-class-that-is-used-as-a-feature-range-outside-the-PEAR branch from 2be2168 to f95a3a4 Compare August 28, 2024 10:10
…ns-a-JCAS-class-that-is-used-as-a-feature-range-outside-the-PEAR

* release/3.5.x:
  Issue #371: Repeated creation of type systems can exhaust JVM metaspace
  Issue #371: Repeated creation of type systems can exhaust JVM metaspace

% Conflicts:
%	uimaj-core/src/main/java/org/apache/uima/cas/impl/FSClassRegistry.java
@reckart reckart merged commit 876713f into release/3.5.x Aug 28, 2024
1 check passed
@reckart reckart deleted the bugfix/382-Warning-when-PEAR-contains-a-JCAS-class-that-is-used-as-a-feature-range-outside-the-PEAR branch August 28, 2024 12:56
@reckart reckart modified the milestones: 3.6.1, 3.6.0 Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🦟 Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant