diff options
author | Noel Grandin <noel@peralex.com> | 2014-08-15 16:28:22 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-08-20 11:47:47 +0200 |
commit | 6884ef6317ddc29a713a342fb102e28ebc8fa5cc (patch) | |
tree | e5c6b203f6c58e118f2000bee4c23769b4cc36da /swext | |
parent | 8c9fdc4a963fd55da59a93c979071f53b84fbc24 (diff) |
java: don't catch and then just rethrow an exception
without doing anything else useful
Change-Id: I5803d84d46e0a70e1759f2202e2c2273087f8723
Diffstat (limited to 'swext')
-rw-r--r-- | swext/mediawiki/src/com/sun/star/wiki/WikiOptionsEventHandlerImpl.java | 43 |
1 files changed, 18 insertions, 25 deletions
diff --git a/swext/mediawiki/src/com/sun/star/wiki/WikiOptionsEventHandlerImpl.java b/swext/mediawiki/src/com/sun/star/wiki/WikiOptionsEventHandlerImpl.java index c88633b70b74..9c7ff7939b3a 100644 --- a/swext/mediawiki/src/com/sun/star/wiki/WikiOptionsEventHandlerImpl.java +++ b/swext/mediawiki/src/com/sun/star/wiki/WikiOptionsEventHandlerImpl.java @@ -218,38 +218,31 @@ public final class WikiOptionsEventHandlerImpl extends WeakBase { if ( sMethod.equals( sExternalEvent ) ) { - try + String sEvent = AnyConverter.toString( aEventObject ); + if ( sEvent != null ) { - String sEvent = AnyConverter.toString( aEventObject ); - if ( sEvent != null ) + if ( sEvent.equals( sOk ) ) + { + if ( m_aSettings != null ) + m_aSettings.storeConfiguration(); + } + else if ( sEvent.equals( sInitialize ) || sEvent.equals( sBack ) ) { - if ( sEvent.equals( sOk ) ) + if ( sEvent.equals( sInitialize ) ) { - if ( m_aSettings != null ) - m_aSettings.storeConfiguration(); + m_xDialog = UnoRuntime.queryInterface( XDialog.class, xWindow ); + m_xControlContainer = UnoRuntime.queryInterface( XControlContainer.class, m_xDialog ); + m_aSettings = Settings.getSettings( m_xContext ); + m_aSettings.loadConfiguration(); // throw away all the noncommited changes + InitStrings(); } - else if ( sEvent.equals( sInitialize ) || sEvent.equals( sBack ) ) - { - if ( sEvent.equals( sInitialize ) ) - { - m_xDialog = UnoRuntime.queryInterface( XDialog.class, xWindow ); - m_xControlContainer = UnoRuntime.queryInterface( XControlContainer.class, m_xDialog ); - m_aSettings = Settings.getSettings( m_xContext ); - m_aSettings.loadConfiguration(); // throw away all the noncommited changes - InitStrings(); - } - else if ( m_aSettings != null ) - m_aSettings.loadConfiguration(); // throw away all the noncommited changes + else if ( m_aSettings != null ) + m_aSettings.loadConfiguration(); // throw away all the noncommited changes - RefreshView(); - CheckButtonState(); - } + RefreshView(); + CheckButtonState(); } } - catch ( com.sun.star.uno.RuntimeException r ) - { - throw r; - } } else if ( sMethod.equals( sAdd ) ) { |