com.github.blagerweij.sessionlock.util.StringUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of liquibase-sessionlock Show documentation
Show all versions of liquibase-sessionlock Show documentation
Replaces the default DATABASECHANGELOGLOCK with a RDBMS lock, which is automatically released when the container is stopped unexpectedly
The newest version!
package com.github.blagerweij.sessionlock.util;
import java.util.Locale;
public class StringUtils {
StringUtils() {
throw new IllegalArgumentException("Utility class");
}
public static String truncate(final String str, final int maxlength) {
if (str == null || str.length() <= maxlength) {
return str;
} else {
return str.substring(0, maxlength);
}
}
public static String toUpperCase(final String str) {
if (str == null) {
return null;
} else {
return str.toUpperCase(Locale.ROOT);
}
}
}