Skip to content

Commit

Permalink
[MNG-5670] guard against ConcurrentModificationException
Browse files Browse the repository at this point in the history
[MNG-6053] guard against key without value
  • Loading branch information
ChristianSchulte committed Jul 28, 2016
1 parent 32ce349 commit 5307750
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,17 +137,15 @@ public static DefaultRepositorySystemSession newSession()
try ( final ByteArrayOutputStream out = new ByteArrayOutputStream() )
{
System.getProperties().store( out, null );
out.close();

try ( final ByteArrayInputStream in = new ByteArrayInputStream( out.toByteArray() ) )
{
systemProperties.load( in );
in.close();
}
}
catch ( final IOException e )
{
throw new AssertionError( "Unexpected IO error copying system properties." );
throw new AssertionError( "Unexpected IO error copying system properties.", e );
}

session.setSystemProperties( systemProperties );
Expand Down

0 comments on commit 5307750

Please sign in to comment.