Author: navssurtani
Date: 2008-07-01 13:09:30 -0400 (Tue, 01 Jul 2008)
New Revision: 6146
Modified:
searchable/trunk/src/main/java/org/jboss/cache/search/CacheEntityId.java
searchable/trunk/src/main/java/org/jboss/cache/search/CacheQueryImpl.java
Log:
Still testing - and failing
Modified: searchable/trunk/src/main/java/org/jboss/cache/search/CacheEntityId.java
===================================================================
--- searchable/trunk/src/main/java/org/jboss/cache/search/CacheEntityId.java 2008-07-01
15:24:27 UTC (rev 6145)
+++ searchable/trunk/src/main/java/org/jboss/cache/search/CacheEntityId.java 2008-07-01
17:09:30 UTC (rev 6146)
@@ -16,11 +16,14 @@
public CacheEntityId(String documentId)
{
+ if(documentId == null) throw new NullPointerException("documentId is
null");
this.documentId = documentId;
}
public CacheEntityId(Fqn fqn, String key)
{
+ if(fqn == null) throw new NullPointerException("Fqn is null");
+ if(key == null) throw new NullPointerException("Key is null");
this.fqn = fqn;
this.key = key;
}
@@ -39,7 +42,11 @@
fqn = Transformer.getFqn(documentId);
return fqn;
}
- throw new IllegalArgumentException("At least fqn or documentId must be set to
call this method");
+
+ if(documentId == null)
+ throw new IllegalArgumentException("docId is null");
+
+ throw new IllegalArgumentException("Fqn is null");
}
/**
Modified: searchable/trunk/src/main/java/org/jboss/cache/search/CacheQueryImpl.java
===================================================================
--- searchable/trunk/src/main/java/org/jboss/cache/search/CacheQueryImpl.java 2008-07-01
15:24:27 UTC (rev 6145)
+++ searchable/trunk/src/main/java/org/jboss/cache/search/CacheQueryImpl.java 2008-07-01
17:09:30 UTC (rev 6146)
@@ -258,6 +258,7 @@
for (int index = first; index <= max; index++)
{
String documentId = (String) extractor.extract(hits, index).id;
+ if (documentId == null) throw new NullPointerException("The document id
extracted is null");
CacheEntityId id = new CacheEntityId(documentId);
ids.add(id);
}
Show replies by date