From 9f0a786894a83c6cc47efc1b107b7c1232b3bc36 Mon Sep 17 00:00:00 2001 From: simonbrandhof Date: Mon, 10 Jan 2011 00:40:45 +0100 Subject: [PATCH] Rule.getRulesCategory() must return a fake category instead of null --- sonar-plugin-api/src/main/java/org/sonar/api/rules/Rule.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/rules/Rule.java b/sonar-plugin-api/src/main/java/org/sonar/api/rules/Rule.java index 6a33cb6c5f6..238763e2603 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/rules/Rule.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/rules/Rule.java @@ -35,6 +35,8 @@ import javax.persistence.*; @Table(name = "rules") public final class Rule { + private final static RulesCategory NONE = new RulesCategory("none"); + @Id @Column(name = "id") @GeneratedValue @@ -190,7 +192,7 @@ public final class Rule { */ @Deprecated public RulesCategory getRulesCategory() { - return null; + return NONE; } /** -- 2.39.5