[ 
https://issues.apache.org/jira/browse/MNG-8142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17852428#comment-17852428
 ] 

ASF GitHub Bot commented on MNG-8142:
-------------------------------------

cstamas opened a new pull request, #1557:
URL: https://github.com/apache/maven/pull/1557

   If property `java.version` is in unexpected format, the activator throws 
NumberFormatEx, that in turn, is caught and reported by DefaultProfileSelector 
w/o any cause.
   
   These should be cleanly reported instead: report that `java.version` 
property is in "unexpected format", and also report why was there are failure 
to evaluate a properrty activation.
   
   Note1: Maven allows `-Djava.version` override, this is exactly what IT 
MNG-3746 exactly does, but the
   NumberFormatEx went unnoticed (was swallowed).
   
   Note2: This bug was revealed by #1555 as it reported the issue, and later 
"asserted error free log" which was not error-free. Hence, this bug was simply 
revealed by improved logging on unrelated issue.
   
   ---
   
   https://issues.apache.org/jira/browse/MNG-8142




> If JDK profile activator gets "invalid" JDK version for whatever reason, it 
> chokes but does not tell why
> --------------------------------------------------------------------------------------------------------
>
>                 Key: MNG-8142
>                 URL: https://issues.apache.org/jira/browse/MNG-8142
>             Project: Maven
>          Issue Type: Bug
>          Components: Core
>            Reporter: Tamas Cservenak
>            Assignee: Tamas Cservenak
>            Priority: Major
>             Fix For: 3.9.8, 4.0.0-beta-4
>
>
> The JDK profile activator uses property {{java.version}} to determine is 
> profile active or not, but if you look at MNG-3746 you can see that Maven 
> _allows overriding that property_ by user, but also, today some "weird 
> formatted" version may pop up in the wild.
> The JDK profile activator is not prepared for these cases, and will just 
> throw (NumberFormatEx), without telling why it did belly up.
> Improve the message why it throw.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to