This commit is contained in:
Redkale
2017-03-21 11:55:57 +08:00
parent f6b5882cd4
commit 045029b4a9
10 changed files with 12 additions and 12 deletions

View File

@@ -38,7 +38,7 @@ public class TypeSimpledCoder<R extends Reader, W extends Writer> extends Simple
if (str == null) return null;
try {
return Class.forName(str);
} catch (Exception e) {
} catch (Throwable e) {
return null;
}
}

View File

@@ -387,7 +387,7 @@ public abstract class HttpBaseServlet extends HttpServlet {
try {
Class.forName(newDynName.replace('/', '.'));
newDynName += "_" + (++i);
} catch (Exception ex) {
} catch (Throwable ex) {
break;
}
}

View File

@@ -71,7 +71,7 @@ public class HttpPrepareServlet extends PrepareServlet<String, HttpContext, Http
String resServlet = resConfig.getValue("servlet", HttpResourceServlet.class.getName());
try {
this.resourceHttpServlet = (HttpServlet) Class.forName(resServlet).newInstance();
} catch (Exception e) {
} catch (Throwable e) {
this.resourceHttpServlet = new HttpResourceServlet();
logger.log(Level.WARNING, "init HttpResourceSerlvet(" + resServlet + ") error", e);
}

View File

@@ -239,7 +239,7 @@ public abstract class Sncp {
}
try {
return (Class<T>) Class.forName(newDynName.replace('/', '.'));
} catch (Exception ex) {
} catch (Throwable ex) {
}
//------------------------------------------------------------------------------
ClassWriter cw = new ClassWriter(COMPUTE_FRAMES);
@@ -942,7 +942,7 @@ public abstract class Sncp {
s.set(rs, sb.toString());
}
return rs;
} catch (Exception ex) {
} catch (Throwable ex) {
}
//------------------------------------------------------------------------------
ClassWriter cw = new ClassWriter(COMPUTE_FRAMES);

View File

@@ -231,7 +231,7 @@ public final class SncpDynServlet extends SncpServlet {
try {
Class.forName(newDynName.replace('/', '.'));
newDynName += "_";
} catch (Exception ex) {
} catch (Throwable ex) {
break;
}
}

View File

@@ -82,7 +82,7 @@ public class CacheSourceService<K extends Serializable, V extends Object> implem
if (storeKeyStr != null && storeValueStr != null) {
try {
this.setStoreType(Class.forName(storeKeyStr), Class.forName(storeValueStr));
} catch (Exception e) {
} catch (Throwable e) {
logger.log(Level.SEVERE, self.getClass().getSimpleName() + " load key & value store class (" + storeKeyStr + ", " + storeValueStr + ") error", e);
}
}
@@ -92,7 +92,7 @@ public class CacheSourceService<K extends Serializable, V extends Object> implem
if (expireHandlerClass != null) {
try {
this.expireHandler = (Consumer<CacheEntry>) Class.forName(expireHandlerClass).newInstance();
} catch (Exception e) {
} catch (Throwable e) {
logger.log(Level.SEVERE, self.getClass().getSimpleName() + " new expirehandler class (" + expireHandlerClass + ") instance error", e);
}
}

View File

@@ -131,7 +131,7 @@ public class PoolJdbcSource {
try {
Class.forName("com.mysql.cj.jdbc.MysqlConnectionPoolDataSource");
source = "com.mysql.cj.jdbc.MysqlConnectionPoolDataSource";
} catch (Exception e) {
} catch (Throwable e) {
source = "com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource";
}
break;

View File

@@ -213,7 +213,7 @@ public interface Creator<T> {
}
try {
return (Creator) Class.forName(newDynName.replace('/', '.')).newInstance();
} catch (Exception ex) {
} catch (Throwable ex) {
}
Constructor<T> constructor0 = null;

View File

@@ -42,7 +42,7 @@ public interface Reproduce<D, S> extends BiFunction<D, S, D> {
}
try {
return (Reproduce) Class.forName(newDynName.replace('/', '.')).newInstance();
} catch (Exception ex) {
} catch (Throwable ex) {
}
// ------------------------------------------------------------------------------
ClassWriter cw = new ClassWriter(COMPUTE_FRAMES);

View File

@@ -183,7 +183,7 @@ public abstract class TypeToken<T> {
try {
Class.forName(newDynName.replace('/', '.'));
newDynName = TypeToken.class.getName().replace('.', '/') + "_Dyn" + Math.abs(System.nanoTime());
} catch (Exception ex) { //异常说明类不存在
} catch (Throwable ex) { //异常说明类不存在
break;
}
}