mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-11 07:55:47 +01:00
improve loggin of jaxbstore
This commit is contained in:
@@ -69,6 +69,8 @@ public class JAXBStore<T> implements Store<T>
|
||||
*/
|
||||
public JAXBStore(Class<T> type, File configFile)
|
||||
{
|
||||
this.type = type;
|
||||
|
||||
try
|
||||
{
|
||||
context = JAXBContext.newInstance(type);
|
||||
@@ -91,6 +93,11 @@ public class JAXBStore<T> implements Store<T>
|
||||
@Override
|
||||
public T get()
|
||||
{
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("load {} from store {}", type, configFile);
|
||||
}
|
||||
|
||||
T result = null;
|
||||
|
||||
if (configFile.exists())
|
||||
@@ -108,6 +115,17 @@ public class JAXBStore<T> implements Store<T>
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Class<T> getType()
|
||||
{
|
||||
return type;
|
||||
}
|
||||
|
||||
//~--- set methods ----------------------------------------------------------
|
||||
|
||||
/**
|
||||
@@ -145,4 +163,7 @@ public class JAXBStore<T> implements Store<T>
|
||||
|
||||
/** Field description */
|
||||
private JAXBContext context;
|
||||
|
||||
/** Field description */
|
||||
private Class<T> type;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user