Skip to content

Releases/v2025.12.0#35

Closed
craigpnnl wants to merge 18 commits into
masterfrom
releases/v2025.12.0
Closed

Releases/v2025.12.0#35
craigpnnl wants to merge 18 commits into
masterfrom
releases/v2025.12.0

Conversation

@craigpnnl
Copy link
Copy Markdown
Contributor

No description provided.

craigpnnl and others added 18 commits September 5, 2025 15:43
…lity

- Updated Gradle wrapper to version 8.10 in gradle-wrapper.properties.
- Modified .classpath files to include new source paths and updated JRE container to JavaSE-22.
- Updated bnd.bnd files to reflect new bundle versions and dependencies.
- Created build.gradle files for core, runner, itests, and testutil modules with necessary dependencies for JUnit 5, Mockito, and AssertJ.
- Refactored integration test classes to use JUnit 5 annotations and assertions.
- Updated various bundle versions across the project to SNAPSHOT versions for ongoing development.
- Changed imports in LoginService and LoginTestService to use Jakarta EE packages.
- Enhanced MultiReadHttpServletRequestWrapper to implement ReadListener interface.
- Simplified settings.gradle for better project structure and clarity.
- Updated bundle configurations to remove Felix DM annotations and replace them with OSGi DS annotations.
- Converted various components to use OSGi DS, including ClientServiceFactory, ExceptionLookup, and multiple security-related classes.
- Removed the Activator classes that were previously used for Felix DM and added service properties for OSGi DS.
- Adjusted service dependencies to use @reference annotations with appropriate cardinality and policies.
- Cleaned up code by removing unnecessary comments and unused imports.
- Deleted the PooledSqlServiceFactory class as part of the migration effort.
- Updated settings.gradle to note the need for Felix DM migration in integration tests.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…tency

- Updated HelloService.java to enhance code formatting and maintain consistency in comments.
- Refactored LoggedInFilter.java to improve readability and streamline token retrieval logic.
- Cleaned up LoginService.java and LoginTestService.java for better formatting and consistency.
- Enhanced MultiReadHttpServletRequestWrapper.java to improve readability and maintainability.
- Simplified XDomainFilter.java by improving formatting and consistency in method implementations.
- Refactored DataSourceObjectImpl.java and DataSourceRegistryImpl.java for better readability and consistency in logging.
- Improved HandlerRegistryImpl.java by enhancing code structure and readability.
- Updated PooledBasicDataSourceBuilderImpl.java to improve code clarity and maintainability.
- Enhanced HandlerRegistryImplTest.java for better readability and consistency in test structure.
…aintainability

- Updated LoginTestService to improve code formatting and structure.
- Refactored MultiReadHttpServletRequestWrapper for better clarity and consistency.
- Enhanced XDomainFilter for clearer CORS handling.
- Improved DataSourceObjectImpl and DataSourceRegistryImpl for better logging and structure.
- Refactored HandlerRegistryImpl to streamline request handling and improve readability.
- Updated PooledBasicDataSourceBuilderImpl for better property management and logging.
- Enhanced HandlerRegistryImplTest to improve test clarity and structure.
This change downgrades the project from JDK 22 to JDK 21 (LTS) for better
long-term support and compatibility. JDK 21 is the latest LTS release and
provides more stable support for production environments.

Changes:
- Update Gradle build configuration to target Java 21
- Update all .bnd files to use JavaSE-21 execution environment
- Update documentation to reflect JDK 21 requirements
- Update installation instructions across all documentation
- Maintain all dependency versions (they support both JDK 21 and 22)

Build and Runtime:
- Project builds successfully with OpenJDK 21.0.8
- All executable JARs run correctly with JDK 21
- Integration tests have existing OSGi classpath issues (not related to JDK version)

Documentation Updates:
- README.md: Updated JDK requirements and installation instructions
- DEVELOPER-SETUP.md: Updated IDE setup for JDK 21
- PRODUCTION-DEPLOYMENT.md: Updated deployment requirements for JDK 21
- QUICK-START.md: Updated quick start guide for JDK 21
- docs/README.md: Updated runtime requirements

