Skip to content

Conversation

@marcustalbot-ov
Copy link
Contributor

  • Fixed bug where inaccessible fields (usually private fields without accessor) would be mapped to a target record, disregarding mapping rules.

@marcustalbot-ov marcustalbot-ov force-pushed the fix/#215-inaccessible-private-fields-are-mapped-to-record branch from 646a3c6 to 6cc0362 Compare October 30, 2025 20:40
@marcustalbot-ov marcustalbot-ov changed the title #215: Prevent mapping of inaccessible fields to record #215 Prevent mapping of inaccessible fields to record Oct 30, 2025
@marcustalbot-ov
Copy link
Contributor Author

The Codacy analysis only flags the 'unused' private fields in the test-classes. As such, I recommend ignoring those issues.

@marcustalbot-ov marcustalbot-ov force-pushed the fix/#215-inaccessible-private-fields-are-mapped-to-record branch 3 times, most recently from 7c3df88 to 02631a4 Compare October 31, 2025 08:19
@JoelDuurkoop
Copy link
Contributor

1 test failure

@marcustalbot-ov
Copy link
Contributor Author

marcustalbot-ov commented Nov 4, 2025

Fixing the pipeline is not something I can do easily. Steps to fix the problem can be found here: https://rieckpil.de/fix-sonatype-oss-index-errors-for-owasp-maven-plugin/

Unless setting the ossindexAnalyzerEnabled-flag to false is acceptable. In that case, please let me know.

Or, if you were talking about a test-failure in the library itself, could you tell me what is failing? It runs on my machine, with Java 21.

@JoelDuurkoop
Copy link
Contributor

Library tests run successfully for java 21, but when running with the recently added java 25 this results in an IllegalArgumentException for testMapEntityWithMapToEntityResultWithMap.

- Fixed bug where inaccessible fields (usually private fields without accessor) would be mapped to a target record, disregarding mapping rules.

Signed-off-by: Marcus Talbot <marcus.talbot@openvalue.nl>
@marcustalbot-ov marcustalbot-ov force-pushed the fix/#215-inaccessible-private-fields-are-mapped-to-record branch from 02631a4 to c26bf49 Compare November 4, 2025 17:12
@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 4, 2025

@marcustalbot-ov
Copy link
Contributor Author

Library tests run successfully for java 21, but when running with the recently added java 25 this results in an IllegalArgumentException for testMapEntityWithMapToEntityResultWithMap.

That's a known issue, which was fixed in the latest merged PR. I have now rebased this branch to include the fix.

@codecov
Copy link

codecov bot commented Nov 4, 2025

Codecov Report

❌ Patch coverage is 91.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 86.24%. Comparing base (20d1fde) to head (c26bf49).
⚠️ Report is 90 commits behind head on master.

Files with missing lines Patch % Lines
...va/io/beanmapper/strategy/MapToRecordStrategy.java 88.88% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #217      +/-   ##
============================================
- Coverage     87.61%   86.24%   -1.38%     
- Complexity      998     1169     +171     
============================================
  Files           110      129      +19     
  Lines          2205     2603     +398     
  Branches        246      298      +52     
============================================
+ Hits           1932     2245     +313     
- Misses          183      230      +47     
- Partials         90      128      +38     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@marcustalbot-ov
Copy link
Contributor Author

marcustalbot-ov commented Nov 4, 2025

While the OWASP Dependency Check succeeds, the logs contain the following warning:

Warning: Disabling OSS Index analyzer due to missing user/password credentials. Authentication is now required: https://ossindex.sonatype.org/doc/auth-required

Ideally, authentication is arranged for the OSS Index Analyzer.

@JoelDuurkoop JoelDuurkoop merged commit 4886305 into 42BV:master Nov 5, 2025
4 of 6 checks passed
@marcustalbot-ov marcustalbot-ov deleted the fix/#215-inaccessible-private-fields-are-mapped-to-record branch November 5, 2025 12:06
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.

2 participants