Skip to content

Commit 7e26460

Browse files
authored
Merge pull request #6400 from halibobo1205/481/update_dependencies
feat(dependencies): update dependencies for security
2 parents 3f280c9 + 44dcce3 commit 7e26460

File tree

9 files changed

+1110
-293
lines changed

9 files changed

+1110
-293
lines changed

build.gradle

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
allprojects {
22
version = "1.0.0"
33
apply plugin: "java-library"
4+
ext {
5+
springVersion = "5.3.39"
6+
}
47
}
58

69
subprojects {
@@ -41,8 +44,7 @@ subprojects {
4144
implementation group: 'org.slf4j', name: 'jcl-over-slf4j', version: '1.7.25'
4245
implementation group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.13'
4346
implementation "com.google.code.findbugs:jsr305:3.0.0"
44-
implementation group: 'org.springframework', name: 'spring-context', version: '5.3.18'
45-
implementation group: 'org.springframework', name: 'spring-tx', version: '5.3.18'
47+
implementation group: 'org.springframework', name: 'spring-context', version: "${springVersion}"
4648
implementation "org.apache.commons:commons-lang3:3.4"
4749
implementation group: 'org.apache.commons', name: 'commons-math', version: '2.2'
4850
implementation "org.apache.commons:commons-collections4:4.1"

chainbase/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ dependencies {
1010
api project(":common")
1111
api project(":crypto")
1212
api "org.fusesource.jansi:jansi:$jansiVersion"
13-
api 'io.github.tronprotocol:zksnark-java-sdk:1.0.0'
13+
api group: 'commons-io', name: 'commons-io', version: '2.18.0'
14+
api 'io.github.tronprotocol:zksnark-java-sdk:1.0.0' exclude(group: 'commons-io', module: 'commons-io')
1415
api 'org.reflections:reflections:0.9.11'
1516
}
1617

common/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ if (isWindows()) {
3030
}
3131

3232
dependencies {
33-
api group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.13.4.2' // https://github.com/FasterXML/jackson-databind/issues/3627
34-
api "com.cedarsoftware:java-util:1.8.0"
33+
api group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.18.3' // https://github.com/FasterXML/jackson-databind/issues/3627
34+
api "com.cedarsoftware:java-util:3.2.0"
3535
api group: 'org.apache.httpcomponents', name: 'httpasyncclient', version: '4.1.1'
3636
api group: 'commons-codec', name: 'commons-codec', version: '1.11'
3737
api group: 'com.beust', name: 'jcommander', version: '1.78'
@@ -44,7 +44,7 @@ dependencies {
4444
api 'org.aspectj:aspectjrt:1.8.13'
4545
api 'org.aspectj:aspectjweaver:1.8.13'
4646
api 'org.aspectj:aspectjtools:1.8.13'
47-
api group: 'io.github.tronprotocol', name: 'libp2p', version: '2.2.5',{
47+
api group: 'io.github.tronprotocol', name: 'libp2p', version: '2.2.6',{
4848
exclude group: 'io.grpc', module: 'grpc-context'
4949
exclude group: 'io.grpc', module: 'grpc-core'
5050
exclude group: 'io.grpc', module: 'grpc-netty'

common/src/main/java/org/tron/core/config/CommonConfig.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,8 @@
2121
import org.springframework.context.annotation.ComponentScan;
2222
import org.springframework.context.annotation.Configuration;
2323
import org.springframework.context.annotation.EnableAspectJAutoProxy;
24-
import org.springframework.transaction.annotation.EnableTransactionManagement;
2524

2625
@Configuration
27-
@EnableTransactionManagement
2826
@EnableAspectJAutoProxy
2927
@ComponentScan(basePackages = "org.tron")
3028
public class CommonConfig {

framework/build.gradle

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,11 @@ dependencies {
3838
//local libraries
3939
implementation fileTree(dir: 'libs', include: '*.jar')
4040
// end local libraries
41-
testImplementation group: 'org.hamcrest', name: 'hamcrest-junit', version: '1.0.0.1'
42-
43-
implementation group: 'com.google.inject', name: 'guice', version: '4.1.0'
4441
implementation group: 'io.dropwizard.metrics', name: 'metrics-core', version: '3.1.2'
4542
implementation group: 'com.github.davidb', name: 'metrics-influxdb', version: '0.8.2'
46-
implementation group: 'com.carrotsearch', name: 'java-sizeof', version: '0.0.5'
4743
// http
48-
implementation 'org.eclipse.jetty:jetty-server:9.4.53.v20231009'
49-
implementation 'org.eclipse.jetty:jetty-servlet:9.4.53.v20231009'
44+
implementation 'org.eclipse.jetty:jetty-server:9.4.57.v20241219'
45+
implementation 'org.eclipse.jetty:jetty-servlet:9.4.57.v20241219'
5046
implementation 'com.alibaba:fastjson:1.2.83'
5147
// end http
5248

@@ -56,14 +52,11 @@ dependencies {
5652
// https://mvnrepository.com/artifact/javax.portlet/portlet-api
5753
compileOnly group: 'javax.portlet', name: 'portlet-api', version: '3.0.1'
5854

59-
implementation "io.vavr:vavr:0.9.2"
6055
implementation (group: 'org.pf4j', name: 'pf4j', version: '3.10.0') {
6156
exclude group: "org.slf4j", module: "slf4j-api"
6257
}
6358

64-
testImplementation group: 'org.springframework', name: 'spring-test', version: '5.2.0.RELEASE'
65-
testImplementation group: 'org.springframework', name: 'spring-web', version: '5.2.0.RELEASE'
66-
59+
testImplementation group: 'org.springframework', name: 'spring-test', version: "${springVersion}"
6760
implementation group: 'org.zeromq', name: 'jeromq', version: '0.5.3'
6861
api project(":chainbase")
6962
api project(":protocol")
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
/*
2+
* Copyright 2002-2018 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+
* https://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+
package org.springframework.http;
18+
19+
import org.springframework.util.InvalidMimeTypeException;
20+
21+
/**
22+
* Exception thrown from {@link MediaType#parseMediaType(String)} in case of
23+
* encountering an invalid media type specification String.
24+
*
25+
* @author Juergen Hoeller
26+
* @since 3.2.2
27+
*/
28+
@SuppressWarnings("serial")
29+
public class InvalidMediaTypeException extends IllegalArgumentException {
30+
31+
private final String mediaType;
32+
33+
34+
/**
35+
* Create a new InvalidMediaTypeException for the given media type.
36+
*
37+
* @param mediaType the offending media type
38+
* @param message a detail message indicating the invalid part
39+
*/
40+
public InvalidMediaTypeException(String mediaType, String message) {
41+
super("Invalid media type \"" + mediaType + "\": " + message);
42+
this.mediaType = mediaType;
43+
}
44+
45+
/**
46+
* Constructor that allows wrapping {@link InvalidMimeTypeException}.
47+
*/
48+
InvalidMediaTypeException(InvalidMimeTypeException ex) {
49+
super(ex.getMessage(), ex);
50+
this.mediaType = ex.getMimeType();
51+
}
52+
53+
54+
/**
55+
* Return the offending media type.
56+
*/
57+
public String getMediaType() {
58+
return this.mediaType;
59+
}
60+
61+
}

0 commit comments

Comments
 (0)