class DefaultToolchainsBuilder implements ToolchainsBuilder {
    private final Logger logger = LoggerFactory.getLogger(getClass());

    public PersistedToolchains build(File userToolchainsFile) throws MisconfiguredToolchainException {<FILL_FUNCTION_BODY>}
}

        PersistedToolchains toolchains = null;

        if (userToolchainsFile != null && userToolchainsFile.isFile()) {
            try (InputStream in = Files.newInputStream(userToolchainsFile.toPath())) {
                toolchains = new PersistedToolchains(new MavenToolchainsStaxReader().read(in));
            } catch (Exception e) {
                throw new MisconfiguredToolchainException(
                        "Cannot read toolchains file at " + userToolchainsFile.getAbsolutePath(), e);
            }

        } else if (userToolchainsFile != null) {
            logger.debug("Toolchains configuration was not found at {}", userToolchainsFile);
        }

        return toolchains;
    
<no_super_class>