Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
skublik committed Mar 29, 2022
2 parents 03c03da + 5792e46 commit ab1db56
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 4 deletions.
24 changes: 23 additions & 1 deletion dist/src/main/bin/midpoint.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

setlocal

if "%MIDPOINT_PORT%" == "" (
set MIDPOINT_PORT=8080
)

if "%1" == "start" goto doStart
if "%1" == "stop" goto doStop

Expand Down Expand Up @@ -44,6 +48,10 @@ call "%MIDPOINT_HOME%\setenv.bat"

:noSetEnvMpHome

if "%MIDPOINT_PORT%" NEQ "8080" (
set JAVA_OPTS=%JAVA_OPTS% -Dserver.port=%MIDPOINT_PORT%
)

echo Using MIDPOINT_HOME: "%MIDPOINT_HOME%"

if not exist "%LIB_DIR%\midpoint.war" (
Expand Down Expand Up @@ -76,7 +84,21 @@ goto end

:doStop

set MIDPOINT_PORT=8080
if not exist "%BIN_DIR%setenv.bat" goto :noSetEnvStop
echo Applying %BIN_DIR%setenv.bat
echo.

call "%BIN_DIR%setenv.bat"

:noSetEnvStop

if not exist "%MIDPOINT_HOME%\setenv.bat" goto :noSetEnvMpHomeStop
echo Applying %MIDPOINT_HOME%\setenv.bat
echo.

call "%MIDPOINT_HOME%\setenv.bat"

:noSetEnvMpHomeStop

echo Trying to find and stop a process listening on port %MIDPOINT_PORT%...
set MIDPOINT_FOUND=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import java.util.ArrayList;
import java.util.List;

import com.evolveum.midpoint.schema.util.cases.CaseTypeUtil;
import com.evolveum.midpoint.schema.util.cases.WorkItemTypeUtil;

import org.apache.commons.lang3.StringUtils;
Expand Down Expand Up @@ -65,7 +66,7 @@ public class PageCaseWorkItem extends PageAdminCaseWorkItems {
private static final String ID_BACK_BUTTON = "backButton";

private final LoadableModel<CaseWorkItemType> caseWorkItemModel;
private final PageParameters pageParameters;
private PageParameters pageParameters;

private LoadableModel<CaseType> caseModel;
private WorkItemId workItemId;
Expand Down Expand Up @@ -253,4 +254,14 @@ protected PrismObject<UserType> getPowerDonor() {
}
return null;
}

public PageParameters getPageParameters() {
if (pageParameters == null || StringUtils.isEmpty(pageParameters.get(OnePageParameterEncoder.PARAMETER).toString())) {
pageParameters = new PageParameters();
CaseWorkItemType workItem = caseWorkItemModel.getObject();
CaseType parentCase = CaseTypeUtil.getCase(workItem);
pageParameters.add(OnePageParameterEncoder.PARAMETER, WorkItemId.createWorkItemId(parentCase.getOid(), workItem.getId()));
}
return pageParameters;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -313,9 +313,9 @@ public void test900HeapUsage() throws Exception {
int count = 400;

// 50 is the default "step" in paged iterative search, so we can expect we always have 50 objects in memory
// And "times 3" is the safety margin. It might or might not be sufficient, as System.gc() is not guaranteed to
// And "times 4" is the safety margin. It might or might not be sufficient, as System.gc() is not guaranteed to
// really execute the garbage collection (only suggests JVM to do it).
long tolerance = (50 * size) * 3;
long tolerance = (50 * size) * 4;

showMemory("Initial");
dumpHeap("initial");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -842,6 +842,7 @@ public void test150WorkBucketsReplace() throws Exception {

TaskType task = new TaskType()
.name("test150")
.taskIdentifier("test150")
.beginActivityState()
.beginActivity()
.beginBucketing()
Expand Down

0 comments on commit ab1db56

Please sign in to comment.