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-5971] Imported dependencies should be available to inheritance processing
Date Mon, 22 Feb 2016 18:52:49 GMT
Repository: maven
Updated Branches:
  refs/heads/master 024a705d4 -> 508e16e23


[MNG-5971] Imported dependencies should be available to inheritance processing

o Updated to stop reporting model problems for intermediate models. For building
  the final model, inheritance and interpolation needs to be performed multiple
  times. Reporting any intermediate model problems is misleading and also leads
  to redundant messages getting reported.


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

Branch: refs/heads/master
Commit: 508e16e23d66de09893d1eb52dff6a1c5ca019b3
Parents: 024a705
Author: Christian Schulte <schulte@apache.org>
Authored: Mon Feb 22 17:08:14 2016 +0100
Committer: Christian Schulte <schulte@apache.org>
Committed: Mon Feb 22 19:50:44 2016 +0100

----------------------------------------------------------------------
 .../model/building/DefaultModelBuilder.java     | 400 ++++++++++---------
 .../building/DefaultModelProblemCollector.java  |  18 +-
 2 files changed, 214 insertions(+), 204 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/508e16e2/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 4471f7d..00ee475 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
@@ -384,15 +384,16 @@ public class DefaultModelBuilder
         // interpolation needs to be performed. A temporary model is built in phase 1 applying
inheritance and
         // interpolation to fill in those values but is not returned. The rest of the model
building takes place in
         // phase 2.
+        final DefaultModelProblemCollector intermediateProblems = new DefaultModelProblemCollector(
result );
         final List<Model> intermediateLineage = new ArrayList<>( lineage.size()
);
         for ( final ModelData modelData : lineage )
         {
             intermediateLineage.add( modelData.getModel().clone() );
         }
-        assembleInheritance( intermediateLineage, request, problems );
+        assembleInheritance( intermediateLineage, request, intermediateProblems );
 
         Model intermediateModel = intermediateLineage.get( 0 );
-        intermediateModel = interpolateModel( intermediateModel, request, problems );
+        intermediateModel = interpolateModel( intermediateModel, request, intermediateProblems
);
 
         Model resultModel = resultData.getModel();
 
@@ -434,6 +435,11 @@ public class DefaultModelBuilder
         // phase 2
         Model resultModel = result.getEffectiveModel();
 
+        // Reset to on-disk values to not suppress any warnings from phase 1.
+        resultModel.setGroupId( result.getRawModel().getGroupId() );
+        resultModel.setArtifactId( result.getRawModel().getArtifactId() );
+        resultModel.setVersion( result.getRawModel().getVersion() );
+
         DefaultModelProblemCollector problems = new DefaultModelProblemCollector( result
);
         problems.setSource( resultModel );
         problems.setRootModel( resultModel );
@@ -447,6 +453,7 @@ public class DefaultModelBuilder
 
         // [MNG-5971] Imported dependencies should be available to inheritance processing
         processImports( lineage, request, problems );
+        problems.setSource( resultModel );
 
         // inheritance assembly
         assembleInheritance( lineage, request, problems );
@@ -667,28 +674,26 @@ public class DefaultModelBuilder
     private void configureResolver( ModelResolver modelResolver, Model model, DefaultModelProblemCollector
problems,
                                     boolean replaceRepositories )
     {
-        if ( modelResolver == null )
+        if ( modelResolver != null )
         {
-            return;
-        }
-
-        problems.setSource( model );
+            problems.setSource( model );
 
-        List<Repository> repositories = model.getRepositories();
+            List<Repository> repositories = model.getRepositories();
 
-        for ( Repository repository : repositories )
-        {
-            try
-            {
-                modelResolver.addRepository( repository, replaceRepositories );
-            }
-            catch ( InvalidRepositoryException e )
+            for ( Repository repository : repositories )
             {
-                problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE
).
-                    setMessage( "Invalid repository " + repository.getId() + ": " + e.getMessage()
).
-                    setLocation( repository.getLocation( "" ) ).
-                    setException( e ) );
+                try
+                {
+                    modelResolver.addRepository( repository, replaceRepositories );
+                }
+                catch ( InvalidRepositoryException e )
+                {
+                    problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE
).
+                        setMessage( "Invalid repository " + repository.getId() + ": " + e.getMessage()
).
+                        setLocation( repository.getLocation( "" ) ).
+                        setException( e ) );
 
+                }
             }
         }
     }
@@ -696,54 +701,52 @@ public class DefaultModelBuilder
     private void checkPluginVersions( List<ModelData> lineage, ModelBuildingRequest
request,
                                       ModelProblemCollector problems )
     {
-        if ( request.getValidationLevel() < ModelBuildingRequest.VALIDATION_LEVEL_MAVEN_2_0
)
+        if ( request.getValidationLevel() >= ModelBuildingRequest.VALIDATION_LEVEL_MAVEN_2_0
)
         {
-            return;
-        }
-
-        Map<String, Plugin> plugins = new HashMap<>();
-        Map<String, String> versions = new HashMap<>();
-        Map<String, String> managedVersions = new HashMap<>();
+            Map<String, Plugin> plugins = new HashMap<>();
+            Map<String, String> versions = new HashMap<>();
+            Map<String, String> managedVersions = new HashMap<>();
 
-        for ( int i = lineage.size() - 1; i >= 0; i-- )
-        {
-            Model model = lineage.get( i ).getModel();
-            Build build = model.getBuild();
-            if ( build != null )
+            for ( int i = lineage.size() - 1; i >= 0; i-- )
             {
-                for ( Plugin plugin : build.getPlugins() )
+                Model model = lineage.get( i ).getModel();
+                Build build = model.getBuild();
+                if ( build != null )
                 {
-                    String key = plugin.getKey();
-                    if ( versions.get( key ) == null )
+                    for ( Plugin plugin : build.getPlugins() )
                     {
-                        versions.put( key, plugin.getVersion() );
-                        plugins.put( key, plugin );
+                        String key = plugin.getKey();
+                        if ( versions.get( key ) == null )
+                        {
+                            versions.put( key, plugin.getVersion() );
+                            plugins.put( key, plugin );
+                        }
                     }
-                }
-                PluginManagement mngt = build.getPluginManagement();
-                if ( mngt != null )
-                {
-                    for ( Plugin plugin : mngt.getPlugins() )
+                    PluginManagement mngt = build.getPluginManagement();
+                    if ( mngt != null )
                     {
-                        String key = plugin.getKey();
-                        if ( managedVersions.get( key ) == null )
+                        for ( Plugin plugin : mngt.getPlugins() )
                         {
-                            managedVersions.put( key, plugin.getVersion() );
+                            String key = plugin.getKey();
+                            if ( managedVersions.get( key ) == null )
+                            {
+                                managedVersions.put( key, plugin.getVersion() );
+                            }
                         }
                     }
                 }
             }
-        }
 
-        for ( String key : versions.keySet() )
-        {
-            if ( versions.get( key ) == null && managedVersions.get( key ) == null
)
+            for ( String key : versions.keySet() )
             {
-                InputLocation location = plugins.get( key ).getLocation( "" );
-                problems.add( new ModelProblemCollectorRequest( Severity.WARNING, Version.V20
).
-                    setMessage( "'build.plugins.plugin.version' for " + key + " is missing."
).
-                    setLocation( location ) );
+                if ( versions.get( key ) == null && managedVersions.get( key ) ==
null )
+                {
+                    InputLocation location = plugins.get( key ).getLocation( "" );
+                    problems.add( new ModelProblemCollectorRequest( Severity.WARNING, Version.V20
).
+                        setMessage( "'build.plugins.plugin.version' for " + key + " is missing."
).
+                        setLocation( location ) );
 
+                }
             }
         }
     }
@@ -785,12 +788,15 @@ public class DefaultModelBuilder
             child.setRepositories( repositories );
         }
 
+        final DefaultModelProblemCollector intermediateProblems =
+            new DefaultModelProblemCollector( new DefaultModelBuildingResult() );
+
         // Interpolates the intermediate model.
         for ( int i = 0, s0 = intermediateLineage.size(); i < s0; i++ )
         {
             final Model model = intermediateLineage.get( i );
-            problems.setSource( model );
-            this.interpolateModel( model, request, problems );
+            intermediateProblems.setSource( model );
+            this.interpolateModel( model, request, intermediateProblems );
         }
 
         // Exchanges 'import' scope dependencies in the original lineage with possibly interpolated
values.
@@ -1250,206 +1256,208 @@ public class DefaultModelBuilder
     {
         DependencyManagement depMngt = model.getDependencyManagement();
 
-        if ( depMngt == null )
+        if ( depMngt != null )
         {
-            return;
-        }
-
-        problems.setSource( model );
-
-        String importing = model.getGroupId() + ':' + model.getArtifactId() + ':' + model.getVersion();
+            problems.setSource( model );
 
-        importIds.add( importing );
+            String importing = model.getGroupId() + ':' + model.getArtifactId() + ':' + model.getVersion();
 
-        final WorkspaceModelResolver workspaceResolver = request.getWorkspaceModelResolver();
-        final ModelResolver modelResolver = request.getModelResolver();
+            importIds.add( importing );
 
-        ModelBuildingRequest importRequest = null;
+            final WorkspaceModelResolver workspaceResolver = request.getWorkspaceModelResolver();
+            final ModelResolver modelResolver = request.getModelResolver();
 
-        List<DependencyManagement> importMngts = null;
+            ModelBuildingRequest importRequest = null;
 
-        for ( Iterator<Dependency> it = depMngt.getDependencies().iterator(); it.hasNext();
)
-        {
-            Dependency dependency = it.next();
+            List<DependencyManagement> importMngts = null;
 
-            if ( !"pom".equals( dependency.getType() ) || !scope.equals( dependency.getScope()
) )
+            for ( Iterator<Dependency> it = depMngt.getDependencies().iterator(); it.hasNext();
)
             {
-                continue;
-            }
+                Dependency dependency = it.next();
 
-            it.remove();
+                if ( !"pom".equals( dependency.getType() ) || !scope.equals( dependency.getScope()
) )
+                {
+                    continue;
+                }
 
-            String groupId = dependency.getGroupId();
-            String artifactId = dependency.getArtifactId();
-            String version = dependency.getVersion();
+                it.remove();
 
-            if ( groupId == null || groupId.length() <= 0 )
-            {
-                problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE
)
-                    .setMessage( "'dependencyManagement.dependencies.dependency.groupId'
for "
-                                     + dependency.getManagementKey() + " is missing." )
-                    .setLocation( dependency.getLocation( "" ) ) );
-                continue;
-            }
-            if ( artifactId == null || artifactId.length() <= 0 )
-            {
-                problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE
).
-                    setMessage( "'dependencyManagement.dependencies.dependency.artifactId'
for "
-                                    + dependency.getManagementKey() + " is missing." ).
-                    setLocation( dependency.getLocation( "" ) ) );
+                String groupId = dependency.getGroupId();
+                String artifactId = dependency.getArtifactId();
+                String version = dependency.getVersion();
 
-                continue;
-            }
-            if ( version == null || version.length() <= 0 )
-            {
-                problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE
).
-                    setMessage( "'dependencyManagement.dependencies.dependency.version' for
"
-                                    + dependency.getManagementKey() + " is missing." ).
-                    setLocation( dependency.getLocation( "" ) ) );
-
-                continue;
-            }
+                if ( groupId == null || groupId.length() <= 0 )
+                {
+                    problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE
)
+                        .setMessage( "'dependencyManagement.dependencies.dependency.groupId'
for "
+                                         + dependency.getManagementKey() + " is missing."
)
+                        .setLocation( dependency.getLocation( "" ) ) );
 
