Skip to content

Commit

Permalink
Merge pull request #3 from sunbiz/master
Browse files Browse the repository at this point in the history
openmrs formatter fixes files
  • Loading branch information
Michael Downey committed Aug 17, 2012
2 parents cf21662 + 46e8148 commit 884d131
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions api/src/main/java/org/openmrs/util/OpenmrsSecurityManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ public Class<?> getCallerClass(int callStackDepth) {
int skipClasses = 1;
Class<?>[] classContext = getClassContext();
for (Class<?> clazz : classContext) {
if (SecurityManager.class.isAssignableFrom(clazz)) {
skipClasses++;
} else {
break;
}
}
if (SecurityManager.class.isAssignableFrom(clazz)) {
skipClasses++;
} else {
break;
}
}

//Adjust the depth so that "0" is the not this "getCallerClass" method
return getClassContext()[callStackDepth + skipClasses];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ public void validate(Object obj, Errors errors) {
}

//state should belong to one of the workflows in the program
// note that we are iterating over getAllWorkflows() here because we want to include
// retired workflows, and the workflows variable does not include retired workflows
// note that we are iterating over getAllWorkflows() here because we want to include
// retired workflows, and the workflows variable does not include retired workflows
boolean isValidPatientState = false;
for (ProgramWorkflow wf : patientProgram.getProgram().getAllWorkflows()) {
if (wf.getStates().contains(patientState.getState())) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,8 @@ public void validate_shouldFailIfThereIsMoreThanOneStateWithANullStartDateInTheS

/**
* @see {@link PatientProgramValidator#validate(Object,Errors)}
* this test is to specifically validate fix for https://tickets.openmrs.org/browse/TRUNK-3670
*/
* this test is to specifically validate fix for https://tickets.openmrs.org/browse/TRUNK-3670
*/
@Test
@Verifies(value = "should not fail if a non-voided patient state is associated with a retired workflow", method = "validate(Object,Errors)")
public void validate_shouldNotFailIfPatientStateIsInRetiredWorkflow() throws Exception {
Expand Down

0 comments on commit 884d131

Please sign in to comment.