-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
[MNG-8482] Use instanceof assignments to get rid of casting expressions #2018
Conversation
@cstamas I now see that the integration tests use |
@gnodet ^ IMO is just an omission? ITs should be 17 as well.... still, we do have a requirement to run ITs against other Maven builds (not from the reactor of this build)... |
I think that's why we haven't bumped the source level, isn't it ? Though we did split 3.x and 4.x ITs a while ago, so I don't think we need to support running Maven 3.x against the 4.x ITs, do we ? |
Ok, I'll hold. 😄 |
What about splitting this PR ? Let's keep aside the changes targeting ITs for now, so that we can merge the others. |
# Conflicts: # compat/maven-compat/src/test/java/org/apache/maven/project/AbstractMavenProjectTestCase.java
@breun for you: in my PR there are two changes you need to pick. One of those two undos any IT code change |
In short: let apply this change to maven codebase only, and IT codebase should remain untouched for now (as many of those are still release=8 despite surrounding reactor of maven is 17) |
Changes to IT codebase have been undone. |
# Conflicts: # compat/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java # compat/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultTransformerContext.java # compat/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultModelCache.java # impl/maven-core/src/main/java/org/apache/maven/project/ReactorModelPool.java
src/mdo/model-v3.vm
Outdated
if (!Objects.equals(((Xpp3Dom) ${field.name}).getDom(), getDelegate().${pfx}${cap}())) { | ||
update(getDelegate().with${cap}(((Xpp3Dom) ${field.name}).getDom())); | ||
((Xpp3Dom) ${field.name}).setChildrenTracking(this::replace); | ||
if (${field.name} instanceof Xpp3Dom xpp3DomFieldName) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
xpp3DomFieldName
name is wrong here.
I don't see any loop around, so maybe simply xpp3dom
?
JIRA issue: MNG-8482
Following this checklist to help us incorporate your
contribution quickly and easily:
for the change (usually before you start working on it). Trivial changes like typos do not
require a JIRA issue. Your pull request should address just this issue, without
pulling in other changes.
[MNG-XXX] SUMMARY
,where you replace
MNG-XXX
andSUMMARY
with the appropriate JIRA issue.[MNG-XXX] SUMMARY
.Best practice is to use the JIRA issue title in both the pull request title and in the first line of the commit message.
mvn clean verify
to make sure basic checks pass. A more thorough check willbe performed on your pull request automatically.
If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.
To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.
I hereby declare this contribution to be licenced under the Apache License Version 2.0, January 2004
In any other case, please file an Apache Individual Contributor License Agreement.