在我的应用程序中,我有一个 ApplicationConstants.java 类,它为应用程序中使用的字符串常量服务。
我将 public static final String PASSWORD = "password"
作为常量之一。 Sonar 为此抛出错误,如下所示。如果有办法处理,请告诉我。
Sonar error: Description Assignee Resource New issue Credentials should not be hard-coded : Remove this hard-coded password. EnrollmentConstant.java false
最佳答案
您应该将密码移至配置。
关于java - Sonar "Credentials should not be hard-coded"错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40177121/