}
protected static void checkElevatedPasswordPromptRegex(final SshElevatedUserConnection connection, final String optionKey, final Logger logger) {
checkArgument(!connection.elevatedPasswordPromptRegex.endsWith("*"), optionKey + " should not end in a wildcard");
checkArgument(!connection.elevatedPasswordPromptRegex.endsWith("?"), optionKey + " should not end in a wildcard");
if (!connection.allocateDefaultPty && connection.allocatePty == null) {
<BUG>logger.warn("An ssh:{}: connection requires a pty, allocating a pty with spec [" + OVERRIDE_ALLOCATE_PTY + "].", connection.sshConnectionType.toString().toLowerCase());
</BUG>
connection.allocatePty = OVERRIDE_ALLOCATE_PTY;
}
}

}
protected static void checkElevatedPasswordPromptRegex(final SshElevatedUserConnection connection, final String optionKey, final Logger logger) {
checkArgument(!connection.elevatedPasswordPromptRegex.endsWith("*"), optionKey + " should not end in a wildcard");
checkArgument(!connection.elevatedPasswordPromptRegex.endsWith("?"), optionKey + " should not end in a wildcard");
if (!connection.allocateDefaultPty && connection.allocatePty == null) {
logger.warn("An {} connection requires a pty, allocating a pty with spec [" + OVERRIDE_ALLOCATE_PTY + "].", connection.protocolAndConnectionType);
connection.allocatePty = OVERRIDE_ALLOCATE_PTY;
}
}
