Skip to content

Commit

Permalink
Fix docs and use Map#computeIfAbsent with a lambda.
Browse files Browse the repository at this point in the history
  • Loading branch information
bzablocki committed Nov 13, 2024
1 parent 262b6df commit 94af14f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public SempBasicAuthClientExecutor(
this.password = password;
this.requestFactory = httpRequestFactory;
this.cookieManagerKey = new CookieManagerKey(this.baseUrl, this.username);
COOKIE_MANAGER_MAP.putIfAbsent(this.cookieManagerKey, new CookieManager());
COOKIE_MANAGER_MAP.computeIfAbsent(this.cookieManagerKey, key -> new CookieManager());
}

public boolean isQueueNonExclusive(String queueName) throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@
import org.apache.beam.sdk.values.KV;

/**
* This class a pseudo-key with a given cardinality. The downstream steps will use state {@literal
* &} timers to distribute the data and control for the number of parallel workers used for writing.
* This class adds pseudo-key with a given cardinality. The downstream steps will use state
* {@literal &} timers to distribute the data and control for the number of parallel workers used
* for writing.
*/
@Internal
public class AddShardKeyDoFn extends DoFn<Solace.Record, KV<Integer, Solace.Record>> {
Expand Down

0 comments on commit 94af14f

Please sign in to comment.