@Test public void testShouldNotAlias() { assertThat(shouldAlias(""), is(false)); assertThat(shouldAlias("_"), is(false)); assertThat(shouldAlias("__"), is(false)); assertThat(shouldAlias("x__y"), is(false)); assertThat(shouldAlias("_xy"), is(false)); assertThat(shouldAlias("xy_"), is(false)); assertThat(shouldAlias("xyz"), is(false)); }
public static boolean shouldAlias(final String name) { final int length = name.length(); return length > 2 && name.charAt(0) != UNDERSCORE_CHAR && name.charAt(length - 1) != UNDERSCORE_CHAR && name.contains(UNDERSCORE) && !name.contains(DOUBLE_UNDERSCORE); }
EnvironmentVariables { public static boolean shouldAlias(final String name) { final int length = name.length(); return length > 2 && name.charAt(0) != UNDERSCORE_CHAR && name.charAt(length - 1) != UNDERSCORE_CHAR && name.contains(UNDERSCORE) && !name.contains(DOUBLE_UNDERSCORE); } }
EnvironmentVariables { public static boolean shouldAlias(final String name) { final int length = name.length(); return length > 2 && name.charAt(0) != UNDERSCORE_CHAR && name.charAt(length - 1) != UNDERSCORE_CHAR && name.contains(UNDERSCORE) && !name.contains(DOUBLE_UNDERSCORE); } private  EnvironmentVariables(); }
EnvironmentVariables { public static boolean shouldAlias(final String name) { final int length = name.length(); return length > 2 && name.charAt(0) != UNDERSCORE_CHAR && name.charAt(length - 1) != UNDERSCORE_CHAR && name.contains(UNDERSCORE) && !name.contains(DOUBLE_UNDERSCORE); } private  EnvironmentVariables(); static boolean shouldAlias(final String name); static Map<String, String> expand(); static Map<String, String> expand(final Map<String, String> env); }
EnvironmentVariables { public static boolean shouldAlias(final String name) { final int length = name.length(); return length > 2 && name.charAt(0) != UNDERSCORE_CHAR && name.charAt(length - 1) != UNDERSCORE_CHAR && name.contains(UNDERSCORE) && !name.contains(DOUBLE_UNDERSCORE); } private  EnvironmentVariables(); static boolean shouldAlias(final String name); static Map<String, String> expand(); static Map<String, String> expand(final Map<String, String> env);  }