@@ -704,7 +704,7 @@ private int getApproximateAgeInYears() {
704704 Date birthDate = calcBirthDateValue ();
705705 if (birthDate != null ) {
706706 Pair <Integer , ApproximateAgeType > pair =
707- ApproximateAgeHelper .getApproximateAge (birthDate , (Date ) getFieldGroup ().getField (PersonDto .DEATH_DATE ).getValue ());
707+ ApproximateAgeHelper .getApproximateAge (birthDate , (Date ) getFieldGroup ().getField (PersonDto .DEATH_DATE ).getValue ());
708708 if ((pair .getElement0 () != null ) && (pair .getElement1 () == ApproximateAgeType .YEARS )) {
709709 return pair .getElement0 ();
710710 }
@@ -715,7 +715,7 @@ private int getApproximateAgeInYears() {
715715 private void onEmancipatedChange () {
716716 boolean isEmancipatedChecked = (isEmancipated != null ) && (isEmancipated .getValue ());
717717 hasGuardian .setValue (!isEmancipatedChecked );
718- if (isEmancipatedChecked ) {
718+ if (isEmancipatedChecked ) {
719719 nameOfGuardians .setValue ("" );
720720 }
721721 updateHasGuardianCheckBox (isEmancipatedChecked );
@@ -728,7 +728,7 @@ private void updateLegalGuardianSection(boolean isInitialized) {
728728 boolean canBeEmancipated = personCanBeEmancipated (approximateAge , isEmancipatedChecked );
729729 isEmancipated .setVisible (!isIncapacitatedChecked && canBeEmancipated );
730730 hasGuardian .setValue (isIncapacitatedChecked || approximateAge < minimumAdultAge );
731- if (getApproximateAgeInYears () < minimumAdultAge ) {
731+ if (getApproximateAgeInYears () < minimumAdultAge ) {
732732 nameOfGuardians .setValue (getValue ().getNamesOfGuardians ());
733733 }
734734 updateHasGuardianCheckBox (false );
@@ -737,14 +737,14 @@ private void updateLegalGuardianSection(boolean isInitialized) {
737737
738738 private boolean personCanBeEmancipated (int approximateAge , boolean change ) {
739739 boolean canBeEmancipated ;
740- if (approximateAge == -1 && (approximateAgeField ).getValue () != null ) {
740+ if (approximateAge == -1 && (approximateAgeField ).getValue () != null ) {
741741 canBeEmancipated = false ;
742742 } else {
743743 canBeEmancipated = approximateAge >= minimumEmancipatedAge && approximateAge < minimumAdultAge ;
744744 }
745- if (!canBeEmancipated && (approximateAgeField ).getValue () != null ) {
745+ if (!canBeEmancipated && (approximateAgeField ).getValue () != null ){
746746 int age = Integer .parseInt (approximateAgeField .getValue ());
747- if (approximateAgeTypeField .getValue () == ApproximateAgeType .YEARS ) {
747+ if (approximateAgeTypeField .getValue () == ApproximateAgeType .YEARS ){
748748 canBeEmancipated = age >= minimumEmancipatedAge && age < minimumAdultAge ;
749749 if (change ) {
750750 isEmancipated .setValue (canBeEmancipated );
@@ -765,12 +765,12 @@ private void updateHasGuardianCheckBox(boolean onEmancipatedChange) {
765765 boolean isIncapacitatedChecked = (isIncapacitated != null ) && (isIncapacitated .getValue ());
766766 boolean isEmancipatedChecked = (isEmancipated != null ) && (isEmancipated .getValue ());
767767 boolean canBe = personCanBeEmancipated (getApproximateAgeInYears (), onEmancipatedChange );
768- if ((!canBe || isIncapacitatedChecked ) && isEmancipatedChecked ) {
768+ if ((!canBe || isIncapacitatedChecked ) && isEmancipatedChecked ) {
769769 isEmancipatedChecked = false ;
770770 isEmancipated .setValue (Boolean .FALSE );
771771 isIncapacitated .setVisible (true );
772772 }
773- if (isEmancipatedChecked ) {
773+ if (isEmancipatedChecked ){
774774 hasGuardian .setVisible (false );
775775 nameOfGuardians .setVisible (false );
776776 isIncapacitated .setVisible (false );
@@ -783,7 +783,7 @@ private void updateHasGuardianCheckBox(boolean onEmancipatedChange) {
783783 boolean isChildOrUnknownDate = getApproximateAgeInYears () < minimumAdultAge ;
784784 nameOfGuardians .setVisible (isChildOrUnknownDate || isIncapacitatedChecked );
785785 hasGuardian .setVisible (isChildOrUnknownDate || isIncapacitatedChecked );
786- if ((birthDate == null ) || isChildOrUnknownDate ) {
786+ if ((birthDate == null ) || isChildOrUnknownDate ) {
787787 hasGuardian .setValue (Boolean .TRUE );
788788 }
789789 }
0 commit comments