jvmfwk/plugins/sunmajor/pluginlib/diagnostics.h | 31 -------------------- jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx | 12 ++----- jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx | 4 +- jvmfwk/plugins/sunmajor/pluginlib/util.cxx | 3 - 4 files changed, 7 insertions(+), 43 deletions(-)
New commits: commit c393229168c62fc678162b080c41cd249c9787b1 Author: Gabor Kelemen <gabor.kele...@collabora.com> AuthorDate: Sat Aug 16 10:47:06 2025 +0200 Commit: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de> CommitDate: Fri Sep 19 08:25:16 2025 +0200 Drop JFW_ENSURE wrapper above SAL_WARN_IF replace in some cases with SAL_WARN where the condition was 'false' drop now unnecessary diagnostics.h header Change-Id: I46cedd9363f38256d5364600c4a7f16ce6937930 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189783 Tested-by: Jenkins Reviewed-by: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de> diff --git a/jvmfwk/plugins/sunmajor/pluginlib/diagnostics.h b/jvmfwk/plugins/sunmajor/pluginlib/diagnostics.h deleted file mode 100644 index 0299941d985a..000000000000 --- a/jvmfwk/plugins/sunmajor/pluginlib/diagnostics.h +++ /dev/null @@ -1,31 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_JVMFWK_PLUGINS_SUNMAJOR_PLUGINLIB_DIAGNOSTICS_H -#define INCLUDED_JVMFWK_PLUGINS_SUNMAJOR_PLUGINLIB_DIAGNOSTICS_H - -#include <sal/config.h> - -#include <sal/log.hxx> - -#define JFW_ENSURE(c, m) SAL_WARN_IF(!(c), "jfw", m) - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx index 5dcbb8de016d..8031d426b6e8 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx @@ -70,7 +70,6 @@ #include <jvmfwk/framework.hxx> #include "util.hxx" #include "sunversion.hxx" -#include "diagnostics.h" #if defined MACOSX && defined __x86_64__ #include "util_cocoa.hxx" @@ -279,8 +278,7 @@ javaPluginError checkJavaVersionRequirements( catch (MalformedVersionException&) { //The minVersion was not recognized as valid for this vendor. - JFW_ENSURE( - false, + SAL_WARN("jfw", "[Java framework]sunjavaplugin does not know version: " + sMinVersion + " for vendor: " + aVendorInfo->getVendor() + " .Check minimum Version." ); @@ -298,8 +296,7 @@ javaPluginError checkJavaVersionRequirements( catch (MalformedVersionException&) { //The maxVersion was not recognized as valid for this vendor. - JFW_ENSURE( - false, + SAL_WARN("jfw", "[Java framework]sunjavaplugin does not know version: " + sMaxVersion + " for vendor: " + aVendorInfo->getVendor() + " .Check maximum Version." ); @@ -316,8 +313,7 @@ javaPluginError checkJavaVersionRequirements( catch (MalformedVersionException&) { //The excluded version was not recognized as valid for this vendor. - JFW_ENSURE( - false, + SAL_WARN("jfw", "[Java framework]sunjavaplugin does not know version: " + sExVer + " for vendor: " + aVendorInfo->getVendor() + " .Check excluded versions." ); @@ -655,7 +651,7 @@ javaPluginError jfw_plugin_startJavaVirtualMachine( if (!moduleRt.load(sRuntimeLib)) #endif { - JFW_ENSURE(false, + SAL_WARN("jfw", "[Java framework]sunjavaplugin" SAL_DLLEXTENSION " could not load Java runtime library: " + sRuntimeLib + " "); diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx index ae229606afc5..cd1b73a722b2 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx @@ -18,9 +18,9 @@ */ +#include <sal/log.hxx> #include "sunjre.hxx" #include "sunversion.hxx" -#include "diagnostics.h" namespace jfw_plugin { @@ -95,7 +95,7 @@ int SunInfo::compareVersions(const OUString& sSecond) const OUString sFirst = getVersion(); SunVersion version1(sFirst); - JFW_ENSURE(version1, "[Java framework] sunjavaplugin" SAL_DLLEXTENSION + SAL_WARN_IF(!(version1), "jfw", "[Java framework] sunjavaplugin" SAL_DLLEXTENSION " does not know the version: " + sFirst + " as valid for a SUN/Oracle JRE."); SunVersion version2(sSecond); diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx index 26ab4cab5567..995bda5084bf 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx @@ -47,7 +47,6 @@ #include "sunjre.hxx" #include "vendorlist.hxx" -#include "diagnostics.h" #if defined MACOSX && defined __x86_64__ #include "util_cocoa.hxx" #endif @@ -1234,7 +1233,7 @@ void addJavaInfosDirScan( aStatus.getFileURL(), allInfos, addedInfos); } - JFW_ENSURE(errNext == File::E_None || errNext == File::E_NOENT, + SAL_WARN_IF(errNext != File::E_None && errNext != File::E_NOENT, "jfw", "[Java framework] sunjavaplugin: " "Error while iterating over contents of " + usDir2 + ". Osl file error: "