Skip to content

Commit

Permalink
Fix JavaDoc issues. Spotted by IntelliJ (apache#8054)
Browse files Browse the repository at this point in the history
Issues spotted by IntelliJ

### Motivation
IntelliJ complains and highlights these issues

### Modifications
Sync JavaDoc with code

### Verifying this change
This change is a trivial rework / code cleanup without any test coverage.
  • Loading branch information
kellyfj authored Sep 30, 2020
1 parent e5f57a3 commit 692a28e
Show file tree
Hide file tree
Showing 23 changed files with 28 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ public void run() {
*
* @param addr
* Socket Address
* @param latch
* @param l
* Latch to wait on
* @throws InterruptedException
* @throws IOException
Expand Down Expand Up @@ -417,8 +417,6 @@ public void restartBookies(ServerConfiguration newConf) throws Exception {
* Helper method to startup a new bookie server with the indicated port number. Also, starts the auto recovery
* process, if the isAutoRecoveryEnabled is set true.
*
* @param port
* Port to start the new bookie server on
* @throws IOException
*/
public int startNewBookie() throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public static <T extends PulsarConfiguration> T create(Properties properties,
* and value of the element is null or number value is not in a provided (min,max) range then consider as incomplete
* object and throws exception with incomplete parameters
*
* @param object
* @param obj
* @return
* @throws IllegalArgumentException
* if object is field values are not completed according to {@link FieldContext} constraints.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ public BundleSplitterTask(final PulsarService pulsar) {
* @param loadData
* Load data to base decisions on (does not have benefit of preallocated data since this may not be the
* leader broker).
* @param localData
* Local data for the broker we are splitting on.
* @param pulsar
* Service to use.
* @return All bundles who have exceeded configured thresholds in number of topics, number of sessions, total
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -325,9 +325,7 @@ public boolean registerNamespace(String namespace, boolean ensureOwned) throws P
* Main internal method to lookup and setup ownership of service unit to a broker
*
* @param bundle
* @param authoritative
* @param readOnly
* @param advertisedListenerName
* @param options
* @return
* @throws PulsarServerException
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public class OwnedBundle {
/**
* constructor
*
* @param nsname
* @param suName
*/
public OwnedBundle(NamespaceBundle suName) {
this.bundle = suName;
Expand All @@ -60,8 +60,7 @@ public OwnedBundle(NamespaceBundle suName) {
/**
* Constructor to allow set initial active flag
*
* @param nsname
* @param nssvc
* @param suName
* @param active
*/
public OwnedBundle(NamespaceBundle suName, boolean active) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,14 +220,14 @@ public CompletableFuture<Boolean> checkOwnership(NamespaceBundle bundle) {
/**
* Method to get the current owner of the <code>ServiceUnit</code>
*
* @param suId
* identifier of the <code>ServiceUnit</code>
* @param suName
* name of the <code>ServiceUnit</code>
* @return The ephemeral node data showing the current ownership info in <code>ZooKeeper</code>
* @throws Exception
* throws exception if no ownership info is found
*/
public CompletableFuture<Optional<NamespaceEphemeralData>> getOwnerAsync(NamespaceBundle suname) {
String path = ServiceUnitZkUtils.path(suname);
public CompletableFuture<Optional<NamespaceEphemeralData>> getOwnerAsync(NamespaceBundle suName) {
String path = ServiceUnitZkUtils.path(suName);

CompletableFuture<OwnedBundle> ownedBundleFuture = ownedBundlesCache.getIfPresent(path);
if (ownedBundleFuture != null) {
Expand All @@ -245,8 +245,8 @@ public CompletableFuture<Optional<NamespaceEphemeralData>> getOwnerAsync(Namespa
/**
* Method to get the current owner of the <code>ServiceUnit</code> or set the local broker as the owner if absent
*
* @param suId
* identifier of the <code>NamespaceBundle</code>
* @param bundle
* the <code>NamespaceBundle</code>
* @return The ephemeral node data showing the current ownership info in <code>ZooKeeper</code>
* @throws Exception
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,8 @@ private static final void cleanupSingleNamespaceNode(ZooKeeper zkc, String path,
*
* @param zkc
* the <code>ZooKeeper</code> connected session object
* @param nsname
* the name space name
* @param path
* the namespace path
* @param value
* the broker url that serves the name space.
* @return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ public Object[][] namespaceNameProvider() {
*
* </pre>
*
* @param topicName
* @throws Exception
*/
@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ public void testTlsSyncProducerAndConsumerCorrectBrokerHost() throws Exception {
}

/**
* This test verifies {@link DefaultHostnameVerifier} behavior and gives fair idea about host matching result
* This test verifies {@link TlsHostnameVerifier} behavior and gives fair idea about host matching result
*
* @throws Exception
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,6 @@ public void testMessageRateLimitingNotReceiveAllMessages(SubscriptionType subscr
/**
* It verifies that dispatch-rate throttling with cluster-configuration
*
* @param subscription
* @param dispatchRateType
* @throws Exception
*/
@Test()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,6 @@ public void testLoadManagerAssignmentForNonPersistentTestAssignment(String loadM
/**
* verifies: broker should reject non-persistent topic loading if broker is not enable for non-persistent topic
*
* @param loadManagerName
* @throws Exception
*/
@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ public long getStatsIntervalSeconds() {
* Set the interval between each stat info <i>(default: 60 seconds)</i> Stats will be activated with positive
* statsIntervalSeconds It should be set to at least 1 second
*
* @param statsIntervalSeconds
* @param statsInterval
* the interval between each stat info
* @param unit
* time unit for {@code statsInterval}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ public ConsumerConfiguration setSubscriptionInitialPosition(SubscriptionInitialP
}

/**
* @return the configured {@link subscriptionInitailPosition} for the consumer
* @return the configured {@link subscriptionInitialPosition} for the consumer
*/
public SubscriptionInitialPosition getSubscriptionInitialPosition(){
return conf.getSubscriptionInitialPosition();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1730,7 +1730,7 @@ CompletableFuture<Void> setDelayedDeliveryPolicyAsync(String topic
/**
* set inactive topic policies of a topic.
* @param topic
* @param maxNum
* @param inactiveTopicPolicies
* @throws PulsarAdminException
*/
void setInactiveTopicPolicies(String topic
Expand All @@ -1739,7 +1739,7 @@ void setInactiveTopicPolicies(String topic
/**
* set inactive topic policies of a topic asynchronously.
* @param topic
* @param maxNum
* @param inactiveTopicPolicies
* @return
*/
CompletableFuture<Void> setInactiveTopicPoliciesAsync(String topic, InactiveTopicPolicies inactiveTopicPolicies);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,7 @@ public void close() throws IOException {
/**
* Derive the host
*
* @param isBindOnLocalhost
* @return
* @return String containing the hostname
*/
public String host() {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@ public void testClientServerConnectionTls() throws Exception {
* creates ClientHandler channel to connect and communicate with server
*
* @param serviceUrl
* @param latch
* @param promise
* @param tls
* @return
* @throws URISyntaxException
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ public class Utils {
* Serialize record to flat-buffer. it's not a thread-safe method.
*
* @param record
* @param data
* @return
*/
public static ByteBuffer serializeRecordToFlatBuffer(Record<byte[]> record) {
Expand Down Expand Up @@ -167,8 +166,7 @@ private static int createEncryptionCtxOffset(final FlatBufferBuilder builder, Op
* Serializes sink-record into json format. It encodes encryption-keys, encryption-param and payload in base64
* format so, it can be sent in json.
*
* @param inputRecordContext
* @param data
* @param record
* @return
*/
public static String serializeRecordToJson(Record<byte[]> record) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ public boolean isDurableSubscription() {
* if subscription is not durable then it creates non-durable reader to start reading from the
* {@link #setNonDurableSubscriptionReadPosition(MessagePosition)} in topic.
*
* @param nonDurableSubscription
* @param durableSubscription
*/
public void setDurableSubscription(boolean durableSubscription) {
this.durableSubscription = durableSubscription;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public interface PulsarSpoutConsumer {
* Receives a single message.
*
* @param waitTime
* @param milliseconds
* @param unit
* @return
* @throws PulsarClientException
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ private SharedPulsarClient(String componentId, ClientConfigurationData clientCon
*
* @param componentId
* the id of the spout/bolt
* @param serviceUrl
* @param clientConf
* @return
* @throws PulsarClientException
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,6 @@ public CompletableFuture<Boolean> existsAsync(String path, Watcher watcher) {
*
* @param path
* @param deserializer
* @param stat
* @return
* @throws Exception
*/
Expand Down Expand Up @@ -314,7 +313,6 @@ public <T> CompletableFuture<Optional<T>> getDataAsync(final String path, final
* @param path
* @param watcher
* @param deserializer
* @param stat
* @return
* @throws Exception
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ enum SessionType {
/**
* Return a future yielding a connected ZooKeeper client
*
* @param conf
* @param serverList
* @param sessionType
* @param zkSessionTimeoutMillis
* @return
*/
CompletableFuture<ZooKeeper> create(String serverList, SessionType sessionType, int zkSessionTimeoutMillis);
Expand Down
2 changes: 1 addition & 1 deletion site2/docs/security-extending.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public interface AuthorizationProvider extends Closeable {
/**
* Perform initialization for the authorization provider
*
* @param config
* @param conf
* broker config object
* @param configCache
* pulsar zk configuration cache service
Expand Down

0 comments on commit 692a28e

Please sign in to comment.