796. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 10/18/2018 2:02:21 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.

796.1 Files compared

# Location File Last Modified
1 VIX_SIV_v3_0_patch_201_build_8.zip\v3.0_patch_201_build_8\VISA\Java\VistaConnection\main\src\java\gov\va\med\imaging\url\vista HandlerFactory.java Thu Oct 11 13:30:17 2018 UTC
2 VIX_SIV_v3_0_patch_201_build_8.zip\v3.0_patch_201_build_8\VISA\Java\VistaConnection\main\src\java\gov\va\med\imaging\url\vista HandlerFactory.java Wed Oct 17 19:07:40 2018 UTC

796.2 Comparison summary

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

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

796.4 Active regular expressions

No regular expressions were active.

796.5 Comparison detail

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