Skip to content

Commit 1ba1aa8

Browse files
committed
Merge branch 'consistent-documentation'
2 parents 0c2b065 + a6e47d7 commit 1ba1aa8

File tree

13 files changed

+26
-18
lines changed

13 files changed

+26
-18
lines changed

CONTRIBUTING.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@ of the AuthMe Discord server.
2020

2121
No sweat if some points aren't met since they can be addressed in pull requests, and PRs can be squashed.
2222

23+
### Glossary
24+
25+
Try to use and write terms consistently. Some spellings:
26+
27+
- ConfigMe
28+
- Javadoc (always capitalized)
29+
- _no-arg constructor_ (not "zero-arg(s)")
30+
2331
## Code style
2432

2533
Please try to match the current code style. A few pointers:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# ConfigMe
22
[![Build Status](https://github.com/AuthMe/ConfigMe/actions/workflows/maven_jdk8.yml/badge.svg)](https://github.com/AuthMe/ConfigMe/actions?query=branch%3Amaster)
33
[![Coverage Status](https://coveralls.io/repos/github/AuthMe/ConfigMe/badge.svg?branch=master)](https://coveralls.io/github/AuthMe/ConfigMe?branch=master)
4-
[![Javadocs](https://www.javadoc.io/badge/ch.jalu/configme.svg)](https://www.javadoc.io/doc/ch.jalu/configme)
4+
[![Javadoc](https://www.javadoc.io/badge/ch.jalu/configme.svg)](https://www.javadoc.io/doc/ch.jalu/configme)
55
[![MegaLinter](https://github.com/AuthMe/ConfigMe/workflows/MegaLinter/badge.svg?branch=master)](https://github.com/AuthMe/ConfigMe/actions?query=workflow%3AMegaLinter+branch%3Amaster)
66

77
A simple configuration management library with YAML support out of the box.

src/main/java/ch/jalu/configme/SettingsHolder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* of {@link ch.jalu.configme.properties.Property} type in a class
1111
* which implements this interface.
1212
* <p>
13-
* Classes implementing this interface must have a no-args constructor (any visibility).
13+
* Classes implementing this interface must have a no-arg constructor (any visibility).
1414
*
1515
* @see ch.jalu.configme.properties.PropertyInitializer
1616
* @see ch.jalu.configme.configurationdata.ConfigurationDataBuilder

src/main/java/ch/jalu/configme/beanmapper/Mapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import org.jetbrains.annotations.Nullable;
77

88
/**
9-
* Maps the values of a property reader to Java classes (referred to as beans). See the JavaDoc on the default
9+
* Maps the values of a property reader to Java classes (referred to as beans). See the Javadoc on the default
1010
* implementation, {@link MapperImpl}, for more details.
1111
*/
1212
public interface Mapper {

src/main/java/ch/jalu/configme/configurationdata/ConfigurationDataBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ protected void collectSectionComments(@NotNull Class<? extends SettingsHolder> c
181181
ReflectionHelper.setAccessibleIfNeeded(constructor);
182182
return constructor.newInstance();
183183
} catch (NoSuchMethodException e) {
184-
throw new ConfigMeException("Expected no-args constructor to be available for " + clazz, e);
184+
throw new ConfigMeException("Expected no-arg constructor to be available for " + clazz, e);
185185
} catch (IllegalAccessException | InstantiationException | InvocationTargetException e) {
186186
throw new ConfigMeException("Could not create instance of " + clazz, e);
187187
}

src/main/java/ch/jalu/configme/configurationdata/PropertyListBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public void add(@NotNull Property<?> property) {
4646

4747
/**
4848
* Creates a list of properties that have been added, by insertion order but grouped by path parents
49-
* (see class JavaDoc).
49+
* (see class Javadoc).
5050
*
5151
* @return ordered list of registered properties
5252
*/

src/main/java/ch/jalu/configme/properties/convertresult/ConvertErrorRecorder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public class ConvertErrorRecorder {
1919
private boolean hasError;
2020

2121
/**
22-
* Registers that some error occurred during the conversion of the value. See class javadoc: no need to register
22+
* Registers that some error occurred during the conversion of the value. See class Javadoc: no need to register
2323
* an error if the return value of the conversion implies there is an issue (such as returning null).
2424
*
2525
* @param reason the reason (not used in this implementation but may be extended for debugging)

src/main/java/ch/jalu/configme/utils/SettingsHolderClassValidator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public void validateSettingsHolderClassesFinal(@NotNull Iterable<Class<? extends
141141

142142
/**
143143
* Throws an exception if any of the provided setting holder classes does not have a single private
144-
* no-args constructor.
144+
* no-arg constructor.
145145
*
146146
* @param settingHolders the classes to check
147147
*/
@@ -156,7 +156,7 @@ public void validateClassesHaveHiddenNoArgConstructor(
156156
}
157157

158158
if (!invalidClasses.isEmpty()) {
159-
throw new IllegalStateException("The following classes do not have a single no-args private constructor:"
159+
throw new IllegalStateException("The following classes do not have a single no-arg private constructor:"
160160
+ "\n- " + String.join("\n- ", invalidClasses));
161161
}
162162
}

src/test/java/ch/jalu/configme/configurationdata/ConfigurationDataBuilderTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ void shouldGetAllProperties() {
6161
void shouldHandleSettingsHolderConstructorIssues() {
6262
ConfigMeException ex;
6363

64-
// Missing no-args constructor
64+
// Missing no-arg constructor
6565
ex = assertThrows(ConfigMeException.class,
66-
() -> ConfigurationDataBuilder.createConfiguration(IllegalSettingsHolderConstructorClasses.MissingNoArgsConstructor.class));
67-
assertThat(ex.getMessage(), startsWith("Expected no-args constructor to be available for class "));
66+
() -> ConfigurationDataBuilder.createConfiguration(IllegalSettingsHolderConstructorClasses.MissingNoArgConstructor.class));
67+
assertThat(ex.getMessage(), startsWith("Expected no-arg constructor to be available for class "));
6868

6969
// Constructor throws exception
7070
ex = assertThrows(ConfigMeException.class,
@@ -79,7 +79,7 @@ void shouldHandleSettingsHolderConstructorIssues() {
7979
// Class is interface
8080
ex = assertThrows(ConfigMeException.class,
8181
() -> ConfigurationDataBuilder.createConfiguration(IllegalSettingsHolderConstructorClasses.InterfaceSettingsHolder.class));
82-
assertThat(ex.getMessage(), startsWith("Expected no-args constructor to be available for interface "));
82+
assertThat(ex.getMessage(), startsWith("Expected no-arg constructor to be available for interface "));
8383
}
8484

8585
@Test

src/test/java/ch/jalu/configme/configurationdata/samples/IllegalSettingsHolderConstructorClasses.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ private IllegalSettingsHolderConstructorClasses() {
1212
}
1313

1414
/**
15-
* Class doesn't have a no-args constructor.
15+
* Class doesn't have a no-arg constructor.
1616
*/
17-
public final static class MissingNoArgsConstructor implements SettingsHolder {
17+
public final static class MissingNoArgConstructor implements SettingsHolder {
1818

19-
MissingNoArgsConstructor(String str) {
19+
MissingNoArgConstructor(String str) {
2020
}
2121
}
2222

0 commit comments

Comments
 (0)