
|
If you were logged in you would be able to see more operations.
|
|
|
OSCache
Created: 11/Apr/07 02:25 AM
Updated: 15/Apr/07 06:44 AM
|
|
| Component/s: |
Base Classes
|
| Affects Version/s: |
None
|
| Fix Version/s: |
2.4
|
|
|
In class com.opensymphony.oscache.base.Cache, two bad practice i think can be seen. One the use of e.printStackTrace(), is commanly know that this is a bad practice. The other bad practice is making a try/catch with Exception. In the same line, inside try/catch there is a throws new Exception() and is catched inside it.
try {
throw new Exception("states not equal");
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
You can see above all bad practices.
|
|
Description
|
In class com.opensymphony.oscache.base.Cache, two bad practice i think can be seen. One the use of e.printStackTrace(), is commanly know that this is a bad practice. The other bad practice is making a try/catch with Exception. In the same line, inside try/catch there is a throws new Exception() and is catched inside it.
try {
throw new Exception("states not equal");
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
You can see above all bad practices. |
Show » |
|
but the stack trace is useful and of course a bad practise.