jsr107 / jsr107spec

JSR107 Cache Specification
Apache License 2.0
415 stars 164 forks source link

CacheManager.getCache() NullPointerException and ClassCastException #361

Closed cruftex closed 8 years ago

cruftex commented 8 years ago

From: https://github.com/jsr107/jsr107spec/issues/357

TCK CacheManagerTest.getNullTypeCacheRequest() mandates to throw NullPointerException when passing null as keyClass or valueClass.

From: https://github.com/jsr107/jsr107tck/issues/86

TCK asserts that wrong classes yield ClassCastException but not IllegalArgumentException. Change the Spec JavaDoc to ClassCastException which is more precise and the current behavior that everyone implemented.