// Path: src/main/java/org/codelibs/fess/suggest/exception/SuggestSettingsException.java
// public class SuggestSettingsException extends RuntimeException {
// 
//     private static final long serialVersionUID = 1L;
// 
//     public SuggestSettingsException(final String msg) {
//         super(msg);
//     }
// 
//     public SuggestSettingsException(final Throwable cause) {
//         super(cause);
//     }
// 
//     public SuggestSettingsException(final String msg, final Throwable cause) {
//         super(msg, cause);
//     }
// }


import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.codelibs.fess.suggest.exception.SuggestSettingsException;
import org.opensearch.client.Client;
import org.opensearch.common.Strings;
        }
        arraySettings.delete(BAD_WORD_SETTINGD_KEY);
    }

    protected String getValidationError(final String badWord) {
        if (Strings.isNullOrEmpty(badWord)) {
            return "badWord was empty.";
        }
        if (badWord.contains(" ") || badWord.contains("  ")) {
            return "badWord contains space.";
        }
        return null;
    }

    protected static void updateDefaultBadwords() {
        if (defaultWords != null) {
            return;
        }

        final List<String> list = new ArrayList<>();
        try (BufferedReader br = new BufferedReader(new InputStreamReader(
                Thread.currentThread().getContextClassLoader().getResourceAsStream("suggest_settings/default-badwords.txt")))) {

            String line;
            while ((line = br.readLine()) != null) {
                if (line.length() > 0 && !line.startsWith("#")) {
                    list.add(line.trim());
                }
            }
        } catch (final Exception e) {
// Path: src/main/java/org/codelibs/fess/suggest/exception/SuggestSettingsException.java
// public class SuggestSettingsException extends RuntimeException {
// 
//     private static final long serialVersionUID = 1L;
// 
//     public SuggestSettingsException(final String msg) {
//         super(msg);
//     }
// 
//     public SuggestSettingsException(final Throwable cause) {
//         super(cause);
//     }
// 
//     public SuggestSettingsException(final String msg, final Throwable cause) {
//         super(msg, cause);
//     }
// }


// Path: src/main/java/org/codelibs/fess/suggest/settings/BadWordSettings.java
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.codelibs.fess.suggest.exception.SuggestSettingsException;
import org.opensearch.client.Client;
import org.opensearch.common.Strings;

        }
        arraySettings.delete(BAD_WORD_SETTINGD_KEY);
    }

    protected String getValidationError(final String badWord) {
        if (Strings.isNullOrEmpty(badWord)) {
            return "badWord was empty.";
        }
        if (badWord.contains(" ") || badWord.contains("  ")) {
            return "badWord contains space.";
        }
        return null;
    }

    protected static void updateDefaultBadwords() {
        if (defaultWords != null) {
            return;
        }

        final List<String> list = new ArrayList<>();
        try (BufferedReader br = new BufferedReader(new InputStreamReader(
                Thread.currentThread().getContextClassLoader().getResourceAsStream("suggest_settings/default-badwords.txt")))) {

            String line;
            while ((line = br.readLine()) != null) {
                if (line.length() > 0 && !line.startsWith("#")) {
                    list.add(line.trim());
                }
            }
        } catch (final Exception e) {
            throw new SuggestSettingsException("Failed to load default badwords.", e);