124. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 7/10/2017 1:01:46 PM Central Daylight 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.

124.1 Files compared

# Location File Last Modified
1 C:\AraxisMergeCompare\Pri_un\IV-ehmp_cif\MIXConnection\main\src\java\gov\va\med\imaging\url\mix HandlerFactory.java Thu Jun 29 17:22:08 2017 UTC
2 C:\AraxisMergeCompare\Pri_re\IV-ehmp_cif\MIXConnection\main\src\java\gov\va\med\imaging\url\mix HandlerFactory.java Thu Jul 6 15:04:20 2017 UTC

124.2 Comparison summary

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

124.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

124.4 Active regular expressions

No regular expressions were active.

124.5 Comparison detail

  1   /**
  2    * 
  3    */
  4   package go v.va.med.i maging.url .mix;
  5  
  6   import gov .va.med.im aging.url. mix.Handle rFactory;
  7  
  8   import jav a.io.IOExc eption;
  9   import jav a.io.Input Stream;
  10   import jav a.net.URLS treamHandl er;
  11   import jav a.net.URLS treamHandl erFactory;
  12   import jav a.util.Has hMap;
  13   import jav a.util.Ite rator;
  14   import jav a.util.Map ;
  15   import jav a.util.Pro perties;
  16  
  17   /**
  18    * @author         
BECKEC
  19    *
  20    */
  21   public cla ss Handler Factory 
  22   implements  URLStream HandlerFac tory
  23   {
  24       // the  configura tion mappi ng
  25       privat e final st atic Map<S tring, Str ing> handl erClassMap ping;
  26       
  27       // the  loaded (c ached) han dlers
  28       privat e final st atic Map<S tring, URL StreamHand ler> handl erMap;
  29       
  30       static
  31       {
  32           ha ndlerClass Mapping =  new HashMa p<String,  String>();
  33           St ring handl erFactoryP roperties  = HandlerF actory.cla ss.getName () + ".pro perties";
  34           In putStream  inStream =  ClassLoad er.getSyst emResource AsStream(h andlerFact oryPropert ies);
  35           
  36           Sy stem.out.p rintln(
  37                    (inS tream == n ull ? "Una ble to rea d " : "Rea ding ") +
  38                    "pro tocol hand ler factor y properti es from '"  +
  39                    hand lerFactory Properties  + "'.");
  40  
  41           Pr operties h andlerClas sMappingPr operties =  new Prope rties();
  42           as sert(inStr eam != nul l && handl erClassMap pingProper ties != nu ll);
  43           
  44           tr y
  45           {
  46                handlerC lassMappin gPropertie s.load(inS tream);
  47                for( Ite rator<Map. Entry<Obje ct, Object >> iter=ha ndlerClass MappingPro perties.en trySet().i terator();
  48                    iter .hasNext() ; )
  49                {
  50                    Map. Entry<Obje ct, Object > entry =  iter.next( );
  51                    hand lerClassMa pping.put(  entry.get Key().toSt ring(), en try.getVal ue().toStr ing() );
  52                }
  53           } 
  54           ca tch (IOExc eption e)
  55           {
  56                e.printS tackTrace( );
  57           }
  58           
  59           ha ndlerMap =  new HashM ap<String,  URLStream Handler>() ;
  60       }
  61       
  62       public  HandlerFa ctory()
  63       {
  64           su per();
  65       }
  66  
  67       /* (no n-Javadoc)
  68        * @se e java.net .URLStream HandlerFac tory#creat eURLStream Handler(ja va.lang.St ring)
  69        */
  70       @Overr ide
  71       public  URLStream Handler cr eateURLStr eamHandler (String pr otocol)
  72       {
  73           sy nchronized  (handlerM ap)
  74           {
  75                URLStrea mHandler s treamHandl er = handl erMap.get( protocol);
  76                if(strea mHandler = = null)
  77                {
  78                    Stri ng handler ClassName  = handlerC lassMappin g.get(prot ocol);
  79                    try
  80                    {
  81                         Class<?> h andlerClas s = Class. forName(ha ndlerClass Name);
  82                         streamHand ler = (URL StreamHand ler)handle rClass.new Instance() ;
  83                        
  84                         handlerMap .put(proto col, strea mHandler);
  85                    } 
  86                    catc h (ClassNo tFoundExce ption e)
  87                    {
  88                         e.printSta ckTrace();
  89                    } 
  90                    catc h (Instant iationExce ption e)
  91                    {
  92                         e.printSta ckTrace();
  93                    } 
  94                    catc h (Illegal AccessExce ption e)
  95                    {
  96                         e.printSta ckTrace();
  97                    }
  98                    catc h (ClassCa stExceptio n e)
  99                    {
  100                         e.printSta ckTrace();
  101                    }
  102                }
  103                
  104                return s treamHandl er;
  105           }
  106       }
  107  
  108   }