From 97eb00c75e173d4c8d0b483a7941ad3d2f23783e Mon Sep 17 00:00:00 2001 From: Chris Sherlock Date: Sun, 7 May 2017 17:03:35 +1000 Subject: revert OSL_ASSERT changes Change-Id: I365d140446bd2a62cf8256acbfdd53fe72987380 --- jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx | 4 ++-- jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx | 12 ++++++------ jvmfwk/plugins/sunmajor/pluginlib/util.cxx | 8 ++++---- jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx | 4 ++-- jvmfwk/source/elements.cxx | 6 +++--- jvmfwk/source/framework.cxx | 6 +++--- jvmfwk/source/fwkbase.cxx | 6 +++--- 7 files changed, 23 insertions(+), 23 deletions(-) (limited to 'jvmfwk') diff --git a/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx b/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx index 8e8146628621..1750696ab018 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx @@ -171,7 +171,7 @@ bool GnuInfo::initialize(vector > props) m_sJavaHome = "file:///usr/lib"; // init m_sRuntimeLibrary - assert(!m_sHome.isEmpty()); + OSL_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 > props) return false; // init m_sLD_LIBRARY_PATH - assert(!m_sHome.isEmpty()); + OSL_ASSERT(!m_sHome.isEmpty()); size = 0; char const * const * arLDPaths = getLibraryPaths( & size); vector ld_paths = getVectorFromCharArray(arLDPaths, size); diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx index 9071bc6fa3b5..0bd412408b3b 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); - assert(ver142 && ver150 && ver); + OSL_ASSERT(ver142 && ver150 && ver); OUString sName; if (ver < ver142) @@ -139,7 +139,7 @@ OString getPluginJarPath( sPath = sPath1 + OUString::createFromAscii(sep) + sPath2; } } - assert(!sPath.isEmpty()); + OSL_ASSERT(!sPath.isEmpty()); } ret = OUStringToOString(sPath, osl_getThreadTextEncoding()); @@ -301,7 +301,7 @@ javaPluginError jfw_plugin_getAllJavaInfos( { assert(parJavaInfo); - assert(!sVendor.isEmpty()); + OSL_ASSERT(!sVendor.isEmpty()); if (sVendor.isEmpty()) return javaPluginError::InvalidArg; @@ -349,11 +349,11 @@ javaPluginError jfw_plugin_getJavaInfoByPath( std::unique_ptr * ppInfo) { assert(ppInfo != nullptr); - assert(!sPath.isEmpty()); + OSL_ASSERT(!sPath.isEmpty()); if (sPath.isEmpty()) return javaPluginError::InvalidArg; - assert(!sVendor.isEmpty()); + OSL_ASSERT(!sVendor.isEmpty()); if (sVendor.isEmpty()) return javaPluginError::InvalidArg; @@ -688,7 +688,7 @@ javaPluginError jfw_plugin_startJavaVirtualMachine( reinterpret_cast(moduleRt.getFunctionSymbol(sSymbolCreateJava)); if (!pCreateJavaVM) { - assert(false); + OSL_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 0b37c182f805..3c31e60c63e6 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; - assert(!exePath.isEmpty()); + OSL_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('='); - assert(index != -1); + OSL_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); - assert(procErr == osl_Process_E_None); + OSL_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) { - assert(out != nullptr); + OSL_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 c84e668e8371..1f7423045bc1 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx @@ -122,7 +122,7 @@ bool VendorBase::initialize(vector > props) return false; // init m_sRuntimeLibrary - assert(!m_sHome.isEmpty()); + OSL_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 > props) return false; // init m_sLD_LIBRARY_PATH - assert(!m_sHome.isEmpty()); + OSL_ASSERT(!m_sHome.isEmpty()); size = 0; char const * const * arLDPaths = getLibraryPaths( & size); vector ld_paths = getVectorFromCharArray(arLDPaths, size); diff --git a/jvmfwk/source/elements.cxx b/jvmfwk/source/elements.cxx index a57af9ad2374..353eab37ba6f 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 - assert(!docPath.isEmpty()); + OSL_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)."); - assert(pJavaInfo && pDoc); + OSL_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 { - assert(pJavaInfoNode && pDoc); + OSL_ASSERT(pJavaInfoNode && pDoc); //write the attribute vendorSettings //javaInfo@vendorUpdate diff --git a/jvmfwk/source/framework.cxx b/jvmfwk/source/framework.cxx index 9dd836a5b806..ddc5e6c19747 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 - assert(false); + OSL_ASSERT(false); pInfo = aInfo.get(); } assert(pInfo != nullptr); @@ -299,7 +299,7 @@ javaFrameworkError jfw_startVM( g_pJavaVM = pVm; *ppVM = pVm; } - assert(plerr != javaPluginError::WrongVendor); + OSL_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; } - assert(false); + OSL_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 226673356cd5..dbab7d4a9e7a 100644 --- a/jvmfwk/source/fwkbase.cxx +++ b/jvmfwk/source/fwkbase.cxx @@ -120,7 +120,7 @@ VendorSettings::VendorSettings(): VersionInfo VendorSettings::getVersionInformation(const OUString & sVendor) { - assert(!sVendor.isEmpty()); + OSL_ASSERT(!sVendor.isEmpty()); VersionInfo aVersionInfo; OString osVendor = OUStringToOString(sVendor, RTL_TEXTENCODING_UTF8); //Get minVersion @@ -436,7 +436,7 @@ JFW_MODE getMode() OUString getApplicationClassPath() { - assert(getMode() == JFW_MODE_APPLICATION); + OSL_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 ); - assert( rc == osl_File_E_None ); + OSL_ASSERT( rc == osl_File_E_None ); if (rc == osl_File_E_None && !systemPathElement.isEmpty()) { if (buf.getLength() > 0) -- cgit v1.2.3