如何解决强化扫描问题 - 代码正确性:字节数组到字符串的转换

问题描述

我在强化扫描中收到此错误代码正确性:字节数组到字符串的转换

        final ByteBuffer byteBuffer = Base64.getEncoder().encode(byteCharBuffer);
        final String base64EncodedPwd = new String(byteBuffer.array());
        technicalUserToSave.setPassword(base64EncodedPwd.tochararray()); // M getting error at this line

TechnicalUser.java 类

public class TechnicalUser implements Serializable
{

/**
 * Serialization version uid.
 */
private static final long serialVersionUID = 1L;

/**
 * The password or secret of the technical user.
 */
@ApiModelProperty(name = "password",value = "Password")
@JsonProperty("password")
@Setter
private char[] password;
}

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)