-            String imported = groupId + ':' + artifactId + ':' + version;
+                    continue;
+                }
+                if ( artifactId == null || artifactId.length() <= 0 )
+                {
+                    problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE
).
+                        setMessage( "'dependencyManagement.dependencies.dependency.artifactId'
for "
+                                        + dependency.getManagementKey() + " is missing."
).
+                        setLocation( dependency.getLocation( "" ) ) );
 
-            if ( importIds.contains( imported ) )
-            {
-                String message = "The dependencies of type=pom and scope=" + scope + " form
a cycle: ";
-                for ( String modelId : importIds )
+                    continue;
+                }
+                if ( version == null || version.length() <= 0 )
                 {
-                    message += modelId + " -> ";
+                    problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE
).
+                        setMessage( "'dependencyManagement.dependencies.dependency.version'
for "
+                                        + dependency.getManagementKey() + " is missing."
).
+                        setLocation( dependency.getLocation( "" ) ) );
+
+                    continue;
                 }
-                message += imported;
-                problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE
).setMessage( message ) );
-                continue;
-            }
 
-            DependencyManagement importMngt = getCache( request.getModelCache(), groupId,
artifactId, version,
-                                                        ModelCacheTag.IMPORT );
+                String imported = groupId + ':' + artifactId + ':' + version;
 
-            if ( importMngt == null )
-            {
-                if ( workspaceResolver == null && modelResolver == null )
+                if ( importIds.contains( imported ) )
                 {
-                    throw new NullPointerException( String.format(
-                        "request.workspaceModelResolver and request.modelResolver cannot
be null"
-                            + " (parent POM %s and POM %s)",
-                        ModelProblemUtils.toId( groupId, artifactId, version ),
-                        ModelProblemUtils.toSourceHint( model ) ) );
+                    String message = "The dependencies of type=pom and scope=" + scope +
" form a cycle: ";
+                    for ( String modelId : importIds )
+                    {
+                        message += modelId + " -> ";
+                    }
+                    message += imported;
+                    problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE
).
+                        setMessage( message ) );
 
+                    continue;
                 }
 
-                Model importModel = null;
-                if ( workspaceResolver != null )
+                DependencyManagement importMngt = getCache( request.getModelCache(), groupId,
artifactId, version,
+                                                            ModelCacheTag.IMPORT );
+
+                if ( importMngt == null )
                 {
-                    try
+                    if ( workspaceResolver == null && modelResolver == null )
                     {
-                        importModel = workspaceResolver.resolveEffectiveModel( groupId, artifactId,
version );
+                        throw new NullPointerException( String.format(
+                            "request.workspaceModelResolver and request.modelResolver cannot
be null"
+                                + " (parent POM %s and POM %s)",
+                            ModelProblemUtils.toId( groupId, artifactId, version ),
+                            ModelProblemUtils.toSourceHint( model ) ) );
+
                     }
-                    catch ( UnresolvableModelException e )
+
+                    Model importModel = null;
+                    if ( workspaceResolver != null )
                     {
-                        problems.add( new ModelProblemCollectorRequest( Severity.FATAL, Version.BASE
).
-                            setMessage( e.getMessage().toString() ).
-                            setException( e ) );
+                        try
+                        {
+                            importModel = workspaceResolver.resolveEffectiveModel( groupId,
artifactId, version );
+                        }
+                        catch ( UnresolvableModelException e )
+                        {
+                            problems.add( new ModelProblemCollectorRequest( Severity.FATAL,
Version.BASE ).
+                                setMessage( e.getMessage() ).
+                                setException( e ) );
 
-                        continue;
+                            continue;
+                        }
                     }
-                }
 
