Findbugs returns a warning for the class below:
Class ServiceUtils$1 defines non-transient non-serializable instance field val$request
Bug type SE_BAD_FIELD (click for details) In class ServiceUtils$1 Field ServiceUtils$1.val$request In ServiceUtils.java
I cannot understand what is wrong with this code...
public class ServiceUtils {
public static String getFileName(final PostFileRequest request) {
String separator = "-";
StringBuilder sb = new StringBuilder()
.append(request.getFirstName())
.append(separator)
.append(request.getLastName())
.append(separator)
.append(request.getAddress())
.append(separator)
.append(request.getNumber());
return sb.toString();
}
}