We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The less deps the better - less updating and CVE surface. We are only using string and immutable list utils.
For the lists, new JDKs have:
Collections.unmodifiableList(list);
List.of(...)
For strings, I have a small utils class:
class StringUtils { private static final Pattern CONTROL_CHAR_PATTERN = Pattern.compile("^\\p{Cc}&&[^\\r\\n\\t]+$"); /** * Trim and strip control chars */ public static String clean(String str) { if (str == null) return null; return CONTROL_CHAR_PATTERN.matcher(str).replaceAll("").trim(); } /** * Trim and strip control chars; return an empty string if a null is encountered */ public static String cleanNonNull(String str) { if (str == null) return ""; return CONTROL_CHAR_PATTERN.matcher(str).replaceAll("").trim(); } public static boolean isNullOrWhitespace(String str) { return str == null || str.isBlank(); } public static boolean isNullOrEmpty(String str) { return str == null || str.isEmpty(); } }
The text was updated successfully, but these errors were encountered:
and of commons-lang(3):
org.eclipse.lyo.server.ui.model.PreviewFactory uses StringUtils.isBlank
org.eclipse.lyo.server.ui.model.PreviewFactory
Sorry, something went wrong.
No branches or pull requests
The less deps the better - less updating and CVE surface. We are only using string and immutable list utils.
For the lists, new JDKs have:
Collections.unmodifiableList(list);
List.of(...)
For strings, I have a small utils class:
The text was updated successfully, but these errors were encountered: