History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: CACHE-290
Type: Improvement Improvement
Status: Closed Closed
Resolution: Won't Fix
Priority: Minor Minor
Assignee: Lars Torunski
Reporter: Alex Soto
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
OSCache

Bad Practice

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


 Description  « Hide
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.

 All   Comments   Change History      Sort Order:
Lars Torunski - [15/Apr/07 06:44 AM ]
e.printStackTrace is avoided now,
but the stack trace is useful and of course a bad practise.