You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by si...@apache.org on 2011/04/23 20:27:38 UTC
svn commit: r1096203 -
/commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/EvictionTimer.java
Author: simonetripodi
Date: Sat Apr 23 18:27:38 2011
New Revision: 1096203
URL: http://svn.apache.org/viewvc?rev=1096203&view=rev
Log:
fixed generics in EvictionTimer class
Modified:
commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/EvictionTimer.java
Modified: commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/EvictionTimer.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/EvictionTimer.java?rev=1096203&r1=1096202&r2=1096203&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/EvictionTimer.java (original)
+++ commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/EvictionTimer.java Sat Apr 23 18:27:38 2011
@@ -62,7 +62,7 @@ class EvictionTimer {
if (null == _timer) {
// Force the new Timer thread to be created with a context class
// loader set to the class loader that loaded this library
- ClassLoader ccl = (ClassLoader) AccessController.doPrivileged(
+ ClassLoader ccl = AccessController.doPrivileged(
new PrivilegedGetTccl());
try {
AccessController.doPrivileged(new PrivilegedSetTccl(
@@ -92,12 +92,12 @@ class EvictionTimer {
/**
* {@link PrivilegedAction} used to get the ContextClassLoader
*/
- private static class PrivilegedGetTccl implements PrivilegedAction {
+ private static class PrivilegedGetTccl implements PrivilegedAction<ClassLoader> {
/**
* {@inheritDoc}
*/
- public Object run() {
+ public ClassLoader run() {
return Thread.currentThread().getContextClassLoader();
}
}
@@ -105,7 +105,7 @@ class EvictionTimer {
/**
* {@link PrivilegedAction} used to set the ContextClassLoader
*/
- private static class PrivilegedSetTccl implements PrivilegedAction {
+ private static class PrivilegedSetTccl implements PrivilegedAction<Void> {
/** ClassLoader */
private final ClassLoader cl;
@@ -121,7 +121,7 @@ class EvictionTimer {
/**
* {@inheritDoc}
*/
- public Object run() {
+ public Void run() {
Thread.currentThread().setContextClassLoader(cl);
return null;
}