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

Violette Roche-Montane
24.35.2014 93ba67975e33b76fb0770377b61b2dedccd5a5cd
OPENDJ-1352 upgrade.log does not contain platform line breaks
- Replaced harcoded "\n" by ServerConstants.EOL.
2 files modified
10 ■■■■■ changed files
opends/src/server/org/opends/server/tools/upgrade/Upgrade.java 3 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/tools/upgrade/UpgradeLog.java 7 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/tools/upgrade/Upgrade.java
@@ -30,6 +30,7 @@
import static org.opends.server.tools.upgrade.FormattedNotificationCallback.*;
import static org.opends.server.tools.upgrade.UpgradeTasks.*;
import static org.opends.server.tools.upgrade.LicenseFile.*;
import static org.opends.server.util.ServerConstants.EOL;
import java.io.File;
import java.io.FileWriter;
@@ -632,7 +633,7 @@
    {
      if (LicenseFile.exists())
      {
        context.notify(Message.raw("\n" + LicenseFile.getText()));
        context.notify(Message.raw(EOL + LicenseFile.getText()));
        context.notify(INFO_LICENSE_DETAILS_CLI_LABEL.get());
        if (!context.isAcceptLicenseMode())
        {
opends/src/server/org/opends/server/tools/upgrade/UpgradeLog.java
@@ -21,7 +21,7 @@
 * CDDL HEADER END
 *
 *
 *      Copyright 2013 ForgeRock AS
 *      Copyright 2013-2014 ForgeRock AS
 */
package org.opends.server.tools.upgrade;
@@ -42,6 +42,7 @@
import org.opends.server.tools.ClientException;
import static org.opends.messages.ToolMessages.ERR_UPGRADE_INVALID_LOG_FILE;
import static org.opends.server.util.ServerConstants.EOL;
/**
 * Creates a historical log about the upgrade. If file does not exist an attempt
@@ -92,9 +93,9 @@
            record.getSequenceNumber()).append(SPACE).append("severity=")
            .append(record.getLevel().toString().toUpperCase());
        sb.append(SPACE).append("src=").append(record.getSourceClassName())
            .append(SPACE).append(record.getSourceMethodName()).append("\n");
            .append(SPACE).append(record.getSourceMethodName()).append(EOL);
        sb.append(SPACE).append("msg=").append(record.getMessage())
            .append("\n");
            .append(EOL);
        return sb.toString();
      }
    });