Kaydet (Commit) 471cbb05 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

bool improvements

Change-Id: I418611622b4b47ed5a4fa2ab99afb25371b186f6
üst 62736c5f
...@@ -254,7 +254,8 @@ javaPluginError jfw_plugin_getAllJavaInfos( ...@@ -254,7 +254,8 @@ javaPluginError jfw_plugin_getAllJavaInfos(
{ {
//The minVersion was not recognized as valid for this vendor. //The minVersion was not recognized as valid for this vendor.
JFW_ENSURE( JFW_ENSURE(
0,"[Java framework]sunjavaplugin does not know version: " false,
"[Java framework]sunjavaplugin does not know version: "
+ ouMinVer + " for vendor: " + cur->getVendor() + ouMinVer + " for vendor: " + cur->getVendor()
+ " .Check minimum Version." ); + " .Check minimum Version." );
return JFW_PLUGIN_E_WRONG_VERSION_FORMAT; return JFW_PLUGIN_E_WRONG_VERSION_FORMAT;
...@@ -272,7 +273,8 @@ javaPluginError jfw_plugin_getAllJavaInfos( ...@@ -272,7 +273,8 @@ javaPluginError jfw_plugin_getAllJavaInfos(
{ {
//The maxVersion was not recognized as valid for this vendor. //The maxVersion was not recognized as valid for this vendor.
JFW_ENSURE( JFW_ENSURE(
0,"[Java framework]sunjavaplugin does not know version: " false,
"[Java framework]sunjavaplugin does not know version: "
+ ouMaxVer + " for vendor: " + cur->getVendor() + ouMaxVer + " for vendor: " + cur->getVendor()
+ " .Check maximum Version." ); + " .Check maximum Version." );
return JFW_PLUGIN_E_WRONG_VERSION_FORMAT; return JFW_PLUGIN_E_WRONG_VERSION_FORMAT;
...@@ -295,7 +297,8 @@ javaPluginError jfw_plugin_getAllJavaInfos( ...@@ -295,7 +297,8 @@ javaPluginError jfw_plugin_getAllJavaInfos(
{ {
//The excluded version was not recognized as valid for this vendor. //The excluded version was not recognized as valid for this vendor.
JFW_ENSURE( JFW_ENSURE(
0,"[Java framework]sunjavaplugin does not know version: " false,
"[Java framework]sunjavaplugin does not know version: "
+ sExVer + " for vendor: " + cur->getVendor() + sExVer + " for vendor: " + cur->getVendor()
+ " .Check excluded versions." ); + " .Check excluded versions." );
return JFW_PLUGIN_E_WRONG_VERSION_FORMAT; return JFW_PLUGIN_E_WRONG_VERSION_FORMAT;
...@@ -378,7 +381,8 @@ javaPluginError jfw_plugin_getJavaInfoByPath( ...@@ -378,7 +381,8 @@ javaPluginError jfw_plugin_getJavaInfoByPath(
{ {
//The minVersion was not recognized as valid for this vendor. //The minVersion was not recognized as valid for this vendor.
JFW_ENSURE( JFW_ENSURE(
0,"[Java framework]sunjavaplugin does not know version: " false,
"[Java framework]sunjavaplugin does not know version: "
+ ouMinVer + " for vendor: " + aVendorInfo->getVendor() + ouMinVer + " for vendor: " + aVendorInfo->getVendor()
+ " .Check minimum Version." ); + " .Check minimum Version." );
return JFW_PLUGIN_E_WRONG_VERSION_FORMAT; return JFW_PLUGIN_E_WRONG_VERSION_FORMAT;
...@@ -398,7 +402,8 @@ javaPluginError jfw_plugin_getJavaInfoByPath( ...@@ -398,7 +402,8 @@ javaPluginError jfw_plugin_getJavaInfoByPath(
{ {
//The maxVersion was not recognized as valid for this vendor. //The maxVersion was not recognized as valid for this vendor.
JFW_ENSURE( JFW_ENSURE(
0,"[Java framework]sunjavaplugin does not know version: " false,
"[Java framework]sunjavaplugin does not know version: "
+ ouMaxVer + " for vendor: " + aVendorInfo->getVendor() + ouMaxVer + " for vendor: " + aVendorInfo->getVendor()
+ " .Check maximum Version." ); + " .Check maximum Version." );
return JFW_PLUGIN_E_WRONG_VERSION_FORMAT; return JFW_PLUGIN_E_WRONG_VERSION_FORMAT;
...@@ -419,7 +424,8 @@ javaPluginError jfw_plugin_getJavaInfoByPath( ...@@ -419,7 +424,8 @@ javaPluginError jfw_plugin_getJavaInfoByPath(
{ {
//The excluded version was not recognized as valid for this vendor. //The excluded version was not recognized as valid for this vendor.
JFW_ENSURE( JFW_ENSURE(
0,"[Java framework]sunjavaplugin does not know version: " false,
"[Java framework]sunjavaplugin does not know version: "
+ sExVer + " for vendor: " + aVendorInfo->getVendor() + sExVer + " for vendor: " + aVendorInfo->getVendor()
+ " .Check excluded versions." ); + " .Check excluded versions." );
return JFW_PLUGIN_E_WRONG_VERSION_FORMAT; return JFW_PLUGIN_E_WRONG_VERSION_FORMAT;
...@@ -579,7 +585,8 @@ javaPluginError jfw_plugin_startJavaVirtualMachine( ...@@ -579,7 +585,8 @@ javaPluginError jfw_plugin_startJavaVirtualMachine(
if ((moduleRt = osl_loadModule(sRuntimeLib.pData, SAL_LOADMODULE_DEFAULT)) == 0) if ((moduleRt = osl_loadModule(sRuntimeLib.pData, SAL_LOADMODULE_DEFAULT)) == 0)
#endif #endif
{ {
JFW_ENSURE(0, "[Java framework]sunjavaplugin" SAL_DLLEXTENSION JFW_ENSURE(false,
"[Java framework]sunjavaplugin" SAL_DLLEXTENSION
" could not load Java runtime library: \n" " could not load Java runtime library: \n"
+ sRuntimeLib + "\n"); + sRuntimeLib + "\n");
JFW_TRACE0("[Java framework]sunjavaplugin" SAL_DLLEXTENSION JFW_TRACE0("[Java framework]sunjavaplugin" SAL_DLLEXTENSION
...@@ -606,7 +613,7 @@ javaPluginError jfw_plugin_startJavaVirtualMachine( ...@@ -606,7 +613,7 @@ javaPluginError jfw_plugin_startJavaVirtualMachine(
moduleRt, sSymbolCreateJava.pData); moduleRt, sSymbolCreateJava.pData);
if (!pCreateJavaVM) if (!pCreateJavaVM)
{ {
OSL_ASSERT(0); OSL_ASSERT(false);
OString sLib = OUStringToOString( OString sLib = OUStringToOString(
sRuntimeLib, osl_getThreadTextEncoding()); sRuntimeLib, osl_getThreadTextEncoding());
OString sSymbol = OUStringToOString( OString sSymbol = OUStringToOString(
......
...@@ -74,7 +74,7 @@ bool SunVersion::init(const char *szVersion) ...@@ -74,7 +74,7 @@ bool SunVersion::init(const char *szVersion)
char buf[128]; char buf[128];
//char must me a number 0 - 999 and no leading //char must me a number 0 - 999 and no leading
while (1) while (true)
{ {
if (pCur < pEnd && isdigit(*pCur)) if (pCur < pEnd && isdigit(*pCur))
{ {
...@@ -128,7 +128,7 @@ bool SunVersion::init(const char *szVersion) ...@@ -128,7 +128,7 @@ bool SunVersion::init(const char *szVersion)
if (* (pCur - 1) == '_') if (* (pCur - 1) == '_')
{// _01, _02 {// _01, _02
// update is the last part _01, _01a, part 0 is the digits parts and 1 the trailing alpha // update is the last part _01, _01a, part 0 is the digits parts and 1 the trailing alpha
while (1) while (true)
{ {
if (pCur <= pEnd) if (pCur <= pEnd)
{ {
......
...@@ -460,7 +460,7 @@ bool getJavaProps(const OUString & exePath, ...@@ -460,7 +460,7 @@ bool getJavaProps(const OUString & exePath,
//Use this thread to read output stream //Use this thread to read output stream
FileHandleReader::Result rs = FileHandleReader::RESULT_OK; FileHandleReader::Result rs = FileHandleReader::RESULT_OK;
while (1) while (true)
{ {
OString aLine; OString aLine;
rs = stdoutReader.readLine( & aLine); rs = stdoutReader.readLine( & aLine);
......
...@@ -1074,7 +1074,7 @@ void MergedSettings::merge(const NodeJava & share, const NodeJava & user) ...@@ -1074,7 +1074,7 @@ void MergedSettings::merge(const NodeJava & share, const NodeJava & user)
else if (share.getEnabled()) else if (share.getEnabled())
m_bEnabled = * share.getEnabled(); m_bEnabled = * share.getEnabled();
else else
m_bEnabled = sal_True; m_bEnabled = true;
if (user.getUserClassPath()) if (user.getUserClassPath())
m_sClassPath = * user.getUserClassPath(); m_sClassPath = * user.getUserClassPath();
......
...@@ -371,7 +371,7 @@ javaFrameworkError SAL_CALL jfw_startVM( ...@@ -371,7 +371,7 @@ javaFrameworkError SAL_CALL jfw_startVM(
"-Djava.class.path=" + jfw::BootParams::getClasspath(); "-Djava.class.path=" + jfw::BootParams::getClasspath();
} }
else else
OSL_ASSERT(0); OSL_ASSERT(false);
pInfo = aInfo.pInfo; pInfo = aInfo.pInfo;
} }
assert(pInfo != NULL); assert(pInfo != NULL);
...@@ -884,7 +884,7 @@ javaFrameworkError SAL_CALL jfw_getJavaInfoByPath( ...@@ -884,7 +884,7 @@ javaFrameworkError SAL_CALL jfw_getJavaInfoByPath(
{// plugin does not recognize this path as belonging to JRE {// plugin does not recognize this path as belonging to JRE
continue; continue;
} }
OSL_ASSERT(0); OSL_ASSERT(false);
} }
if (*ppInfo == NULL && errcode != JFW_E_FAILED_VERSION) if (*ppInfo == NULL && errcode != JFW_E_FAILED_VERSION)
errcode = JFW_E_NOT_RECOGNIZED; errcode = JFW_E_NOT_RECOGNIZED;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment