You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2022/07/03 14:37:29 UTC
[commons-dbcp] branch master updated: LifetimeExceededException should extend SQLException.
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-dbcp.git
The following commit(s) were added to refs/heads/master by this push:
new 09677c3e LifetimeExceededException should extend SQLException.
09677c3e is described below
commit 09677c3e674894cffe2f9ebeaa7e562792f658a4
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun Jul 3 10:37:23 2022 -0400
LifetimeExceededException should extend SQLException.
---
src/changes/changes.xml | 1 +
.../commons/dbcp2/LifetimeExceededException.java | 88 +++++++++++-----------
2 files changed, 46 insertions(+), 43 deletions(-)
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 117256bf..73226f9c 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -86,6 +86,7 @@ The <action> type attribute can be add,update,fix,remove.
<action dev="ggregory" type="fix" due-to="Gary Gregory">
UserPassKey should be Serializable.
</action>
+ LifetimeExceededException should extend SQLException.
<!-- ADD -->
<action dev="ggregory" type="add" due-to="Gary Gregory">
Add and use AbandonedTrace#setLastUsed(Instant).
diff --git a/src/main/java/org/apache/commons/dbcp2/LifetimeExceededException.java b/src/main/java/org/apache/commons/dbcp2/LifetimeExceededException.java
index 40f83104..4344b5d1 100644
--- a/src/main/java/org/apache/commons/dbcp2/LifetimeExceededException.java
+++ b/src/main/java/org/apache/commons/dbcp2/LifetimeExceededException.java
@@ -1,43 +1,45 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.dbcp2;
-
-/**
- * Exception thrown when a connection's maximum lifetime has been exceeded.
- *
- * @since 2.1
- */
-class LifetimeExceededException extends Exception {
-
- private static final long serialVersionUID = -3783783104516492659L;
-
- /**
- * Create a LifetimeExceededException.
- */
- public LifetimeExceededException() {
- }
-
- /**
- * Create a LifetimeExceededException with the given message.
- *
- * @param message
- * The message with which to create the exception
- */
- public LifetimeExceededException(final String message) {
- super(message);
- }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.dbcp2;
+
+import java.sql.SQLException;
+
+/**
+ * Exception thrown when a connection's maximum lifetime has been exceeded.
+ *
+ * @since 2.1
+ */
+class LifetimeExceededException extends SQLException {
+
+ private static final long serialVersionUID = -3783783104516492659L;
+
+ /**
+ * Create a LifetimeExceededException.
+ */
+ public LifetimeExceededException() {
+ }
+
+ /**
+ * Create a LifetimeExceededException with the given message.
+ *
+ * @param message
+ * The message with which to create the exception
+ */
+ public LifetimeExceededException(final String message) {
+ super(message);
+ }
+}
Re: [commons-dbcp] branch master updated: LifetimeExceededException should extend SQLException.
Posted by Gary Gregory <ga...@gmail.com>.
Fixed, TY!
Gary
On Mon, Jul 4, 2022, 06:05 Mark Thomas <ma...@apache.org> wrote:
> On 03/07/2022 15:37, ggregory@apache.org wrote:
> > This is an automated email from the ASF dual-hosted git repository.
> >
> > ggregory pushed a commit to branch master
> > in repository https://gitbox.apache.org/repos/asf/commons-dbcp.git
> >
> >
> > The following commit(s) were added to refs/heads/master by this push:
> > new 09677c3e LifetimeExceededException should extend SQLException.
> > 09677c3e is described below
> >
> > commit 09677c3e674894cffe2f9ebeaa7e562792f658a4
> > Author: Gary Gregory <ga...@gmail.com>
> > AuthorDate: Sun Jul 3 10:37:23 2022 -0400
> >
> > LifetimeExceededException should extend SQLException.
> > ---
> > src/changes/changes.xml | 1 +
> > .../commons/dbcp2/LifetimeExceededException.java | 88
> +++++++++++-----------
> > 2 files changed, 46 insertions(+), 43 deletions(-)
> >
> > diff --git a/src/changes/changes.xml b/src/changes/changes.xml
> > index 117256bf..73226f9c 100644
> > --- a/src/changes/changes.xml
> > +++ b/src/changes/changes.xml
> > @@ -86,6 +86,7 @@ The <action> type attribute can be
> add,update,fix,remove.
> > <action dev="ggregory" type="fix" due-to="Gary Gregory">
> > UserPassKey should be Serializable.
> > </action>
> > + LifetimeExceededException should extend SQLException.
>
> Gary,
>
> This breaks the XML. You need to add the tags.
>
> Mark
>
Re: [commons-dbcp] branch master updated: LifetimeExceededException should extend SQLException.
Posted by Mark Thomas <ma...@apache.org>.
On 03/07/2022 15:37, ggregory@apache.org wrote:
> This is an automated email from the ASF dual-hosted git repository.
>
> ggregory pushed a commit to branch master
> in repository https://gitbox.apache.org/repos/asf/commons-dbcp.git
>
>
> The following commit(s) were added to refs/heads/master by this push:
> new 09677c3e LifetimeExceededException should extend SQLException.
> 09677c3e is described below
>
> commit 09677c3e674894cffe2f9ebeaa7e562792f658a4
> Author: Gary Gregory <ga...@gmail.com>
> AuthorDate: Sun Jul 3 10:37:23 2022 -0400
>
> LifetimeExceededException should extend SQLException.
> ---
> src/changes/changes.xml | 1 +
> .../commons/dbcp2/LifetimeExceededException.java | 88 +++++++++++-----------
> 2 files changed, 46 insertions(+), 43 deletions(-)
>
> diff --git a/src/changes/changes.xml b/src/changes/changes.xml
> index 117256bf..73226f9c 100644
> --- a/src/changes/changes.xml
> +++ b/src/changes/changes.xml
> @@ -86,6 +86,7 @@ The <action> type attribute can be add,update,fix,remove.
> <action dev="ggregory" type="fix" due-to="Gary Gregory">
> UserPassKey should be Serializable.
> </action>
> + LifetimeExceededException should extend SQLException.
Gary,
This breaks the XML. You need to add the tags.
Mark