-
Notifications
You must be signed in to change notification settings - Fork 4
Feature/update java version to 17 lts #211
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit removes outdated or redundant properties in pom.xml, updates the Java version to 17 and hard-codes versions for each dependency in pom.xml directly, rather than referencing them as properties. This was done to improve readability and maintainability of the file. Additionally, the Java version on the GitHub workflows has been updated to align with the version in pom.xml, and unnecessary workflow steps have been removed. The commit also introduces a NonRetryCancellationToken class for non-cancellable tasks.
This commit removes outdated or redundant properties in pom.xml, updates the Java version to 17 and hard-codes versions for each dependency in pom.xml directly, rather than referencing them as properties. This was done to improve readability and maintainability of the file. Additionally, the Java version on the GitHub workflows has been updated to align with the version in pom.xml, and unnecessary workflow steps have been removed. The commit also introduces a NonRetryCancellationToken class for non-cancellable tasks.
This commit updates the JAX-RS dependency in pom.xml from javax.ws.rs-api 2.1.1 to jakarta.ws.rs-api 3.1.0. This shift was necessary as we are aligning our project with the Jakarta EE platform, following the transition from Java EE to Jakarta EE. Also, we ensure to use the most up-to-date and maintained version to avail better support and features.
The changes were required due to the deprecation of JavaEE in favour of JakartaEE. The restful Web services are now using updated libraries which led to code adaptation for API changes. Additionally, the Kotlin dependencies were upgraded from version 1.3.71 to 1.9.0. Code reformatting was done for better readability and maintainability following the project's coding standards.
The onboarding parameters and responses were adjusted based on new device and sensor alternate IDs, and the registration code was also amended. Moreover, the request factory was refactored to enhance the keystore creation method by taking into account certificate type. This results in a cleaner implementation of the SSL/TLS client configuration step.
Refined the request factory to improve the keystore creation by considering the certificate type. Also, adjusted onboarding parameters and responses based on new device and sensor alternate IDs and amended registration code. This results in more straightforward implementation of SSL/TLS client configuration.
Removed redundant dependency 'org.glassfish.jersey.inject:jersey-hk2' from pom.xml. Refactored the createClient methods in RequestFactory.java to exclude unnecessary try-with-resources statements because the Client instance does not need to be closed immediately. Improved the legibility by adjusting spacing and indentation in KeyStoreCreationService.java.
Reformatted the code according to the standard conventions for better readability. Adjusted the indentation and spacing in various classes. Removed unused imports, and reorganized the order of the imports. This change does not affect the program's semantics or its performance.
Deleted two unused Kotlin files "MessageConfirmationRequest.kt" and "MessageSendingResult.kt" from the codebase. These files are no longer needed as part of the agrirouter API and their removal simplifies the codebase structure.
The CouldNotFetchCookiesException, CouldNotGetRegistrationCodeException, and CouldNotOffboardVirtualCommunicationUnitException classes have been removed. These specific exception handling classes were no longer needed or used in the codebase.
Removed the RegistrationCodeResponse class in the agrirouter-sdk-java-api package, as it has become obsolete. Also, removed an unnecessary semicolon in the RevokeRequest class and added a "SuppressWarnings" annotation to the Production class.
Removed the redundant constructor from the CouldNotCreateMqttOptionException class in the agrirouter-sdk-java-api package. This simplifies error handling as it was unnecessary to have two ways of constructing these exceptions.
Removed the unnecessary default constructor in the IllegalParameterDefinitionException class within the agrirouter-sdk-java-api package. This change streamlines the creation of
…y using a more appropriate function (`entries.find` instead of `RevokeResponse.values().find`) to find values within the RevokeResponse enumeration.
The client ID now correctly retrieves the value from the connection criteria's getClientId method, instead of using the deviceAlternateId. This ensures that the correct client ID is used when creating a new MqttClient, improving the accuracy and consistency of the application's behavior.
Removed unnecessary semicolons after the instantiation of Authentication and ConnectionCriteria in RouterDevice. Also, added a suppress warning annotation for an unused variable, improving the cleanliness of the code.
Added @SuppressWarnings("unused") annotation to UtcTimeService class to mark variables that are declared but not used. This helps in improving the tidiness and readability of the code.
Added @SuppressWarnings("unused") annotation in the RevokingService class and refactored the ContentReader class by modifying readRawData method. These changes enhance the code readability and maintainability.
Added @Suppress("unused") to the hasError method in AuthorizationResponse class. This change mitigates warning messages in the development environment about the function not being used.
Several "unused" warnings across the project are addressed by adding @SuppressWarnings("unused") annotations. This change aims to achieve a cleaner and less noisy console during development, making it easier to spot relevant issues.
Added '@SuppressWarnings("unused")' annotations to several classes and interfaces throughout the project. These additions help reduce console noise during development, facilitating easier identification of significant warnings or issues.
Added '@SuppressWarnings("unused")' to various classes and interfaces to reduce console clutter during development. The refactor also included switching from explicit to implicit type declaration (using 'var') in the MqttOptionService class for improved code readability.
Reduced warning messages by adding '@SuppressWarnings("unused")' on class MessageQueryServiceImpl. Also improved code readability by switching to implicit type declaration using 'var' for MessageQueryParameters.
…ability Added '@SuppressWarnings("unused")' annotation to CloudOnboardingServiceImpl class to reduce warning messages. Further enhanced code readability by adopting 'var' for implicit type declarations, especially for encodedMessage, sendMessageParameters, messageAsJson, and payload.
…ility Added '@SuppressWarnings("unused")' to suppress unnecessary warnings in the CloudOffboardingServiceImpl class. Also implemented the use of 'var' for a more clear and concise representation of variable types. This helps in both reducing verbosity and enhancing code readability.
…readability Added '@SuppressWarnings("unused")' to suppress superfluous warnings in the SetSubscriptionServiceImpl and SetCapabilityServiceImpl classes. Also, shifted to 'var' keyword for declaring variables to enhance readability. These modifications decrease verbosity and improve code comprehension.
Implemented the '@SuppressWarnings("unused")' annotation and switched to the 'var' keyword for variable declaration in the ListEndpointsServiceImpl class. These changes aim to suppress unneeded warnings and streamline
Unused imports have been removed from several classes and tests. This cleanup is intended to improve code readability and maintainability by eliminating unnecessary lines of code.
The code has been revised to use the `var` keyword to enhance code legibility in various Java classes. Additionally, several fields in `AbstractIntegrationTest.java` have been marked as `final` to enhance code immutability and reduce the chance of unexpected mutation.
The code updates involve the use of 'var' keyword to declare local variables in multiple Java files. This change increases the readability of the code and ensures type inference for local variables, reducing unnecessary verbosity. Furthermore, fields in `AbstractIntegrationTest.java` were finalized to limit mutation.
Deleted the unused import java.io.UnsupportedEncodingException in AuthorizationRequestServiceImpl.java file. It keeps the code clean and readable by avoiding unnecessary classes or packages.
Multiple unused imports across various files in the application have been removed. This enhances code readability and decreases the possibility of potential conflicts from unnecessary classes or packages. Files affected include encoding classes, messaging classes, test classes, and others.
The CertificationTypeNotSupportedException in the RequestFactory.java file, and a method call transform from Collectors class in SendAndReceiveChunkedMessagesTest.java are removed. These changes contribute to a more readable and maintainable codebase by reducing unnecessary complexity and avoiding potential issues that might arise from unutilized classes or methods.
Several changes were made to improve code quality and maintainability. In some cases, enhancements involved removing unnecessary complexity or transforming variables to use Kotlin's more concise syntax. Moreover, warnings were addressed by adding `@Suppress("unused")` annotations to prevent potential issues from unutilized classes or methods.
This commit primarily removes unused imports and suppresses resource warnings in various Java classes. Simultaneously, minor grammar mistakes are corrected in the README file. Updating these details collectively improves the code readability and the documentation.
Unused warnings have been suppressed in multiple classes across the SDK to clean up the output. The test in SendAndReceiveChunkedMessagesTest.java has been refactored to improve clarity. The adjustments enhance the code quality and maintainability.
The version of the Agrirouter SDK Java has been updated from 2.3.0 to 3.0.0 in all related modules. This significant version change includes new features, improvements, and bug fixes, warranting the version increment to ensure consistency across all SDK components.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.