Skip to content

Commit 35eb2a6

Browse files
Merge pull request #193 from bugsnag/release/v3.7.0
2 parents 885bcaa + 10e2e17 commit 35eb2a6

File tree

108 files changed

+2786
-246
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+2786
-246
lines changed

.buildkite/pipeline.yml

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ steps:
1111
plugins:
1212
- docker-compose#v3.7.0:
1313
run: java-common
14-
command: './gradlew :bugsnag:assemble :bugsnag-spring:assemble'
14+
command: './gradlew :bugsnag:assemble :bugsnag-spring:javax:assemble :bugsnag-spring:assemble'
1515

1616
- label: ':docker: Run JVM tests'
1717
key: 'java-jvm-tests'
@@ -21,19 +21,36 @@ steps:
2121
run: java-common
2222
command: './gradlew check test'
2323

24-
- label: ':docker: Mazerunner tests batch 1'
24+
- label: ':docker: Mazerunner java8 tests batch 1'
2525
key: 'java-mazerunner-tests-1'
2626
timeout_in_minutes: 30
2727
plugins:
2828
- docker-compose#v3.7.0:
29-
run: java-mazerunner
29+
run: java8-mazerunner
3030
command: 'bundle exec maze-runner --exclude=features/[^a-m].*.feature'
3131

