This commit is contained in:
@@ -38,7 +38,7 @@ public class TypeSimpledCoder<R extends Reader, W extends Writer> extends Simple
|
|||||||
if (str == null) return null;
|
if (str == null) return null;
|
||||||
try {
|
try {
|
||||||
return Class.forName(str);
|
return Class.forName(str);
|
||||||
} catch (Exception e) {
|
} catch (Throwable e) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -387,7 +387,7 @@ public abstract class HttpBaseServlet extends HttpServlet {
|
|||||||
try {
|
try {
|
||||||
Class.forName(newDynName.replace('/', '.'));
|
Class.forName(newDynName.replace('/', '.'));
|
||||||
newDynName += "_" + (++i);
|
newDynName += "_" + (++i);
|
||||||
} catch (Exception ex) {
|
} catch (Throwable ex) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ public class HttpPrepareServlet extends PrepareServlet<String, HttpContext, Http
|
|||||||
String resServlet = resConfig.getValue("servlet", HttpResourceServlet.class.getName());
|
String resServlet = resConfig.getValue("servlet", HttpResourceServlet.class.getName());
|
||||||
try {
|
try {
|
||||||
this.resourceHttpServlet = (HttpServlet) Class.forName(resServlet).newInstance();
|
this.resourceHttpServlet = (HttpServlet) Class.forName(resServlet).newInstance();
|
||||||
} catch (Exception e) {
|
} catch (Throwable e) {
|
||||||
this.resourceHttpServlet = new HttpResourceServlet();
|
this.resourceHttpServlet = new HttpResourceServlet();
|
||||||
logger.log(Level.WARNING, "init HttpResourceSerlvet(" + resServlet + ") error", e);
|
logger.log(Level.WARNING, "init HttpResourceSerlvet(" + resServlet + ") error", e);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -239,7 +239,7 @@ public abstract class Sncp {
|
|||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
return (Class<T>) Class.forName(newDynName.replace('/', '.'));
|
return (Class<T>) Class.forName(newDynName.replace('/', '.'));
|
||||||
} catch (Exception ex) {
|
} catch (Throwable ex) {
|
||||||
}
|
}
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
ClassWriter cw = new ClassWriter(COMPUTE_FRAMES);
|
ClassWriter cw = new ClassWriter(COMPUTE_FRAMES);
|
||||||
@@ -942,7 +942,7 @@ public abstract class Sncp {
|
|||||||
s.set(rs, sb.toString());
|
s.set(rs, sb.toString());
|
||||||
}
|
}
|
||||||
return rs;
|
return rs;
|
||||||
} catch (Exception ex) {
|
} catch (Throwable ex) {
|
||||||
}
|
}
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
ClassWriter cw = new ClassWriter(COMPUTE_FRAMES);
|
ClassWriter cw = new ClassWriter(COMPUTE_FRAMES);
|
||||||
|
|||||||
@@ -231,7 +231,7 @@ public final class SncpDynServlet extends SncpServlet {
|
|||||||
try {
|
try {
|
||||||
Class.forName(newDynName.replace('/', '.'));
|
Class.forName(newDynName.replace('/', '.'));
|
||||||
newDynName += "_";
|
newDynName += "_";
|
||||||
} catch (Exception ex) {
|
} catch (Throwable ex) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ public class CacheSourceService<K extends Serializable, V extends Object> implem
|
|||||||
if (storeKeyStr != null && storeValueStr != null) {
|
if (storeKeyStr != null && storeValueStr != null) {
|
||||||
try {
|
try {
|
||||||
this.setStoreType(Class.forName(storeKeyStr), Class.forName(storeValueStr));
|
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);
|
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) {
|
if (expireHandlerClass != null) {
|
||||||
try {
|
try {
|
||||||
this.expireHandler = (Consumer<CacheEntry>) Class.forName(expireHandlerClass).newInstance();
|
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);
|
logger.log(Level.SEVERE, self.getClass().getSimpleName() + " new expirehandler class (" + expireHandlerClass + ") instance error", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ public class PoolJdbcSource {
|
|||||||
try {
|
try {
|
||||||
Class.forName("com.mysql.cj.jdbc.MysqlConnectionPoolDataSource");
|
Class.forName("com.mysql.cj.jdbc.MysqlConnectionPoolDataSource");
|
||||||
source = "com.mysql.cj.jdbc.MysqlConnectionPoolDataSource";
|
source = "com.mysql.cj.jdbc.MysqlConnectionPoolDataSource";
|
||||||
} catch (Exception e) {
|
} catch (Throwable e) {
|
||||||
source = "com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource";
|
source = "com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -213,7 +213,7 @@ public interface Creator<T> {
|
|||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
return (Creator) Class.forName(newDynName.replace('/', '.')).newInstance();
|
return (Creator) Class.forName(newDynName.replace('/', '.')).newInstance();
|
||||||
} catch (Exception ex) {
|
} catch (Throwable ex) {
|
||||||
}
|
}
|
||||||
|
|
||||||
Constructor<T> constructor0 = null;
|
Constructor<T> constructor0 = null;
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ public interface Reproduce<D, S> extends BiFunction<D, S, D> {
|
|||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
return (Reproduce) Class.forName(newDynName.replace('/', '.')).newInstance();
|
return (Reproduce) Class.forName(newDynName.replace('/', '.')).newInstance();
|
||||||
} catch (Exception ex) {
|
} catch (Throwable ex) {
|
||||||
}
|
}
|
||||||
// ------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------
|
||||||
ClassWriter cw = new ClassWriter(COMPUTE_FRAMES);
|
ClassWriter cw = new ClassWriter(COMPUTE_FRAMES);
|
||||||
|
|||||||
@@ -183,7 +183,7 @@ public abstract class TypeToken<T> {
|
|||||||
try {
|
try {
|
||||||
Class.forName(newDynName.replace('/', '.'));
|
Class.forName(newDynName.replace('/', '.'));
|
||||||
newDynName = TypeToken.class.getName().replace('.', '/') + "_Dyn" + Math.abs(System.nanoTime());
|
newDynName = TypeToken.class.getName().replace('.', '/') + "_Dyn" + Math.abs(System.nanoTime());
|
||||||
} catch (Exception ex) { //异常说明类不存在
|
} catch (Throwable ex) { //异常说明类不存在
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user