Skip to content

Commit

Permalink
Small code cleanup (#3873)
Browse files Browse the repository at this point in the history
* Removes hyphens from JavaDoc parameters
* Fixes a few 'exists' grammar mistakes

Signed-off-by: Wouter Born <[email protected]>
  • Loading branch information
wborn authored Nov 15, 2023
1 parent 9ad2fef commit 7af0259
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ private PercentType getSinkMockVolume(PercentType initialVolume) throws IOExcept

/**
*
* @param param - either default source or default sink
* @param param either default source or default sink
*/
private void assertAddedParameterOption(String param, Locale locale) {
String id = "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public interface ModuleHandlerCallback {
*
* @param ruleUID UID of the {@link Rule}
* @return {@link RuleStatusInfo} object containing status of the looking {@link Rule} or null when a rule with
* specified UID does not exists.
* specified UID does not exist.
*/
@Nullable
RuleStatusInfo getStatusInfo(String ruleUID);
Expand All @@ -69,7 +69,7 @@ public interface ModuleHandlerCallback {
*
* @param ruleUID UID of the {@link Rule}
* @return {@link RuleStatus} object containing status of the looking {@link Rule} or null when a rule with
* specified UID does not exists.
* specified UID does not exist.
*/
@Nullable
RuleStatus getStatus(String ruleUID);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public interface RuleManager {
*
* @param ruleUID UID of the {@link Rule}
* @return {@link RuleStatusInfo} object containing status of the looking {@link Rule} or null when a rule with
* specified UID does not exists.
* specified UID does not exist.
*/
@Nullable
RuleStatusInfo getStatusInfo(String ruleUID);
Expand All @@ -73,7 +73,7 @@ public interface RuleManager {
*
* @param ruleUID UID of the {@link Rule}
* @return {@link RuleStatus} object containing status of the looking {@link Rule} or null when a rule with
* specified UID does not exists.
* specified UID does not exist.
*/
@Nullable
RuleStatus getStatus(String ruleUID);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1164,7 +1164,7 @@ private boolean calculateConditions(WrappedRule rule) {
}

/**
* This method evaluates actions of the {@link Rule} and set their {@link Output}s when they exists.
* This method evaluates actions of the {@link Rule} and set their {@link Output}s when they exist.
*
* @param rule executed rule.
*/
Expand Down Expand Up @@ -1207,7 +1207,7 @@ private void executeActions(WrappedRule rule, boolean stopOnFirstFail) {
* This method gets rule's status object.
*
* @param rUID rule's UID
* @return status of the rule or null when such rule does not exists.
* @return status of the rule or null when such rule does not exist.
*/
protected @Nullable RuleStatus getRuleStatus(String rUID) {
RuleStatusInfo info = getStatusInfo(rUID);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ class RulesJvmModelInferrer extends ScriptJvmModelInferrer {
/**
* Is called for each instance of the first argument's type contained in a resource.
*
* @param ruleModel - the model to create one or more JvmDeclaredTypes from.
* @param acceptor - each created JvmDeclaredType without a container should be passed to the acceptor in order get attached to the
* @param ruleModel the model to create one or more JvmDeclaredTypes from.
* @param acceptor each created JvmDeclaredType without a container should be passed to the acceptor in order get attached to the
* current resource.
* @param isPreIndexingPhase - whether the method is called in a pre linking phase, i.e. when the global index isn't fully updated. You
* must not rely on linking using the index if iPrelinkingPhase is <code>true</code>
* @param isPreIndexingPhase whether the method is called in a pre linking phase, i.e. when the global index isn't fully updated. You
* must not rely on linking using the index if isPreIndexingPhase is <code>true</code>
*/
def dispatch void infer(RuleModel ruleModel, IJvmDeclaredTypeAcceptor acceptor, boolean isPreIndexingPhase) {
val className = ruleModel.eResource.URI.lastSegment.split("\\.").head.toFirstUpper + "Rules"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ class ScriptJvmModelInferrer extends AbstractModelInferrer {
/**
* Is called for each instance of the first argument's type contained in a resource.
*
* @param script - the model to create one or more JvmDeclaredTypes from.
* @param acceptor - each created JvmDeclaredType without a container should be passed to the acceptor in order get attached to the
* @param script the model to create one or more JvmDeclaredTypes from.
* @param acceptor each created JvmDeclaredType without a container should be passed to the acceptor in order get attached to the
* current resource.
* @param isPreIndexingPhase - whether the method is called in a pre linking phase, i.e. when the global index isn't fully updated. You
* must not rely on linking using the index if iPrelinkingPhase is <code>true</code>
* @param isPreIndexingPhase whether the method is called in a pre linking phase, i.e. when the global index isn't fully updated. You
* must not rely on linking using the index if isPreIndexingPhase is <code>true</code>
*/
def dispatch void infer(Script script, IJvmDeclaredTypeAcceptor acceptor, boolean isPreIndexingPhase) {
val className = script.eResource.URI.lastSegment.split("\\.").head.toFirstUpper + "Script"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public interface SemanticTagRegistry extends Registry<SemanticTag, String> {
* Checks if a tag with a given id can be added to the registry.
*
* To be added, no tag with this id must already exist in the registry, the tag name extracted from this id
* must have a valid syntax, the parent tag extracted from this id must already exists in the registry and
* must have a valid syntax, the parent tag extracted from this id must already exist in the registry and
* should be either a default semantic tag or a managed semantic tag, and no tag with a same name must already
* exist in the registry.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public void updateConfiguration(ThingUID thingUID, Map<String, Object> configura
throw new IllegalStateException("Thing with UID " + thingUID + " has no handler attached.");
}
} else {
throw new IllegalArgumentException("Thing with UID " + thingUID + " does not exists.");
throw new IllegalArgumentException("Thing with UID " + thingUID + " does not exist.");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public Collection<E> getAll() {
return oldElement;
}
} else {
logger.warn("Could not update element with key {} in {}, because it does not exists.", key,
logger.warn("Could not update element with key {} in {}, because it does not exist.", key,
this.getClass().getSimpleName());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public void modified(WatchServiceConfiguration config) throws IOException {
closeWatcherAndUnregister();

if (!Files.exists(basePath)) {
logger.info("Watch directory '{}' does not exists. Trying to create it.", basePath);
logger.info("Watch directory '{}' does not exist. Trying to create it.", basePath);
Files.createDirectories(basePath);
}

Expand Down

0 comments on commit 7af0259

Please sign in to comment.