// Path: honeybadger-java/src/main/java/io/honeybadger/util/HBStringUtils.java
// public final class HBStringUtils {
//     private HBStringUtils() { }
// 
//     /**
//      * Removes a single character from the end of a string if it matches.
//      * @param input String to remove from, if null returns null
//      * @param c character to match
//      * @return Original string minus matched character
//      */
//     public static String stripTrailingChar(final String input, final char c) {
//         if (input == null) return null;
//         if (input.isEmpty()) return input;
// 
//         char[] charArray = input.toCharArray();
// 
//         if (charArray[charArray.length - 1] == c) {
//             return new String(Arrays.copyOf(charArray, charArray.length - 1));
//         } else {
//             return input;
//         }
//     }
// 
//     /**
//      * Checks a string to see if it is null or empty.
//      * @param string String to check
//      * @return true if null or empty
//      */
//     public static boolean isPresent(final String string) {
//         return string != null && !string.isEmpty();
//     }
// }


import com.typesafe.config.Config;
import com.typesafe.config.ConfigValue;
import io.honeybadger.util.HBStringUtils;
import org.slf4j.LoggerFactory;
import play.Environment;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.stream.Collectors;
import java.util.stream.Stream;
package io.honeybadger.reporter.config;



/**
 * {@link ConfigContext} implementation that reads its configuration values from
 * a Play Framework {@link Config} class.
 *
 * @author <a href="https://github.com/dekobon">Elijah Zupancic</a>
 * @since 1.0.11
 */
public class PlayConfigContext extends BaseChainedConfigContext {
    /**
     * {@link Map.Entry} implementation for mapping between Play config objects
     * and generic Map.Entry objects.
     *
     * @param <K> key type
     * @param <V> value type
     */
    private static final class ConfigEntry<K, V> implements Map.Entry<K, V> {
        private final K key;
        private V val;

        static Map.Entry<String, Object> fromConfigValueEntry(
                final Map.Entry<String, ConfigValue> entry) {
            return new ConfigEntry<>(entry.getKey(), entry.getValue().unwrapped());
        }

// Path: honeybadger-java/src/main/java/io/honeybadger/util/HBStringUtils.java
// public final class HBStringUtils {
//     private HBStringUtils() { }
// 
//     /**
//      * Removes a single character from the end of a string if it matches.
//      * @param input String to remove from, if null returns null
//      * @param c character to match
//      * @return Original string minus matched character
//      */
//     public static String stripTrailingChar(final String input, final char c) {
//         if (input == null) return null;
//         if (input.isEmpty()) return input;
// 
//         char[] charArray = input.toCharArray();
// 
//         if (charArray[charArray.length - 1] == c) {
//             return new String(Arrays.copyOf(charArray, charArray.length - 1));
//         } else {
//             return input;
//         }
//     }
// 
//     /**
//      * Checks a string to see if it is null or empty.
//      * @param string String to check
//      * @return true if null or empty
//      */
//     public static boolean isPresent(final String string) {
//         return string != null && !string.isEmpty();
//     }
// }


// Path: honeybadger-java/src/main/java/io/honeybadger/reporter/config/PlayConfigContext.java
import com.typesafe.config.Config;
import com.typesafe.config.ConfigValue;
import io.honeybadger.util.HBStringUtils;
import org.slf4j.LoggerFactory;
import play.Environment;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.stream.Collectors;
import java.util.stream.Stream;

package io.honeybadger.reporter.config;



/**
 * {@link ConfigContext} implementation that reads its configuration values from
 * a Play Framework {@link Config} class.
 *
 * @author <a href="https://github.com/dekobon">Elijah Zupancic</a>
 * @since 1.0.11
 */
public class PlayConfigContext extends BaseChainedConfigContext {
    /**
     * {@link Map.Entry} implementation for mapping between Play config objects
     * and generic Map.Entry objects.
     *
     * @param <K> key type
     * @param <V> value type
     */
    private static final class ConfigEntry<K, V> implements Map.Entry<K, V> {
        private final K key;
        private V val;

        static Map.Entry<String, Object> fromConfigValueEntry(
                final Map.Entry<String, ConfigValue> entry) {
            return new ConfigEntry<>(entry.getKey(), entry.getValue().unwrapped());
        }

        ConfigEntry(final K key, final V val) {