Bug 745869 (EDG-64) - HotRod RemoteCacheManager returns non-null value for non-existent cache
Summary: HotRod RemoteCacheManager returns non-null value for non-existent cache
Keywords:
Status: CLOSED NOTABUG
Alias: EDG-64
Product: JBoss Data Grid 5
Classification: JBoss
Component: Infinispan
Version: unspecified
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: EAP 5.1.0 EDG TP
Assignee: Default User
QA Contact:
URL: http://jira.jboss.org/jira/browse/EDG-64
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-22 14:05 UTC by Richard Achmatowicz
Modified: 2011-10-11 17:06 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-03-23 11:55:47 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker EDG-64 0 Major Closed HotRod RemoteCacheManager returns non-null value for non-existent cache 2013-09-25 20:25:36 UTC
Red Hat Issue Tracker ISPN-990 0 Major Resolved RemoteCacheManager.getCache should return null if cache not defined 2013-09-25 20:25:36 UTC

Description Richard Achmatowicz 2011-03-22 14:05:16 UTC
project_key: EDG

RemoteCacheManager rcm = new RemoteCacheManager() ;
RemoteCache rc = rcm.getCache("nonExistentCache") ;

The value rc != null.

See HotRodClientRemoteCacheManagerTestCase.testGetNonExistentCache()

Comment 1 Galder Zamarreño 2011-03-22 15:22:08 UTC
Richard, isn't that throwing an exception? That I believe is what is happening with current behaivour, it should be returning HotRodClientException, see https://github.com/infinispan/infinispan/blob/master/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/RemoteCacheManagerTest.java#L96

Now, this will change in in 5.0: ISPN-990

Comment 2 Galder Zamarreño 2011-03-22 15:23:06 UTC
Link: Added: This issue is related to ISPN-990


Comment 3 Richard Achmatowicz 2011-03-22 18:33:03 UTC
Hi Galder

No, no exception is being thrown. Also, the javadoc for 4.2.1 does not mention anything about throwing an exception:
http://docs.jboss.org/infinispan/4.2/apidocs/org/infinispan/client/hotrod/RemoteCacheManager.html#getCache%28boolean%29



Comment 4 Galder Zamarreño 2011-03-23 11:55:02 UTC
Right, I see the mismatch. In 4.2.x, the error will the thrown when a put or similar operation is executed against the non-existent cache. I can't change the API assumptions in 4.2.x but for 5.x, getCache() will return null in this scenarios.

I'm closing this for the time being.


Note You need to log in before you can comment on or make changes to this bug.