Tries to fix the build (tests).

cusax-fix
Lyubomir Marinov 14 years ago
parent 34d54b1d84
commit 5986cc0119

@ -592,6 +592,10 @@
<!-- Tell the slick runner where to store test results. -->
<sysproperty key="net.java.sip.communicator.slick.runner.OUTPUT_DIR"
value="${test.reports.dir}"/>
<sysproperty key="net.java.sip.communicator.SC_HOME_DIR_LOCATION"
value="${test.reports.dir}"/>
<sysproperty key="net.java.sip.communicator.SC_HOME_DIR_NAME"
value="schome"/>
<!-- Tell the slick runner which Test classes to run. -->
<sysproperty key="net.java.sip.communicator.slick.runner.TEST_LIST"
@ -689,6 +693,10 @@
<!-- Tell the slick runner where to store test results. -->
<sysproperty key="net.java.sip.communicator.slick.runner.OUTPUT_DIR"
value="${test.reports.dir}"/>
<sysproperty key="net.java.sip.communicator.SC_HOME_DIR_LOCATION"
value="${test.reports.dir}"/>
<sysproperty key="net.java.sip.communicator.SC_HOME_DIR_NAME"
value="schome"/>
<!-- use a meta contact list file different to normal client. -->
<sysproperty key="net.java.sip.communicator.CONTACTLIST_FILE_NAME"

@ -94,13 +94,14 @@ public Iterator<HistoryID> getExistingIDs()
List<File> vect = new Vector<File>();
File histDir = null;
try {
String userSetDataDirectory = System.getProperty("HistoryServiceDirectory");
if(userSetDataDirectory != null)
histDir = this.fileAccessService
.getPrivatePersistentDirectory(userSetDataDirectory);
else
histDir = this.fileAccessService
.getPrivatePersistentDirectory(DATA_DIRECTORY);
String userSetDataDirectory
= System.getProperty("HistoryServiceDirectory");
histDir
= getFileAccessService().getPrivatePersistentDirectory(
(userSetDataDirectory == null)
? DATA_DIRECTORY
: userSetDataDirectory);
findDatFiles(vect, histDir);
} catch (Exception e)
@ -259,14 +260,19 @@ private File createHistoryDirectories(HistoryID id)
System.arraycopy(idComponents, 0, dirs, 1, dirs.length - 1);
File directory = null;
try {
directory = this.fileAccessService
.getPrivatePersistentDirectory(dirs);
} catch (Exception e)
try
{
throw (IOException) new IOException(
"Could not create history due to file system error")
.initCause(e);
directory
= getFileAccessService().getPrivatePersistentDirectory(dirs);
}
catch (Exception e)
{
IOException ioe
= new IOException(
"Could not create history due to file system error");
ioe.initCause(e);
throw ioe;
}
if (!directory.exists() && !directory.mkdirs())
@ -365,11 +371,7 @@ private static ConfigurationService getConfigurationService(
private static FileAccessService getFileAccessService(
BundleContext bundleContext)
{
ServiceReference serviceReference =
bundleContext
.getServiceReference(FileAccessService.class.getName());
return (serviceReference == null) ? null
: (FileAccessService) bundleContext.getService(serviceReference);
return ServiceUtils.getService(bundleContext, FileAccessService.class);
}
/**
@ -416,9 +418,7 @@ private File getDirForHistory(HistoryID id)
for (int i = 0; i < dirNames.length; i++)
{
if (i > 0)
{
dirName.append(File.separatorChar);
}
dirName.append(dirNames[i]);
}
@ -426,18 +426,16 @@ private File getDirForHistory(HistoryID id)
File histDir = null;
try
{
String userSetDataDirectory =
System.getProperty("HistoryServiceDirectory");
String userSetDataDirectory
= System.getProperty("HistoryServiceDirectory");
if(userSetDataDirectory != null)
histDir = this.fileAccessService
.getPrivatePersistentDirectory(userSetDataDirectory);
else
histDir = this.fileAccessService
.getPrivatePersistentDirectory(DATA_DIRECTORY);
} catch (Exception e)
histDir
= getFileAccessService().getPrivatePersistentDirectory(
(userSetDataDirectory == null)
? DATA_DIRECTORY
: userSetDataDirectory);
}
catch (Exception e)
{
logger.error("Error opening directory", e);
}

Loading…
Cancel
Save