mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Violette Roche-Montane
14.40.2014 8ea401e9c7d07f5a32e048742f4c342b747a13e7
Minor fix for OPENDJ-1303. Added static initialization on OperatingSystem. Removed modifications on previous test cases.
Thanks to JN.
3 files modified
15 ■■■■ changed files
opendj-cli/src/test/java/com/forgerock/opendj/cli/ConsoleApplicationTestCase.java 4 ●●●● patch | view | raw | blame | history
opendj-core/src/main/java/com/forgerock/opendj/util/OperatingSystem.java 3 ●●●●● patch | view | raw | blame | history
opendj-ldap-toolkit/src/test/java/com/forgerock/opendj/ldap/tools/MakeLDIFTestCase.java 8 ●●●●● patch | view | raw | blame | history
opendj-cli/src/test/java/com/forgerock/opendj/cli/ConsoleApplicationTestCase.java
@@ -32,8 +32,6 @@
import org.forgerock.i18n.LocalizableMessage;
import org.testng.annotations.Test;
import com.forgerock.opendj.util.OperatingSystem;
import static org.fest.assertions.Assertions.assertThat;
import static org.testng.Assert.assertFalse;
import static org.testng.Assert.assertTrue;
@@ -62,8 +60,6 @@
        }
        final static MockConsoleApplication getDefault() {
            // The console app needs the operating system.
            OperatingSystem.getOperatingSystem();
            out = new ByteArrayOutputStream();
            final PrintStream psOut = new PrintStream(out);
            err = new ByteArrayOutputStream();
opendj-core/src/main/java/com/forgerock/opendj/util/OperatingSystem.java
@@ -99,6 +99,9 @@
    private boolean isUnixBased;
    private static OperatingSystem os;
    static {
        OperatingSystem.getOperatingSystem();
    }
    /**
     * Creates a new operating system value with the provided name.
opendj-ldap-toolkit/src/test/java/com/forgerock/opendj/ldap/tools/MakeLDIFTestCase.java
@@ -36,20 +36,12 @@
import java.io.UnsupportedEncodingException;
import org.forgerock.i18n.LocalizableMessage;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import com.forgerock.opendj.util.OperatingSystem;
@SuppressWarnings("javadoc")
public class MakeLDIFTestCase extends ToolsTestCase {
    @BeforeClass
    public void getOperatingSystem() {
        OperatingSystem.getOperatingSystem();
    }
    @DataProvider(name = "validArguments")
    Object[][] createValidArguments() throws Exception {
        Object[][] data = new Object[][] {