13. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 11/28/2017 4:44:48 PM Eastern Standard Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

13.1 Files compared

# Location File Last Modified
1 admin_portal_reeng_2018.1.0.0.zip\admin portal reeng\mhv_source\mhv_admin\mhv-admin-main\src\main\java\gov\va\med\mhv\admin\registry ModelObject.java Wed Aug 23 04:11:24 2017 UTC
2 admin_portal_reeng_2018.1.0.0.zip\admin portal reeng\mhv_source\mhv_admin\mhv-admin-main\src\main\java\gov\va\med\mhv\admin\registry ModelObject.java Tue Nov 28 20:42:25 2017 UTC

13.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 2 112
Changed 1 2
Inserted 0 0
Removed 0 0

13.3 Comparison options

Whitespace
Character case Differences in character case are significant
Line endings Differences in line endings (CR and LF characters) are ignored
CR/LF characters Not shown in the comparison detail

13.4 Active regular expressions

No regular expressions were active.

13.5 Comparison detail

  1   /**
  2    * 
  3    */
  4   package go v.va.med.m hv.admin.r egistry;
  5  
  6   /**
  7    * @author  
P
I I
  8    *
  9    */
  10   public abs tract clas s ModelObj ect {
  11  
  12       /**
  13        * Nul l-safe det ermination  of hasCod e of an ob ject
  14        * @pa ram value  The object  to get th e hashcode  for
  15        * @re turn The h ashcode of  value, 0  if the val ue is null
  16        */
  17       protec ted static  int hashC odeOrZero( Object val ue) {
  18           re turn (valu e != null)  ? value.h ashCode()  : 0;
  19       }
  20  
  21       /**
  22        * Nul l-safe equ ality comp arison of  objects.
  23        * @pa ram value  Value to c ompare
  24        * @pa ram otherV alue The o ther value  to compar e it to
  25        * @re turn True,  if both o bjects are  null or t he objects  are equal  as 
  26        * ind icated by  the equals () method;  false oth erwise.
  27        */
  28       protec ted static  boolean a reEqual(Ob ject value , Object o therValue)  {
  29           re turn ((val ue == null ) && (othe rValue ==  null))
  30                || ((val ue != null ) && value .equals(ot herValue)) ;
  31       }
  32  
  33       /**
  34        * Cal culates a  hash code  from the h ash codes  of set of  objects.
  35        * Not e that an  object doe s not need  to provid e all fiel ds to calc ulate
  36        * a h ashCode. J ust use fi elds that  will most  likely be  discrimina ting,
  37        * suc h that dif ferent val ue for the se fields  leads to d ifferent h ash codes.
  38        * Usi ng 2-3 fie lds probab ly suffici ent.     
  39        * @pa ram fields  The field s used to  calculate  the hash c ode
  40        * @re turn The c alculated  hash code  value
  41        */
  42       protec ted static  int hashC ode(Object [] fields)  {
  43           fi nal int PR IME = 31;
  44           in t hashCode  = 1;
  45           //  TODO: Thi s code cou ld overflo w the maxi mum intege r,
  46           //  as the re sult can g row quickl y, if any  of the fie lds 
  47           //  hashcodes  are big.
  48           if  (fields ! = null) {
  49                for (Obj ect field:  fields) {
  50                    hash Code = PRI ME * hashC ode + hash CodeOrZero (field);
  51                }
  52           }
  53           re turn hashC ode;
  54  
  55       }
  56  
  57   }