这个未使用的方法参数我有重大的问题“删除此未使用的方法参数‘shiftId’”(和一些类似的问题):删除春季安全@PreAuthorize
@RequestMapping(value = "/refund/{invoiceId}", method = RequestMethod.GET)
@PreAuthorize("@AccessPosition.toMeOpen(#shiftId)")
public PosTransactionRefundInfoDTO getTransactionRefund(@PathVariable("shiftId") Long shiftId, @PathVariable("invoiceId") Long invoiceId)
{
// ... some code here
}
参数shiftId
声明只为@PreAuthorize
注释,它在方法代码中没有用到。 我能以某种方式解决这个问题吗“以正确的方式”,而不用“不会修复”或“误报”来标记它?
你可能会开始讨论解决此上[Google网上论坛](https://groups.google.com/forum/?pli=1#!forum/sonarqube)。 –