From 84d126c6b64f156527abcc47a508a0127505147d Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 16 Feb 2016 09:46:58 +0000 Subject: coverity#1326199 Explicit null dereferenced extensionDb is always the same Change-Id: I57b59f09b3f55757844a6aab6c6698857da2e15b --- .../com/sun/star/script/framework/provider/ScriptProvider.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'scripting') diff --git a/scripting/java/com/sun/star/script/framework/provider/ScriptProvider.java b/scripting/java/com/sun/star/script/framework/provider/ScriptProvider.java index 9e7c4b63d7b8..c84d4b75348e 100644 --- a/scripting/java/com/sun/star/script/framework/provider/ScriptProvider.java +++ b/scripting/java/com/sun/star/script/framework/provider/ScriptProvider.java @@ -194,24 +194,20 @@ public abstract class ScriptProvider implements m_container = new ParcelContainer(m_xContext, contextUrl, language); m_xModel = getModelFromDocUrl(originalContextURL); } else { - String extensionDb = null; + String extensionDb = "vnd.sun.star.expand:${$BRAND_INI_DIR/" + + PathUtils.BOOTSTRAP_NAME + "::UserInstallation}/user"; + String extensionRepository = null; if (originalContextURL.startsWith("bundled")) { contextUrl = "vnd.sun.star.expand:$BUNDLED_EXTENSIONS"; - extensionDb = "vnd.sun.star.expand:${$BRAND_INI_DIR/" - + PathUtils.BOOTSTRAP_NAME + "::UserInstallation}/user"; extensionRepository = "bundled"; } else if (originalContextURL.startsWith("share")) { contextUrl = "vnd.sun.star.expand:$BRAND_BASE_DIR/$BRAND_SHARE_SUBDIR"; - extensionDb = "vnd.sun.star.expand:${$BRAND_INI_DIR/" - + PathUtils.BOOTSTRAP_NAME + "::UserInstallation}/user"; extensionRepository = "shared"; } else if (originalContextURL.startsWith("user")) { contextUrl = "vnd.sun.star.expand:${$BRAND_INI_DIR/" + PathUtils.BOOTSTRAP_NAME + "::UserInstallation}/user"; - extensionDb = "vnd.sun.star.expand:${$BRAND_INI_DIR/" - + PathUtils.BOOTSTRAP_NAME + "::UserInstallation}/user"; extensionRepository = "user"; } -- cgit