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