This is an automated email from the ASF dual-hosted git repository. jensdeppe pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git
The following commit(s) were added to refs/heads/develop by this push: new 350e6d2 GEODE-6790: Refactor DataSourceCreateException to correctly capture cause (#3615) 350e6d2 is described below commit 350e6d276cc5d385f5d9687abcd6f90f406decf9 Author: Jens Deppe <jde...@pivotal.io> AuthorDate: Sun May 26 23:26:16 2019 -0700 GEODE-6790: Refactor DataSourceCreateException to correctly capture cause (#3615) --- .../datasource/DataSourceCreateException.java | 28 +++++++++------------- .../sanctioned-geode-core-serializables.txt | 2 +- 2 files changed, 12 insertions(+), 18 deletions(-) diff --git a/geode-core/src/main/java/org/apache/geode/internal/datasource/DataSourceCreateException.java b/geode-core/src/main/java/org/apache/geode/internal/datasource/DataSourceCreateException.java index 97378d8..d1cc259 100644 --- a/geode-core/src/main/java/org/apache/geode/internal/datasource/DataSourceCreateException.java +++ b/geode-core/src/main/java/org/apache/geode/internal/datasource/DataSourceCreateException.java @@ -18,42 +18,36 @@ import org.apache.geode.GemFireCheckedException; /** * Exception thrown from DataSource factory. - * */ public class DataSourceCreateException extends GemFireCheckedException { - private static final long serialVersionUID = 8759147832954825309L; - private Exception excep; + private static final long serialVersionUID = 5107756585306908219L; - /** Creates a new instance of CreateConnectionException */ + /** + * Creates a new instance of CreateConnectionException + */ public DataSourceCreateException() { super(); } - public DataSourceCreateException(String message) { - super(message); - } - /** * Single Argument constructor to construct a new exception with the specified detail message. * Calls Exception class constructor. * * @param message The detail message. The detail message is saved for later retrieval. */ - public DataSourceCreateException(String message, Exception ex) { + public DataSourceCreateException(String message) { super(message); - this.excep = ex; } /** - * @return ??? + * Constructs a new exception with the specified detail message and cause. + * + * @param message The detail message. The detail message is saved for later retrieval. + * @param cause the cause (which is saved for later retrieval. */ - @Override - public StackTraceElement[] getStackTrace() { - return excep.getStackTrace(); + public DataSourceCreateException(String message, Throwable cause) { + super(message, cause); } - public Exception getWrappedException() { - return this.excep; - } } diff --git a/geode-core/src/main/resources/org/apache/geode/internal/sanctioned-geode-core-serializables.txt b/geode-core/src/main/resources/org/apache/geode/internal/sanctioned-geode-core-serializables.txt index ed9bbf5..b2bf9ae 100644 --- a/geode-core/src/main/resources/org/apache/geode/internal/sanctioned-geode-core-serializables.txt +++ b/geode-core/src/main/resources/org/apache/geode/internal/sanctioned-geode-core-serializables.txt @@ -375,7 +375,7 @@ org/apache/geode/internal/datasource/AbstractPoolCache,false,INIT_LIMIT:int,MAX_ org/apache/geode/internal/datasource/ConfiguredDataSourceProperties,true,1241739895646314739,connPoolDSClass:java/lang/String,expirationTime:int,initialPoolSize:int,jdbcDriver:java/lang/String,loginTimeOut:int,maxPoolSize:int,mcfClass:java/lang/String,password:java/lang/String,timeOut:int,txnType:java/lang/String,url:java/lang/String,user:java/lang/String,xadsClass:java/lang/String org/apache/geode/internal/datasource/ConnectionPoolCacheImpl,true,-3096029291871746431,m_cpds:javax/sql/ConnectionPoolDataSource org/apache/geode/internal/datasource/ConnectionProviderException,true,-7406652144153958227,excep:java/lang/Exception -org/apache/geode/internal/datasource/DataSourceCreateException,true,8759147832954825309,excep:java/lang/Exception +org/apache/geode/internal/datasource/DataSourceCreateException,true,5107756585306908219 org/apache/geode/internal/datasource/GemFireBasicDataSource,true,-4010116024816908360 org/apache/geode/internal/datasource/GemFireConnPooledDataSource,true,1177231744410855158,provider:org/apache/geode/internal/datasource/ConnectionProvider org/apache/geode/internal/datasource/GemFireConnectionPoolManager,true,23723212980453813,connPoolCache:org/apache/geode/internal/datasource/ConnectionPoolCache