From fb52304993db2cffb70106dfc79137a36df60f64 Mon Sep 17 00:00:00 2001 From: Matthew Buckett Date: Tue, 15 Dec 2015 11:12:40 +0000 Subject: [PATCH] SAK-26269 LTiService.filterContent can accept nulls. --- .../java/org/sakaiproject/basiclti/util/SakaiBLTIUtil.java | 5 +---- .../basiclti/impl/BasicLTISecurityServiceImpl.java | 6 +----- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/basiclti/basiclti-common/src/java/org/sakaiproject/basiclti/util/SakaiBLTIUtil.java b/basiclti/basiclti-common/src/java/org/sakaiproject/basiclti/util/SakaiBLTIUtil.java index 2936a552bf04..fca3de047205 100644 --- a/basiclti/basiclti-common/src/java/org/sakaiproject/basiclti/util/SakaiBLTIUtil.java +++ b/basiclti/basiclti-common/src/java/org/sakaiproject/basiclti/util/SakaiBLTIUtil.java @@ -1662,10 +1662,7 @@ public static Properties getPropertiesFromPlacement(String placement_id, LTIServ if ( tool == null ) return null; // Adjust the content items based on the tool items - if ( tool != null || content != null ) - { - ltiService.filterContent(content, tool); - } + ltiService.filterContent(content, tool); for (String formInput : LTIService.TOOL_MODEL) { Properties info = parseFormString(formInput); diff --git a/basiclti/basiclti-impl/src/java/org/sakaiproject/basiclti/impl/BasicLTISecurityServiceImpl.java b/basiclti/basiclti-impl/src/java/org/sakaiproject/basiclti/impl/BasicLTISecurityServiceImpl.java index 23b3061b4cbe..6d4dacc8aed0 100644 --- a/basiclti/basiclti-impl/src/java/org/sakaiproject/basiclti/impl/BasicLTISecurityServiceImpl.java +++ b/basiclti/basiclti-impl/src/java/org/sakaiproject/basiclti/impl/BasicLTISecurityServiceImpl.java @@ -361,11 +361,7 @@ else if ( refId.startsWith("content:") && refId.length() > 8 ) } } - // Adjust the content items based on the tool items - if ( tool != null || content != null ) - { - ltiService.filterContent(content, tool); - } + ltiService.filterContent(content, tool); } String splash = null; if ( tool != null ) splash = (String) tool.get("splash");