32-
- label: ':docker: Mazerunner tests batch 2'
32+
- label: ':docker: Mazerunner java8 tests batch 2'
3333
key: 'java-mazerunner-tests-2'
3434
timeout_in_minutes: 30
3535
plugins:
3636
- docker-compose#v3.7.0:
37-
pull: java-mazerunner
38-
run: java-mazerunner
37+
pull: java8-mazerunner
38+
run: java8-mazerunner
39+
command: 'bundle exec maze-runner --exclude=features/[^n-z].*.feature'
40+
41+
- label: ':docker: Mazerunner java17 tests batch 1'
42+
key: 'java-mazerunner-tests-3'
43+
timeout_in_minutes: 30
44+
plugins:
45+
- docker-compose#v3.7.0:
46+
run: java17-mazerunner
47+
command: 'bundle exec maze-runner --exclude=features/[^a-m].*.feature'
48+
49+
- label: ':docker: Mazerunner java17 tests batch 2'
50+
key: 'java-mazerunner-tests-4'
51+
timeout_in_minutes: 30
52+
plugins:
53+
- docker-compose#v3.7.0:
54+
pull: java17-mazerunner
55+
run: java17-mazerunner
3956
command: 'bundle exec maze-runner --exclude=features/[^n-z].*.feature'

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.4.1
1+
2.7.5

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## 3.7.0 (2023-06-07)
4+
5+
* Support Spring 6 / Spring Boot 3
6+
[#191](https://github.com/bugsnag/bugsnag-java/pull/191)
7+
8+
* Bump Jackson from 2.13.3 for critical vulnerability fixes
9+
[#184](https://github.com/bugsnag/bugsnag-java/pull/184)
10+
311
## 3.6.4 (2022-07-12)
412

513
* Support log messages that use `{}` formatting

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
source 'https://rubygems.org'
22

3-
gem 'bugsnag-maze-runner', git: 'https://github.com/bugsnag/maze-runner', tag: 'v6.8.0'
3+
gem 'bugsnag-maze-runner', git: 'https://github.com/bugsnag/maze-runner', tag: 'v7.24.0'
44
gem 'os'

Gemfile.lock

Lines changed: 46 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,39 @@
11
GIT
22
remote: https://github.com/bugsnag/maze-runner
3-
revision: fe12189f83aad154f54221ee0fcd41b483d3c0d1
4-
tag: v6.8.0
3+
revision: 734405a801012be706f5e190e472fb02dd83b264
4+
tag: v7.10.2
55
specs:
6-
bugsnag-maze-runner (6.8.0)
7-
appium_lib (~> 11.2.0)
6+
bugsnag-maze-runner (7.10.2)
7+
appium_lib (~> 12.0.0)
8+
appium_lib_core (~> 5.4.0)
89
bugsnag (~> 6.24)
910
cucumber (~> 7.1)
1011
cucumber-expressions (~> 6.0.0)
1112
curb (~> 0.9.6)
13+
json_schemer (~> 0.2.24)
1214
optimist (~> 3.0.1)
1315
os (~> 1.0.0)
1416
rake (~> 12.3.3)
1517
rubyzip (~> 2.3.2)
16-
selenium-webdriver (~> 3.11)
18+
selenium-webdriver (~> 4.0)
1719
test-unit (~> 3.5.2)
1820
webrick (~> 1.7.0)
1921

2022
GEM
2123
remote: https://rubygems.org/
2224
specs:
23-
appium_lib (11.2.0)
24-
appium_lib_core (~> 4.1)
25+
appium_lib (12.0.1)
26+
appium_lib_core (~> 5.0)
2527
nokogiri (~> 1.8, >= 1.8.1)
26-
tomlrb (~> 1.1)
27-
appium_lib_core (4.7.1)
28+
tomlrb (>= 1.1, < 3.0)
29+
appium_lib_core (5.4.0)
2830
faye-websocket (~> 0.11.0)
29-
selenium-webdriver (~> 3.14, >= 3.14.1)
30-
bugsnag (6.24.1)
31+
selenium-webdriver (~> 4.2, < 4.6)
32+
bugsnag (6.25.1)
3133
concurrent-ruby (~> 1.0)
3234
builder (3.2.4)
33-
childprocess (3.0.0)
34-
concurrent-ruby (1.1.9)
35+
childprocess (4.1.0)
36+
concurrent-ruby (1.1.10)
3537
cucumber (7.1.0)
3638
builder (~> 3.2, >= 3.2.4)
3739
cucumber-core (~> 10.1, >= 10.1.0)
@@ -45,10 +47,10 @@ GEM
4547
mime-types (~> 3.3, >= 3.3.1)
4648
multi_test (~> 0.1, >= 0.1.2)
4749
sys-uname (~> 1.2, >= 1.2.2)
48-
cucumber-core (10.1.0)
50+
cucumber-core (10.1.1)
4951
cucumber-gherkin (~> 22.0, >= 22.0.0)
5052
cucumber-messages (~> 17.1, >= 17.1.1)
51-
cucumber-tag-expressions (~> 4.0, >= 4.0.2)
53+
cucumber-tag-expressions (~> 4.1, >= 4.1.0)
5254
cucumber-create-meta (6.0.4)
5355
cucumber-messages (~> 17.1, >= 17.1.1)
5456
sys-uname (~> 1.2, >= 1.2.2)
@@ -60,40 +62,53 @@ GEM
6062
cucumber-messages (~> 17.1, >= 17.1.0)
6163
cucumber-messages (17.1.1)
6264
cucumber-tag-expressions (4.1.0)
63-
cucumber-wire (6.2.0)
65+
cucumber-wire (6.2.1)
6466
cucumber-core (~> 10.1, >= 10.1.0)
6567
cucumber-cucumber-expressions (~> 14.0, >= 14.0.0)
66-
cucumber-messages (~> 17.1, >= 17.1.1)
6768
curb (0.9.11)
6869
diff-lcs (1.5.0)
70+
ecma-re-validator (0.4.0)
71+
regexp_parser (~> 2.2)
6972
eventmachine (1.2.7)
7073
faye-websocket (0.11.1)
7174
eventmachine (>= 0.12.0)
7275
websocket-driver (>= 0.5.1)
73-
ffi (1.15.4)
76+
ffi (1.15.5)
77+
hana (1.3.7)
78+
json_schemer (0.2.24)
79+
ecma-re-validator (~> 0.3)
80+
hana (~> 1.3)
81+
regexp_parser (~> 2.0)
82+
uri_template (~> 0.7)
7483
mime-types (3.4.1)
7584
mime-types-data (~> 3.2015)
76-
mime-types-data (3.2021.1115)
77-
mini_portile2 (2.6.1)
85+
mime-types-data (3.2022.0105)
86+
mini_portile2 (2.8.1)
7887
multi_test (0.1.2)
79-
nokogiri (1.12.5)
80-
mini_portile2 (~> 2.6.1)
88+
nokogiri (1.13.10)
89+
mini_portile2 (~> 2.8.0)
8190
racc (~> 1.4)
8291
optimist (3.0.1)
83-
os (1.0.0)
84-
power_assert (2.0.1)
85-
racc (1.6.0)
92+
os (1.0.1)
93+
power_assert (2.0.3)
94+
racc (1.6.2)
8695
rake (12.3.3)
96+
regexp_parser (2.6.1)
97+
rexml (3.2.5)
8798
rubyzip (2.3.2)
88-
selenium-webdriver (3.142.7)
89-
childprocess (>= 0.5, < 4.0)
90-
rubyzip (>= 1.2.2)
99+
selenium-webdriver (4.5.0)
100+
childprocess (>= 0.5, < 5.0)
101+
rexml (~> 3.2, >= 3.2.5)
102+
rubyzip (>= 1.2.2, < 3.0)
103+
websocket (~> 1.0)
91104
sys-uname (1.2.2)
92105
ffi (~> 1.1)
93-
test-unit (3.5.3)
106+
test-unit (3.5.7)
94107
power_assert
95-
tomlrb (1.3.0)
108+
tomlrb (2.0.3)
109+
uri_template (0.7.0)
96110
webrick (1.7.0)
111+
websocket (1.2.9)
97112
websocket-driver (0.7.5)
98113
websocket-extensions (>= 0.1.0)
99114
websocket-extensions (0.1.5)
@@ -106,4 +121,4 @@ DEPENDENCIES
106121
os
107122

108123
BUNDLED WITH
109-
1.16.5
124+
2.1.4

bugsnag-spring/build.gradle

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ext {
2-
springVersion = '4.3.18.RELEASE'
3-
springBootVersion = '1.5.15.RELEASE'
2+
springVersion = '6.0.0'
3+
springBootVersion = '3.0.0'
44
}
55

66
apply plugin: 'java-library'
@@ -12,16 +12,32 @@ repositories {
1212
}
1313

1414
dependencies {
15-
compile project(':bugsnag')
16-
testCompile project(path: ':bugsnag', configuration: 'testRuntime')
15+
compileOnly project(':bugsnag-spring:javax')
16+
api project(':bugsnag')
1717

18-
compileOnly "javax.servlet:javax.servlet-api:${servletApiVersion}"
18+
compileOnly "jakarta.servlet:jakarta.servlet-api:${jakartaServletApiVersion}"
1919
compileOnly "org.springframework:spring-webmvc:${springVersion}"
2020
compileOnly "org.springframework.boot:spring-boot:${springBootVersion}"
2121
compileOnly "ch.qos.logback:logback-core:${logbackVersion}"
22+
compileOnly "org.slf4j:slf4j-api:${slf4jApiVersion}"
2223

23-
testCompile "junit:junit:4.13.2"
24-
testCompile "javax.servlet:javax.servlet-api:${servletApiVersion}"
25-
testCompile "org.springframework.boot:spring-boot-starter-test:${springBootVersion}"
26-
testCompile "org.springframework.boot:spring-boot-starter-web:${springBootVersion}"
24+
testImplementation project(':bugsnag').sourceSets.test.output
25+
testImplementation project(':bugsnag-spring:javax')
26+
testImplementation project(':bugsnag')
27+
testImplementation "junit:junit:${junitVersion}"
28+
testImplementation "jakarta.servlet:jakarta.servlet-api:${jakartaServletApiVersion}"
29+
testImplementation "org.springframework.boot:spring-boot-starter-test:${springBootVersion}"
30+
testImplementation "org.springframework.boot:spring-boot-starter-web:${springBootVersion}"
31+
testImplementation "org.mockito:mockito-core:${mockitoVersion}"
32+
}
33+
34+
evaluationDependsOnChildren()
35+
36+
tasks['jar'].dependsOn(project(':bugsnag-spring:javax').tasks['jar'])
37+
38+
jar {
39+
from project.sourceSets.main.allSource
40+
from project(':bugsnag-spring:javax').configurations.archives.artifacts.files.collect { file ->
41+
zipTree(file)
42+
}
2743
}

bugsnag-spring/javax/build.gradle

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
ext {
2+
springVersion = '5.3.20'
3+
springBootVersion = '2.5.14'
4+
}
5+
6+
apply plugin: 'java'
7+
apply plugin: 'java-library'
8+
9+
apply from: '../../common.gradle'
10+
11+
compileJava {
12+
sourceCompatibility = '1.8'
13+
targetCompatibility = '1.8'
14+
}
15+
16+
repositories {
17+
mavenCentral()
18+
}
19+
20+
dependencies {
21+
api project(':bugsnag')
22+
testImplementation project(':bugsnag').sourceSets.test.output
23+
24+
compileOnly "javax.servlet:javax.servlet-api:${javaxServletApiVersion}"
25+
compileOnly "org.springframework:spring-webmvc:${springVersion}"
26+
compileOnly "org.springframework.boot:spring-boot:${springBootVersion}"
27+
compileOnly "ch.qos.logback:logback-core:${logbackVersion}"
28+
compileOnly "org.slf4j:slf4j-api:${slf4jApiVersion}"
29+
30+
testImplementation "junit:junit:${junitVersion}"
31+
testImplementation "javax.servlet:javax.servlet-api:${javaxServletApiVersion}"
32+
testImplementation "org.springframework.boot:spring-boot-starter-test:${springBootVersion}"
33+
testImplementation "org.springframework.boot:spring-boot-starter-web:${springBootVersion}"
34+
testImplementation "org.mockito:mockito-core:${mockitoVersion}"
35+
}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
package com.bugsnag;
2+
3+
import org.springframework.context.annotation.ImportSelector;
4+
import org.springframework.core.SpringVersion;
5+
import org.springframework.core.type.AnnotationMetadata;
6+
7+
public class BugsnagImportSelector implements ImportSelector {
8+
9+
private static final String[] SPRING_JAKARTA_CLASSES = {
10+
"com.bugsnag.SpringBootJakartaConfiguration",
11+
"com.bugsnag.JakartaMvcConfiguration",
12+
"com.bugsnag.ScheduledTaskConfiguration"
13+
};
14+
15+
private static final String[] SPRING_JAVAX_CLASSES = {
16+
"com.bugsnag.SpringBootJavaxConfiguration",
17+
"com.bugsnag.JavaxMvcConfiguration",
18+
"com.bugsnag.ScheduledTaskConfiguration"
19+
};
20+
21+
@Override
22+
public String[] selectImports(AnnotationMetadata importingClassMetadata) {
23+
if (isSpringJakartaCompatible() && isJava17Compatible()) {
24+
return SPRING_JAKARTA_CLASSES;
25+
}
26+
27+
return SPRING_JAVAX_CLASSES;
28+
}
29+
30+
private static boolean isSpringJakartaCompatible() {
31+
return getMajorVersion(SpringVersion.getVersion()) >= 6;
32+
}
33+
34+
private static boolean isJava17Compatible() {
35+
return getMajorVersion(System.getProperty("java.version")) >= 17;
36+
}
37+
38+
private static int getMajorVersion(String version) {
39+
if (version == null) {
40+
return 0;
41+
}
42+
int firstDot = version.indexOf(".");
43+
if (firstDot == -1) {
44+
return 0;
45+
}
46+
47+
String majorVersion = version.substring(0, firstDot);
48+
try {
49+
return Integer.parseInt(majorVersion);
50+
} catch (NumberFormatException nfe) {
51+
return 0;
52+
}
53+
}
54+
}

bugsnag-spring/src/main/java/com/bugsnag/BugsnagMvcExceptionHandler.java renamed to bugsnag-spring/javax/src/main/java/com/bugsnag/BugsnagJavaxMvcExceptionHandler.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import org.springframework.web.servlet.ModelAndView;
99

1010
import java.util.Collections;
11-
1211
import javax.servlet.http.HttpServletRequest;
1312
import javax.servlet.http.HttpServletResponse;
1413

@@ -20,11 +19,11 @@
2019
* resolvers.
2120
*/
2221
@Order(Ordered.HIGHEST_PRECEDENCE)
23-
class BugsnagMvcExceptionHandler implements HandlerExceptionResolver {
22+
class BugsnagJavaxMvcExceptionHandler implements HandlerExceptionResolver {
2423

2524
private final Bugsnag bugsnag;
2625

27-
BugsnagMvcExceptionHandler(final Bugsnag bugsnag) {
26+
BugsnagJavaxMvcExceptionHandler(final Bugsnag bugsnag) {
2827
this.bugsnag = bugsnag;
2928
}
3029

0 commit comments

Comments
 (0)