-                // no workspace resolver or workspace resolver returned null (i.e. model
not in workspace)
-                if ( importModel == null )
-                {
-                    final ModelSource importSource;
-                    try
+                    // no workspace resolver or workspace resolver returned null (i.e. model
not in workspace)
+                    if ( importModel == null )
                     {
-                        dependency = dependency.clone();
-                        importSource = modelResolver.resolveModel( dependency );
-                        final String resolvedId =
-                            dependency.getGroupId() + ':' + dependency.getArtifactId() +
':' + dependency.getVersion();
+                        final ModelSource importSource;
+                        try
+                        {
+                            dependency = dependency.clone();
+                            importSource = modelResolver.resolveModel( dependency );
+                            final String resolvedId =
+                                dependency.getGroupId() + ':' + dependency.getArtifactId()
+ ':'
+                                    + dependency.getVersion();
 
-                        if ( !imported.equals( resolvedId ) && importIds.contains(
resolvedId ) )
+                            if ( !imported.equals( resolvedId ) && importIds.contains(
resolvedId ) )
+                            {
+                                // A version range has been resolved to a cycle.
+                                String message = "The dependencies of type=pom and scope="
+ scope + " form a cycle: ";
+                                for ( String modelId : importIds )
+                                {
+                                    message += modelId + " -> ";
+                                }
+                                message += resolvedId;
+                                problems.add( new ModelProblemCollectorRequest( Severity.ERROR,
Version.BASE ).
+                                    setMessage( message ) );
+
+                                continue;
+                            }
+                        }
+                        catch ( UnresolvableModelException e )
                         {
-                            // A version range has been resolved to a cycle.
-                            String message = "The dependencies of type=pom and scope=" +
scope + " form a cycle: ";
-                            for ( String modelId : importIds )
+                            StringBuilder buffer = new StringBuilder( 256 );
+                            buffer.append( "Non-resolvable " + scope + " POM" );
+                            if ( !containsCoordinates( e.getMessage(), groupId, artifactId,
version ) )
                             {
-                                message += modelId + " -> ";
+                                buffer.append( ' ' ).append( ModelProblemUtils.toId( groupId,
artifactId, version ) );
                             }
-                            message += resolvedId;
+                            buffer.append( ": " ).append( e.getMessage() );
+
                             problems.add( new ModelProblemCollectorRequest( Severity.ERROR,
Version.BASE ).
-                                setMessage( message ) );
+                                setMessage( buffer.toString() ).
+                                setLocation( dependency.getLocation( "" ) ).
+                                setException( e ) );
 
                             continue;
                         }
-                    }
-                    catch ( UnresolvableModelException e )
-                    {
-                        StringBuilder buffer = new StringBuilder( 256 );
-                        buffer.append( "Non-resolvable " + scope + " POM" );
-                        if ( !containsCoordinates( e.getMessage(), groupId, artifactId, version
) )
+
+                        if ( importRequest == null )
                         {
-                            buffer.append( ' ' ).append( ModelProblemUtils.toId( groupId,
artifactId, version ) );
+                            importRequest = new DefaultModelBuildingRequest();
+                            importRequest.setValidationLevel( ModelBuildingRequest.VALIDATION_LEVEL_MINIMAL
);
+                            importRequest.setModelCache( request.getModelCache() );
+                            importRequest.setSystemProperties( request.getSystemProperties()
);
+                            importRequest.setUserProperties( request.getUserProperties()
);
+                            importRequest.setLocationTracking( request.isLocationTracking()
);
                         }
-                        buffer.append( ": " ).append( e.getMessage() );
 
-                        problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE
).
-                            setMessage( buffer.toString() ).
-                            setLocation( dependency.getLocation( "" ) ).
-                            setException( e ) );
+                        importRequest.setModelSource( importSource );
+                        importRequest.setModelResolver( modelResolver.newCopy() );
 
-                        continue;
-                    }
+                        final ModelBuildingResult importResult;
+                        try
+                        {
+                            importResult = build( importRequest );
+                        }
+                        catch ( ModelBuildingException e )
+                        {
+                            problems.addAll( e.getProblems() );
+                            continue;
+                        }
 
