Skip to content

Commit

Permalink
Fixed compile errors in javadoc content. (#7581)
Browse files Browse the repository at this point in the history
* Fixed compile errors in javadoc content.

* Formatting

* Clickable docs link for IDE navigation
  • Loading branch information
airbyte-jenny authored Nov 3, 2021
1 parent c77dd7a commit 9a07136
Show file tree
Hide file tree
Showing 14 changed files with 30 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* <pre>
* <code>
* try(final ScopedMDCChange scopedMDCChange = new ScopedMDCChange(
* new HashMap<String, String>() {{
* new HashMap&lt;String, String&gt;() {{
* put("my", "value");
* }}
* )) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ public static <T> AutoCloseableIterator<T> fromIterator(final Iterator<T> iterat
}

/**
* Coerces a vanilla {@link Iterator} into a {@link AutoCloseableIterator}. The provided
* {@param onClose} function will be called at most one time.
* Coerces a vanilla {@link Iterator} into a {@link AutoCloseableIterator}. The provided onClose
* function will be called at most one time.
*
* @param iterator autocloseable iterator to add another close to
* @param onClose the function that will be called on close
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,11 @@ public String getJobImagePullPolicy() {
/**
* Returns worker pod tolerations parsed from its own environment variable. The value of the env is
* a string that represents one or more tolerations.
* <ul>
* <li>Tolerations are separated by a `;`
* <li>Each toleration contains k=v pairs mentioning some/all of key, effect, operator and value and
* separated by `,`
* </ul>
* <p>
* For example:- The following represents two tolerations, one checking existence and another
* matching a value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ public void updateConnectionState(final UUID connectionId, final State state) th

/**
* Converts between a dumpConfig() output and a replaceAllConfigs() input, by deserializing the
* string/jsonnode into the AirbyteConfig, Stream<Object<AirbyteConfig.getClassName()>
* string/jsonnode into the AirbyteConfig, Stream&lt;Object&lt;AirbyteConfig.getClassName()&gt;&gt;
*
* @param configurations from dumpConfig()
* @return input suitable for replaceAllConfigs()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

/**
* Provides a read-only interface to a backing secrets store similar to {@link SecretPersistence}.
* In practice, the functionality should be provided by a {@link SecretPersistence#read function.
* In practice, the functionality should be provided by a {@link SecretPersistence#read} function.
*/
@FunctionalInterface
public interface ReadOnlySecretPersistence {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,13 @@

/**
* Custom database for jOOQ code generation. It performs the following operations:
* <ul>
* <li>Run Flyway migration.</li>
* <li>Dump the database schema.</li>
* <li>Create a connection for jOOQ code generation.</li>
* <p/>
* </ul>
* <p>
* </p>
* Reference: https://github.com/sabomichal/jooq-meta-postgres-flyway
*/
public abstract class FlywayMigrationDatabase extends PostgresDatabase {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import java.util.stream.Stream;

/**
* This migration fixes a mistake. We should have done a minor version bump from 0.14.2 => 0.14.3
* This migration fixes a mistake. We should have done a minor version bump from 0.14.2 to 0.14.3
* but we did not. This migration cleans up any problems that might have arisen from that. Then we
* will do another migration to 0.15 forcing everyone to migrate (guaranteeing they hit this one)
* and getting into a good state. The only change here is that instead of using StandardDataSchema
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,32 +20,34 @@

/**
* Following docs from
* https://help.salesforce.com/s/articleView?language=en_US&id=sf.remoteaccess_oauth_web_server_flow.htm
* https://help.salesforce.com/s/articleView?language=en_US&amp;id=sf.remoteaccess_oauth_web_server_flow.htm
*/
public class SalesforceOAuthFlow extends BaseOAuthFlow {
// Clickable link for IDE
// https://help.salesforce.com/s/articleView?language=en_US&id=sf.remoteaccess_oauth_web_server_flow.htm

private static final String AUTHORIZE_URL = "https://login.salesforce.com/services/oauth2/authorize";
private static final String ACCESS_TOKEN_URL = "https://login.salesforce.com/services/oauth2/token";

public SalesforceOAuthFlow(ConfigRepository configRepository) {
public SalesforceOAuthFlow(final ConfigRepository configRepository) {
super(configRepository);
}

@VisibleForTesting
SalesforceOAuthFlow(ConfigRepository configRepository, HttpClient httpClient, Supplier<String> stateSupplier) {
SalesforceOAuthFlow(final ConfigRepository configRepository, final HttpClient httpClient, final Supplier<String> stateSupplier) {
super(configRepository, httpClient, stateSupplier);
}

@Override
protected String formatConsentUrl(UUID definitionId, String clientId, String redirectUrl) throws IOException {
protected String formatConsentUrl(final UUID definitionId, final String clientId, final String redirectUrl) throws IOException {
try {
return new URIBuilder(AUTHORIZE_URL)
.addParameter("client_id", clientId)
.addParameter("redirect_uri", redirectUrl)
.addParameter("response_type", "code")
.addParameter("state", getState())
.build().toString();
} catch (URISyntaxException e) {
} catch (final URISyntaxException e) {
throw new IOException("Failed to format Consent URL for OAuth flow", e);
}
}
Expand All @@ -56,15 +58,18 @@ protected String getAccessTokenUrl() {
}

@Override
protected Map<String, String> getAccessTokenQueryParameters(String clientId, String clientSecret, String authCode, String redirectUrl) {
protected Map<String, String> getAccessTokenQueryParameters(final String clientId,
final String clientSecret,
final String authCode,
final String redirectUrl) {
return ImmutableMap.<String, String>builder()
.putAll(super.getAccessTokenQueryParameters(clientId, clientSecret, authCode, redirectUrl))
.put("grant_type", "authorization_code")
.build();
}

@Override
protected Map<String, Object> extractRefreshToken(JsonNode data, String accessTokenUrl) throws IOException {
protected Map<String, Object> extractRefreshToken(final JsonNode data, final String accessTokenUrl) throws IOException {
System.out.println(Jsons.serialize(data));
if (data.has("refresh_token")) {
final String refreshToken = data.get("refresh_token").asText();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public interface JobPersistence {
<T> void writeOutput(long jobId, int attemptNumber, T output) throws IOException;

/**
* @param configType - type of config, e.g. sync
* @param configTypes - type of config, e.g. sync
* @param configId - id of that config
* @return lists job in descending order by created_at
* @throws IOException - what you do when you IO
Expand Down Expand Up @@ -196,8 +196,6 @@ public interface JobPersistence {

/**
* Purges job history while ensuring that the latest saved-state information is maintained.
*
* @throws IOException
*/
void purgeJobHistory();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ private Collection<StandardDestinationDefinition> listDestinationDefinition(fina
}

/**
* List all configurations of type @param <T> that already exists
* List all configurations of type @param &lt;T&gt; that already exists
*/
public interface ListConfigCall<T> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -596,8 +596,8 @@ private <T> Map<UUID, UUID> importIntoWorkspace(final ConfigSchema configSchema,
}

/**
* List all configurations of type @param <T> that already exists (we'll be using this to know which
* ids are already in use)
* List all configurations of type @param &lt;T&gt; that already exists (we'll be using this to know
* which ids are already in use)
*/
public interface ListConfigCall<T> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
* stderr streams and copy configuration files over.
*
* This is made possible by:
* <ul>
* <li>1) An init container that creates 3 named pipes corresponding to stdin, stdout and std err on
* a shared volume.</li>
* <li>2) Config files (e.g. config.json, catalog.json etc) are copied from the parent process into
Expand All @@ -76,7 +77,7 @@
* handling.</li>
* <li>8) A heartbeat sidecar checks if the worker that launched the pod is still alive. If not, the
* pod will fail.</li>
*
* </ul>
* The docker image used for this pod process must expose a AIRBYTE_ENTRYPOINT which contains the
* entrypoint we will wrap when creating the main container in the pod.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ private KubePortManagerSingleton(final Set<Integer> ports) {

/**
* Make sure init(ports) is called once prior to repeatedly using getInstance().
*
* @return
*/
public static synchronized KubePortManagerSingleton getInstance() {
if (instance == null) {
Expand All @@ -49,8 +47,6 @@ public static synchronized KubePortManagerSingleton getInstance() {
/**
* Sets up the port range; make sure init(ports) is called once prior to repeatedly using
* getInstance().
*
* @return
*/
public static synchronized void init(final Set<Integer> ports) {
if (instance != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

package io.airbyte.workers.temporal;

import io.airbyte.workers.WorkerException;
import io.temporal.activity.Activity;
import io.temporal.activity.ActivityExecutionContext;
import io.temporal.client.ActivityCompletionException;
Expand Down Expand Up @@ -35,7 +34,6 @@ public TemporalCancellationHandler() {
*
* @param onCancellationCallback a runnable that will only run when Temporal indicates the activity
* should be killed (cancellation or timeout).
* @throws WorkerException
*/
@Override
public void checkAndHandleCancellation(final Runnable onCancellationCallback) {
Expand Down

0 comments on commit 9a07136

Please sign in to comment.