[Libreoffice-commits] core.git: scripting/java
rbuj
robert.buj at gmail.com
Sun Sep 7 11:02:25 PDT 2014
scripting/java/com/sun/star/script/framework/container/Parcel.java | 15 ++++------
1 file changed, 6 insertions(+), 9 deletions(-)
New commits:
commit 4d6bd06c3317ca6b5a4b873d523ead798cb825d8
Author: rbuj <robert.buj at gmail.com>
Date: Sat Sep 6 22:15:21 2014 +0200
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 at gmail.com>
Tested-by: Noel Grandin <noelgrandin at gmail.com>
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 6b4fd8d..e9c3bfe 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
{
More information about the Libreoffice-commits
mailing list