The project now uses JDK 21 LTS, providing a stable foundation for both
development and production deployments while maintaining all modern Java
features and performance improvements.
- Created OSGiIntegrationTest.java to test OSGi environment detection, service lookup, configuration updates, and service registration.
- Implemented TestRunner.java for executing tests from the command line.
- Updated bnd.bnd files to include necessary dependencies for JUnit and Jakarta JMS.
- Added ClientServerTest.java to test ActiveMQ broker functionality with OpenWire and STOMP protocols.
- Refactored existing code to replace javax.jms imports with jakarta.jms for compatibility with Jakarta EE.
- Updated GossClient.java to streamline message handling for both OpenWire and STOMP protocols.
- Enhanced server implementation classes to utilize Jakarta JMS imports.
- Removed the old TestRunner.java file and replaced it with a new implementation.
- Added comprehensive integration tests for GOSS functionality, including BasicConnectionTest, CoreFunctionalityTest, GossEndToEndTest, GossOSGiEndToEndTest, and OSGiIntegrationTest.
- Updated .classpath to include test source directories and dependencies.
- Modified goss-core.bndrun to use JavaSE-21 and updated run bundles.
- Updated bnd.bnd and goss-client.bnd to change dependency versions for Apache Shiro and other libraries.
- Added a new META-INF/MANIFEST.MF file for JAXB implementation.
- Enhanced test coverage for client-server communication, including publish/subscribe patterns and multiple protocol support.
- Implemented service registration and configuration updates for OSGi environment tests.
…onents, including security, server API, and test utilities. Update bundle versions to reflect the latest changes across the project, ensuring compatibility and improved functionality. Notable updates include the addition of security-ldap and security-propertyfile modules, as well as enhancements in the runner and test utilities.
@craigpnnl
Copy link
Copy Markdown
Contributor Author

@copilot can you resolve the issues by accepting the incoming branch.

Copy link
Copy Markdown

Copilot AI commented Nov 21, 2025

@craig8 I've opened a new pull request, #36, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR migrates the GOSS core framework to version 2025.12.0 with significant modernization efforts including migration from Felix Dependency Manager to OSGi Declarative Services, upgrading from javax.* to jakarta.* namespace packages for JDK 22 compatibility, and test framework updates from JUnit 4 to JUnit 5.

Key Changes:

  • Simplified Gradle build configuration for JDK 22 compatibility
  • Complete migration from Felix DM annotations to OSGi DS (@component, @reference, @activate, @deactivate, @Modified)
  • Package namespace migration from javax.jms/javax.ws.rs to jakarta.jms/jakarta.ws.rs
  • Test framework upgrade to JUnit 5 with AssertJ assertions
  • STOMP client implementation replaced with OpenWire fallback approach
  • Code formatting standardization across all files

Reviewed changes

Copilot reviewed 152 out of 275 changed files in this pull request and generated 34 comments.

Show a summary per file
File Description
settings.gradle Simplified Gradle configuration, removed complex BND workspace logic for JDK 22 compatibility
HandlerRegistryImpl.java Migrated to OSGi DS with @reference annotations, updated to use ReferenceCardinality.MULTIPLE
DataSourceRegistryImpl.java Fixed parameter type in datasourceRemoved method (was AuthorizationHandler, now DataSourceObject)
PooledBasicDataSourceBuilderImpl.java Migrated to OSGi DS, added service attribute to @component
SecurityManagerRealmHandler.java Migrated to OSGi DS with dynamic reference policy
GossClient.java Removed STOMP JMS library dependencies, simplified to use OpenWire connection for STOMP protocol
HandlerRegistryImplTest.java Upgraded to JUnit 5 with AssertJ, added test for NullPointerException behavior
GridOpticsServer.java Migrated configuration from Dictionary to Map, updated @ConfigurationDependency to @Modified
PropertyBasedRealm.java Updated configuration handling from Dictionary to Map
XDomainFilter.java Fixed typo in comment ("optionss" → "options")
Default.java Fixed typo in starting() method output ("Startting" → "Starting")
Hello.java Fixed typo in stopping() method output ("servilt" → "servlet")
Commands.java Updated OSGi command registration from Felix DM property syntax to OSGi DS property syntax
Various security/client files Migrated from javax.jms to jakarta.jms across all JMS-related code
LoginTestService.java/LoginService.java Migrated from javax.ws.rs to jakarta.ws.rs
MultiReadHttpServletRequestWrapper.java Added required Servlet 3.1+ methods (isFinished, isReady, setReadListener)
*.bnd files Updated bundle versions to 2.0.0-SNAPSHOT or 3.0.0-SNAPSHOT
Comments suppressed due to low confidence (2)

