diff options
author | rbuj <robert.buj@gmail.com> | 2014-09-06 22:15:21 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2014-09-07 13:01:56 -0500 |
commit | 4d6bd06c3317ca6b5a4b873d523ead798cb825d8 (patch) | |
tree | 1fdc9ed2220c6e7904023659c3a33d9563d7765d /scripting/java/com | |
parent | 19be6cfc93eb4f7d0b4440c42f698805294fb881 (diff) |
scripting: there isn't any benefit by reducing the scope here.
Change-Id: I73ebfac7b44d3fba7da70788784492fa3c53c572
Reviewed-on: https://gerrit.libreoffice.org/11312
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'scripting/java/com')
-rw-r--r-- | scripting/java/com/sun/star/script/framework/container/Parcel.java | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/scripting/java/com/sun/star/script/framework/container/Parcel.java b/scripting/java/com/sun/star/script/framework/container/Parcel.java index 6b4fd8dd6370..e9c3bfebe00f 100644 --- a/scripting/java/com/sun/star/script/framework/container/Parcel.java +++ b/scripting/java/com/sun/star/script/framework/container/Parcel.java @@ -244,20 +244,17 @@ public class Parcel implements XNameContainer { try { - ScriptMetaData script = null; - if ( ( script = (ScriptMetaData)getByName( Name ) ) != null ) + ScriptMetaData script = (ScriptMetaData)getByName( Name ); + if ( script != null ) { + if ( !script.removeSourceFile() ) { - if ( !script.removeSourceFile() ) - { - LogUtils.DEBUG("** Parcel.removeByName Failed to remove script " + Name ); - throw new com.sun.star.lang.WrappedTargetException("Failed to remove script " + Name ); - } - LogUtils.DEBUG("** Parcel.removeByName have removed script source file " + Name ); + LogUtils.DEBUG("** Parcel.removeByName Failed to remove script " + Name); + throw new com.sun.star.lang.WrappedTargetException("Failed to remove script " + Name); } + LogUtils.DEBUG("** Parcel.removeByName have removed script source file " + Name); m_descriptor.removeScriptEntry( script ); writeParcelDescriptor(); - } else { |