Commit f6095e76 authored by Liang Ding's avatar Liang Ding

🎨 Cleanup code

parent 8f252221
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
*/ */
package org.b3log.solo.event.plugin; package org.b3log.solo.event.plugin;
import org.b3log.latke.event.AbstractEventListener; import org.b3log.latke.event.AbstractEventListener;
import org.b3log.latke.event.Event; import org.b3log.latke.event.Event;
import org.b3log.latke.event.EventException; import org.b3log.latke.event.EventException;
...@@ -32,10 +31,9 @@ import org.b3log.solo.service.PluginMgmtService; ...@@ -32,10 +31,9 @@ import org.b3log.solo.service.PluginMgmtService;
import java.util.List; import java.util.List;
/** /**
* This listener is responsible for refreshing plugin after every loaded. * This listener is responsible for refreshing plugin after every loaded.
* *
* @author <a href="http://88250.b3log.org">Liang Ding</a> * @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.0.0.1, Nov 28, 2011 * @version 1.0.0.1, Nov 28, 2011
* @since 0.3.1 * @since 0.3.1
...@@ -56,12 +54,10 @@ public final class PluginRefresher extends AbstractEventListener<List<AbstractPl ...@@ -56,12 +54,10 @@ public final class PluginRefresher extends AbstractEventListener<List<AbstractPl
final LatkeBeanManager beanManager = Lifecycle.getBeanManager(); final LatkeBeanManager beanManager = Lifecycle.getBeanManager();
final PluginRepository pluginRepository = beanManager.getReference(PluginRepositoryImpl.class); final PluginRepository pluginRepository = beanManager.getReference(PluginRepositoryImpl.class);
final Transaction transaction = pluginRepository.beginTransaction(); final Transaction transaction = pluginRepository.beginTransaction();
try { try {
final PluginMgmtService pluginMgmtService = beanManager.getReference(PluginMgmtService.class); final PluginMgmtService pluginMgmtService = beanManager.getReference(PluginMgmtService.class);
pluginMgmtService.refresh(plugins); pluginMgmtService.refresh(plugins);
transaction.commit(); transaction.commit();
} catch (final Exception e) { } catch (final Exception e) {
...@@ -76,7 +72,7 @@ public final class PluginRefresher extends AbstractEventListener<List<AbstractPl ...@@ -76,7 +72,7 @@ public final class PluginRefresher extends AbstractEventListener<List<AbstractPl
/** /**
* Gets the event type {@linkplain PluginManager#PLUGIN_LOADED_EVENT}. * Gets the event type {@linkplain PluginManager#PLUGIN_LOADED_EVENT}.
* *
* @return event type * @return event type
*/ */
@Override @Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment