summaryrefslogtreecommitdiff
path: root/jvmfwk
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2017-05-07 08:18:25 +1000
committerChris Sherlock <chris.sherlock79@gmail.com>2017-05-07 08:18:25 +1000
commit3cf126d701484c8141f9c64e87127f3e858c2aef (patch)
tree5b7de1c2e7871a916450c94ff2bdfc76d8ece62c /jvmfwk
parent9ff87d13932ca68a775a439df378bed25f9f0e8f (diff)
tdf#43157: convert jvmfwk from OSL_ASSERT to assert
Change-Id: Ie06633dd6a49ed9fc51dfb5e6066529020dcf268
Diffstat (limited to 'jvmfwk')
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx4
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx12
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/util.cxx8
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx4
-rw-r--r--jvmfwk/source/elements.cxx6
-rw-r--r--jvmfwk/source/framework.cxx6
-rw-r--r--jvmfwk/source/fwkbase.cxx6
7 files changed, 23 insertions, 23 deletions
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx b/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx
index 1750696ab018..8e8146628621 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx
@@ -171,7 +171,7 @@ bool GnuInfo::initialize(vector<pair<OUString, OUString> > props)
m_sJavaHome = "file:///usr/lib";
// init m_sRuntimeLibrary
- OSL_ASSERT(!m_sHome.isEmpty());
+ assert(!m_sHome.isEmpty());
//call virtual function to get the possible paths to the runtime library.
int size = 0;
@@ -256,7 +256,7 @@ bool GnuInfo::initialize(vector<pair<OUString, OUString> > props)
return false;
// init m_sLD_LIBRARY_PATH
- OSL_ASSERT(!m_sHome.isEmpty());
+ assert(!m_sHome.isEmpty());
size = 0;
char const * const * arLDPaths = getLibraryPaths( & size);
vector<OUString> ld_paths = getVectorFromCharArray(arLDPaths, size);
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
index 0bd412408b3b..9071bc6fa3b5 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
@@ -103,7 +103,7 @@ OString getPluginJarPath(
SunVersion ver142("1.4.2-ea");
SunVersion ver150("1.5.0-ea");
SunVersion ver(sVersion);
- OSL_ASSERT(ver142 && ver150 && ver);
+ assert(ver142 && ver150 && ver);
OUString sName;
if (ver < ver142)
@@ -139,7 +139,7 @@ OString getPluginJarPath(
sPath = sPath1 + OUString::createFromAscii(sep) + sPath2;
}
}
- OSL_ASSERT(!sPath.isEmpty());
+ assert(!sPath.isEmpty());
}
ret = OUStringToOString(sPath, osl_getThreadTextEncoding());
@@ -301,7 +301,7 @@ javaPluginError jfw_plugin_getAllJavaInfos(
{
assert(parJavaInfo);
- OSL_ASSERT(!sVendor.isEmpty());
+ assert(!sVendor.isEmpty());
if (sVendor.isEmpty())
return javaPluginError::InvalidArg;
@@ -349,11 +349,11 @@ javaPluginError jfw_plugin_getJavaInfoByPath(
std::unique_ptr<JavaInfo> * ppInfo)
{
assert(ppInfo != nullptr);
- OSL_ASSERT(!sPath.isEmpty());
+ assert(!sPath.isEmpty());
if (sPath.isEmpty())
return javaPluginError::InvalidArg;
- OSL_ASSERT(!sVendor.isEmpty());
+ assert(!sVendor.isEmpty());
if (sVendor.isEmpty())
return javaPluginError::InvalidArg;
@@ -688,7 +688,7 @@ javaPluginError jfw_plugin_startJavaVirtualMachine(
reinterpret_cast<JNI_CreateVM_Type *>(moduleRt.getFunctionSymbol(sSymbolCreateJava));
if (!pCreateJavaVM)
{
- OSL_ASSERT(false);
+ assert(false);
OString sLib = OUStringToOString(
sRuntimeLib, osl_getThreadTextEncoding());
OString sSymbol = OUStringToOString(
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
index 3c31e60c63e6..0b37c182f805 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
@@ -404,7 +404,7 @@ bool getJavaProps(const OUString & exePath,
{
bool ret = false;
- OSL_ASSERT(!exePath.isEmpty());
+ assert(!exePath.isEmpty());
OUString usStartDir;
//We need to set the CLASSPATH in case the office is started from
//a different directory. The JREProperties.class is expected to reside
@@ -515,7 +515,7 @@ bool getJavaProps(const OUString & exePath,
continue;
//The JREProperties class writes key value pairs, separated by '='
sal_Int32 index = sLine.indexOf('=');
- OSL_ASSERT(index != -1);
+ assert(index != -1);
OUString sKey = sLine.copy(0, index);
OUString sVal = sLine.copy(index + 1);
@@ -541,7 +541,7 @@ bool getJavaProps(const OUString & exePath,
TimeValue waitMax= {5 ,0};
procErr = osl_joinProcessWithTimeout(javaProcess, &waitMax);
- OSL_ASSERT(procErr == osl_Process_E_None);
+ assert(procErr == osl_Process_E_None);
osl_freeProcessHandle(javaProcess);
return ret;
}
@@ -552,7 +552,7 @@ bool getJavaProps(const OUString & exePath,
*/
bool decodeOutput(const OString& s, OUString* out)
{
- OSL_ASSERT(out != nullptr);
+ assert(out != nullptr);
OUStringBuffer buff(512);
sal_Int32 nIndex = 0;
do
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx b/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx
index 1f7423045bc1..c84e668e8371 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx
@@ -122,7 +122,7 @@ bool VendorBase::initialize(vector<pair<OUString, OUString> > props)
return false;
// init m_sRuntimeLibrary
- OSL_ASSERT(!m_sHome.isEmpty());
+ assert(!m_sHome.isEmpty());
//call virtual function to get the possible paths to the runtime library.
int size = 0;
@@ -148,7 +148,7 @@ bool VendorBase::initialize(vector<pair<OUString, OUString> > props)
return false;
// init m_sLD_LIBRARY_PATH
- OSL_ASSERT(!m_sHome.isEmpty());
+ assert(!m_sHome.isEmpty());
size = 0;
char const * const * arLDPaths = getLibraryPaths( & size);
vector<OUString> ld_paths = getVectorFromCharArray(arLDPaths, size);
diff --git a/jvmfwk/source/elements.cxx b/jvmfwk/source/elements.cxx
index 353eab37ba6f..a57af9ad2374 100644
--- a/jvmfwk/source/elements.cxx
+++ b/jvmfwk/source/elements.cxx
@@ -51,7 +51,7 @@ OString getElement(OString const & docPath,
xmlChar const * pathExpression, bool bThrowIfEmpty)
{
//Prepare the xml document and context
- OSL_ASSERT(!docPath.isEmpty());
+ assert(!docPath.isEmpty());
jfw::CXmlDocPtr doc(xmlParseFile(docPath.getStr()));
if (doc == nullptr)
throw FrameworkException(
@@ -712,7 +712,7 @@ void CNodeJavaInfo::loadFromNode(xmlDoc * pDoc, xmlNode * pJavaInfo)
OString sExcMsg("[Java framework] Error in function NodeJavaInfo::loadFromNode "
"(elements.cxx).");
- OSL_ASSERT(pJavaInfo && pDoc);
+ assert(pJavaInfo && pDoc);
if (pJavaInfo->children == nullptr)
return;
//Get the xsi:nil attribute;
@@ -829,7 +829,7 @@ void CNodeJavaInfo::writeToNode(xmlDoc* pDoc,
xmlNode* pJavaInfoNode) const
{
- OSL_ASSERT(pJavaInfoNode && pDoc);
+ assert(pJavaInfoNode && pDoc);
//write the attribute vendorSettings
//javaInfo@vendorUpdate
diff --git a/jvmfwk/source/framework.cxx b/jvmfwk/source/framework.cxx
index ddc5e6c19747..9dd836a5b806 100644
--- a/jvmfwk/source/framework.cxx
+++ b/jvmfwk/source/framework.cxx
@@ -239,7 +239,7 @@ javaFrameworkError jfw_startVM(
"-Djava.class.path=" + jfw::BootParams::getClasspath();
}
else
- OSL_ASSERT(false);
+ assert(false);
pInfo = aInfo.get();
}
assert(pInfo != nullptr);
@@ -299,7 +299,7 @@ javaFrameworkError jfw_startVM(
g_pJavaVM = pVm;
*ppVM = pVm;
}
- OSL_ASSERT(plerr != javaPluginError::WrongVendor);
+ assert(plerr != javaPluginError::WrongVendor);
}
catch (const jfw::FrameworkException& e)
{
@@ -667,7 +667,7 @@ javaFrameworkError jfw_getJavaInfoByPath(OUString const & pPath, std::unique_ptr
{// plugin does not recognize this path as belonging to JRE
continue;
}
- OSL_ASSERT(false);
+ assert(false);
}
if (!*ppInfo && errcode != JFW_E_FAILED_VERSION)
errcode = JFW_E_NOT_RECOGNIZED;
diff --git a/jvmfwk/source/fwkbase.cxx b/jvmfwk/source/fwkbase.cxx
index dbab7d4a9e7a..226673356cd5 100644
--- a/jvmfwk/source/fwkbase.cxx
+++ b/jvmfwk/source/fwkbase.cxx
@@ -120,7 +120,7 @@ VendorSettings::VendorSettings():
VersionInfo VendorSettings::getVersionInformation(const OUString & sVendor)
{
- OSL_ASSERT(!sVendor.isEmpty());
+ assert(!sVendor.isEmpty());
VersionInfo aVersionInfo;
OString osVendor = OUStringToOString(sVendor, RTL_TEXTENCODING_UTF8);
//Get minVersion
@@ -436,7 +436,7 @@ JFW_MODE getMode()
OUString getApplicationClassPath()
{
- OSL_ASSERT(getMode() == JFW_MODE_APPLICATION);
+ assert(getMode() == JFW_MODE_APPLICATION);
OUString retVal;
OUString sParams = BootParams::getClasspathUrls();
if (sParams.isEmpty())
@@ -453,7 +453,7 @@ OUString getApplicationClassPath()
OUString systemPathElement;
oslFileError rc = osl_getSystemPathFromFileURL(
token.pData, &systemPathElement.pData );
- OSL_ASSERT( rc == osl_File_E_None );
+ assert( rc == osl_File_E_None );
if (rc == osl_File_E_None && !systemPathElement.isEmpty())
{
if (buf.getLength() > 0)