Kaydet (Commit) 49d43265 authored tarafından David Tardon's avatar David Tardon

WaE: ordered comparison of pointer with integer zero

üst c475316c
...@@ -294,33 +294,31 @@ javaPluginError jfw_plugin_getAllJavaInfos( ...@@ -294,33 +294,31 @@ javaPluginError jfw_plugin_getAllJavaInfos(
} }
} }
if (arExcludeList > 0) bool bExclude = false;
for (int j = 0; j < nLenList; j++)
{ {
bool bExclude = false; rtl::OUString sExVer(arExcludeList[j]);
for (int j = 0; j < nLenList; j++) try
{ {
rtl::OUString sExVer(arExcludeList[j]); if (cur->compareVersions(sExVer) == 0)
try
{
if (cur->compareVersions(sExVer) == 0)
{
bExclude = true;
break;
}
}
catch (MalformedVersionException&)
{ {
//The excluded version was not recognized as valid for this vendor. bExclude = true;
JFW_ENSURE( break;
0,OUSTR("[Java framework]sunjavaplugin does not know version: ")
+ sExVer + OUSTR(" for vendor: ") + cur->getVendor()
+ OUSTR(" .Check excluded versions.") );
return JFW_PLUGIN_E_WRONG_VERSION_FORMAT;
} }
} }
if (bExclude == true) catch (MalformedVersionException&)
continue; {
//The excluded version was not recognized as valid for this vendor.
JFW_ENSURE(
0,OUSTR("[Java framework]sunjavaplugin does not know version: ")
+ sExVer + OUSTR(" for vendor: ") + cur->getVendor()
+ OUSTR(" .Check excluded versions.") );
return JFW_PLUGIN_E_WRONG_VERSION_FORMAT;
}
} }
if (bExclude == true)
continue;
vecVerifiedInfos.push_back(*i); vecVerifiedInfos.push_back(*i);
} }
//Now vecVerifiedInfos contains all those JREs which meet the version requirements //Now vecVerifiedInfos contains all those JREs which meet the version requirements
...@@ -424,28 +422,25 @@ javaPluginError jfw_plugin_getJavaInfoByPath( ...@@ -424,28 +422,25 @@ javaPluginError jfw_plugin_getJavaInfoByPath(
return JFW_PLUGIN_E_FAILED_VERSION; return JFW_PLUGIN_E_FAILED_VERSION;
} }
if (arExcludeList > 0) for (int i = 0; i < nLenList; i++)
{ {
for (int i = 0; i < nLenList; i++) rtl::OUString sExVer(arExcludeList[i]);
int nRes = 0;
try
{ {
rtl::OUString sExVer(arExcludeList[i]); nRes = aVendorInfo->compareVersions(sExVer);
int nRes = 0; }
try catch (MalformedVersionException&)
{ {
nRes = aVendorInfo->compareVersions(sExVer); //The excluded version was not recognized as valid for this vendor.
} JFW_ENSURE(
catch (MalformedVersionException&) 0,OUSTR("[Java framework]sunjavaplugin does not know version: ")
{ + sExVer + OUSTR(" for vendor: ") + aVendorInfo->getVendor()
//The excluded version was not recognized as valid for this vendor. + OUSTR(" .Check excluded versions.") );
JFW_ENSURE( return JFW_PLUGIN_E_WRONG_VERSION_FORMAT;
0,OUSTR("[Java framework]sunjavaplugin does not know version: ")
+ sExVer + OUSTR(" for vendor: ") + aVendorInfo->getVendor()
+ OUSTR(" .Check excluded versions.") );
return JFW_PLUGIN_E_WRONG_VERSION_FORMAT;
}
if (nRes == 0)
return JFW_PLUGIN_E_FAILED_VERSION;
} }
if (nRes == 0)
return JFW_PLUGIN_E_FAILED_VERSION;
} }
*ppInfo = createJavaInfo(aVendorInfo); *ppInfo = createJavaInfo(aVendorInfo);
......
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