Skip to content

Commit 0fe6e8d

Browse files
committed
chore: address Checkstyle markers
1 parent 2cc62c0 commit 0fe6e8d

File tree

59 files changed

+233
-27
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+233
-27
lines changed

com.avaloq.tools.ddk.check.core/src/com/avaloq/tools/ddk/check/validation/UniquenessJavaValidationHelper.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ public UniquenessJavaValidationHelper(final Function<T, QualifiedName> nameFunct
4848
* provides the feature of the duplicate object on which to anchor the marker
4949
* @param issueCode
5050
* the issue code
51+
* @throws IllegalArgumentException
52+
* if acceptor is null
5153
*/
5254
public void warnOnDuplicates(final Iterable<T> possiblyDuplicateObjects, final Function<T, EStructuralFeature> featureProvider, final String issueCode) {
5355
if (acceptor == null) {
@@ -75,6 +77,8 @@ public void warnOnDuplicates(final Iterable<T> possiblyDuplicateObjects, final F
7577
* provides the feature of the duplicate object on which to anchor the marker
7678
* @param issueCode
7779
* the issue code
80+
* @throws IllegalArgumentException
81+
* if acceptor is null
7882
*/
7983
public void errorOnDuplicates(final Iterable<T> possiblyDuplicateObjects, final Function<T, EStructuralFeature> featureProvider, final String issueCode) {
8084
if (acceptor == null) {

com.avaloq.tools.ddk.check.core/src/com/avaloq/tools/ddk/check/validation/UniquenessValidationHelper.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,11 @@ public class UniquenessValidationHelper<T extends EObject> {
3636

3737
/**
3838
* Creates a Uniqueness validation helper.
39-
*
39+
*
4040
* @param nameFunction
4141
* a function that returns a representation of a T object that can be compared by means of equals
42+
* @throws IllegalArgumentException
43+
* if nameFunction is null
4244
*/
4345
public UniquenessValidationHelper(final Function<T, QualifiedName> nameFunction) {
4446
if (nameFunction == null) {

com.avaloq.tools.ddk.check.runtime.core/src/com/avaloq/tools/ddk/check/runtime/issue/ValidationMessageAcceptorMixin.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,8 @@ default Diagnostic createDiagnostic(final Severity severity, final String messag
145145
* @param severity
146146
* the issue severity
147147
* @return the numeric value representing a severity
148+
* @throws IllegalArgumentException
149+
* if the severity is unknown
148150
*/
149151
static int toDiagnosticSeverity(final Severity severity) {
150152
return switch (severity) {

com.avaloq.tools.ddk.check.runtime.core/src/com/avaloq/tools/ddk/check/runtime/quickfix/BadLocationException.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ public BadLocationException(final String message) {
4343

4444
/**
4545
* Creates a new bad location exception.
46-
*
47-
* @param exception
46+
*
47+
* @param wrappedException
4848
* the cause for the exception
4949
*/
5050
public BadLocationException(final Exception wrappedException) {

com.avaloq.tools.ddk.check.runtime.core/src/com/avaloq/tools/ddk/check/runtime/validation/AbstractCheckValidator.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,16 @@ public Iterable<? extends ICheckValidatorImpl> getValidators(final Map<Object, O
6969

7070
/**
7171
* Internal collect validators.
72-
*
72+
*
7373
* @param language
7474
* the language
7575
* @param object
7676
* the object to be validated
7777
* @return the iterable
78+
* @throws IllegalArgumentException
79+
* if language is null
7880
*/
81+
@SuppressWarnings("PMD.UnusedFormalParameter")
7982
protected Iterable<? extends ICheckValidatorImpl> internalCollectValidators(final String language, final EObject object) {
8083
if (language == null) {
8184
throw new IllegalArgumentException("Input language cannot be null"); //$NON-NLS-1$

com.avaloq.tools.ddk.check.ui/src/com/avaloq/tools/ddk/check/ui/builder/CheckExtensionGenerator.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -485,12 +485,15 @@ public boolean saveOpenEditor() {
485485

486486
/**
487487
* Merges the {@code MANIFEST.MF} file with new plug-in dependencies. Adds dependencies as returned by
488+
* {@link com.avaloq.tools.ddk.check.util.GrammarHelper#getRequiredBundleSymbolicNames()} of current
489+
* check catalog to the MANIFEST.MF file.
488490
*
489491
* @param catalog
490492
* check catalog
491493
* @param monitor
492-
* progress monitor {@link com.avaloq.tools.ddk.check.util.GrammarHelper#getRequiredBundleSymbolicNames()} of current
493-
* check catalog to the MANIFEST.MF file.
494+
* progress monitor
495+
* @throws WrappedException
496+
* if an IOException or CoreException occurs during manifest modification
494497
*/
495498
private void mergeManifest(final CheckCatalog catalog, final IProgressMonitor monitor) {
496499
final IProject project = RuntimeProjectUtil.getProject(catalog.eResource().getURI(), mapper);

com.avaloq.tools.ddk.check.ui/src/com/avaloq/tools/ddk/check/ui/builder/util/CheckProjectHelper.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,8 @@ public CheckCatalog getCatalog(final IBuildContext context, final URI uri) {
187187
* @param className
188188
* the class name, must not be {@code null}
189189
* @return whether the corresponding java file exists in the project
190+
* @throws IllegalArgumentException
191+
* if the class name is simple or not a valid class name
190192
*/
191193
public boolean isJavaFilePresent(final IProject project, final String className) {
192194
int packageSplitIndex = className.lastIndexOf('.');

com.avaloq.tools.ddk.check.ui/src/com/avaloq/tools/ddk/check/ui/labeling/CheckLabelProvider.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ public String text(final Category category) {
9191
* any catalog
9292
* @return a graphical representation of the catalog
9393
*/
94+
@SuppressWarnings("PMD.UnusedFormalParameter")
9495
public Image image(final CheckCatalog catalog) {
9596
return images.forCheckCatalog();
9697
}
@@ -102,6 +103,7 @@ public Image image(final CheckCatalog catalog) {
102103
* any category
103104
* @return a graphical representation of the category
104105
*/
106+
@SuppressWarnings("PMD.UnusedFormalParameter")
105107
public Image image(final Category category) {
106108
return images.forCategory();
107109
}
@@ -124,39 +126,43 @@ public Image image(final Check check) {
124126
* any context
125127
* @return a graphical representation of the context
126128
*/
129+
@SuppressWarnings("PMD.UnusedFormalParameter")
127130
public Image image(final Context context) {
128131
return images.forContext();
129132
}
130133

131134
/**
132135
* An image for member labels.
133-
*
136+
*
134137
* @param context
135138
* any context
136139
* @return a graphical representation of the context
137140
*/
141+
@SuppressWarnings("PMD.UnusedFormalParameter")
138142
public Image image(final Member context) {
139143
return images.getJdtImage(xbaseImages.forField(JvmVisibility.PRIVATE, 0));
140144
}
141145

142146
/**
143147
* An image for member labels.
144-
*
148+
*
145149
* @param context
146150
* any context
147151
* @return a graphical representation of the context
148152
*/
153+
@SuppressWarnings("PMD.UnusedFormalParameter")
149154
public Image image(final ContextVariable context) {
150155
return images.getJdtImage(xbaseImages.forLocalVariable(0));
151156
}
152157

153158
/**
154159
* An image for member labels.
155-
*
160+
*
156161
* @param context
157162
* any context
158163
* @return a graphical representation of the context
159164
*/
165+
@SuppressWarnings("PMD.UnusedFormalParameter")
160166
public Image image(final FormalParameter context) {
161167
return images.getJdtImage(xbaseImages.forLocalVariable(0));
162168
}

com.avaloq.tools.ddk.check.ui/src/com/avaloq/tools/ddk/check/ui/popup/actions/DeployJob.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,12 @@ private static class DeployException extends Exception {
418418
DeployException() {
419419
}
420420

421-
/** Constructor with cause exception. */
421+
/**
422+
* Constructor with cause exception.
423+
*
424+
* @param e
425+
* the cause exception
426+
*/
422427
DeployException(final Exception e) {
423428
super(e);
424429
}

com.avaloq.tools.ddk.check.ui/src/com/avaloq/tools/ddk/check/ui/util/FieldInitializerUtil.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ public class FieldInitializerUtil {
4545
* @param selection
4646
* the selection
4747
* @return the selected resource
48+
* @throws RuntimeException
49+
* if a Java model exception occurs
4850
*/
4951
public IJavaElement getSelectedResource(final IStructuredSelection selection) {
5052
IJavaElement elem = null;

0 commit comments

Comments
 (0)