cid#1509234 DCN: Don't Catch NullPointer Exception

and

cid#1509229 DCN: Don't Catch NullPointer Exception

Change-Id: I113de964ff07fc771ac64acb8583341cd518d0e6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138921
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
Caolán McNamara
2022-08-27 12:46:16 +02:00
parent 995ae3dc84
commit 45e54afffa
@@ -321,12 +321,7 @@ public class _XTransliteration extends MultiMethodTest {
boolean ret = true ;
int res = -666 ;
try {
res = oObj.compareSubstring(str1, p1, len1, str2, p2, len2);
} catch (NullPointerException e) {
log.println("Exception while method calling occurs :" + e);
}
int res = oObj.compareSubstring(str1, p1, len1, str2, p2, len2);
if (res != expRes) {
log.print("Comparing FAILED; return: " + res + ", expected: " +
@@ -402,12 +397,7 @@ public class _XTransliteration extends MultiMethodTest {
boolean ret = true ;
int res = -666 ;
try {
res = oObj.compareString(str1, str2);
} catch (NullPointerException e) {
log.println("Exception while method calling occurs :" + e);
}
int res = oObj.compareString(str1, str2);
if (res == expRes) {
log.println("Comparing of '" + str1 + "' and '" + str2 + "' OK" );