You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Christian Schulte (JIRA)" <ji...@apache.org> on 2016/07/25 17:46:20 UTC

[jira] [Closed] (MNG-6053) Unsafe System Properties copy in MavenRepositorySystemUtils, causing NPEs

     [ https://issues.apache.org/jira/browse/MNG-6053?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Schulte closed MNG-6053.
----------------------------------
       Resolution: Fixed
         Assignee: Christian Schulte
    Fix Version/s: 3.4.0

> Unsafe System Properties copy in MavenRepositorySystemUtils, causing NPEs
> -------------------------------------------------------------------------
>
>                 Key: MNG-6053
>                 URL: https://issues.apache.org/jira/browse/MNG-6053
>             Project: Maven
>          Issue Type: Bug
>    Affects Versions: 3.3.9
>         Environment: Eclipse m2e 1.7
>            Reporter: Fred Bricon
>            Assignee: Christian Schulte
>             Fix For: 3.4.0
>
>
> This bug has been reported in m2e https://bugs.eclipse.org/bugs/show_bug.cgi?id=493871:
> {quote}
> I'm occasionally, not 100% reliably reproducible, but regularly enough (like it occurs every now and then, not just once) seeing the error below, in the Error Log of Eclipse during workspace rebuilds.  This is with M2E 1.7.0. -- I'm not sure if this is just "annoying" or actually prevents M2E from correctly configuring projects (?).  Either way, perhaps it would be possible to "harden" respective code to prevent this?
> java.lang.NullPointerException
> 	at java.util.Hashtable.put(Hashtable.java:459)
> 	at org.apache.maven.repository.internal.MavenRepositorySystemUtils.newSession(MavenRepositorySystemUtils.java:133)
> 	at org.apache.maven.internal.aether.DefaultRepositorySystemSessionFactory.newRepositorySession(DefaultRepositorySystemSessionFactory.java:98)
> 	at org.apache.maven.DefaultMaven.newRepositorySession(DefaultMaven.java:352)
> 	at org.eclipse.m2e.core.internal.embedder.MavenImpl.createRepositorySession(MavenImpl.java:309)
> {quote}
> Looking at https://github.com/apache/maven/blob/86b656167923923e2e416def4a48303b4e6248fa/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/MavenRepositorySystemUtils.java#L132, it seems some system property is null (maybe due to some concurrency issue), and given that Hashtable doesn't support null values, then it throws an NPE on the put() call



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)