You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by rv...@apache.org on 2015/01/14 11:31:55 UTC
[53/93] [abbrv] jena git commit: Cope with no entry at all on deletion
Cope with no entry at all on deletion
Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/4eaa2e8c
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/4eaa2e8c
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/4eaa2e8c
Branch: refs/heads/hadoop-rdf
Commit: 4eaa2e8c82dabd7775f4cb820890fbcc647b14df
Parents: 47bf098
Author: Andy Seaborne <an...@apache.org>
Authored: Mon Jan 5 18:05:48 2015 +0000
Committer: Andy Seaborne <an...@apache.org>
Committed: Mon Jan 5 18:05:48 2015 +0000
----------------------------------------------------------------------
jena-arq/src/main/java/org/apache/jena/atlas/lib/MultiMap.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jena/blob/4eaa2e8c/jena-arq/src/main/java/org/apache/jena/atlas/lib/MultiMap.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/atlas/lib/MultiMap.java b/jena-arq/src/main/java/org/apache/jena/atlas/lib/MultiMap.java
index ad33046..1e02028 100644
--- a/jena-arq/src/main/java/org/apache/jena/atlas/lib/MultiMap.java
+++ b/jena-arq/src/main/java/org/apache/jena/atlas/lib/MultiMap.java
@@ -65,7 +65,10 @@ public abstract class MultiMap<K, V>
x.add(value) ;
}
- public void remove(K key, V value) { map.get(key).remove(value) ; }
+ public void remove(K key, V value) {
+ if ( map.containsKey(key))
+ map.get(key).remove(value) ;
+ }
public void removeKey(K key) { map.remove(key) ; }
protected Collection<V> valuesForKey(K key) { return map.get(key); }