mbien commented on code in PR #7158:
URL: https://github.com/apache/netbeans/pull/7158#discussion_r1525815266


##########
java/maven.hints/src/org/netbeans/modules/maven/hints/pom/ParentVersionError.java:
##########
@@ -107,7 +108,17 @@ public List<ErrorDescription> 
getErrorsForDocument(POMModel model, Project prj)
                     if (parentPrj != null) {
                         NbMavenProject nbprj = 
parentPrj.getLookup().lookup(NbMavenProject.class);
                         if (nbprj != null) { //do we have some non-maven 
project maybe?
-                            MavenProject mav = nbprj.getMavenProject();
+                            MavenProject mav = nbprj.getMavenProject();  
+                            
if(PomModelUtils.isPropertyExpression(declaredVersion)){
+                                String key = 
PomModelUtils.getPropertyName(declaredVersion);
+                                String propVal = 
PomModelUtils.getProperty(model, declaredVersion);
+                                if(propVal != null){
+                                    declaredVersion = propVal;
+                                }
+                                else {
+                                    declaredVersion = 
mav.getProperties().getProperty(key, declaredVersion);
+                                }
+                            }

Review Comment:
   thanks for checking, yes the override behavior makes sense.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to