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

Valery Kharseko
10 hours ago ebb19c5816399b83c42b8f9194dbf3d9296975a3
opendj-server-legacy/src/main/java/org/opends/server/plugins/profiler/ProfileStack.java
@@ -13,12 +13,12 @@
 *
 * Copyright 2006-2008 Sun Microsystems, Inc.
 * Portions Copyright 2014-2016 ForgeRock AS.
 * Portions Copyright 2026 3A Systems, LLC.
 */
package org.opends.server.plugins.profiler;
import java.io.IOException;
import org.forgerock.i18n.slf4j.LocalizedLogger;
import org.forgerock.opendj.io.ASN1Reader;
import org.forgerock.opendj.io.ASN1Writer;
@@ -28,11 +28,6 @@
 */
public class ProfileStack
{
  private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
  /**
   * The line number that will be used for stack frames in which the line number
   * is unknown but it is not a native method.
@@ -240,43 +235,32 @@
  @Override
  public boolean equals(Object o)
  {
    if (o == null)
    {
      return false;
    }
    else if (this == o)
    if (this == o)
    {
      return true;
    }
    try
    if (!(o instanceof ProfileStack))
    {
      ProfileStack s = (ProfileStack) o;
      return false;
    }
      if (numFrames != s.numFrames)
    ProfileStack s = (ProfileStack) o;
    if (numFrames != s.numFrames)
    {
      return false;
    }
    for (int i=0; i < numFrames; i++)
    {
      if (lineNumbers[i] != s.lineNumbers[i] ||
          !classNames[i].equals(s.classNames[i]) ||
          !methodNames[i].equals(s.methodNames[i]))
      {
        return false;
      }
      for (int i=0; i < numFrames; i++)
      {
        if (lineNumbers[i] != s.lineNumbers[i] ||
            !classNames[i].equals(s.classNames[i]) ||
            !methodNames[i].equals(s.methodNames[i]))
        {
          return false;
        }
      }
      return true;
    }
    catch (Exception e)
    {
      logger.traceException(e);
      return false;
    }
    return true;
  }