You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2014/04/02 12:41:18 UTC
svn commit: r1583962 -
/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/util/OneToManyMap.java
Author: andy
Date: Wed Apr 2 10:41:18 2014
New Revision: 1583962
URL: http://svn.apache.org/r1583962
Log:
JENA-667 : void -> boolean return for .remove(Object,Object) to align with Java 8.
Modified:
jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/util/OneToManyMap.java
Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/util/OneToManyMap.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/util/OneToManyMap.java?rev=1583962&r1=1583961&r2=1583962&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/util/OneToManyMap.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/util/OneToManyMap.java Wed Apr 2 10:41:18 2014
@@ -328,8 +328,11 @@ public class OneToManyMap<From, To> impl
*
* @param key The key object
* @param value The value object
+ * @return {@code true} if an entry was removed.
*/
- public void remove( Object key, Object value ) {
+ //@Override
+ public boolean remove( Object key, Object value ) {
+ // Java 8 added a default method with the above signature.
List<To> entries = m_table.get( key );
if (entries != null) {
@@ -337,8 +340,10 @@ public class OneToManyMap<From, To> impl
if (entries.isEmpty()) {
m_table.remove( key );
+ return true;
}
}
+ return false ;
}