Skip to content

MatParam: code cleanup + javadoc#2521

Closed
capdevon wants to merge 8 commits into
jMonkeyEngine:masterfrom
capdevon:capdevon-MatParam2
Closed

MatParam: code cleanup + javadoc#2521
capdevon wants to merge 8 commits into
jMonkeyEngine:masterfrom
capdevon:capdevon-MatParam2

Conversation

@capdevon
Copy link
Copy Markdown
Contributor

@capdevon capdevon commented Jun 24, 2025

This PR enhances the MatParam class by introducing stricter type checking when setting values, encapsulating type validation logic, and improving code readability and maintainability.

It adds a dedicated validateValueType method, updates the equals method for clarity and correctness using Objects.equals, and refines JavaDoc comments throughout the class.

Additionally, variable naming is clarified, redundant or commented-out code is cleaned up, and direct field access (e.g., v2.x instead of v2.getX()) is used for conciseness.

These changes aim to make the codebase more robust and easier to maintain.

Edit:
Fix #2523

Comment thread jme3-core/src/main/java/com/jme3/material/MatParam.java Outdated
@codex128 codex128 added the Refactoring and Cleanup This PR is all about improving code quality and javadoc. label Aug 14, 2025
@codex128 codex128 closed this Dec 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Refactoring and Cleanup This PR is all about improving code quality and javadoc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MatParam: Design Flaw: getValueAsString() returning null leads to misleading output in toString()

3 participants