Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
f49f1b4
Migrate to OpenMRS Core 3.0.0-SNAPSHOT
dkayiwa Feb 25, 2026
a3cbda7
Remove Java 8, 11, 17 from build matrix
dkayiwa Feb 25, 2026
59703a1
Add Java 25 to the build matrix
dkayiwa Feb 25, 2026
0aa0277
Fix admin page extension point links not displaying
dkayiwa Feb 26, 2026
c811111
Use apacheTomcatVersion property instead of inline version
dkayiwa Feb 26, 2026
862b58a
Clean up FieldAnswerResource1_8 imports for readability
dkayiwa Feb 26, 2026
6a92a36
Restore AdministrationSectionLinks Javadoc detail
dkayiwa Feb 26, 2026
7c94c18
Restore @Override on AdminSection.getLinks()
dkayiwa Feb 26, 2026
9922523
Restore original ConceptAttributeTypeController2_0Test handler class
dkayiwa Feb 26, 2026
b47b696
Extract helper method in ConceptStateConversionController2_0Test
dkayiwa Feb 26, 2026
66d6534
Un-ignore NameTemplate tests by registering templates in setUp
dkayiwa Feb 26, 2026
ff57098
Restore NAME_TEMPLATES_COUNT to 5, remove manual template registration
dkayiwa Feb 26, 2026
6c18f12
Move legacyui version to parent POM dependencyManagement
dkayiwa Feb 26, 2026
3568c7e
Remove unused DbSession getSession() and Hibernate 3 compatibility code
dkayiwa Feb 26, 2026
ce93bee
Remove unnecessary variable in DynamicBeanConfiguration
dkayiwa Feb 26, 2026
166dc42
Simplify setResponseStatus by removing redundant reason check
dkayiwa Feb 26, 2026
94c875f
Restore comments in NameTemplateController2_0Test
dkayiwa Feb 26, 2026
8c05542
Update legacyui-omod version to 3.0.0-SNAPSHOT
dkayiwa Feb 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
matrix:
platform: [ ubuntu-latest ]
java-version: [ 8, 11, 17, 21 ]
java-version: [ 21, 25 ]
fail-fast: false

runs-on: ${{ matrix.platform }}
Expand Down
12 changes: 6 additions & 6 deletions bamboo-specs/bamboo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ stages:
manual: false
final: false
jobs:
- Build and Test JDK 8
- Build and Test JDK 21
- Deploy:
manual: false
final: false
Expand All @@ -22,8 +22,8 @@ stages:
jobs:
- Release to Maven

Build and Test JDK 8:
key: BTJ8
Build and Test JDK 21:
key: BTJ21
tasks:
- checkout:
force-clean-build: 'false'
Expand All @@ -34,7 +34,7 @@ Build and Test JDK 8:
- |-
#!/bin/bash -eu
set -x
export IMAGE="maven:3.9.9-amazoncorretto-8"
export IMAGE="maven:3.9.9-amazoncorretto-21"
docker pull ${IMAGE}
docker run -v m2-repo:/root/.m2/repository -v ${PWD}:/module --rm -w="/module" ${IMAGE} bash -c 'mvn clean package && chmod -R 777 .'
description: Build and test
Expand Down Expand Up @@ -63,7 +63,7 @@ Deploy to Maven:
- |-
#!/bin/bash -eu
set -x
export IMAGE="maven:3.9.9-amazoncorretto-8"
export IMAGE="maven:3.9.9-amazoncorretto-21"
docker pull ${IMAGE}
docker run -v m2-repo:/root/.m2/repository -v ~/.m2/settings.xml:/.m2/settings.xml:ro -v ${PWD}:/module --rm -w="/module" ${IMAGE} bash -c 'mvn deploy -DskipTests --settings /.m2/settings.xml'
description: Deploy
Expand Down Expand Up @@ -97,7 +97,7 @@ Release to Maven:
- |-
#!/bin/bash -eu
set -x
export IMAGE="maven:3.9.9-amazoncorretto-8"
export IMAGE="maven:3.9.9-amazoncorretto-21"
docker pull ${IMAGE}
docker run \
-v m2-repo:/root/.m2/repository \
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.2</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<source>21</source>
<target>21</target>
</configuration>
</plugin>
<plugin>
Expand Down
2 changes: 1 addition & 1 deletion omod-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<dependencies>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>jasper</artifactId>
<artifactId>tomcat-jasper</artifactId>
<version>${apacheTomcatVersion}</version>
<scope>provided</scope>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
package org.openmrs.module.webservices.docs.swagger;

import com.fasterxml.jackson.annotation.JsonGetter;
import org.codehaus.jackson.annotate.JsonProperty;
import com.fasterxml.jackson.annotation.JsonProperty;

