Clover Coverage Report - KS Common 1.2.1-SNAPSHOT (Aggregated)
Coverage timestamp: Wed Nov 2 2011 04:55:08 EST
../../../../../../../img/srcFileCovDistChart0.png 29% of files have more coverage
4   21   2   4
0   15   0.5   1
1     2  
1    
 
  MetadataMethodEhcacheAdvice       Line # 7 4 0% 2 5 0% 0.0
 
No Tests
 
1    package org.kuali.student.common.assembly.util.spring;
2   
3    import org.aspectj.lang.ProceedingJoinPoint;
4    import org.kuali.student.common.assembly.data.Metadata;
5    import org.kuali.student.common.util.spring.MethodArgsToObjectEhcacheAdvice;
6   
 
7    public class MetadataMethodEhcacheAdvice extends MethodArgsToObjectEhcacheAdvice {
8   
 
9  0 toggle @Override
10    public Object getFromCache(ProceedingJoinPoint pjp) throws Throwable {
11  0 try{
12    //Return a copy so that if the data is mutated the original remains
13  0 Metadata result = (Metadata) super.getFromCache(pjp);
14  0 return new Metadata(result);
15    }catch(ClassCastException e){
16  0 throw new RuntimeException("This cache should only be used on methods that return Metadata", e);
17    }
18    }
19   
20   
21    }