Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Functional #34

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# 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.

name: Java CI

on: [push]

jobs:
build:
strategy:
matrix:
java: [ '1.8', '9.0.4', '11.0.4', '12.0.2' ]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Set up Java ${{ matrix.java }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: Build with Maven
run: mvn -V package --file pom.xml
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>commons-dbcp2</artifactId>
<version>2.7.1-SNAPSHOT</version>
<version>2.8.0-SNAPSHOT</version>
<name>Apache Commons DBCP</name>

<inceptionYear>2001</inceptionYear>
Expand Down Expand Up @@ -293,7 +293,7 @@
<commons.rc.version>RC1</commons.rc.version>
<commons.module.name>org.apache.commons.dbcp2</commons.module.name>

<commons.release.version>2.7.0</commons.release.version>
<commons.release.version>2.8.0</commons.release.version>
<commons.release.desc>for JDBC 4.2 on Java 8</commons.release.desc>
<commons.release.hash>sha512</commons.release.hash>

Expand Down Expand Up @@ -331,7 +331,7 @@
<commons.osgi.import>javax.transaction;version="1.1.0",javax.transaction.xa;version="1.1.0";partial=true;mandatory:=partial,*</commons.osgi.import>
<commons.japicmp.ignoreMissingClasses>true</commons.japicmp.ignoreMissingClasses>
<!-- Commons Release Plugin -->
<commons.bc.version>2.6.0</commons.bc.version>
<commons.bc.version>2.7.0</commons.bc.version>
<commons.release.isDistModule>true</commons.release.isDistModule>
<commons.releaseManagerName>Gary Gregory</commons.releaseManagerName>
<commons.releaseManagerKey>86fdc7e2a11262cb</commons.releaseManagerKey>
Expand Down
17 changes: 6 additions & 11 deletions src/main/java/org/apache/commons/dbcp2/AbandonedTrace.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
*
* @since 2.0
*/
public class AbandonedTrace implements TrackedUse {
public class AbandonedTrace extends ResourceFunctions implements TrackedUse {

/** A list of objects created by children of this object. */
private final List<WeakReference<AbandonedTrace>> traceList = new ArrayList<>();
Expand All @@ -50,8 +50,7 @@ public AbandonedTrace() {
/**
* Constructs a new AbandonedTrace with a parent object.
*
* @param parent
* AbandonedTrace parent object.
* @param parent AbandonedTrace parent object.
*/
public AbandonedTrace(final AbandonedTrace parent) {
init(parent);
Expand All @@ -60,8 +59,7 @@ public AbandonedTrace(final AbandonedTrace parent) {
/**
* Adds an object to the list of objects being traced.
*
* @param trace
* AbandonedTrace object to add.
* @param trace AbandonedTrace object to add.
*/
protected void addTrace(final AbandonedTrace trace) {
synchronized (this.traceList) {
Expand Down Expand Up @@ -118,8 +116,7 @@ protected List<AbandonedTrace> getTrace() {
/**
* Initializes abandoned tracing for this object.
*
* @param parent
* AbandonedTrace parent object.
* @param parent AbandonedTrace parent object.
*/
private void init(final AbandonedTrace parent) {
if (parent != null) {
Expand All @@ -142,8 +139,7 @@ protected void removeThisTrace(final Object source) {
/**
* Removes a child object this object is tracing.
*
* @param trace
* AbandonedTrace object to remove.
* @param trace AbandonedTrace object to remove.
*/
protected void removeTrace(final AbandonedTrace trace) {
synchronized (this.traceList) {
Expand Down Expand Up @@ -171,8 +167,7 @@ protected void setLastUsed() {
/**
* Sets the time in milliseconds this object was last used.
*
* @param lastUsedMillis
* time in milliseconds.
* @param lastUsedMillis time in milliseconds.
*/
protected void setLastUsed(final long lastUsedMillis) {
this.lastUsedMillis = lastUsedMillis;
Expand Down
Loading