Commit 2a7541da by zhanghou

解决空指针

parent 849f11eb
...@@ -110,9 +110,9 @@ public class Mx2MapPacs009Creator extends AbstractMx2MapCreator { ...@@ -110,9 +110,9 @@ public class Mx2MapPacs009Creator extends AbstractMx2MapCreator {
undrlyTxnMaps.put(getPropertyValue("txnRemark"), tag.getValue()); undrlyTxnMaps.put(getPropertyValue("txnRemark"), tag.getValue());
} }
if (undrlygCstmrCdtTrfMaps.get("instdAmt") != null) { if (undrlygCstmrCdtTrfMaps.get("instdAmt") != null) {
BigDecimal amt = (BigDecimal) elementMaps.get("instdAmt"); BigDecimal amt = (BigDecimal) undrlygCstmrCdtTrfMaps.get("instdAmt");
if (elementMaps.get("instdAmtCcy") != null) { if (undrlygCstmrCdtTrfMaps.get("instdAmtCcy") != null) {
undrlyTxnMaps.put(getPropertyValue("original.settlement.amt"), elementMaps.get("instdAmtCcy") + " " + amt.toPlainString()); undrlyTxnMaps.put(getPropertyValue("original.settlement.amt"), undrlygCstmrCdtTrfMaps.get("instdAmtCcy") + " " + amt.toPlainString());
} else { } else {
undrlyTxnMaps.put(getPropertyValue("original.settlement.amt"), amt.toPlainString()); undrlyTxnMaps.put(getPropertyValue("original.settlement.amt"), amt.toPlainString());
} }
......
...@@ -137,6 +137,7 @@ Change Log ...@@ -137,6 +137,7 @@ Change Log
<InstrForNxtAgt> <InstrForNxtAgt>
<InstrInf>123456789</InstrInf> <InstrInf>123456789</InstrInf>
</InstrForNxtAgt> </InstrForNxtAgt>
<InstdAmt Ccy="EUR">1111</InstdAmt>
</UndrlygCstmrCdtTrf> </UndrlygCstmrCdtTrf>
</CdtTrfTxInf> </CdtTrfTxInf>
</FICdtTrf> </FICdtTrf>
......
...@@ -19,7 +19,7 @@ public class Mx2ElementTest { ...@@ -19,7 +19,7 @@ public class Mx2ElementTest {
@Test @Test
public void testMx2Map() throws IOException { public void testMx2Map() throws IOException {
// File file = FileUtils.toFile(Mx2MtTest.class.getResource("/swiftXml/MxPacs00800108.xml")); // File file = FileUtils.toFile(Mx2MtTest.class.getResource("/swiftXml/MxPacs00800108.xml"));
File file = FileUtils.toFile(Mx2MtTest.class.getResource("/swiftXml/Pacs00800108.xml")); File file = FileUtils.toFile(Mx2MtTest.class.getResource("/swiftXml/MxPacs00900108_COV.xml"));
//File file = FileUtils.toFile(Mx2MtTest.class.getResource("/swiftXml/MxPacs00900108.xml")); //File file = FileUtils.toFile(Mx2MtTest.class.getResource("/swiftXml/MxPacs00900108.xml"));
//File file = FileUtils.toFile(Mx2MtTest.class.getResource("/swiftXml/MxPacs00900108_COV.xml")); //File file = FileUtils.toFile(Mx2MtTest.class.getResource("/swiftXml/MxPacs00900108_COV.xml"));
//File file = FileUtils.toFile(Mx2MtTest.class.getResource("/swiftXml/MxCamt05300108_950.xml")); //File file = FileUtils.toFile(Mx2MtTest.class.getResource("/swiftXml/MxCamt05300108_950.xml"));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment