2015-11-06 66 views
0

如果我使用Lombok的@Setting注释上的场的PRIVATE声纳错误

@Data 
@AllArgsConstructor 
@NoArgsConstructor 
public class Notification implements Serializable { 

    private static final long serialVersionUID = 1L; 

    @Id 
    @Setter(value = AccessLevel.PRIVATE) 
    private String id; 
    private long userId; 
    private Event event; 

    private long timestamp = System.currentTimeMillis(); 


    public Notification(final String id) { 
     this.id = id; 
    }  

} 

的值。声纳Maven插件提供了以下错误:

ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.7.1:sonar (default-cli) on project mio-events: Unable to analyze .class file tv/nativ/mio/event/model/Notification: 0 is not a valid line for a file -> [Help 1] 

将@Setting值更改为public可修复此问题,就像完全删除@Setting并为该字段添加手动私有设置器一样。

任何想法可能是什么问题?

感谢

尼克

+0

你能提供堆栈跟踪吗?我认为你正面临着这个问题:[sonarqube-java-plugin-3-7-analysis-error](http://stackoverflow.com/questions/33521753/sonarqube-java-plugin-3-7-analysis-error/ ) –

+0

将会有声纳java插件3.7.1的bugfix版本。 https://groups.google.com/forum/#!topic/sonarqube/rHLYkHOHUUs –

+0

谢谢你的 – nickcodefresh

回答