pnnl.goss.core/src/pnnl/goss/core/DataError.java:63

  • This method overrides Error.getMessage; it is advisable to add an Override annotation.
    pnnl.goss.core/src/pnnl/goss/core/client/DefaultClientConsumer.java:84
  • This method overrides ClientConsumer.getMessageConsumer; it is advisable to add an Override annotation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

private boolean used;
private String trustStore;
private String trustStorePassword;
private List<Thread> threads = new ArrayList<Thread>();
Copy link

Copilot AI Nov 21, 2025

Choose a reason for hiding this comment

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

The contents of this container are never accessed.

Copilot uses AI. Check for mistakes.
public void datasourceRemoved(ServiceReference<DataSourceObject> ref) {
log.debug("Removing datasource: " + serviceRefMap.get(ref).getName());
DataSourceObject toRemove = serviceRefMap.remove(ref);
dataSourceMap.remove(toRemove);
Copy link

Copilot AI Nov 21, 2025

Choose a reason for hiding this comment

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

Actual argument type 'DataSourceObject' is incompatible with expected argument type 'String'.

Copilot uses AI. Check for mistakes.
RequestHandler handler = registeredHandlers.remove(ref);
System.out.println("Un-Registering Request Handler: " + handler.getClass().getName());
handler.getHandles().forEach((k, v) -> {
handlerMapping.remove(k);
Copy link

Copilot AI Nov 21, 2025

Choose a reason for hiding this comment

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

Actual argument type 'Class<? extends Request>' is incompatible with expected argument type 'String'.

Copilot uses AI. Check for mistakes.
try {
if (this.properties.isEmpty()) {
System.out.println("Reading configuration properties");
configProperties.load(new FileInputStream("conf" + File.separatorChar + "pnnl.goss.core.client.cfg"));
Copy link

Copilot AI Nov 21, 2025

Choose a reason for hiding this comment

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

This FileInputStream is not always closed on method exit.

Copilot uses AI. Check for mistakes.
try {
inputStream = request.getInputStream();
int bytesRead = -1;
BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
Copy link

Copilot AI Nov 21, 2025

Choose a reason for hiding this comment

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

This InputStreamReader is not always closed on method exit.

Copilot uses AI. Check for mistakes.
}

static class TestServiceImpl implements TestService {
public String getName() {
Copy link

Copilot AI Nov 21, 2025

Choose a reason for hiding this comment

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

This method overrides TestService.getName; it is advisable to add an Override annotation.

Copilot uses AI. Check for mistakes.
SystemException.wrap(e).set("topic", topic).set("message", message);

} finally {
if (clientConsumer != null) {
Copy link

Copilot AI Nov 21, 2025

Choose a reason for hiding this comment

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

This check is useless. clientConsumer cannot be null at this check, since new DefaultClientConsumer(...) always is non-null.

Copilot uses AI. Check for mistakes.
public void testSerializableResponses() {
// Verify that response objects are serializable
DataResponse dataResponse = new DataResponse("test");
assertTrue(dataResponse instanceof Serializable,
Copy link

Copilot AI Nov 21, 2025

Choose a reason for hiding this comment

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

There is no need to test whether an instance of DataResponse is also an instance of Serializable - it always is.

Copilot uses AI. Check for mistakes.
"DataResponse should be serializable");

ResponseError errorResponse = new ResponseError("error");
assertTrue(errorResponse instanceof Serializable,
Copy link

Copilot AI Nov 21, 2025

Choose a reason for hiding this comment

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

There is no need to test whether an instance of ResponseError is also an instance of Serializable - it always is.

Copilot uses AI. Check for mistakes.
"ResponseError should be serializable");

UploadResponse uploadResponse = new UploadResponse(true);
assertTrue(uploadResponse instanceof Serializable,
Copy link

Copilot AI Nov 21, 2025

Choose a reason for hiding this comment

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

There is no need to test whether an instance of UploadResponse is also an instance of Serializable - it always is.

Copilot uses AI. Check for mistakes.
@craigpnnl craigpnnl closed this Nov 21, 2025
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