summaryrefslogtreecommitdiff
path: root/jvmfwk/plugins
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-01-28 20:01:36 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-01-28 20:26:26 +0100
commit471cbb05226c2fd3f92c63f3e6a7087a73ee8f6f (patch)
treea58a0a3fd43580b99d08eb3640475b9fc691a14f /jvmfwk/plugins
parent62736c5fb8b68b25d7605a59437bf555902b3d96 (diff)
bool improvements
Change-Id: I418611622b4b47ed5a4fa2ab99afb25371b186f6
Diffstat (limited to 'jvmfwk/plugins')
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx23
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx4
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/util.cxx2
3 files changed, 18 insertions, 11 deletions
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
index aa4091c7c991..481847e1cdfc 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
@@ -254,7 +254,8 @@ javaPluginError jfw_plugin_getAllJavaInfos(
{
//The minVersion was not recognized as valid for this vendor.
JFW_ENSURE(
- 0,"[Java framework]sunjavaplugin does not know version: "
+ false,
+ "[Java framework]sunjavaplugin does not know version: "
+ ouMinVer + " for vendor: " + cur->getVendor()
+ " .Check minimum Version." );
return JFW_PLUGIN_E_WRONG_VERSION_FORMAT;
@@ -272,7 +273,8 @@ javaPluginError jfw_plugin_getAllJavaInfos(
{
//The maxVersion was not recognized as valid for this vendor.
JFW_ENSURE(
- 0,"[Java framework]sunjavaplugin does not know version: "
+ false,
+ "[Java framework]sunjavaplugin does not know version: "
+ ouMaxVer + " for vendor: " + cur->getVendor()
+ " .Check maximum Version." );
return JFW_PLUGIN_E_WRONG_VERSION_FORMAT;
@@ -295,7 +297,8 @@ javaPluginError jfw_plugin_getAllJavaInfos(
{
//The excluded version was not recognized as valid for this vendor.
JFW_ENSURE(
- 0,"[Java framework]sunjavaplugin does not know version: "
+ false,
+ "[Java framework]sunjavaplugin does not know version: "
+ sExVer + " for vendor: " + cur->getVendor()
+ " .Check excluded versions." );
return JFW_PLUGIN_E_WRONG_VERSION_FORMAT;
@@ -378,7 +381,8 @@ javaPluginError jfw_plugin_getJavaInfoByPath(
{
//The minVersion was not recognized as valid for this vendor.
JFW_ENSURE(
- 0,"[Java framework]sunjavaplugin does not know version: "
+ false,
+ "[Java framework]sunjavaplugin does not know version: "
+ ouMinVer + " for vendor: " + aVendorInfo->getVendor()
+ " .Check minimum Version." );
return JFW_PLUGIN_E_WRONG_VERSION_FORMAT;
@@ -398,7 +402,8 @@ javaPluginError jfw_plugin_getJavaInfoByPath(
{
//The maxVersion was not recognized as valid for this vendor.
JFW_ENSURE(
- 0,"[Java framework]sunjavaplugin does not know version: "
+ false,
+ "[Java framework]sunjavaplugin does not know version: "
+ ouMaxVer + " for vendor: " + aVendorInfo->getVendor()
+ " .Check maximum Version." );
return JFW_PLUGIN_E_WRONG_VERSION_FORMAT;
@@ -419,7 +424,8 @@ javaPluginError jfw_plugin_getJavaInfoByPath(
{
//The excluded version was not recognized as valid for this vendor.
JFW_ENSURE(
- 0,"[Java framework]sunjavaplugin does not know version: "
+ false,
+ "[Java framework]sunjavaplugin does not know version: "
+ sExVer + " for vendor: " + aVendorInfo->getVendor()
+ " .Check excluded versions." );
return JFW_PLUGIN_E_WRONG_VERSION_FORMAT;
@@ -579,7 +585,8 @@ javaPluginError jfw_plugin_startJavaVirtualMachine(
if ((moduleRt = osl_loadModule(sRuntimeLib.pData, SAL_LOADMODULE_DEFAULT)) == 0)
#endif
{
- JFW_ENSURE(0, "[Java framework]sunjavaplugin" SAL_DLLEXTENSION
+ JFW_ENSURE(false,
+ "[Java framework]sunjavaplugin" SAL_DLLEXTENSION
" could not load Java runtime library: \n"
+ sRuntimeLib + "\n");
JFW_TRACE0("[Java framework]sunjavaplugin" SAL_DLLEXTENSION
@@ -606,7 +613,7 @@ javaPluginError jfw_plugin_startJavaVirtualMachine(
moduleRt, sSymbolCreateJava.pData);
if (!pCreateJavaVM)
{
- OSL_ASSERT(0);
+ OSL_ASSERT(false);
OString sLib = OUStringToOString(
sRuntimeLib, osl_getThreadTextEncoding());
OString sSymbol = OUStringToOString(
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx
index 2cca0c2831a4..9e3114304aca 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx
@@ -74,7 +74,7 @@ bool SunVersion::init(const char *szVersion)
char buf[128];
//char must me a number 0 - 999 and no leading
- while (1)
+ while (true)
{
if (pCur < pEnd && isdigit(*pCur))
{
@@ -128,7 +128,7 @@ bool SunVersion::init(const char *szVersion)
if (* (pCur - 1) == '_')
{// _01, _02
// 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)
{
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
index 238842d0578f..f87aa7221e9f 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
@@ -460,7 +460,7 @@ bool getJavaProps(const OUString & exePath,
//Use this thread to read output stream
FileHandleReader::Result rs = FileHandleReader::RESULT_OK;
- while (1)
+ while (true)
{
OString aLine;
rs = stdoutReader.readLine( & aLine);