/* The object provides metadata about the API.*/
public class Info {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import com.fasterxml.jackson.annotation.JsonGetter;
import com.fasterxml.jackson.annotation.JsonSetter;
import org.codehaus.jackson.annotate.JsonProperty;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.ArrayList;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import io.swagger.models.properties.RefProperty;
import io.swagger.models.properties.StringProperty;
import io.swagger.util.Json;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.log4j.Level;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import org.openmrs.util.PrivilegeConstants;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.ServletContext;
import jakarta.servlet.ServletContext;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
import java.io.IOException;
import java.util.LinkedHashMap;

import org.codehaus.jackson.JsonParseException;
import org.codehaus.jackson.map.JsonMappingException;
import org.codehaus.jackson.map.ObjectMapper;
import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.openmrs.module.webservices.rest.util.SimpleObjectConverter;

import com.thoughtworks.xstream.annotations.XStreamAlias;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public HttpMessageConverter<?> getMappingJacksonHttpMessageConverter() throws Ex
clazz = Context.loadClass("org.springframework.http.converter.json.MappingJacksonHttpMessageConverter");
}

return (HttpMessageConverter<?>) clazz.newInstance();
return (HttpMessageConverter<?>) clazz.getDeclaredConstructor().newInstance();
}

/**
Expand Down Expand Up @@ -75,7 +75,7 @@ public AbstractHandlerExceptionResolver getHandlerExceptionResolver() throws Exc
Class<?> clazz = Context
.loadClass("org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerExceptionResolver");

bean = (AbstractHandlerExceptionResolver) clazz.newInstance();
bean = (AbstractHandlerExceptionResolver) clazz.getDeclaredConstructor().newInstance();

Method method = bean.getClass().getMethod("setMessageConverters", HttpMessageConverter[].class);
method.invoke(bean, new Object[] { new HttpMessageConverter[] { stringHttpMessageConverter,
Expand All @@ -85,7 +85,7 @@ public AbstractHandlerExceptionResolver getHandlerExceptionResolver() throws Exc
Class<?> clazz = Context
.loadClass("org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver");

bean = (AbstractHandlerExceptionResolver) clazz.newInstance();
bean = (AbstractHandlerExceptionResolver) clazz.getDeclaredConstructor().newInstance();

Method method = bean.getClass().getMethod("setMessageConverters", List.class);
method.invoke(bean, Arrays.asList(stringHttpMessageConverter,
Expand Down Expand Up @@ -115,6 +115,6 @@ public AbstractHandlerMapping getHandlerMapping() throws Exception {
clazz = Context.loadClass("org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping");
}

return (AbstractHandlerMapping) clazz.newInstance();
return (AbstractHandlerMapping) clazz.getDeclaredConstructor().newInstance();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/
package org.openmrs.module.webservices.rest.web;

import org.codehaus.jackson.annotate.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnore;

import com.thoughtworks.xstream.annotations.XStreamAlias;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
import java.net.URLEncoder;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

import org.openmrs.api.APIException;
import org.openmrs.module.webservices.rest.web.representation.DefaultRepresentation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/
package org.openmrs.module.webservices.rest.web;

import javax.annotation.PostConstruct;
import jakarta.annotation.PostConstruct;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
package org.openmrs.module.webservices.rest.web;

import org.apache.commons.beanutils.PropertyUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.exception.ExceptionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.exception.ExceptionUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.openmrs.GlobalProperty;
Expand All @@ -34,8 +34,8 @@
import org.springframework.web.bind.ServletRequestUtils;
import org.springframework.web.bind.annotation.ResponseStatus;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.IOException;
import java.net.InetAddress;
Expand Down Expand Up @@ -496,7 +496,7 @@ public static RequestContext getRequestContext(HttpServletRequest request, HttpS
* @param request the current http web request
* @param response the current http web response
* @return a {@link RequestContext} object filled with all the necessary values
* @see getRequestContext(javax.servlet.http.HttpServletRequest,
* @see getRequestContext(jakarta.servlet.http.HttpServletRequest,
* org.openmrs.module.webservices.rest.web.representation.Representation)
*/
public static RequestContext getRequestContext(HttpServletRequest request, HttpServletResponse response) {
Expand Down Expand Up @@ -552,11 +552,7 @@ public static Boolean getBooleanParam(HttpServletRequest request, String param)
public static void setResponseStatus(Throwable ex, HttpServletResponse response) {
ResponseStatus ann = ex.getClass().getAnnotation(ResponseStatus.class);
if (ann != null) {
if (StringUtils.isNotBlank(ann.reason())) {
Copy link
Member Author

Choose a reason for hiding this comment

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

The HttpServletResponse.setStatus(int, String) method (status code + reason phrase) was removed in Jakarta Servlet 6.0 (which Core 3.0 uses). Only setStatus(int) remains. The two-argument version was deprecated since Servlet 2.1 because HTTP/2 doesn't support custom reason phrases, and Jakarta finally removed it.

response.setStatus(ann.value().value(), ann.reason());
} else {
response.setStatus(ann.value().value());
}
response.setStatus(ann.value().value());
} else {
response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
}
Expand Down
Loading
Loading