@Test public void setDefaults() { final LinuxTerminalPreferences prefs = new LinuxTerminalPreferences(); prefs.load(); prefs.setLogging(); prefs.setFactories(); prefs.setDefaults(); assertEquals("NativePRNGNonBlocking", prefs.getProperty("connection.ssl.securerandom.algorithm")); assertEquals(UnsecureHostPasswordStore.class.getName(), prefs.getProperty("factory.passwordstore.class")); }
@Override protected void setDefaults() { super.setDefaults(); try { final Process echo = Runtime.getRuntime().exec(new String[]{"/bin/sh", "-c", "echo ~"}); this.setDefault("local.user.home", StringUtils.strip(IOUtils.toString(echo.getInputStream(), Charset.defaultCharset()))); } catch(IOException e) { log.warn("Failure determining user home with `echo ~`"); } this.setDefault("ssh.authentication.agent.enable", String.valueOf(false)); this.setDefault("bookmarks.folder.name", "bookmarks"); this.setDefault("profiles.folder.name", "profiles"); this.setDefault("connection.ssl.securerandom.algorithm", "NativePRNGNonBlocking"); }
LinuxTerminalPreferences extends TerminalPreferences { @Override protected void setDefaults() { super.setDefaults(); try { final Process echo = Runtime.getRuntime().exec(new String[]{"/bin/sh", "-c", "echo ~"}); this.setDefault("local.user.home", StringUtils.strip(IOUtils.toString(echo.getInputStream(), Charset.defaultCharset()))); } catch(IOException e) { log.warn("Failure determining user home with `echo ~`"); } this.setDefault("ssh.authentication.agent.enable", String.valueOf(false)); this.setDefault("bookmarks.folder.name", "bookmarks"); this.setDefault("profiles.folder.name", "profiles"); this.setDefault("connection.ssl.securerandom.algorithm", "NativePRNGNonBlocking"); } }
LinuxTerminalPreferences extends TerminalPreferences { @Override protected void setDefaults() { super.setDefaults(); try { final Process echo = Runtime.getRuntime().exec(new String[]{"/bin/sh", "-c", "echo ~"}); this.setDefault("local.user.home", StringUtils.strip(IOUtils.toString(echo.getInputStream(), Charset.defaultCharset()))); } catch(IOException e) { log.warn("Failure determining user home with `echo ~`"); } this.setDefault("ssh.authentication.agent.enable", String.valueOf(false)); this.setDefault("bookmarks.folder.name", "bookmarks"); this.setDefault("profiles.folder.name", "profiles"); this.setDefault("connection.ssl.securerandom.algorithm", "NativePRNGNonBlocking"); } LinuxTerminalPreferences(); }
LinuxTerminalPreferences extends TerminalPreferences { @Override protected void setDefaults() { super.setDefaults(); try { final Process echo = Runtime.getRuntime().exec(new String[]{"/bin/sh", "-c", "echo ~"}); this.setDefault("local.user.home", StringUtils.strip(IOUtils.toString(echo.getInputStream(), Charset.defaultCharset()))); } catch(IOException e) { log.warn("Failure determining user home with `echo ~`"); } this.setDefault("ssh.authentication.agent.enable", String.valueOf(false)); this.setDefault("bookmarks.folder.name", "bookmarks"); this.setDefault("profiles.folder.name", "profiles"); this.setDefault("connection.ssl.securerandom.algorithm", "NativePRNGNonBlocking"); } LinuxTerminalPreferences();  }
LinuxTerminalPreferences extends TerminalPreferences { @Override protected void setDefaults() { super.setDefaults(); try { final Process echo = Runtime.getRuntime().exec(new String[]{"/bin/sh", "-c", "echo ~"}); this.setDefault("local.user.home", StringUtils.strip(IOUtils.toString(echo.getInputStream(), Charset.defaultCharset()))); } catch(IOException e) { log.warn("Failure determining user home with `echo ~`"); } this.setDefault("ssh.authentication.agent.enable", String.valueOf(false)); this.setDefault("bookmarks.folder.name", "bookmarks"); this.setDefault("profiles.folder.name", "profiles"); this.setDefault("connection.ssl.securerandom.algorithm", "NativePRNGNonBlocking"); } LinuxTerminalPreferences();   }