Skip to content

Commit 7b96367

Browse files
committed
Fix some more javadoc error and warnings (#396)
- fix some reference errors - simplify constructor
1 parent 640b646 commit 7b96367

File tree

11 files changed

+17
-20
lines changed

11 files changed

+17
-20
lines changed

metafacture-commons/src/main/java/org/metafacture/commons/TimeUtil.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ private TimeUtil() {
4040
}
4141

4242
/**
43-
* Formats a duration to human readable abbrevations. See {@link TimeUtilTest}
44-
* how to use it.
43+
* Formats a duration to human readable abbrevations.
4544
*
4645
* @param duration a long value of the duration
4746
* @return a human readable format of the duration

metafacture-html/src/main/java/org/metafacture/html/HtmlDecoder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ private boolean handleAttributeValuesAsSubfields(final StreamReceiver receiver,
124124
}
125125

126126
/**
127-
* Sets attribute values as subfields. If the value(s) start with an `&` they
127+
* Sets attribute values as subfields. If the value(s) start with an `&` they
128128
* are appended to {@link #DEFAULT_ATTR_VALS_AS_SUBFIELDS}.
129129
*
130130
* @param mapString the attributes to be added as subfields

metafacture-triples/src/main/java/org/metafacture/triples/SortedTripleFileFacade.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public final class SortedTripleFileFacade {
4242
* file.
4343
*
4444
* @param file the File to load a Triple from
45-
* @throws IOException
45+
* @throws IOException if Triple can't be loaded
4646
*/
4747
public SortedTripleFileFacade(final File file) throws IOException {
4848
this.file = file;
@@ -66,7 +66,7 @@ private void next() throws IOException {
6666
}
6767

6868
/**
69-
* Closes the {@link #ObjectInputStream} and deletes the {@value #file} it if it
69+
* Closes the {@link ObjectInputStream} and deletes the {@link #file} it if it
7070
* exists.
7171
*/
7272
public void close() {
@@ -97,7 +97,7 @@ public Triple peek() {
9797
* Pops a Triple from the stack.
9898
*
9999
* @return the Triple at the top of the stack.
100-
* @throws IOException
100+
* @throws IOException if the Triple can't be loaded
101101
*/
102102
public Triple pop() throws IOException {
103103
final Triple nextTriple = peek();

metafacture-yaml/src/main/java/org/metafacture/yaml/YamlDecoder.java

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,12 @@ public final class YamlDecoder extends DefaultObjectPipe<String, StreamReceiver>
5656
private final YAMLFactory yamlFactory = new YAMLFactory();
5757

5858
private YAMLParser yamlParser;
59-
private String arrayMarker;
60-
private String arrayName;
61-
private String recordId;
59+
private String arrayMarker = DEFAULT_ARRAY_MARKER;
60+
private String arrayName = DEFAULT_ARRAY_NAME;
61+
private String recordId = DEFAULT_RECORD_ID;
6262
private int recordCount;
6363

6464
public YamlDecoder() {
65-
setArrayMarker(DEFAULT_ARRAY_MARKER);
66-
setArrayName(DEFAULT_ARRAY_NAME);
67-
setRecordId(DEFAULT_RECORD_ID);
68-
69-
resetRecordCount();
7065
}
7166

7267
public void setArrayMarker(final String arrayMarker) {

metafacture-yaml/src/main/java/org/metafacture/yaml/YamlEncoder.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ public final class YamlEncoder extends DefaultStreamPipe<ObjectReceiver<String>>
6363

6464
private String arrayMarker = ARRAY_MARKER;
6565

66+
/**
67+
* Constructs a YamlEncoder if no IOException occurs.
68+
*/
6669
public YamlEncoder() {
6770
try {
6871
yamlGenerator = new YAMLFactory().createGenerator(writer);

metamorph-api/src/main/java/org/metafacture/metamorph/api/helpers/AbstractFunction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public final String getMapName() {
5050
}
5151

5252
/**
53-
* Gets the {@value #localMap} or a Map with the name of {@value #mapName}.
53+
* Gets the {@link #localMap} or a Map with the name of {@link #mapName}.
5454
*
5555
* @return the Map
5656
*/

metamorph-test/src/main/java/org/metafacture/metamorph/test/MetamorphTestSuite.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public final class MetamorphTestSuite extends ParentRunner<Runner> {
4545
* to a class.
4646
*
4747
* @param suiteRoot the {@code @TestClass}
48-
* @throws InitializationError
48+
* @throws InitializationError if definitions couldn't be loaded
4949
*/
5050
public MetamorphTestSuite(final Class<?> suiteRoot)
5151
throws InitializationError {

metamorph-test/src/main/java/org/metafacture/metamorph/test/reader/MultiFormatReader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public MultiFormatReader(final String format) {
3636
}
3737

3838
/**
39-
* Sets the format of {@value #currentReader} if the {@value #READER_FACTORY}
39+
* Sets the format of {@link #currentReader} if the {@link #READER_FACTORY}
4040
* contains that format.
4141
*
4242
* @param format the format

metamorph/src/main/java/org/metafacture/metamorph/functions/Case.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public void setTo(final String string) {
5959
}
6060

6161
/**
62-
* Sets the language if it's present in {@value #SUPPORTED_LANGUAGES}.
62+
* Sets the language if it's present in {@link #LANGUAGES}.
6363
*
6464
* @param language the language
6565
*/

metamorph/src/main/java/org/metafacture/metamorph/functions/DateFormat.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ public final void setRemoveLeadingZeros(final boolean removeLeadingZeros) {
179179
}
180180

181181
/**
182-
* Sets the language if it's present in {@value #SUPPORTED_LANGUAGES}.
182+
* Sets the language if it's present in {@link #SUPPORTED_LANGUAGES}.
183183
*
184184
* @param language the language
185185
*/

0 commit comments

Comments
 (0)