Move toBytes() into SASLMechanism

as it's a often needed transformation in the SASL world.
This commit is contained in:
Florian Schmaus 2014-08-12 14:43:53 +02:00
parent da7f4495dc
commit 47a59ad7b3
2 changed files with 4 additions and 3 deletions

View File

@ -244,4 +244,8 @@ public abstract class SASLMechanism implements Comparable<SASLMechanism> {
}
protected abstract SASLMechanism newInstance();
protected static byte[] toBytes(String string) {
return StringUtils.toBytes(string);
}
}

View File

@ -200,7 +200,4 @@ public class SASLDigestMD5Mechanism extends SASLMechanism {
return responseValue;
}
private static byte[] toBytes(String string) {
return StringUtils.toBytes(string);
}
}