Skip to content

Commit 42c4988

Browse files
devPalacioJay Palacio
andauthored
move to jakarta (#501)
* Bump mockito, delete unneeded wrapper, get build to pass * move to jakarta * move servlet to version catalog and downgrade to 5.0 for java 8 compatibility * add notes to changelog and rebase * point at correct stone --------- Co-authored-by: Jay Palacio <jpalacio@dropbox.com>
1 parent c9f9f5e commit 42c4988

File tree

14 files changed

+41
-41
lines changed

14 files changed

+41
-41
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
## 5.4.6-SNAPSHOT
1+
## 6.0.0-SNAPSHOT
2+
- Updated to `jakarta.servlet` to unblock adoption of Spring Boot v3, **this is a breaking change if you use `DbxSessionStore`.**
23
- Added better error messaging when trying to build the project without submodules initialized.
4+
- Improved generateStone task to properly declare inputs and outputs
35
- Removed obsolete javadoc flag
46
- Updated test dependencies
7+
- Updated to Gradle 7.6.2
58
- Removed redundant gradle wrappers
69

710
## 5.4.5 (2023-05-16)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ Another workaround is to tell your OSGi container to provide that requirement: [
368368

369369
### Does this SDK require any special ProGuard rules for shrink optimizations?
370370

371-
Versions 2.0.0-2.0.3 of this SDK require SDK-specific ProGuard rules when shrinking is enabled. However, since version **2.0.4**, the only ProGuard rules necessary are for the SDK's required and optional dependencies. If you encounter ProGuard warnings, consider adding the following "-dontwarn" directives to your ProGuard configuration file:
371+
The only ProGuard rules necessary are for the SDK's required and optional dependencies. If you encounter ProGuard warnings, consider adding the following "-dontwarn" directives to your ProGuard configuration file:
372372

373373
```
374374
-dontwarn okio.**

dropbox-sdk-java/api/dropbox-sdk-java.api

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,11 +218,11 @@ public abstract interface class com/dropbox/core/DbxSessionStore {
218218
}
219219

220220
public final class com/dropbox/core/DbxStandardSessionStore : com/dropbox/core/DbxSessionStore {
221-
public fun <init> (Ljavax/servlet/http/HttpSession;Ljava/lang/String;)V
221+
public fun <init> (Ljakarta/servlet/http/HttpSession;Ljava/lang/String;)V
222222
public fun clear ()V
223223
public fun get ()Ljava/lang/String;
224224
public fun getKey ()Ljava/lang/String;
225-
public fun getSession ()Ljavax/servlet/http/HttpSession;
225+
public fun getSession ()Ljakarta/servlet/http/HttpSession;
226226
public fun set (Ljava/lang/String;)V
227227
}
228228

dropbox-sdk-java/build.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ dependencies {
4242
// Android
4343
compileOnly 'com.google.android:android:4.1.1.4' // Until 6.x when we have an Android Artifact
4444
compileOnly(dropboxJavaSdkLibs.kotlin.stdlib) // Only used in Android Code
45-
46-
compileOnly(dropboxJavaSdkLibs.servlet.api)
45+
compileOnly(dropboxJavaSdkLibs.jakarta.servlet.api)
4746
compileOnly(dropboxJavaSdkLibs.okhttp2) // support both v2 and v3 to avoid
4847
compileOnly(dropboxJavaSdkLibs.okhttp3) // method count bloat
4948
compileOnly(dropboxJavaSdkLibs.appengine.api)

dropbox-sdk-java/src/main/java/com/dropbox/core/DbxStandardSessionStore.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package com.dropbox.core;
22

3-
import javax.servlet.http.HttpSession;
3+
import jakarta.servlet.http.HttpSession;
44

55
/*>>> import checkers.nullness.quals.Nullable; */
66

dropbox-sdk-java/src/main/java/com/dropbox/core/DbxWebAuth.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@
3737
* <h2> Part 1 </h2>
3838
* <p> Handler for "http://my-server.com/dropbox-auth-start": </p>
3939
* <pre>
40-
* {@link javax.servlet.http.HttpServletRequest} request = ...
41-
* {@link javax.servlet.http.HttpServletResponse} response = ...
40+
* {@link jakarta.servlet.http.HttpServletRequest} request = ...
41+
* {@link jakarta.servlet.http.HttpServletResponse} response = ...
4242
*
4343
* <b>// Select a spot in the session for DbxWebAuth to store the CSRF token.</b>
44-
* {@link javax.servlet.http.HttpSession} session = request.getSession(true);
44+
* {@link jakarta.servlet.http.HttpSession} session = request.getSession(true);
4545
* String sessionKey = "dropbox-auth-csrf-token";
4646
* {@link DbxSessionStore} csrfTokenStore = new DbxStandardSessionStore(session, sessionKey);
4747
*
@@ -62,11 +62,11 @@
6262
* <h2> Part 2 </h2>
6363
* <p> Handler for "http://my-server.com/dropbox-auth-finish": </p>
6464
* <pre>
65-
* {@link javax.servlet.http.HttpServletRequest} request = ...
66-
* {@link javax.servlet.http.HttpServletResponse} response = ...
65+
* {@link jakarta.servlet.http.HttpServletRequest} request = ...
66+
* {@link jakarta.servlet.http.HttpServletResponse} response = ...
6767
*
6868
* <b>// Fetch the session to verify our CSRF token</b>
69-
* {@link javax.servlet.http.HttpSession} session = request.getSession(true);
69+
* {@link jakarta.servlet.http.HttpSession} session = request.getSession(true);
7070
* String sessionKey = "dropbox-auth-csrf-token";
7171
* {@link DbxSessionStore} csrfTokenStore = new DbxStandardSessionStore(session, sessionKey);
7272
* String redirectUri = "http://my-server.com/dropbox-auth-finish";

examples/android/proguard-rules.pro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
-dontwarn com.google.protos.cloud.sql.**
2727
-dontwarn com.google.cloud.sql.**
2828
-dontwarn javax.activation.**
29-
-dontwarn javax.mail.**
30-
-dontwarn javax.servlet.**
29+
-dontwarn jakarta.mail.**
30+
-dontwarn jakarta.servlet.**
3131
-dontwarn org.apache.**
3232

3333
# Support classes for compatibility with older API versions

examples/examples/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ java {
1212

1313
dependencies {
1414
implementation(project(":dropbox-sdk-java"))
15-
implementation("org.eclipse.jetty.aggregate:jetty-server:8.1.18.v20150929")
16-
implementation("javax.servlet:javax.servlet-api:3.1.0")
15+
implementation("org.eclipse.jetty:jetty-server:11.0.15")
16+
implementation(dropboxJavaSdkLibs.jakarta.servlet.api)
1717
implementation("org.apache.commons:commons-lang3:3.4")
1818
implementation(dropboxJavaSdkLibs.jackson.core)
1919
implementation("com.fasterxml.jackson.core:jackson-databind:2.15.0")
2020
implementation(dropboxJavaSdkLibs.okhttp3)
21-
implementation("org.json:json:20220320")
21+
implementation("org.json:json:20230618")
2222

2323
testImplementation(dropboxJavaSdkLibs.test.junit)
2424
}

examples/examples/src/main/java/com/dropbox/core/examples/web_file_browser/Common.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
import com.fasterxml.jackson.core.type.TypeReference;
1212
import com.fasterxml.jackson.databind.ObjectMapper;
1313
import com.fasterxml.jackson.databind.SerializationFeature;
14+
import jakarta.servlet.ServletException;
15+
import jakarta.servlet.http.HttpServletRequest;
16+
import jakarta.servlet.http.HttpServletResponse;
1417

15-
import javax.servlet.ServletException;
16-
import javax.servlet.http.HttpServletRequest;
17-
import javax.servlet.http.HttpServletResponse;
1818
import java.io.File;
1919
import java.io.IOException;
2020
import java.io.OutputStreamWriter;

examples/examples/src/main/java/com/dropbox/core/examples/web_file_browser/DropboxAuth.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
import com.dropbox.core.DbxStandardSessionStore;
77
import com.dropbox.core.DbxWebAuth;
88

9-
import javax.servlet.ServletException;
10-
import javax.servlet.http.HttpServletRequest;
11-
import javax.servlet.http.HttpServletResponse;
12-
import javax.servlet.http.HttpSession;
9+
import jakarta.servlet.ServletException;
10+
import jakarta.servlet.http.HttpServletRequest;
11+
import jakarta.servlet.http.HttpServletResponse;
12+
import jakarta.servlet.http.HttpSession;
1313
import java.io.IOException;
1414

1515
/**

0 commit comments

Comments
 (0)