-                    if ( importRequest == null )
-                    {
-                        importRequest = new DefaultModelBuildingRequest();
-                        importRequest.setValidationLevel( ModelBuildingRequest.VALIDATION_LEVEL_MINIMAL
);
-                        importRequest.setModelCache( request.getModelCache() );
-                        importRequest.setSystemProperties( request.getSystemProperties()
);
-                        importRequest.setUserProperties( request.getUserProperties() );
-                        importRequest.setLocationTracking( request.isLocationTracking() );
+                        problems.addAll( importResult.getProblems() );
+
+                        importModel = importResult.getEffectiveModel();
                     }
 
-                    importRequest.setModelSource( importSource );
-                    importRequest.setModelResolver( modelResolver.newCopy() );
+                    importMngt = importModel.getDependencyManagement();
 
-                    final ModelBuildingResult importResult;
-                    try
+                    if ( importMngt == null )
                     {
-                        importResult = build( importRequest );
+                        importMngt = new DependencyManagement();
                     }
-                    catch ( ModelBuildingException e )
-                    {
-                        problems.addAll( e.getProblems() );
-                        continue;
-                    }
-
-                    problems.addAll( importResult.getProblems() );
 
-                    importModel = importResult.getEffectiveModel();
+                    putCache( request.getModelCache(), groupId, artifactId, version, ModelCacheTag.IMPORT,
importMngt );
                 }
 
-                importMngt = importModel.getDependencyManagement();
-
-                if ( importMngt == null )
+                if ( importMngts == null )
                 {
-                    importMngt = new DependencyManagement();
+                    importMngts = new ArrayList<>();
                 }
 
-                putCache( request.getModelCache(), groupId, artifactId, version, ModelCacheTag.IMPORT,
importMngt );
+                importMngts.add( importMngt );
             }
 
-            if ( importMngts == null )
-            {
-                importMngts = new ArrayList<>();
-            }
+            importIds.remove( importing );
 
-            importMngts.add( importMngt );
+            dependencyManagementImporter.importManagement( model, importMngts, request, problems
);
         }
-
-        importIds.remove( importing );
-
-        dependencyManagementImporter.importManagement( model, importMngts, request, problems
);
     }
 
     private <T> void putCache( ModelCache modelCache, String groupId, String artifactId,
String version,

http://git-wip-us.apache.org/repos/asf/maven/blob/508e16e2/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelProblemCollector.java
----------------------------------------------------------------------
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelProblemCollector.java
b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelProblemCollector.java
index 89d5cb2..16740dc 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelProblemCollector.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelProblemCollector.java
@@ -146,7 +146,7 @@ class DefaultModelProblemCollector
     {
         int line = -1;
         int column = -1;
-        String source = null;
+        String src = null;
         String modelId = null;
 
         if ( req.getLocation() != null )
@@ -156,15 +156,17 @@ class DefaultModelProblemCollector
             if ( req.getLocation().getSource() != null )
             {
                 modelId = req.getLocation().getSource().getModelId();
-                source = req.getLocation().getSource().getLocation();
+                src = req.getLocation().getSource().getLocation();
             }
         }
 
-        if ( modelId == null )
-        {
-            modelId = getModelId();
-            source = getSource();
-        }
+        modelId = modelId != null
+                      ? this.getModelId() + " [" + modelId + "]"
+                      : this.getModelId();
+
+        src = src != null
+                  ? this.getSource() + " [" + src + "]"
+                  : this.getSource();
 
         if ( line <= 0 && column <= 0 && req.getException() instanceof
ModelParseException )
         {
@@ -174,7 +176,7 @@ class DefaultModelProblemCollector
         }
 
         ModelProblem problem =
-            new DefaultModelProblem( req.getMessage(), req.getSeverity(), req.getVersion(),
source, line, column,
+            new DefaultModelProblem( req.getMessage(), req.getSeverity(), req.getVersion(),
src, line, column,
                                      modelId, req.getException() );
 
         add( problem );


Mime
View raw message