Skip to content

Commit

Permalink
Fix 19 build-time warnings (#236)
Browse files Browse the repository at this point in the history
  • Loading branch information
hiteshsharma authored Apr 25, 2020
1 parent 7e29018 commit 23696f8
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
public interface EventsArrival {

/**
* Returns number of nanoseconds until next arrival.
* @return
* @return The number of nanoseconds until next arrival.
*/
long nanosToNextEvent();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@
/**
* A ParSeq client that creates a ParSeq task from a rest.li {@link Request} by sending the request to underlying rest.li
* {@link Client}. ParSeqRestClient delegates task execution to Rest.li Client {@link Client#sendRequest(Request, Callback)}
* method that takes a {@link PromiseCallbackAdapter}. ParSeq task created from {@link ParSeqRestClient} may fail when
* {@link PromiseCallbackAdapter} receives the following error conditions:
* method that takes a {@link com.linkedin.restli.client.ParSeqRestClient.PromiseCallbackAdapter}. ParSeq task created
* from {@link ParSeqRestClient} may fail when
* {@link com.linkedin.restli.client.ParSeqRestClient.PromiseCallbackAdapter} receives the following error conditions:
* <p>
* 1. @{link RestLiResponseExcepion}: Request has reached Rest.li server and rest.li server throws RestLiServiceException.
* 2. @{link RemoteInvocationException}: Request failed before reaching rest.li server, for example, RestException thrown
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public interface ZKClient {
Task<List<OpResult>> multi(List<Op> ops, Executor executor);

/**
* Returns task that will wait for the given {@link Watcher.Event.KeeperState} to fulfill.
* Returns task that will wait for the given {@link org.apache.zookeeper.Watcher.Event.KeeperState} to fulfill.
* The task will be failed if the underlying zookeeper session expires.
*
* @param state keeper state to wait for.
Expand Down
22 changes: 11 additions & 11 deletions subprojects/parseq/src/main/java/com/linkedin/parseq/Engine.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public class Engine {
private static final int DEFUALT_MAX_RELATIONSHIPS_PER_TRACE = 65536;

public static final String MAX_CONCURRENT_PLANS = "_MaxConcurrentPlans_";
private static final int DEFUALT_MAX_CONCURRENT_PLANS = Integer.MAX_VALUE;
private static final int DEFAULT_MAX_CONCURRENT_PLANS = Integer.MAX_VALUE;

public static final String DRAIN_SERIAL_EXECUTOR_QUEUE = "_DrainSerialExecutorQueue_";
private static final boolean DEFAULT_DRAIN_SERIAL_EXECUTOR_QUEUE = true;
Expand Down Expand Up @@ -158,7 +158,7 @@ private static enum StateName {
if (_properties.containsKey(MAX_CONCURRENT_PLANS)) {
_maxConcurrentPlans = (Integer) getProperty(MAX_CONCURRENT_PLANS);
} else {
_maxConcurrentPlans = DEFUALT_MAX_CONCURRENT_PLANS;
_maxConcurrentPlans = DEFAULT_MAX_CONCURRENT_PLANS;
}
_concurrentPlans = new Semaphore(_maxConcurrentPlans);

Expand Down Expand Up @@ -289,8 +289,8 @@ private final String defaultPlanClass(final Task<?> task) {
* This method throws {@code IllegalStateException} if Engine does not have capacity to run the task.
* Engine's capacity is specified by a {@value #MAX_CONCURRENT_PLANS} configuration property. Use
* {@link EngineBuilder#setEngineProperty(String, Object)} to set this property.
* For the sake of backwards compatibility default value for a {@value #MAX_CONCURRENT_PLANS} is
* {@value #DEFUALT_MAX_CONCURRENT_PLANS} which essentially means "unbounded capacity".
* For the sake of backwards compatibility default value for a {@link #MAX_CONCURRENT_PLANS} is
* {@link #DEFAULT_MAX_CONCURRENT_PLANS} which essentially means "unbounded capacity".
*
* @param task the task to run
* @throws IllegalStateException
Expand All @@ -307,7 +307,7 @@ public void run(final Task<?> task) {
* Engine's capacity is specified by a {@value #MAX_CONCURRENT_PLANS} configuration property. Use
* {@link EngineBuilder#setEngineProperty(String, Object)} to set this property.
* For the sake of backwards compatibility default value for a {@value #MAX_CONCURRENT_PLANS} is
* {@value #DEFUALT_MAX_CONCURRENT_PLANS} which essentially means "unbounded capacity".
* {@link #DEFAULT_MAX_CONCURRENT_PLANS} which essentially means "unbounded capacity".
*
* @param task the task to run
* @param planClass string that identifies a "class" of the Plan. Plan class ends up in a ParSeq
Expand All @@ -328,7 +328,7 @@ public void run(final Task<?> task, final String planClass) {
* specified by a {@value #MAX_CONCURRENT_PLANS} configuration property. Use
* {@link EngineBuilder#setEngineProperty(String, Object)} to set this property.
* For the sake of backwards compatibility default value for a {@value #MAX_CONCURRENT_PLANS} is
* {@value #DEFUALT_MAX_CONCURRENT_PLANS} which essentially means "unbounded capacity".
* {@link #DEFAULT_MAX_CONCURRENT_PLANS} which essentially means "unbounded capacity".
*
* @param task the task to run
*/
Expand All @@ -344,7 +344,7 @@ public void blockingRun(final Task<?> task) {
* specified by a {@value #MAX_CONCURRENT_PLANS} configuration property. Use
* {@link EngineBuilder#setEngineProperty(String, Object)} to set this property.
* For the sake of backwards compatibility default value for a {@value #MAX_CONCURRENT_PLANS} is
* {@value #DEFUALT_MAX_CONCURRENT_PLANS} which essentially means "unbounded capacity".
* {@link #DEFAULT_MAX_CONCURRENT_PLANS} which essentially means "unbounded capacity".
*
* @param task the task to run
* @param planClass string that identifies a "class" of the Plan. Plan class ends up in a ParSeq
Expand All @@ -363,7 +363,7 @@ public void blockingRun(final Task<?> task, final String planClass) {
* Runs the given task if Engine has a capacity to start new plan as specified by
* {@value #MAX_CONCURRENT_PLANS} configuration parameter.
* For the sake of backwards compatibility default value for a {@value #MAX_CONCURRENT_PLANS} is
* {@value #DEFUALT_MAX_CONCURRENT_PLANS} which essentially means "unbounded capacity".
* {@link #DEFAULT_MAX_CONCURRENT_PLANS} which essentially means "unbounded capacity".
* Task passed in as a parameter becomes a root on a new Plan.
* All tasks created and started as a consequence of a root task will belong to that plan and will share a Trace.
* This method returns immediately and does not block. It returns {@code true} if Plan was successfully started.
Expand All @@ -378,7 +378,7 @@ public boolean tryRun(final Task<?> task) {
* Runs the given task if Engine has a capacity to start new plan as specified by
* {@value #MAX_CONCURRENT_PLANS} configuration parameter.
* For the sake of backwards compatibility default value for a {@value #MAX_CONCURRENT_PLANS} is
* {@value #DEFUALT_MAX_CONCURRENT_PLANS} which essentially means "unbounded capacity".
* {@link #DEFAULT_MAX_CONCURRENT_PLANS} which essentially means "unbounded capacity".
* Task passed in as a parameter becomes a root on a new Plan.
* All tasks created and started as a consequence of a root task will belong to that plan and will share a Trace.
* This method returns immediately and does not block. It returns {@code true} if Plan was successfully started.
Expand All @@ -399,7 +399,7 @@ public boolean tryRun(final Task<?> task, final String planClass) {
* Runs the given task if Engine has a capacity to start new plan as specified by
* {@value #MAX_CONCURRENT_PLANS} configuration parameter within specified amount of time.
* For the sake of backwards compatibility default value for a {@value #MAX_CONCURRENT_PLANS} is
* {@value #DEFUALT_MAX_CONCURRENT_PLANS} which essentially means "unbounded capacity".
* {@link #DEFAULT_MAX_CONCURRENT_PLANS} which essentially means "unbounded capacity".
* Task passed in as a parameter becomes a root on a new Plan.
* All tasks created and started as a consequence of a root task will belong to that plan and will share a Trace.
* If Engine does not have capacity to start the task, this method will block up to specified amount of
Expand All @@ -419,7 +419,7 @@ public boolean tryRun(final Task<?> task, final long timeout, final TimeUnit uni
* Runs the given task if Engine has a capacity to start new plan as specified by
* {@value #MAX_CONCURRENT_PLANS} configuration parameter within specified amount of time.
* For the sake of backwards compatibility default value for a {@value #MAX_CONCURRENT_PLANS} is
* {@value #DEFUALT_MAX_CONCURRENT_PLANS} which essentially means "unbounded capacity".
* {@link #DEFAULT_MAX_CONCURRENT_PLANS} which essentially means "unbounded capacity".
* Task passed in as a parameter becomes a root on a new Plan.
* All tasks created and started as a consequence of a root task will belong to that plan and will share a Trace.
* If Engine does not have capacity to start the task, this method will block up to specified amount of
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1372,7 +1372,7 @@ public static <T> Task<T> async(final Function1<Context, Promise<? extends T>> f
* parameter <b>must</b> signal execution rejection by throwing an exception.
* <p>
* In order to prevent blocking ParSeq threads the Executor passed in as a
* parameter <b>must not</b> use {@link ThreadPoolExecutor.CallerRunsPolicy}
* parameter <b>must not</b> use {@link java.util.concurrent.ThreadPoolExecutor.CallerRunsPolicy}
* as a rejection policy.
*
* @param <T> the type of the return value for this task
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ public interface Clock {
* or equal to zero, do not sleep at all.
* @throws InterruptedException if interrupted while sleeping
*/
void sleepNano(long nao) throws InterruptedException;
void sleepNano(long nano) throws InterruptedException;

}
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
/**
* This listener interface allows receiving notifications about plan deactivation.
* It can be used for monitoring and to optimize task implementation e.g. to implement batching.
* See {@link EngineBuilder#setPlanActivityListener(PlanDeactivationListener)}
* for details.
* @see EngineBuilder#setPlanDeactivationListener(PlanDeactivationListener) for details
*
* @author Jaroslaw Odzga (jodzga@linkedin.com)
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ public long nanoTime() {
}

@Override
public void sleepNano(long nao) throws InterruptedException {
TimeUnit.NANOSECONDS.sleep(nao);
public void sleepNano(long nano) throws InterruptedException {
TimeUnit.NANOSECONDS.sleep(nano);
}

}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.linkedin.parseq.internal;

import com.linkedin.parseq.BaseTask;
import com.linkedin.parseq.function.Function1;


/**
Expand All @@ -9,8 +10,8 @@
* <p>
* Instead of extending this class consider using
*
* {@link com.linkedin.parseq.Task#async(String, com.linkedin.parseq.function.Function1, boolean) Task.async}.
* @see com.linkedin.parseq.Task#async(String, com.linkedin.parseq.function.Function1, boolean) Task.async
* {@link com.linkedin.parseq.Task#async(String, Function1)}.
* @see com.linkedin.parseq.Task#async(String, Function1)
*/
public abstract class SystemHiddenTask<T> extends BaseTask<T> {
protected SystemHiddenTask(String name) {
Expand Down

0 comments on commit 23696f8

Please sign in to comment.