Produced by Araxis Merge on 6/9/2017 3:49:58 PM Eastern 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.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | Fri Jun 9 19:49:58 2017 UTC | ||
| 2 | eHealth_Exch (eHealth Exchange Enhancements) Build 3 docs & code_May_2017.zip\VAP_CIF_CODE0502.zip\VAP_CIF_CODE0502\VAP_CIF_CODE0502\nvap-common\src\main\java\gov\va\nvap\common\transformer\date | XmlGregorianCalendarToDate.java | Fri Apr 21 20:03:26 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 0 | 0 |
| Changed | 0 | 0 |
| Inserted | 1 | 42 |
| Removed | 0 | 0 |
| 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 |
No regular expressions were active.
| 1 | package go v.va.nvap. common.tra nsformer.d ate; | |||||
| 2 | ||||||
| 3 | import jav a.util.Dat e; | |||||
| 4 | import jav a.util.Gre gorianCale ndar; | |||||
| 5 | ||||||
| 6 | import jav ax.xml.dat atype.Data typeConfig urationExc eption; | |||||
| 7 | import jav ax.xml.dat atype.Data typeFactor y; | |||||
| 8 | import jav ax.xml.dat atype.XMLG regorianCa lendar; | |||||
| 9 | ||||||
| 10 | import org .dozer.Cus tomConvert er; | |||||
| 11 | import org .dozer.Map pingExcept ion; | |||||
| 12 | ||||||
| 13 | /** | |||||
| 14 | * @author Asha Amri traj | |||||
| 15 | */ | |||||
| 16 | public cla ss XmlGreg orianCalen darToDate implements CustomCon verter { | |||||
| 17 | ||||||
| 18 | @O verride | |||||
| 19 | pu blic Objec t convert( final Obje ct destina tion, fina l Object s ource, | |||||
| 20 | final Class<?> d estClass, final Clas s<?> sourc eClass) { | |||||
| 21 | if ( source == null) { | |||||
| 22 | return null; | |||||
| 23 | } | |||||
| 24 | if ( XMLGregori anCalendar .class.isI nstance(so urce)) { | |||||
| 25 | return ((XMLGreg orianCalen dar) sourc e).toGrego rianCalend ar() | |||||
| 26 | .getTime() ; | |||||
| 27 | } el se if (Dat e.class.is Instance(s ource)) { | |||||
| 28 | final GregorianC alendar gc = new Gre gorianCale ndar(); | |||||
| 29 | gc.set Time((Date ) source); | |||||
| 30 | try { | |||||
| 31 | return D atatypeFac tory.newIn stance() | |||||
| 32 | .n ewXMLGrego rianCalend ar(gc); | |||||
| 33 | } catc h (final D atatypeCon figuration Exception ex) { | |||||
| 34 | throw ne w RuntimeE xception(e x); | |||||
| 35 | } | |||||
| 36 | } el se { | |||||
| 37 | throw new Mappin gException ( | |||||
| 38 | "Converter Gregorian ToDate use d incorrec tly. Argum ents passe d in were: " | |||||
| 39 | + de stination + " and " + source); | |||||
| 40 | } | |||||
| 41 | } | |||||
| 42 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.