Skip to content
This repository was archived by the owner on May 30, 2024. It is now read-only.

Commit 8196c0b

Browse files
LaunchDarklyReleaseBoteli-darklyLaunchDarklyReleaseBotaengelbergantonmos
authored
prepare 7.3.0 release (#323)
## [7.3.0] - 2024-03-14 ### Changed: - Redact anonymous attributes within feature events - Always inline contexts for feature events --------- Co-authored-by: Eli Bishop <[email protected]> Co-authored-by: LaunchDarklyReleaseBot <[email protected]> Co-authored-by: Alex Engelberg <[email protected]> Co-authored-by: Anton Mostovoy <[email protected]> Co-authored-by: LaunchDarklyCI <[email protected]> Co-authored-by: LaunchDarklyCI <[email protected]> Co-authored-by: Gavin Whelan <[email protected]> Co-authored-by: ssrm <[email protected]> Co-authored-by: Harpo Roeder <[email protected]> Co-authored-by: Ben Woskow <[email protected]> Co-authored-by: Elliot <[email protected]> Co-authored-by: Robert J. Neal <[email protected]> Co-authored-by: Robert J. Neal <[email protected]> Co-authored-by: Sam Stokes <[email protected]> Co-authored-by: Ember Stevens <[email protected]> Co-authored-by: ember-stevens <[email protected]> Co-authored-by: Alex Engelberg <[email protected]> Co-authored-by: Louis Chan <[email protected]> Co-authored-by: Louis Chan <[email protected]> Co-authored-by: Todd Anderson <[email protected]> Co-authored-by: tanderson-ld <[email protected]> Co-authored-by: Matthew M. Keeler <[email protected]> Co-authored-by: ld-repository-standards[bot] <113625520+ld-repository-standards[bot]@users.noreply.github.com> Co-authored-by: Kane Parkinson <[email protected]> Co-authored-by: Ryan Lamb <[email protected]>
1 parent d5b39cd commit 8196c0b

File tree

2 files changed

+23
-21
lines changed

2 files changed

+23
-21
lines changed

build.gradle

+7-7
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ allprojects {
5959
ext {
6060
sdkBasePackage = "com.launchdarkly.sdk"
6161
sdkBaseName = "launchdarkly-java-server-sdk"
62-
62+
6363
// List any packages here that should be included in OSGi imports for the SDK, if they cannot
6464
// be discovered by looking in our explicit dependencies.
6565
systemPackageImports = [ "javax.net", "javax.net.ssl" ]
@@ -71,9 +71,9 @@ ext.versions = [
7171
"commonsCodec": "1.15",
7272
"gson": "2.8.9",
7373
"guava": "32.0.1-jre",
74-
"jackson": "2.11.2",
74+
"jackson": "2.11.2",
7575
"launchdarklyJavaSdkCommon": "2.1.1",
76-
"launchdarklyJavaSdkInternal": "1.2.1",
76+
"launchdarklyJavaSdkInternal": "1.3.0",
7777
"launchdarklyLogging": "1.1.0",
7878
"okhttp": "4.9.3", // specify this for the SDK build instead of relying on the transitive dependency from okhttp-eventsource
7979
"okhttpEventsource": "4.1.0",
@@ -172,7 +172,7 @@ dependencies {
172172
optional libraries.optional
173173

174174
internal libraries.internal
175-
175+
176176
commonClasses "com.launchdarkly:launchdarkly-java-sdk-common:${versions.launchdarklyJavaSdkCommon}"
177177
commonDoc "com.launchdarkly:launchdarkly-java-sdk-common:${versions.launchdarklyJavaSdkCommon}:sources"
178178
}
@@ -521,7 +521,7 @@ jacocoTestCoverageVerification {
521521
}
522522
}
523523
}
524-
524+
525525
// General rule that we should expect 100% test coverage; exclude any methods that have overrides above
526526
rule {
527527
element = "METHOD"
@@ -584,7 +584,7 @@ publishing {
584584
artifact sourcesJar
585585
artifact javadocJar
586586
artifact testJar
587-
587+
588588
pom.withXml {
589589
def root = asNode()
590590
root.appendNode('description', 'Official LaunchDarkly SDK for Java')
@@ -602,7 +602,7 @@ nexusPublishing {
602602
repositories {
603603
sonatype {
604604
username = ossrhUsername
605-
password = ossrhPassword
605+
password = ossrhPassword
606606
}
607607
}
608608
}

contract-tests/service/src/main/java/sdktest/TestService.java

+16-14
Original file line numberDiff line numberDiff line change
@@ -34,32 +34,34 @@ public class TestService {
3434
"tags",
3535
"filtering",
3636
"migrations",
37-
"event-sampling"
37+
"event-sampling",
38+
"inline-context",
39+
"anonymous-redaction"
3840
};
39-
41+
4042
static final Gson gson = new GsonBuilder().serializeNulls().create();
4143

4244
static final OkHttpClient client = new OkHttpClient();
43-
45+
4446
private final Map<String, SdkClientEntity> clients = new ConcurrentHashMap<String, SdkClientEntity>();
4547
private final AtomicInteger clientCounter = new AtomicInteger(0);
4648
private final String clientVersion;
47-
49+
4850
private TestService() {
4951
LDClient dummyClient = new LDClient("", new LDConfig.Builder().offline(true).build());
5052
clientVersion = dummyClient.version();
5153
try {
5254
dummyClient.close();
5355
} catch (Exception e) {}
5456
}
55-
57+
5658
@SuppressWarnings("serial")
5759
public static class BadRequestException extends Exception {
5860
public BadRequestException(String message) {
5961
super(message);
6062
}
6163
}
62-
64+
6365
public static void main(String[] args) throws Exception {
6466
TestService service = new TestService();
6567

@@ -70,7 +72,7 @@ public static void main(String[] args) throws Exception {
7072
.addRegex("POST", Pattern.compile("/clients/(.*)"), ctx -> service.postClientCommand(diableKeepAlive(ctx)))
7173
.addRegex("DELETE", Pattern.compile("/clients/(.*)"), ctx -> service.deleteClient(diableKeepAlive(ctx)));
7274

73-
HttpServer server = HttpServer.start(PORT, router);
75+
HttpServer server = HttpServer.start(PORT, router);
7476
server.getRecorder().setEnabled(false); // don't accumulate a request log
7577

7678
System.out.println("Listening on port " + PORT);
@@ -97,21 +99,21 @@ private void forceQuit() {
9799
System.out.println("Test harness has told us to quit");
98100
System.exit(0);
99101
}
100-
102+
101103
private void postCreateClient(RequestContext ctx) {
102104
CreateInstanceParams params = readJson(ctx, CreateInstanceParams.class);
103105

104106
String clientId = String.valueOf(clientCounter.incrementAndGet());
105107
SdkClientEntity client = new SdkClientEntity(this, params);
106108

107109
clients.put(clientId, client);
108-
110+
109111
ctx.addHeader("Location", "/clients/" + clientId);
110112
}
111113

112114
private void postClientCommand(RequestContext ctx) {
113115
CommandParams params = readJson(ctx, CommandParams.class);
114-
116+
115117
String clientId = ctx.getPathParam(0);
116118
SdkClientEntity client = clients.get(clientId);
117119
if (client == null) {
@@ -131,9 +133,9 @@ private void postClientCommand(RequestContext ctx) {
131133
client.logger.error("Unexpected exception: {}", e);
132134
ctx.setStatus(500);
133135
}
134-
}
136+
}
135137
}
136-
138+
137139
private void deleteClient(RequestContext ctx) {
138140
String clientId = ctx.getPathParam(0);
139141
SdkClientEntity client = clients.get(clientId);
@@ -143,11 +145,11 @@ private void deleteClient(RequestContext ctx) {
143145
client.close();
144146
}
145147
}
146-
148+
147149
private <T> T readJson(RequestContext ctx, Class<T> paramsClass) {
148150
return gson.fromJson(ctx.getRequest().getBody(), paramsClass);
149151
}
150-
152+
151153
private void writeJson(RequestContext ctx, Object data) {
152154
String json = gson.toJson(data);
153155
Handlers.bodyJson(json).apply(ctx);

0 commit comments

Comments
 (0)