| 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 |
|
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 2 |
Complexity Density: 0.5 |
|
| 7 |
|
public class MetadataMethodEhcacheAdvice extends MethodArgsToObjectEhcacheAdvice { |
| 8 |
|
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 2 |
Complexity Density: 0.5 |
|
| 9 |
0
|
@Override... |
| 10 |
|
public Object getFromCache(ProceedingJoinPoint pjp) throws Throwable { |
| 11 |
0
|
try{ |
| 12 |
|
|
| 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 |
|
} |