forked from I2P_Developers/i2p.i2p
Plugins: Order and reverse order plugin names for start/stop all cases.
This commit is contained in:
@ -8,6 +8,7 @@ import java.net.URLClassLoader;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
@ -537,6 +538,7 @@ public class PluginStarter implements Runnable {
|
||||
if (files[i].isDirectory())
|
||||
rv.add(files[i].getName());
|
||||
}
|
||||
Collections.sort(rv); // ensure the list is in sorted order.
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
package net.i2p.router.web;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import net.i2p.router.RouterContext;
|
||||
import net.i2p.util.Log;
|
||||
|
||||
@ -27,7 +29,9 @@ public class PluginStopper extends PluginStarter {
|
||||
*/
|
||||
private static void stopPlugins(RouterContext ctx) {
|
||||
Log log = ctx.logManager().getLog(PluginStopper.class);
|
||||
for (String app : getPlugins()) {
|
||||
List<String> pl = getPlugins();
|
||||
Collections.reverse(pl); // reverse the order
|
||||
for (String app : pl) {
|
||||
if (isPluginRunning(app, ctx)) {
|
||||
try {
|
||||
stopPlugin(ctx, app);
|
||||
|
Reference in New Issue
Block a user