maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From schu...@apache.org
Subject maven git commit: [MNG-6075] Increase the model validation level to the next minor level version.
Date Mon, 01 Aug 2016 08:07:12 GMT
Repository: maven
Updated Branches:
  refs/heads/master 615390d7c -> a5e87a423


[MNG-6075] Increase the model validation level to the next minor level version.


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/a5e87a42
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/a5e87a42
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/a5e87a42

Branch: refs/heads/master
Commit: a5e87a42376cc6ecd086bb3dd79ff713ace3d6de
Parents: 615390d
Author: Christian Schulte <schulte@apache.org>
Authored: Mon Aug 1 10:06:14 2016 +0200
Committer: Christian Schulte <schulte@apache.org>
Committed: Mon Aug 1 10:06:14 2016 +0200

----------------------------------------------------------------------
 .../org/apache/maven/model/building/DefaultModelBuilder.java     | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/a5e87a42/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java
----------------------------------------------------------------------
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java
b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java
index 2d50ed1..93c62d0 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java
@@ -784,7 +784,9 @@ public class DefaultModelBuilder
 
                 if ( model.getModelVersion() != null )
                 {
-                    if ( !modelVersions.isEmpty() && modelVersions.add( model.getModelVersion()
) )
+                    final boolean initial = modelVersions.isEmpty();
+
+                    if ( modelVersions.add( model.getModelVersion() ) && !initial
)
                     {
                         problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.V31
)
                             .setMessage( String.format(


Mime
View raw message