Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: address IntelliJ QAPlug plugin findings #5149

Merged
merged 35 commits into from
Nov 11, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
aa6ca30
qa: make final fields static
jdrueckert Oct 22, 2023
1a53322
qa: remove unnecessary local before return
jdrueckert Oct 22, 2023
db4f626
qa: avoid instanceof checks in catch clause
jdrueckert Oct 22, 2023
e3d80fb
qa: method/constructor should not throw java.lang.Exception
jdrueckert Oct 22, 2023
f22c1fa
qa: instanceof check covers null check
jdrueckert Oct 22, 2023
9d7204b
qa: avoid toString on String objects
jdrueckert Oct 22, 2023
993b370
qa: remove overrides that only call their super
jdrueckert Oct 22, 2023
315ef35
qa: remove unused private methods
jdrueckert Oct 22, 2023
3c5d507
qa: if statement nesting not necessary
jdrueckert Oct 22, 2023
df3539a
qa: remove unused local variable
jdrueckert Oct 22, 2023
b0ec929
qa: close resources after use
jdrueckert Oct 22, 2023
06c5fcf
qa: use equals() to compare object references
jdrueckert Oct 22, 2023
3428369
Merge branch 'develop' into chore/qaplug-findings
jdrueckert Oct 27, 2023
a3f8fbc
fix: reintroduce override, needed to elevate access modifier
jdrueckert Oct 27, 2023
760a174
fix: exception type in override
jdrueckert Oct 27, 2023
f067ba2
chore: replace invalid javadoc character with unicode representation
jdrueckert Oct 27, 2023
077d488
javadoc: fix broken references
jdrueckert Oct 28, 2023
6a816ed
javadoc: fix disallowed self-closing and empty elements
jdrueckert Oct 28, 2023
a27bd8e
javadoc: fix invalid uses of @param and @return
jdrueckert Oct 28, 2023
c93ad63
javadoc: fix bad use of symbols
jdrueckert Oct 28, 2023
ad27ad0
javadoc: fix disallowed list item tag without surrounding list
jdrueckert Oct 28, 2023
cce1a8b
javadoc: fix erroneous tags
jdrueckert Oct 28, 2023
45e6571
javadoc: fix more references
jdrueckert Oct 28, 2023
35c2bc3
javadoc: fix emphasize tags
jdrueckert Oct 28, 2023
60a41a5
chore: fix missing javadoc errors
jdrueckert Oct 28, 2023
3d13e1f
javadoc: fix @see
jdrueckert Oct 29, 2023
848947e
checkstyle: remove illegal throws
jdrueckert Oct 30, 2023
f585450
checkstyle: remove unused imports
jdrueckert Oct 30, 2023
01e8edd
refactor: replace explicit close with try-with-resources
jdrueckert Oct 30, 2023
b841271
revert: removal of unused param from AbstractFamily constructor
jdrueckert Oct 30, 2023
2aad50f
revert: close zip Filesystem
jdrueckert Oct 30, 2023
49725fa
revert: removing required zip.close
jdrueckert Oct 30, 2023
bf26781
Merge branch 'develop' into chore/qaplug-findings
jdrueckert Oct 31, 2023
971c853
Merge branch 'develop' into chore/qaplug-findings
jdrueckert Nov 6, 2023
08bd7ea
Merge branch 'develop' into chore/qaplug-findings
jdrueckert Nov 11, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public float getNewValue() {
/**
* The scaling factor determined by the quotient of new and old value.
* <p>
* This is guaranteed to be greater zero (> 0).
* This is guaranteed to be greater than 0.
*/
public float getFactor() {
return newValue / oldValue;
Expand Down
6 changes: 3 additions & 3 deletions engine/src/main/java/org/terasology/engine/math/Rotation.java
Original file line number Diff line number Diff line change
Expand Up @@ -207,16 +207,16 @@ public int hashCode() {
}

/**
* Returns all possible rotations for each yaw, pitch & roll combination, including duplicates.
* Returns all possible rotations for each yaw, pitch &amp; roll combination, including duplicates.
*
* @return All possible rotations for each yaw, pitch & roll combination.
* @return All possible rotations for each yaw, pitch &amp; roll combination.
*/
public static Iterable<Rotation> allValues() {
return Arrays.asList(ALL_ROTATIONS);
}

/**
* Returns only unique rotations, in respect to transformations, rather than in respect to yaw, pitch & roll.
* Returns only unique rotations, in respect to transformations, rather than in respect to yaw, pitch &amp; roll.
*
* @return Unique rotations, in respect to transformations.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,12 @@ public class ParticleEmitterComponent implements Component<ParticleEmitterCompon
public transient ParticlePool particlePool;

/**
* Maps Generator component -> Function that processes that Generator
* Maps Generator component Function that processes that Generator
*/
public final Map<Component, GeneratorFunction> generatorFunctionMap = new LinkedHashMap<>();

/**
* Maps Affector component -> Function that processes that Affector
* Maps Affector component Function that processes that Affector
*/
public final Map<Component, AffectorFunction> affectorFunctionMap = new LinkedHashMap<>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@

/**
* The main NUI editor screen.
* Contains file selection, editing & preview widgets.
* Contains file selection, editing &amp; preview widgets.
*/
@SuppressWarnings("unchecked")
public final class NUIEditorScreen extends AbstractEditorScreen {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,16 +113,16 @@ public static String getNextGameName() {
* game.
*
* <pre>
* 1. "Game" -> "Game"
* 2. "Game" -> "Game 1"
* 3. "Game 1" -> "Game 2"
Comment on lines -116 to -118
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not even here (in <pre>)? 😔 Maybe needs another {@code ... or so, never understood how that really works...

* 1. "Game" "Game"
* 2. "Game" "Game 1"
* 3. "Game 1" "Game 2"
* </pre>
* <p>
* When incrementing the number the currently highest number is incremented by one (i.e., "gaps" are not filled).
*
* <pre>
* 1. "Gooey 3" -> "Gooey 3"
* 2. "Gooey" -> "Gooey 4"
* 1. "Gooey 3" "Gooey 3"
* 2. "Gooey" "Gooey 4"
* </pre>
*
* @param gameName will to use as game prefix, if saves contains this game name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ public NumberedGameName(String namePrefix, Optional<Integer> number) {
* </pre>
* These examples will be parsed as follows:
* <pre>
* "Gooey's 1st Game" -> ("Gooey's 1st Game", None)
* "Gooey 42" -> ("Gooey", Optional(42))
* "42" -> ("42", None)
* "Gooey's 1st Game" ("Gooey's 1st Game", None)
* "Gooey 42" ("Gooey", Optional(42))
* "42" ("42", None)
* </pre>
* <p>
* The input string will be trimmed before matching.
Expand Down Expand Up @@ -70,9 +70,9 @@ static NumberedGameName fromString(String fullName) {
* the name prefix will be returned.
*
* <pre>
* ("Gooey's 1st Game", None) -> "Gooey's 1st Game"
* ("Gooey", Optional(42)) -> "Gooey 42"
* ("42", None) -> "42"
* ("Gooey's 1st Game", None) "Gooey's 1st Game"
* ("Gooey", Optional(42)) "Gooey 42"
* ("42", None) "42"
* </pre>
*
* @return a textual representation of the numbered game version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

/**
* All telemetry fields should have this annotation.
* {@link org.terasology.engine.telemetry.metrics.Metric} finds all the telemetry fields & values via this annotation.
* {@link org.terasology.engine.telemetry.metrics.Metric} finds all telemetry fields and values via this annotation.
*/
@API
@Target(ElementType.FIELD)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,8 @@ default Vector2i getSize(Vector2i dest) {
/**
* Set the size of the block area from the minimum corner.
*
* @param x the x coordinate to set the size; must be > 0
* @param y the y coordinate to set the size; must be > 0
* @param x the x coordinate to set the size; must be greater than 0
* @param y the y coordinate to set the size; must be greater than 0
* @param dest destination; will hold the result
* @return {@code dest} (after modification)
* @throws IllegalArgumentException if the size is smaller than or equal to 0 in any dimension
Expand All @@ -246,7 +246,7 @@ default Vector2i getSize(Vector2i dest) {
/**
* Set the size of the block area from the minimum corner.
*
* @param size the size to set; all dimensions must be > 0
* @param size the size to set; all dimensions must be greater than 0
* @param dest destination; will hold the result
* @return {@code dest} (after modification)
* @throws IllegalArgumentException if the size is smaller than or equal to 0 in any dimension
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,9 @@ default Vector3i getSize(Vector3i dest) {
/**
* Set the size of the block region from the minimum corner.
*
* @param x the x coordinate to set the size; must be > 0
* @param y the y coordinate to set the size; must be > 0
* @param z the z coordinate to set the size; must be >
* @param x the x coordinate to set the size; must be greater than 0
* @param y the y coordinate to set the size; must be greater than 0
* @param z the z coordinate to set the size; must be greater than 0
* @param dest destination; will hold the result
* @return {@code dest} (after modification)
* @throws IllegalArgumentException if the size is smaller than or equal to 0 in any dimension
Expand All @@ -292,7 +292,7 @@ default Vector3i getSize(Vector3i dest) {
/**
* Set the size of the block region from the minimum corner.
*
* @param size the size to set; all dimensions must be > 0
* @param size the size to set; all dimensions must be greater than 0
* @param dest destination; will hold the result
* @return {@code dest} (after modification)
* @throws IllegalArgumentException if the size is smaller than or equal to 0 in any dimension
Expand Down