From 02d8432a9a0de1d2a36b2857caa9dc11aa9e5470 Mon Sep 17 00:00:00 2001 From: "harald.bratko" Date: Mon, 20 Mar 2006 13:55:29 +0000 Subject: =?UTF-8?q?Bug=20fix:=20NullpointerException,=20wenn=20f=C3=BCr=20?= =?UTF-8?q?Supplement-Liste=20null=20=C3=BCbergeben=20wird.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@676 d688527b-c9ab-4aba-bd8d-4036d912da1d --- .../invoke/XMLSignatureVerificationInvoker.java | 33 ++++++++++++---------- 1 file changed, 18 insertions(+), 15 deletions(-) (limited to 'spss.server/src/at') diff --git a/spss.server/src/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureVerificationInvoker.java b/spss.server/src/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureVerificationInvoker.java index e675a40d6..4642593eb 100644 --- a/spss.server/src/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureVerificationInvoker.java +++ b/spss.server/src/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureVerificationInvoker.java @@ -363,16 +363,19 @@ public class XMLSignatureVerificationInvoker { DataObjectFactory factory = DataObjectFactory.getInstance(); DataObject dataObject; Iterator iter; - - for (iter = supplements.iterator(); iter.hasNext();) { - XMLDataObjectAssociation supplement = - (XMLDataObjectAssociation) iter.next(); - dataObject = - factory.createFromXmlDataObjectAssociation(supplement, true, false); - dataObjectList.add(dataObject); + + if (supplements != null) { + for (iter = supplements.iterator(); iter.hasNext();) { + XMLDataObjectAssociation supplement = + (XMLDataObjectAssociation) iter.next(); + dataObject = + factory.createFromXmlDataObjectAssociation(supplement, true, false); + dataObjectList.add(dataObject); + } } - + return dataObjectList; + } /** @@ -392,9 +395,11 @@ public class XMLSignatureVerificationInvoker { TransactionContextManager.getInstance().getTransactionContext(); ConfigurationProvider config = context.getConfiguration(); List supplementProfiles = request.getSupplementProfiles(); - - if (supplementProfiles != null) { - List supplements = new ArrayList(); + + List supplements = new ArrayList(); + + if (supplementProfiles != null) { + List mappedProfiles = ProfileMapper.mapSupplementProfiles(supplementProfiles, config); Iterator iter; @@ -404,11 +409,9 @@ public class XMLSignatureVerificationInvoker { (SupplementProfileExplicit) iter.next(); supplements.add(profile.getSupplementProfile()); } - - return supplements; + } - - return null; + return supplements; } /** -- cgit v1.2.3