X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fconfig%2Fyang-jmx-generator-plugin%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fconfig%2Fyangjmxgenerator%2Fplugin%2FAbstractGeneratorTest.java;h=fb5cd2e9899cdbe96540ff322ed3f5c4c5d50f1b;hb=d79fdfcf87ba53743a600f1bbc76648d71f35afb;hp=9e2f334dac6eb22f647030ae8b6e776c9e6295d1;hpb=9fb64948564e252018f9b1e13e7cea2c92f991aa;p=controller.git diff --git a/opendaylight/config/yang-jmx-generator-plugin/src/test/java/org/opendaylight/controller/config/yangjmxgenerator/plugin/AbstractGeneratorTest.java b/opendaylight/config/yang-jmx-generator-plugin/src/test/java/org/opendaylight/controller/config/yangjmxgenerator/plugin/AbstractGeneratorTest.java index 9e2f334dac..fb5cd2e989 100644 --- a/opendaylight/config/yang-jmx-generator-plugin/src/test/java/org/opendaylight/controller/config/yangjmxgenerator/plugin/AbstractGeneratorTest.java +++ b/opendaylight/config/yang-jmx-generator-plugin/src/test/java/org/opendaylight/controller/config/yangjmxgenerator/plugin/AbstractGeneratorTest.java @@ -8,8 +8,6 @@ package org.opendaylight.controller.config.yangjmxgenerator.plugin; import java.io.File; - -import org.apache.commons.io.FileUtils; import org.junit.Before; import org.opendaylight.controller.config.yangjmxgenerator.AbstractYangTest; @@ -25,7 +23,21 @@ public abstract class AbstractGeneratorTest extends AbstractYangTest { @Before public void cleanUpDirectory() throws Exception { - FileUtils.deleteDirectory(generatorOutputPath); + deleteFolder(generatorOutputPath); + } + + public void deleteFolder(File folder) { + File[] files = folder.listFiles(); + if (files != null) { + for (File f: files) { + if (f.isDirectory()) { + deleteFolder(f); + } else { + f.delete(); + } + } + } + folder.delete(); } }