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

Fix build warnings #511

Merged

Conversation

ngeorges-cnrs
Copy link
Contributor

This patch fixes all build warnings under Intellij+Maven with java21. No functional change.

- Remove deprecated PathMatchConfigurer. setUseSuffixPatternMatch(false) is now the default in Spring, cf https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/web/servlet/config/annotation/PathMatchConfigurer.html#isUseSuffixPatternMatch()).
- Replace deprecated ReaderInputStream with ReaderInputStream.builder()
- Replace deprecated XMLReaderFactory with SAXParserFactory
- Replace deprecated Integer(string) with Integer.parseInt(string)
- Replace deprecated URL() constructor with URI().toURL()
- Replace deprecated string-based Runtime.getRuntime().exec() with its
  array-based variant
- Add @SuppressWarnings("unchecked") in all places with an "unchecked"
  warning. This is not ideal but we lack of a better alternative.
- Remove useless import ParserConfigurationException *2
- Remove useless onChanged handler in vip-application StatsTab.java
  (no-op method, was causing a PMD warning in CI)
- Replace unchecked suppression with better alternative in
  PublicApplicationListIT.java
- Throw ParserConfigurationException in GwendiaTemplateTest.java
Remove unchecked suppression by:
- Replacing JakartaServletFileUpload with JakartaServletDiskFileUpload
- Replaceing FileItem with DiskFileItem
And also replace the iterator by a for loop.
@ngeorges-cnrs
Copy link
Contributor Author

@axlbonnet :
All comments on this PR should be OK with today's commits 35ba563 and d144186, except for two removable unchecked suppressions :

@axlbonnet axlbonnet merged commit a509927 into virtual-imaging-platform:develop Dec 11, 2024
3 checks passed
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.

2 participants