
|
If you were logged in you would be able to see more operations.
|
|
|
|
Environment:
|
does not apply
|
|
|
It would be great to have some way to assert, that the selected cache algorithm (as provided in the constructor of Cache) was really instantiated. This might become a problem if making programming errors like providing a negative capacity in the Cache constructor (because my cache algorithm ignores it like UnlimitedCache does) and then the logics in the Cache class does not instantiate my cache algorithm but UnlimitedCache (without me noticing this - not even logging that it chose another than the specified algorithm!).
Therefore a method in Cache like
public final String getCacheAlgorithm() {
return this.cacheMap.getClass().getName();
}
would be helpful, then I could use a JDK1.4 - assertion to verify correct behaviour.
|
|
Description
|
It would be great to have some way to assert, that the selected cache algorithm (as provided in the constructor of Cache) was really instantiated. This might become a problem if making programming errors like providing a negative capacity in the Cache constructor (because my cache algorithm ignores it like UnlimitedCache does) and then the logics in the Cache class does not instantiate my cache algorithm but UnlimitedCache (without me noticing this - not even logging that it chose another than the specified algorithm!).
Therefore a method in Cache like
public final String getCacheAlgorithm() {
return this.cacheMap.getClass().getName();
}
would be helpful, then I could use a JDK1.4 - assertion to verify correct behaviour.
|
Show » |
| There are no comments yet on this issue.
|
|