Skip to content

Commit e8cc8d1

Browse files
committed
Fix some checkstyle violations
This fixes the checkstyle violations that only have a small number of occurrences: * wrong Javadoc see tag * not commented throws javadoc tags * tabs versus space
1 parent c8104d8 commit e8cc8d1

File tree

8 files changed

+21
-24
lines changed

8 files changed

+21
-24
lines changed

net.sf.eclipsecs.core/src/net/sf/eclipsecs/core/builder/Auditor.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -416,10 +416,8 @@ public void cleanup() {
416416
* the audit error
417417
* @param markerAttributes
418418
* the marker attributes
419-
* @throws CoreException
420419
*/
421-
private void calculateMarkerOffset(AuditEvent error, Map<String, Object> markerAttributes)
422-
throws CoreException {
420+
private void calculateMarkerOffset(AuditEvent error, Map<String, Object> markerAttributes) {
423421

424422
// lazy create the document for the current file
425423
if (mDocument == null) {

net.sf.eclipsecs.core/src/net/sf/eclipsecs/core/config/CheckstyleConfigurationFile.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public void setModificationStamp(long modificationStamp) {
124124
* Returns the resolved URL of the Checkstyle configuration file. Clients are expected to
125125
* <b>not</b> use this to access the underlying Checkstyle configuration file
126126
*
127-
* @return the resolved URL.
127+
* @return the resolved URL
128128
*/
129129
public URL getResolvedConfigFileURL() {
130130
return mResolvedConfigFileURL;

net.sf.eclipsecs.core/src/net/sf/eclipsecs/core/config/configtypes/ConfigurationType.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ protected byte[] getAdditionPropertiesBundleBytes(URL checkConfigURL) {
197197
* @throws IOException
198198
* error creating the property resolver
199199
* @throws URISyntaxException
200+
* if configuration file URL cannot be resolved
200201
*/
201202
protected PropertyResolver getPropertyResolver(ICheckConfiguration config,
202203
CheckstyleConfigurationFile configFile) throws IOException, URISyntaxException {

net.sf.eclipsecs.core/src/net/sf/eclipsecs/core/projectconfig/filters/FilesOlderThanOneDayFilter.java

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,22 @@
44

55
public class FilesOlderThanOneDayFilter extends AbstractFilter {
66

7-
private static final long MILLIS_IN_24_HOURS = 1000 * 60 * 60 * 24;
7+
private static final long MILLIS_IN_24_HOURS = 1000 * 60 * 60 * 24;
88

9-
@Override
10-
public boolean accept(Object o) {
11-
boolean goesThrough = true;
9+
@Override
10+
public boolean accept(Object o) {
11+
boolean goesThrough = true;
1212

13-
if (o instanceof IFile) {
14-
IFile file = (IFile) o;
15-
if ((System.currentTimeMillis() - file.getLocalTimeStamp()) < MILLIS_IN_24_HOURS) {
16-
goesThrough = true;
17-
} else {
18-
goesThrough = false;
19-
}
20-
}
13+
if (o instanceof IFile) {
14+
IFile file = (IFile) o;
15+
if ((System.currentTimeMillis() - file.getLocalTimeStamp()) < MILLIS_IN_24_HOURS) {
16+
goesThrough = true;
17+
} else {
18+
goesThrough = false;
19+
}
20+
}
2121

22-
return goesThrough;
23-
}
22+
return goesThrough;
23+
}
2424

2525
}

net.sf.eclipsecs.ui/src/net/sf/eclipsecs/ui/properties/filter/CheckFileOnOpenPartListener.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
* PartListener implementation that listens for opening editor parts and runs Checkstyle on the
7070
* opened file if the UnOpenedFileFilter is active.
7171
*
72-
* @see https://sourceforge.net/p/eclipse-cs/feature-requests/93/
72+
* @see <a href="https://sourceforge.net/p/eclipse-cs/feature-requests/93/">feature request</a>
7373
* @author Lars Ködderitzsch
7474
*/
7575
public class CheckFileOnOpenPartListener implements IPartListener2 {

net.sf.eclipsecs.ui/src/net/sf/eclipsecs/ui/properties/marker/CheckstyleMarkerPropertyTester.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public boolean test(Object receiver, String property, Object[] args, Object expe
2323
} catch (CoreException e) {
2424
CheckstyleLog.log(e);
2525
}
26-
26+
2727
return false;
2828
}
2929

net.sf.eclipsecs.ui/src/net/sf/eclipsecs/ui/quickfixes/coding/SimplifyBooleanReturnQuickfix.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,14 @@
5252
/**
5353
* Quickfix implementation which simplifies a boolean if/return statement. It transforms an if
5454
* statement like
55-
*
5655
* <pre>
5756
* if (condition) {
5857
* return true;
5958
* } else {
6059
* return false;
6160
* }
6261
* </pre>
63-
*
6462
* into a return statement like
65-
*
6663
* <pre>
6764
* return condition;
6865
* </pre>
@@ -72,7 +69,7 @@
7269
public class SimplifyBooleanReturnQuickfix extends AbstractASTResolution {
7370

7471
/**
75-
* If the condition is of one of these expression types, the parantheses are not necessary when
72+
* If the condition is of one of these expression types, the parentheses are not necessary when
7673
* negated. I.e the replacement can be written as <code>!condition</code> instead of
7774
* <code>!(condition)</code>.
7875
*/

net.sf.eclipsecs.ui/src/net/sf/eclipsecs/ui/stats/views/internal/CheckstyleMarkerFilter.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,7 @@ public void resetState() {
466466
* @param mon
467467
* the progress monitor
468468
* @throws CoreException
469+
* if the resource does not exist or the project is not open
469470
*/
470471
private List<IMarker> findCheckstyleMarkers(IResource[] resources, int depth, IProgressMonitor mon)
471472
throws CoreException {

0 commit comments

Comments
 (0)