Skip to content

Conversation

@lm-sousa
Copy link
Member

NOT TO BE MERGED. FOR REVIEW PURPOSES ONLY. THIS IS PART OF A STACKED DIFF.

joaobispo and others added 30 commits August 18, 2025 22:07
Fix null handling and improve error messages in ClassMap, ClassSet, FunctionClassMap, and MultiFunction
Implement null supplier validation in Lazy and LazyString classes
Implement null checks and improve error handling in XML classes
Fix null input handling and improve validation in RegisterUtils methods
Refactor and enhance utility classes with improved validation and error handling

- AverageType.java: Added checks for null and empty collections, improved handling for geometric mean and harmonic mean calculations, and introduced a safe method for large datasets.
- BufferedStringBuilder.java: Implemented validation for null output files and added null handling in append method.
- BuilderWithIndentation.java: Added validation for null tab strings and strings in add and addLines methods.
- CachedItems.java: Enhanced thread safety with atomic counters for cache hits and misses, and validated mapper function in constructor.
- ClassMapper.java: Added validation for null classes in add and map methods.
- JarPath.java: Improved error handling for invalid paths with logging.
- LineStream.java: Added null check before storing lines.
- NullStringBuilder.java: Updated constructor to avoid validation for null file.
- PersistenceFormat.java: Added validation for null file and class parameters in read and write methods.
- ScheduledLinesBuilder.java: Fixed maxLevel calculation to ensure all levels are shown.
- StringList.java: Updated split method to preserve empty strings.
- HeapBar.java: Improved event handling for timer cancellation.
- MemProgressBarUpdater.java: Added validation for null JProgressBar in constructor.
- AverageTypeTest.java: Updated tests to reflect changes in AverageType behavior and fixed assertions.
- BufferedStringBuilderTest.java: Updated tests to check for proper exception handling and null handling.
- BuilderWithIndentationTest.java: Updated tests to validate null inputs and expected behavior for empty strings.
- CachedItemsTest.java: Enhanced tests for thread safety and race conditions.
- ClassMapperTest.java: Updated tests to validate null inputs and interface hierarchy support.
- PersistenceFormatTest.java: Updated tests to validate null file and class parameters.
- ScheduledLinesBuilderTest.java: Updated tests to validate correct output for scheduled lines.
- StringListTest.java: Updated tests to validate correct handling of split behavior.
- MemProgressBarUpdaterTest.java: Updated tests to validate exception handling for null JProgressBar.
Enhance null handling across provider framework

- Updated CachedStringProvider to use Optional.ofNullable for null values.
- Modified GenericFileResourceProvider to validate target folder and throw IllegalArgumentException for null.
- Added null checks in StringProvider factory methods and Resources constructor.
- Updated tests to ensure null values are handled correctly and exceptions are thrown as expected.
Enhance MapModel to validate indices and support row-wise updates
Refactor tests to improve exception handling and assertions

- Updated InputModeTest to validate null extensions and folder levels, ensuring IllegalArgumentException is thrown with clear messages instead of NullPointerException.
- Modified JobProgressTest to ensure that exceeding job counts handles gracefully without throwing exceptions.
- Adjusted JobTest to confirm that the interrupted flag is properly propagated when execution throws an exception, returning 0 instead of -1.
- Revised JobUtilsTest to reflect the correct behavior of job execution and interruption handling, ensuring jobs with exceptions stop execution as expected and that empty extensions return an empty list.
…ions to indicate that certain issues are not bugs, but rather expected behaviors that require test adjustments.
Fix null handling in ParserResult and update StringParser trim behavior assertions
Enhance timeout handling in ChannelConsumer: handle negative timeouts as zero and cap extreme values to prevent overflow. Update tests to validate these behaviors.
Refactor OutputType enum and ProcessOutputAsString class for correct output handling and null management
Fix range calculation and handle empty header in CsvWriter
…racking and add clearCache method for test isolation. Update XmlNode to return text content from document element. Adjust PrintOnceTest for new cache clearing method and improve concurrent message verification. Fix XmlDocumentTest comment regarding valid XML.
- Replaced instances of SpecsCheck.checkNotNull with Objects.requireNonNull in various classes to standardize null checks.
- Updated methods in AsmFieldData, DeployUtils, EsprimaComment, EsprimaNode, SpecsCollections, SpecsIo, SpecsStrings, and several others.
- Improved code readability and consistency by utilizing Java's built-in null-checking mechanism.
…opposed to tabs. Also checked for commented code.
…ot of listeners and logging exceptions without propagation; update tests to demonstrate unsafe notifier behavior with null events.
…nterface for consistency and improved error handling
… readLine() and handle null reader input safely; update StreamCatcherTest to validate output length accurately.
lm-sousa and others added 15 commits December 25, 2025 20:46
…ed the Z3Helper project as it was deprecated.

All code was deleted because it was unused or deprecated.
- Updated multiple instances across various classes to replace SpecsLogs.getLogger().warning with SpecsLogs.warn for improved readability and consistency in logging practices.
- This change enhances the clarity of log messages throughout the codebase, ensuring a uniform approach to logging warnings.
…ode'

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
…on StackOverflow code and are still in use in private projects.

This partially reverts commit d476eee.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants