You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1.4 When the ClassUtils.getClass(className) method under commons-lang is replaced by the commons-lang3 package, you need to add a forced conversion (Class<? extends LabelBuilderFactory>) ClassUtils.getClass(className);
Search before asking
Problem Description
No response
Description
1.1 The general commons-lang method can be directly upgraded to the commons-lang3 method
The main modification is to convert some passed parameters from String to charSequences. Passing String parameters is feasible in most cases.
1.2 When commons-lang method is passed as String[] {"tom","lucy","bob"} commons-lang3 method is passed as charSequences
Strings, String[], charSequences, CharSequence[] in java code can be converted
In the scala code, String[] to charSequences will merge String array parameters into a string by default, which requires special declaration
val closeBrackets = Array("}", ")", "]")
commons-lang parameter method StringUtils.endsWithAny(real, openBrackets)
commons-lang3 parameter passing method StringUtils.endsWithAny(real, openBrackets: _*)
1.3 org.apache.commons.lang3.exception.ExceptionUtils.getStackTrace replaces org.apache.commons.lang.exception.ExceptionUtils.getFullStackTrace
1.4 When the ClassUtils.getClass(className) method under commons-lang is replaced by the commons-lang3 package, you need to add a forced conversion (Class<? extends LabelBuilderFactory>) ClassUtils.getClass(className);
1.1 一般commons-lang方法可以直接升级为commons-lang3的方法
主要修改是将一些传参从String转为charSequences,在多数情况下传String参数都可行.
1.2 当commons-lang方法传参为String[] {"tom","lucy","bob"} commons-lang3方法传参为charSequences
java代码中Strings,String[],charSequences,CharSequence[]可以转换
scala代码中String[]转charSequences会默认合并String数组参数成一个字符串,需要特殊声明
val closeBrackets = Array("}", ")", "]")
commons-lang传参方法 StringUtils.endsWithAny(real, openBrackets)
commons-lang3传参方法 StringUtils.endsWithAny(real, openBrackets: _*)
1.3 org.apache.commons.lang3.exception.ExceptionUtils.getStackTrace 替换 org.apache.commons.lang.exception.ExceptionUtils.getFullStackTrace
1.4 commons-lang下ClassUtils.getClass(className) 方法使用commons-lang3包替换时需要添加强转(Class<? extends LabelBuilderFactory>) ClassUtils.getClass(className);
Use case
No response
solutions
No response
Anything else
No response
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: