src/main/java/com/xceptance/neodymium/util/YamlProperties.java
/**
     * Parses yaml properties and turns them into regular Java properties. If the file does not exists, it returns null.
     *
     * @param file
     *            a {@link File} for a YAML file
     * @return a Java properties file reader
     */
Parses yaml properties and turns them into regular Java properties. If the file does not exists, it returns null.
@param file
a  File for a YAML file
@return a Java properties file reader
Parses yaml properties and turns them into regular Java properties . If the file does not exists it returns null . @param file a File for a YAML file @return a Java properties file reader
public static Properties build(final File file)
    {
        try (final Reader reader = new BufferedReader(new InputStreamReader(new FileInputStream(file), Charset.forName("UTF-8"))))
        {
            final Yaml yaml = new Yaml();
            final Map<String, Object> map = yaml.load(reader);
            if (map == null)
            {
                return null;
            }
            final YamlProperties yamlProperties = new YamlProperties();
            yamlProperties.yamlToJavaProperties(map);
            return yamlProperties.properties;
        }
        catch (final FileNotFoundException e)
        {
            return null;
        }
        catch (final IOException e)
        {
            return null;
        }
    }
public static Properties build ( final File file ) { try ( final Reader reader = new BufferedReader ( new InputStreamReader ( new FileInputStream ( file ) , Charset . forName ( "UTF-8" ) ) ) ) { final Yaml yaml = new Yaml ( ) ; final Map < String , Object > map = yaml . load ( reader ) ; if ( map == null ) { return null ; } final YamlProperties yamlProperties = new YamlProperties ( ) ; yamlProperties . yamlToJavaProperties ( map ) ; return yamlProperties . properties ; } catch ( final FileNotFoundException e ) { return null ; } catch ( final IOException e ) { return null ; } }
Parses yaml properties and turns them into regular Java properties.
Parses yaml properties and turns them into regular Java properties .
// the localization file is empty