mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-07 22:15:45 +01:00
fix nullpointerexcpetion on first login
This commit is contained in:
@@ -127,7 +127,7 @@ public class AuthenticationResource
|
||||
if ((user != null) &&!SCMContext.USER_ANONYMOUS.equals(user.getName()))
|
||||
{
|
||||
state = new ScmState(contextProvider, securityContext,
|
||||
repositoryManger.getTypes());
|
||||
repositoryManger.getConfiguredTypes());
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -161,7 +161,7 @@ public class AuthenticationResource
|
||||
if (user != null)
|
||||
{
|
||||
ScmState state = new ScmState(contextProvider, securityContext,
|
||||
repositoryManger.getTypes());
|
||||
repositoryManger.getConfiguredTypes());
|
||||
|
||||
resp = Response.ok(state).build();
|
||||
}
|
||||
@@ -199,7 +199,7 @@ public class AuthenticationResource
|
||||
}
|
||||
|
||||
state = new ScmState(contextProvider, securityContext,
|
||||
repositoryManger.getTypes());
|
||||
repositoryManger.getConfiguredTypes());
|
||||
response = Response.ok(state).build();
|
||||
}
|
||||
else
|
||||
|
||||
@@ -59,6 +59,20 @@ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
|
||||
public class XmlGroupDatabase
|
||||
{
|
||||
|
||||
/**
|
||||
* Constructs ...
|
||||
*
|
||||
*/
|
||||
public XmlGroupDatabase()
|
||||
{
|
||||
long c = System.currentTimeMillis();
|
||||
|
||||
creationTime = c;
|
||||
lastModified = c;
|
||||
}
|
||||
|
||||
//~--- methods --------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
|
||||
@@ -209,7 +209,6 @@ public class XmlGroupManager extends AbstractGroupManager
|
||||
if (groupDB == null)
|
||||
{
|
||||
groupDB = new XmlGroupDatabase();
|
||||
groupDB.setCreationTime(System.currentTimeMillis());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -59,6 +59,20 @@ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
|
||||
public class XmlRepositoryDatabase
|
||||
{
|
||||
|
||||
/**
|
||||
* Constructs ...
|
||||
*
|
||||
*/
|
||||
public XmlRepositoryDatabase()
|
||||
{
|
||||
long c = System.currentTimeMillis();
|
||||
|
||||
creationTime = c;
|
||||
lastModified = c;
|
||||
}
|
||||
|
||||
//~--- methods --------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
|
||||
@@ -59,6 +59,20 @@ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
|
||||
public class XmlUserDatabase
|
||||
{
|
||||
|
||||
/**
|
||||
* Constructs ...
|
||||
*
|
||||
*/
|
||||
public XmlUserDatabase()
|
||||
{
|
||||
long c = System.currentTimeMillis();
|
||||
|
||||
creationTime = c;
|
||||
lastModified = c;
|
||||
}
|
||||
|
||||
//~--- methods --------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
|
||||
@@ -242,7 +242,6 @@ public class XmlUserManager extends AbstractUserManager
|
||||
if (userDB == null)
|
||||
{
|
||||
userDB = new XmlUserDatabase();
|
||||
userDB.setCreationTime(System.currentTimeMillis());
|
||||
createDefaultAccounts();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user