diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2015-02-12 20:18:15 +0100 |
---|---|---|
committer | Julien HENRY <julien.henry@sonarsource.com> | 2015-02-12 20:18:15 +0100 |
commit | a025a37a4154c4ea1f60c8264000c965cab9f6b9 (patch) | |
tree | 5ae083440497de611ac272a70e4d47c6bc23d376 /sonar-plugin-api/src | |
parent | 0a91262dbcfc955a043a9241a0efbfd67e778fea (diff) | |
download | sonarqube-a025a37a4154c4ea1f60c8264000c965cab9f6b9.tar.gz sonarqube-a025a37a4154c4ea1f60c8264000c965cab9f6b9.zip |
Fix NPE in erlang plugin
Diffstat (limited to 'sonar-plugin-api/src')
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/resources/Resource.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/resources/Resource.java b/sonar-plugin-api/src/main/java/org/sonar/api/resources/Resource.java index 4634708b4a8..507ee8b2e22 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/resources/Resource.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/resources/Resource.java @@ -309,6 +309,7 @@ public abstract class Resource implements Serializable { @Override public int hashCode() { - return key.hashCode(); + // For File and Directory using deprecatedKey, key can be null + return key != null ? key.hashCode() : super.hashCode(); } } |