Skip to content

Commit 73b4569

Browse files
committed
Merge branch 'master' into pr/2078
2 parents 82f84df + f66e19e commit 73b4569

File tree

24 files changed

+287
-168
lines changed

24 files changed

+287
-168
lines changed

.github/workflows/ci.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#
2+
# Copyright 2009-2020 the original author or authors.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
name: Java CI
18+
19+
on: [push, pull_request]
20+
21+
jobs:
22+
test:
23+
runs-on: ${{ matrix.os }}
24+
strategy:
25+
matrix:
26+
os: [ubuntu-latest, macOS-latest, windows-latest]
27+
java: [8, 11, 15, 16-ea]
28+
fail-fast: false
29+
max-parallel: 4
30+
name: Test JDK ${{ matrix.java }}, ${{ matrix.os }}
31+
32+
steps:
33+
- uses: actions/checkout@v2
34+
- name: Set up JDK
35+
uses: actions/setup-java@v1
36+
with:
37+
java-version: ${{ matrix.java }}
38+
- name: Test with Maven
39+
run: ./mvnw test -B -D"license.skip=true"

.github/workflows/coveralls.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#
2+
# Copyright 2016-2020 the original author or authors.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
name: Coveralls
18+
19+
on: [push, pull_request]
20+
21+
jobs:
22+
build:
23+
if: github.repository_owner == 'mybatis'
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v2
27+
- name: Set up JDK
28+
uses: actions/setup-java@v1
29+
with:
30+
java-version: 8
31+
- name: Report Coverage to Coveralls for Pull Requests
32+
if: github.event_name == 'pull_request'
33+
run: ./mvnw test jacoco:report coveralls:report -q -Dlicense.skip=true -DrepoToken=$GITHUB_TOKEN -DserviceName=github -DpullRequest=$PR_NUMBER
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36+
PR_NUMBER: ${{ github.event.number }}
37+
- name: Report Coverage to Coveralls for General Push
38+
if: github.event_name == 'push'
39+
run: ./mvnw test jacoco:report coveralls:report -q -Dlicense.skip=true -DrepoToken=$GITHUB_TOKEN -DserviceName=github
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/sonar.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#
2+
# Copyright 2009-2020 the original author or authors.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
name: SonarCloud
18+
19+
on:
20+
push:
21+
branches:
22+
- master
23+
24+
jobs:
25+
build:
26+
if: github.repository_owner == 'mybatis'
27+
runs-on: ubuntu-latest
28+
steps:
29+
- uses: actions/checkout@v2
30+
with:
31+
# Disabling shallow clone is recommended for improving relevancy of reporting
32+
fetch-depth: 0
33+
- name: Set up JDK
34+
uses: actions/setup-java@v1
35+
with:
36+
java-version: 11
37+
- name: Analyze with SonarCloud
38+
run: ./mvnw verify jacoco:report sonar:sonar -B -Dsonar.projectKey=mybatis_mybatis-3 -Dsonar.organization=mybatis -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=$SONAR_TOKEN -Dlicense.skip=true
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

.github/workflows/sonatype.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#
2+
# Copyright 2009-2020 the original author or authors.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
name: Sonatype
18+
19+
on:
20+
push:
21+
branches:
22+
- master
23+
24+
jobs:
25+
build:
26+
if: github.repository_owner == 'mybatis' && ! contains(toJSON(github.event.head_commit.message), '[maven-release-plugin]')
27+
runs-on: ubuntu-latest
28+
steps:
29+
- uses: actions/checkout@v2
30+
- name: Set up JDK
31+
uses: actions/setup-java@v1
32+
with:
33+
java-version: 11
34+
- name: Deploy to Sonatype
35+
run: ./mvnw deploy -DskipTests -B --settings ./.mvn/settings.xml -Dlicense.skip=true
36+
env:
37+
CI_DEPLOY_USERNAME: ${{ secrets.CI_DEPLOY_USERNAME }}
38+
CI_DEPLOY_PASSWORD: ${{ secrets.CI_DEPLOY_PASSWORD }}

.mvn/extensions.xml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
4+
Copyright 2009-2020 the original author or authors.
5+
6+
Licensed under the Apache License, Version 2.0 (the "License");
7+
you may not use this file except in compliance with the License.
8+
You may obtain a copy of the License at
9+
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing, software
13+
distributed under the License is distributed on an "AS IS" BASIS,
14+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
See the License for the specific language governing permissions and
16+
limitations under the License.
17+
18+
-->
19+
<extensions>
20+
<extension>
21+
<groupId>fr.jcgay.maven</groupId>
22+
<artifactId>maven-profiler</artifactId>
23+
<version>3.0</version>
24+
</extension>
25+
</extensions>

travis/settings.xml renamed to .mvn/settings.xml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
4-
Copyright 2009-2016 the original author or authors.
4+
Copyright 2009-2020 the original author or authors.
55
66
Licensed under the Apache License, Version 2.0 (the "License");
77
you may not use this file except in compliance with the License.
@@ -26,8 +26,11 @@
2626
</server>
2727
<server>
2828
<id>gh-pages</id>
29-
<username>git</username>
30-
<password>${env.CI_SITE_PASSWORD}</password>
29+
</server>
30+
<server>
31+
<id>github</id>
32+
<username>${env.CI_DEPLOY_USERNAME}</username>
33+
<password>${env.GITHUB_TOKEN}</password>
3134
</server>
3235
</servers>
3336
</settings>

.travis.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

pom.xml

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
</parent>
2828

2929
<artifactId>mybatis</artifactId>
30-
<version>3.5.6-SNAPSHOT</version>
30+
<version>3.5.7-SNAPSHOT</version>
3131
<packaging>jar</packaging>
3232

3333
<name>mybatis</name>
@@ -145,7 +145,7 @@
145145
<dependency>
146146
<groupId>ognl</groupId>
147147
<artifactId>ognl</artifactId>
148-
<version>3.2.15</version>
148+
<version>3.2.18</version>
149149
<scope>compile</scope>
150150
<optional>true</optional>
151151
</dependency>
@@ -177,7 +177,7 @@
177177
<dependency>
178178
<groupId>org.apache.logging.log4j</groupId>
179179
<artifactId>log4j-core</artifactId>
180-
<version>2.13.3</version>
180+
<version>2.14.0</version>
181181
<optional>true</optional>
182182
</dependency>
183183
<dependency>
@@ -221,13 +221,13 @@
221221
<dependency>
222222
<groupId>org.mockito</groupId>
223223
<artifactId>mockito-core</artifactId>
224-
<version>3.5.13</version>
224+
<version>3.6.28</version>
225225
<scope>test</scope>
226226
</dependency>
227227
<dependency>
228228
<groupId>org.mockito</groupId>
229229
<artifactId>mockito-junit-jupiter</artifactId>
230-
<version>3.5.13</version>
230+
<version>3.6.28</version>
231231
<scope>test</scope>
232232
</dependency>
233233
<dependency>
@@ -240,19 +240,19 @@
240240
<dependency>
241241
<groupId>org.postgresql</groupId>
242242
<artifactId>postgresql</artifactId>
243-
<version>42.2.16</version>
243+
<version>42.2.18</version>
244244
<scope>test</scope>
245245
</dependency>
246246
<dependency>
247247
<groupId>mysql</groupId>
248248
<artifactId>mysql-connector-java</artifactId>
249-
<version>8.0.21</version>
249+
<version>8.0.22</version>
250250
<scope>test</scope>
251251
</dependency>
252252
<dependency>
253253
<groupId>org.assertj</groupId>
254254
<artifactId>assertj-core</artifactId>
255-
<version>3.17.2</version>
255+
<version>3.18.1</version>
256256
<scope>test</scope>
257257
</dependency>
258258
<dependency>
@@ -264,21 +264,28 @@
264264
<dependency>
265265
<groupId>org.testcontainers</groupId>
266266
<artifactId>junit-jupiter</artifactId>
267-
<version>1.14.3</version>
267+
<version>1.15.1</version>
268268
<scope>test</scope>
269269
</dependency>
270270
<dependency>
271271
<groupId>org.testcontainers</groupId>
272272
<artifactId>postgresql</artifactId>
273-
<version>1.14.3</version>
273+
<version>1.15.1</version>
274274
<scope>test</scope>
275275
</dependency>
276276
<dependency>
277277
<groupId>org.testcontainers</groupId>
278278
<artifactId>mysql</artifactId>
279-
<version>1.14.3</version>
279+
<version>1.15.1</version>
280280
<scope>test</scope>
281281
</dependency>
282+
<!-- For javadoc link -->
283+
<dependency>
284+
<groupId>com.microsoft.sqlserver</groupId>
285+
<artifactId>mssql-jdbc</artifactId>
286+
<version>8.4.1.jre8</version>
287+
<scope>provided</scope>
288+
</dependency>
282289
</dependencies>
283290

284291
<build>

src/main/java/org/apache/ibatis/cache/decorators/BlockingCache.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
*/
1616
package org.apache.ibatis.cache.decorators;
1717

18-
import java.text.MessageFormat;
1918
import java.util.concurrent.ConcurrentHashMap;
2019
import java.util.concurrent.CountDownLatch;
2120
import java.util.concurrent.TimeUnit;

src/main/java/org/apache/ibatis/cache/decorators/SerializedCache.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import org.apache.ibatis.cache.Cache;
2828
import org.apache.ibatis.cache.CacheException;
2929
import org.apache.ibatis.io.Resources;
30+
import org.apache.ibatis.io.SerialFilterChecker;
3031

3132
/**
3233
* @author Clinton Begin
@@ -96,6 +97,7 @@ private byte[] serialize(Serializable value) {
9697
}
9798

9899
private Serializable deserialize(byte[] value) {
100+
SerialFilterChecker.check();
99101
Serializable result;
100102
try (ByteArrayInputStream bis = new ByteArrayInputStream(value);
101103
ObjectInputStream ois = new CustomObjectInputStream(bis)) {

0 commit comments

Comments
 (0)