package com.l7tech.policy;

import com.l7tech.objectmodel.FindException;
import com.l7tech.objectmodel.GuidEntity;
import com.l7tech.objectmodel.PartiallyZoneableEntity;
import com.l7tech.objectmodel.folder.Folder;
import com.l7tech.objectmodel.folder.HasFolder;
import com.l7tech.objectmodel.imp.ZoneableNamedEntityImp;
import com.l7tech.objectmodel.migration.Migration;
import com.l7tech.objectmodel.migration.MigrationMappingSelection;
import com.l7tech.objectmodel.migration.PropertyResolver;
import com.l7tech.policy.assertion.Assertion;
import com.l7tech.policy.assertion.CommentAssertion;
import com.l7tech.policy.assertion.FalseAssertion;
import com.l7tech.policy.assertion.UsesEntitiesAtDesignTime;
import com.l7tech.policy.assertion.composite.AllAssertion;
import com.l7tech.policy.wsp.WspReader;
import com.l7tech.policy.wsp.WspWriter;
import com.l7tech.security.rbac.RbacAttribute;
import com.l7tech.util.DeserializeSafe;
import com.l7tech.util.ExceptionUtils;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.Table;
import jakarta.persistence.Transient;
import jakarta.xml.bind.annotation.XmlRootElement;
import jakarta.xml.bind.annotation.XmlTransient;
import java.io.Flushable;
import java.io.IOException;
import java.util.Arrays;
import java.util.Iterator;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import org.hibernate.annotations.Parameter;
import org.hibernate.annotations.Proxy;
import org.hibernate.annotations.Type;
import org.jetbrains.annotations.Nullable;

@XmlRootElement
@Entity
@Proxy(lazy = false)
@Table(name = "policy")
@DeserializeSafe
public class Policy extends ZoneableNamedEntityImp implements Flushable, HasFolder, PartiallyZoneableEntity, GuidEntity {
   private static final Logger logger;
   private static WspReader.Visibility defaultVisibility;
   private String guid;
   private String xml;
   private PolicyType type;
   private boolean soap;
   private String internalTag;
   private String internalSubTag;
   private Folder folder;
   private long versionOrdinal;
   private boolean versionActive;
   private transient WspReader.Visibility visibility;
   private transient Assertion assertion;
   private static final AllAssertion DISABLED_POLICY;
   private static final String DISABLED_POLICY_XML;
   static final long serialVersionUID = 8401441431158218633L;
   private static final String[] b;

   @Deprecated
   protected Policy() {
   }

   public Policy(PolicyType var1, String var2, String var3, boolean var4) {
      this.type = var1;
      this._name = var2;
      this.xml = var3;
      this.soap = var4;
   }

   public Policy(Policy var1) {
      this(var1, null, false, null);
   }

   public Policy(Policy var1, @Nullable WspReader.Visibility var2, boolean var3, @Nullable DesignTimeEntityProvider var4) {
      super(var1);
      this.setSoap(var1.isSoap());
      this.setType(var1.getType());
      this.setInternalTag(var1.getInternalTag());
      this.setInternalSubTag(var1.getInternalSubTag());
      this.setVersionActive(this.isVersionActive());
      this.setVersionOrdinal(this.getVersionOrdinal());
      this.setXml(var1.getXml());
      this.setGuid(var1.getGuid());
      this.setFolder(var1.getFolder());
      Policy var10000 = this;
      WspReader.Visibility var10001 = var2 != null ? var2 : var1.getVisibility();

      try {
         var10000.setVisibility(var10001);
         this.setSecurityZone(var1.getSecurityZone());
         if (var4 != null) {
            this.provideEntitiesToAssertionBeans(var4);
         }
      } catch (IllegalArgumentException var6) {
         throw a(var6);
      }

      try {
         if (var3) {
            this.lock();
         }
      } catch (IllegalArgumentException var5) {
         throw a(var5);
      }
   }

   @Transient
   @Nullable
   public synchronized Assertion getAssertion() throws IOException {
      // $VF: Couldn't be decompiled
      // Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!)
      // java.lang.RuntimeException: parsing failure!
      //   at org.jetbrains.java.decompiler.modules.decompiler.decompose.DomHelper.parseGraph(DomHelper.java:211)
      //   at org.jetbrains.java.decompiler.main.rels.MethodProcessor.codeToJava(MethodProcessor.java:174)
      //
      // Bytecode:
      // 00: aload 0
      // 01: getfield com/l7tech/policy/Policy.xml Ljava/lang/String;
      // 04: ifnull 18
      // 07: aload 0
      // 08: getfield com/l7tech/policy/Policy.xml Ljava/lang/String;
      // 0b: invokevirtual java/lang/String.length ()I
      // 0e: ifne 41
      // 11: goto 18
      // 14: invokestatic com/l7tech/policy/Policy.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 17: athrow
      // 18: getstatic com/l7tech/policy/Policy.logger Ljava/util/logging/Logger;
      // 1b: getstatic com/l7tech/policy/Policy.b [Ljava/lang/String;
      // 1e: bipush 9
      // 20: aaload
      // 21: bipush 2
      // 22: anewarray 19
      // 25: dup
      // 26: bipush 0
      // 27: aload 0
      // 28: invokevirtual com/l7tech/policy/Policy.getGoid ()Lcom/l7tech/objectmodel/Goid;
      // 2b: aastore
      // 2c: dup
      // 2d: bipush 1
      // 2e: aload 0
      // 2f: getfield com/l7tech/policy/Policy._name Ljava/lang/String;
      // 32: aastore
      // 33: invokestatic java/text/MessageFormat.format (Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
      // 36: invokevirtual java/util/logging/Logger.warning (Ljava/lang/String;)V
      // 39: invokestatic com/l7tech/policy/assertion/FalseAssertion.getInstance ()Lcom/l7tech/policy/assertion/FalseAssertion;
      // 3c: areturn
      // 3d: invokestatic com/l7tech/policy/Policy.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 40: athrow
      // 41: aload 0
      // 42: getfield com/l7tech/policy/Policy.assertion Lcom/l7tech/policy/assertion/Assertion;
      // 45: ifnonnull a2
      // 48: aload 0
      // 49: getfield com/l7tech/policy/Policy.visibility Lcom/l7tech/policy/wsp/WspReader$Visibility;
      // 4c: ifnull 61
      // 4f: goto 56
      // 52: invokestatic com/l7tech/policy/Policy.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 55: athrow
      // 56: aload 0
      // 57: getfield com/l7tech/policy/Policy.visibility Lcom/l7tech/policy/wsp/WspReader$Visibility;
      // 5a: goto 64
      // 5d: invokestatic com/l7tech/policy/Policy.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 60: athrow
      // 61: getstatic com/l7tech/policy/Policy.defaultVisibility Lcom/l7tech/policy/wsp/WspReader$Visibility;
      // 64: astore 1
      // 65: aload 0
      // 66: invokestatic com/l7tech/policy/wsp/WspReader.getDefault ()Lcom/l7tech/policy/wsp/WspReader;
      // 69: aload 0
      // 6a: getfield com/l7tech/policy/Policy.xml Ljava/lang/String;
      // 6d: aload 1
      // 6e: invokevirtual com/l7tech/policy/wsp/WspReader.parsePermissively (Ljava/lang/String;Lcom/l7tech/policy/wsp/WspReader$Visibility;)Lcom/l7tech/policy/assertion/Assertion;
      // 71: putfield com/l7tech/policy/Policy.assertion Lcom/l7tech/policy/assertion/Assertion;
      // 74: aload 0
      // 75: getfield com/l7tech/policy/Policy.assertion Lcom/l7tech/policy/assertion/Assertion;
      // 78: ifnull a2
      // 7b: aload 0
      // 7c: getfield com/l7tech/policy/Policy.assertion Lcom/l7tech/policy/assertion/Assertion;
      // 7f: aload 0
      // 80: invokevirtual com/l7tech/policy/Policy.getGoid ()Lcom/l7tech/objectmodel/Goid;
      // 83: invokevirtual com/l7tech/policy/assertion/Assertion.ownerPolicyGoid (Lcom/l7tech/objectmodel/Goid;)V
      // 86: aload 0
      // 87: invokevirtual com/l7tech/policy/Policy.isLocked ()Z
      // 8a: ifeq a2
      // 8d: goto 94
      // 90: invokestatic com/l7tech/policy/Policy.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 93: athrow
      // 94: aload 0
      // 95: getfield com/l7tech/policy/Policy.assertion Lcom/l7tech/policy/assertion/Assertion;
      // 98: invokevirtual com/l7tech/policy/assertion/Assertion.lock ()V
      // 9b: goto a2
      // 9e: invokestatic com/l7tech/policy/Policy.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // a1: athrow
      // a2: aload 0
      // a3: getfield com/l7tech/policy/Policy.assertion Lcom/l7tech/policy/assertion/Assertion;
      // a6: areturn
      // try (0 -> 7): 8 java/io/IOException
      // try (3 -> 30): 30 java/io/IOException
      // try (32 -> 38): 39 java/io/IOException
      // try (35 -> 44): 44 java/io/IOException
      // try (48 -> 66): 67 java/io/IOException
      // try (58 -> 72): 73 java/io/IOException
   }

   @Override
   public synchronized void flush() throws IOException {
      try {
         this.checkLocked();
         if (this.assertion != null) {
            this.setXml(WspWriter.getPolicyXml(this.assertion));
         }
      } catch (IOException var1) {
         throw a(var1);
      }
   }

   public synchronized void forceRecompile() {
      this.assertion = null;
   }

   @Transient
   @RbacAttribute
   @Size(min = 1, max = 255)
   @Override
   public String getName() {
      return super.getName();
   }

   @NotNull
   @Size(min = 1, max = 5242880)
   @Migration(resolver = PropertyResolver.Type.POLICY)
   @Column(name = "`xml`")
   public String getXml() {
      return this.xml;
   }

   public synchronized void setXml(String param1) {
      // $VF: Couldn't be decompiled
      // Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!)
      // java.lang.RuntimeException: parsing failure!
      //   at org.jetbrains.java.decompiler.modules.decompiler.decompose.DomHelper.parseGraph(DomHelper.java:211)
      //   at org.jetbrains.java.decompiler.main.rels.MethodProcessor.codeToJava(MethodProcessor.java:174)
      //
      // Bytecode:
      // 00: aload 0
      // 01: invokevirtual com/l7tech/policy/Policy.checkLocked ()V
      // 04: getstatic com/l7tech/policy/Policy.$assertionsDisabled Z
      // 07: ifne 59
      // 0a: aload 1
      // 0b: ifnull 59
      // 0e: goto 15
      // 11: invokestatic com/l7tech/policy/Policy.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 14: athrow
      // 15: aload 1
      // 16: invokevirtual java/lang/String.length ()I
      // 19: bipush 1
      // 1a: if_icmplt 59
      // 1d: goto 24
      // 20: invokestatic com/l7tech/policy/Policy.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 23: athrow
      // 24: aload 1
      // 25: invokevirtual java/lang/String.trim ()Ljava/lang/String;
      // 28: invokevirtual java/lang/String.length ()I
      // 2b: bipush 1
      // 2c: if_icmplt 59
      // 2f: goto 36
      // 32: invokestatic com/l7tech/policy/Policy.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 35: athrow
      // 36: aload 1
      // 37: invokevirtual java/lang/String.trim ()Ljava/lang/String;
      // 3a: bipush 0
      // 3b: invokevirtual java/lang/String.charAt (I)C
      // 3e: aload 1
      // 3f: bipush 0
      // 40: invokevirtual java/lang/String.charAt (I)C
      // 43: if_icmpeq 59
      // 46: goto 4d
      // 49: invokestatic com/l7tech/policy/Policy.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 4c: athrow
      // 4d: new java/lang/AssertionError
      // 50: dup
      // 51: invokespecial java/lang/AssertionError.<init> ()V
      // 54: athrow
      // 55: invokestatic com/l7tech/policy/Policy.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 58: athrow
      // 59: aload 0
      // 5a: aload 1
      // 5b: putfield com/l7tech/policy/Policy.xml Ljava/lang/String;
      // 5e: aload 0
      // 5f: aconst_null
      // 60: putfield com/l7tech/policy/Policy.assertion Lcom/l7tech/policy/assertion/Assertion;
      // 63: return
      // try (0 -> 6): 7 java/lang/IllegalArgumentException
      // try (4 -> 13): 14 java/lang/IllegalArgumentException
      // try (9 -> 21): 22 java/lang/IllegalArgumentException
      // try (16 -> 32): 33 java/lang/IllegalArgumentException
      // try (24 -> 39): 39 java/lang/IllegalArgumentException
   }

   @RbacAttribute
   @NotNull
   @Size(min = 36, max = 36)
   @Column(name = "guid")
   @Override
   public String getGuid() {
      return this.guid;
   }

   @Override
   public void setGuid(String var1) {
      this.guid = var1;
   }

   @RbacAttribute
   @NotNull
   @Column(name = "policy_type")
   @Type(type = "com.l7tech.server.util.GenericEnumUserType", parameters = @Parameter(name = "enumClass", value = "com.l7tech.policy.PolicyType"))
   public PolicyType getType() {
      return this.type;
   }

   public void setType(PolicyType var1) {
      this.checkLocked();
      this.type = var1;
   }

   @RbacAttribute
   @Column(name = "soap")
   public boolean isSoap() {
      return this.soap;
   }

   public void setSoap(boolean var1) {
      this.checkLocked();
      this.soap = var1;
   }

   public void disable() {
      this.setXml(DISABLED_POLICY_XML);
   }

   @RbacAttribute
   @Transient
   public boolean isDisabled() {
      // $VF: Couldn't be decompiled
      // Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!)
      // java.lang.RuntimeException: parsing failure!
      //   at org.jetbrains.java.decompiler.modules.decompiler.decompose.DomHelper.parseGraph(DomHelper.java:211)
      //   at org.jetbrains.java.decompiler.main.rels.MethodProcessor.codeToJava(MethodProcessor.java:174)
      //
      // Bytecode:
      // 00: aload 0
      // 01: invokevirtual com/l7tech/policy/Policy.getXml ()Ljava/lang/String;
      // 04: astore 1
      // 05: aload 1
      // 06: ifnull 1d
      // 09: aload 1
      // 0a: invokevirtual java/lang/String.trim ()Ljava/lang/String;
      // 0d: getstatic com/l7tech/policy/Policy.DISABLED_POLICY_XML Ljava/lang/String;
      // 10: invokevirtual java/lang/String.equals (Ljava/lang/Object;)Z
      // 13: ifeq 25
      // 16: goto 1d
      // 19: invokestatic com/l7tech/policy/Policy.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 1c: athrow
      // 1d: bipush 1
      // 1e: goto 26
      // 21: invokestatic com/l7tech/policy/Policy.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 24: athrow
      // 25: bipush 0
      // 26: ireturn
      // try (3 -> 10): 11 java/lang/IllegalArgumentException
      // try (5 -> 15): 15 java/lang/IllegalArgumentException
   }

   @Transient
   public long getVersionOrdinal() {
      return this.versionOrdinal;
   }

   public void setVersionOrdinal(long var1) {
      this.checkLocked();
      this.versionOrdinal = var1;
   }

   @Transient
   public boolean isVersionActive() {
      return this.versionActive;
   }

   public void setVersionActive(boolean var1) {
      this.checkLocked();
      this.versionActive = var1;
   }

   @Transient
   public WspReader.Visibility getVisibility() {
      return this.visibility;
   }

   @XmlTransient
   @Transient
   public void setVisibility(@Nullable WspReader.Visibility var1) {
      this.checkLocked();
      this.visibility = var1;
   }

   @Size(min = 1, max = 255)
   @Pattern(
      regexp = "message-received|pre-security|pre-service|post-security|post-service|message-completed",
      groups = Policy.GlobalPolicyValidationGroup.class
   )
   @Column(name = "internal_tag")
   public String getInternalTag() {
      return this.internalTag;
   }

   public void setInternalTag(String var1) {
      this.checkLocked();
      this.internalTag = var1;
   }

   @Size(min = 1, max = 255)
   @Column(name = "internal_sub_tag")
   public String getInternalSubTag() {
      return this.internalSubTag;
   }

   public void setInternalSubTag(String var1) {
      this.internalSubTag = var1;
   }

   @ManyToOne
   @JoinColumn(name = "folder_goid")
   @Migration(mapName = MigrationMappingSelection.NONE, mapValue = MigrationMappingSelection.NONE)
   @Override
   public Folder getFolder() {
      return this.folder;
   }

   @Override
   public void setFolder(Folder var1) {
      this.folder = var1;
   }

   @Override
   public boolean equals(Object param1) {
      // $VF: Couldn't be decompiled
      // Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!)
      // java.lang.RuntimeException: parsing failure!
      //   at org.jetbrains.java.decompiler.modules.decompiler.decompose.DomHelper.parseGraph(DomHelper.java:211)
      //   at org.jetbrains.java.decompiler.main.rels.MethodProcessor.codeToJava(MethodProcessor.java:174)
      //
      // Bytecode:
      // 000: aload 0
      // 001: aload 1
      // 002: if_acmpne 00b
      // 005: bipush 1
      // 006: ireturn
      // 007: invokestatic com/l7tech/policy/Policy.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 00a: athrow
      // 00b: aload 1
      // 00c: ifnull 021
      // 00f: aload 0
      // 010: invokevirtual java/lang/Object.getClass ()Ljava/lang/Class;
      // 013: aload 1
      // 014: invokevirtual java/lang/Object.getClass ()Ljava/lang/Class;
      // 017: if_acmpeq 027
      // 01a: goto 021
      // 01d: invokestatic com/l7tech/policy/Policy.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 020: athrow
      // 021: bipush 0
      // 022: ireturn
      // 023: invokestatic com/l7tech/policy/Policy.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 026: athrow
      // 027: aload 0
      // 028: aload 1
      // 029: invokespecial com/l7tech/objectmodel/imp/ZoneableNamedEntityImp.equals (Ljava/lang/Object;)Z
      // 02c: ifne 035
      // 02f: bipush 0
      // 030: ireturn
      // 031: invokestatic com/l7tech/policy/Policy.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 034: athrow
      // 035: aload 1
      // 036: checkcast com/l7tech/policy/Policy
      // 039: astore 2
      // 03a: aload 0
      // 03b: getfield com/l7tech/policy/Policy.guid Ljava/lang/String;
      // 03e: ifnull 05d
      // 041: aload 0
      // 042: getfield com/l7tech/policy/Policy.guid Ljava/lang/String;
      // 045: aload 2
      // 046: getfield com/l7tech/policy/Policy.guid Ljava/lang/String;
      // 049: invokevirtual java/lang/String.equals (Ljava/lang/Object;)Z
      // 04c: ifne 06a
      // 04f: goto 056
      // 052: invokestatic com/l7tech/policy/Policy.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 055: athrow
      // 056: goto 064
      // 059: invokestatic com/l7tech/policy/Policy.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 05c: athrow
      // 05d: aload 2
      // 05e: getfield com/l7tech/policy/Policy.guid Ljava/lang/String;
      // 061: ifnull 06a
      // 064: bipush 0
      // 065: ireturn
      // 066: invokestatic com/l7tech/policy/Policy.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 069: athrow
      // 06a: aload 0
      // 06b: getfield com/l7tech/policy/Policy.internalTag Ljava/lang/String;
      // 06e: ifnull 08d
      // 071: aload 0
      // 072: getfield com/l7tech/policy/Policy.internalTag Ljava/lang/String;
      // 075: aload 2
      // 076: getfield com/l7tech/policy/Policy.internalTag Ljava/lang/String;
      // 079: invokevirtual java/lang/String.equals (Ljava/lang/Object;)Z
      // 07c: ifne 09a
      // 07f: goto 086
      // 082: invokestatic com/l7tech/policy/Policy.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 085: athrow
      // 086: goto 094
      // 089: invokestatic com/l7tech/policy/Policy.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 08c: athrow
      // 08d: aload 2
      // 08e: getfield com/l7tech/policy/Policy.internalTag Ljava/lang/String;
      // 091: ifnull 09a
      // 094: bipush 0
      // 095: ireturn
      // 096: invokestatic com/l7tech/policy/Policy.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 099: athrow
      // 09a: aload 0
      // 09b: getfield com/l7tech/policy/Policy.internalSubTag Ljava/lang/String;
      // 09e: ifnull 0bd
      // 0a1: aload 0
      // 0a2: getfield com/l7tech/policy/Policy.internalSubTag Ljava/lang/String;
      // 0a5: aload 2
      // 0a6: getfield com/l7tech/policy/Policy.internalSubTag Ljava/lang/String;
      // 0a9: invokevirtual java/lang/String.equals (Ljava/lang/Object;)Z
      // 0ac: ifne 0ca
      // 0af: goto 0b6
      // 0b2: invokestatic com/l7tech/policy/Policy.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 0b5: athrow
      // 0b6: goto 0c4
      // 0b9: invokestatic com/l7tech/policy/Policy.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 0bc: athrow
      // 0bd: aload 2
      // 0be: getfield com/l7tech/policy/Policy.internalSubTag Ljava/lang/String;
      // 0c1: ifnull 0ca
      // 0c4: bipush 0
      // 0c5: ireturn
      // 0c6: invokestatic com/l7tech/policy/Policy.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 0c9: athrow
      // 0ca: aload 0
      // 0cb: getfield com/l7tech/policy/Policy.type Lcom/l7tech/policy/PolicyType;
      // 0ce: aload 2
      // 0cf: getfield com/l7tech/policy/Policy.type Lcom/l7tech/policy/PolicyType;
      // 0d2: if_acmpeq 0db
      // 0d5: bipush 0
      // 0d6: ireturn
      // 0d7: invokestatic com/l7tech/policy/Policy.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 0da: athrow
      // 0db: aload 0
      // 0dc: getfield com/l7tech/policy/Policy.xml Ljava/lang/String;
      // 0df: ifnull 0fe
      // 0e2: aload 0
      // 0e3: getfield com/l7tech/policy/Policy.xml Ljava/lang/String;
      // 0e6: aload 2
      // 0e7: getfield com/l7tech/policy/Policy.xml Ljava/lang/String;
      // 0ea: invokevirtual java/lang/String.equals (Ljava/lang/Object;)Z
      // 0ed: ifne 10b
      // 0f0: goto 0f7
      // 0f3: invokestatic com/l7tech/policy/Policy.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 0f6: athrow
      // 0f7: goto 105
      // 0fa: invokestatic com/l7tech/policy/Policy.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 0fd: athrow
      // 0fe: aload 2
      // 0ff: getfield com/l7tech/policy/Policy.xml Ljava/lang/String;
      // 102: ifnull 10b
      // 105: bipush 0
      // 106: ireturn
      // 107: invokestatic com/l7tech/policy/Policy.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 10a: athrow
      // 10b: aload 0
      // 10c: getfield com/l7tech/policy/Policy.securityZone Lcom/l7tech/objectmodel/SecurityZone;
      // 10f: ifnull 12e
      // 112: aload 0
      // 113: getfield com/l7tech/policy/Policy.securityZone Lcom/l7tech/objectmodel/SecurityZone;
      // 116: aload 2
      // 117: getfield com/l7tech/policy/Policy.securityZone Lcom/l7tech/objectmodel/SecurityZone;
      // 11a: invokevirtual com/l7tech/objectmodel/SecurityZone.equals (Ljava/lang/Object;)Z
      // 11d: ifne 13b
      // 120: goto 127
      // 123: invokestatic com/l7tech/policy/Policy.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 126: athrow
      // 127: goto 135
      // 12a: invokestatic com/l7tech/policy/Policy.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 12d: athrow
      // 12e: aload 2
      // 12f: getfield com/l7tech/policy/Policy.securityZone Lcom/l7tech/objectmodel/SecurityZone;
      // 132: ifnull 13b
      // 135: bipush 0
      // 136: ireturn
      // 137: invokestatic com/l7tech/policy/Policy.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 13a: athrow
      // 13b: bipush 1
      // 13c: ireturn
      // try (0 -> 5): 5 java/lang/IllegalArgumentException
      // try (7 -> 14): 15 java/lang/IllegalArgumentException
      // try (9 -> 19): 19 java/lang/IllegalArgumentException
      // try (21 -> 27): 27 java/lang/IllegalArgumentException
      // try (32 -> 41): 42 java/lang/IllegalArgumentException
      // try (35 -> 45): 45 java/lang/IllegalArgumentException
      // try (47 -> 52): 52 java/lang/IllegalArgumentException
      // try (54 -> 63): 64 java/lang/IllegalArgumentException
      // try (57 -> 67): 67 java/lang/IllegalArgumentException
      // try (69 -> 74): 74 java/lang/IllegalArgumentException
      // try (76 -> 85): 86 java/lang/IllegalArgumentException
      // try (79 -> 89): 89 java/lang/IllegalArgumentException
      // try (91 -> 96): 96 java/lang/IllegalArgumentException
      // try (98 -> 105): 105 java/lang/IllegalArgumentException
      // try (107 -> 116): 117 java/lang/IllegalArgumentException
      // try (110 -> 120): 120 java/lang/IllegalArgumentException
      // try (122 -> 127): 127 java/lang/IllegalArgumentException
      // try (129 -> 138): 139 java/lang/IllegalArgumentException
      // try (132 -> 142): 142 java/lang/IllegalArgumentException
      // try (144 -> 149): 149 java/lang/IllegalArgumentException
   }

   @Override
   public int hashCode() {
      int var1 = super.hashCode();

      int var10000;
      int var10001;
      label87: {
         try {
            var10000 = 31 * var1;
            if (this.guid != null) {
               var10001 = this.guid.hashCode();
               break label87;
            }
         } catch (IllegalArgumentException var7) {
            throw a(var7);
         }

         var10001 = 0;
      }

      var1 = var10000 + var10001;

      label79: {
         try {
            var10000 = 31 * var1;
            if (this.xml != null) {
               var10001 = this.xml.hashCode();
               break label79;
            }
         } catch (IllegalArgumentException var6) {
            throw a(var6);
         }

         var10001 = 0;
      }

      var1 = var10000 + var10001;

      label71: {
         try {
            var10000 = 31 * var1;
            if (this.type != null) {
               var10001 = this.type.hashCode();
               break label71;
            }
         } catch (IllegalArgumentException var5) {
            throw a(var5);
         }

         var10001 = 0;
      }

      var1 = var10000 + var10001;

      label63: {
         try {
            var10000 = 31 * var1;
            if (this.internalTag != null) {
               var10001 = this.internalTag.hashCode();
               break label63;
            }
         } catch (IllegalArgumentException var4) {
            throw a(var4);
         }

         var10001 = 0;
      }

      var1 = var10000 + var10001;

      label55: {
         try {
            var10000 = 31 * var1;
            if (this.internalSubTag != null) {
               var10001 = this.internalSubTag.hashCode();
               break label55;
            }
         } catch (IllegalArgumentException var3) {
            throw a(var3);
         }

         var10001 = 0;
      }

      var1 = var10000 + var10001;

      try {
         var10000 = 31 * var1;
         if (this.securityZone != null) {
            return var10000 + this.securityZone.hashCode();
         }
      } catch (IllegalArgumentException var2) {
         throw a(var2);
      }

      return var10000 + 0;
   }

   @Override
   protected void lock() {
      try {
         if (this.assertion != null) {
            this.assertion.lock();
         }
      } catch (IllegalArgumentException var1) {
         throw a(var1);
      }

      super.lock();
   }

   @Override
   public String toString() {
      String[] var2 = b;
      StringBuilder var1 = new StringBuilder(var2[2]);

      StringBuilder var10000;
      String var10001;
      label17: {
         try {
            var1.append(var2[13]).append(this.getGoid().toHexString()).append(var2[10]);
            var1.append(var2[11]).append(this.type).append(var2[6]);
            var10000 = var1.append(var2[4]);
            if (this._name == null) {
               var10001 = "";
               break label17;
            }
         } catch (IllegalArgumentException var3) {
            throw a(var3);
         }

         var10001 = this._name;
      }

      var10000.append(var10001).append(b[14]);
      return var1.toString();
   }

   public static WspReader.Visibility getDefaultVisibility() {
      return defaultVisibility;
   }

   public static void setDefaultVisibility(@NotNull WspReader.Visibility var0) {
      defaultVisibility = var0;
   }

   public static Assertion simplify(Assertion param0, boolean param1) {
      // $VF: Couldn't be decompiled
      // Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!)
      // java.lang.RuntimeException: parsing failure!
      //   at org.jetbrains.java.decompiler.modules.decompiler.decompose.DomHelper.parseGraph(DomHelper.java:211)
      //   at org.jetbrains.java.decompiler.main.rels.MethodProcessor.codeToJava(MethodProcessor.java:174)
      //
      // Bytecode:
      // 00: aload 0
      // 01: ifnonnull 16
      // 04: new java/lang/IllegalArgumentException
      // 07: dup
      // 08: getstatic com/l7tech/policy/Policy.b [Ljava/lang/String;
      // 0b: bipush 12
      // 0d: aaload
      // 0e: invokespecial java/lang/IllegalArgumentException.<init> (Ljava/lang/String;)V
      // 11: athrow
      // 12: invokestatic com/l7tech/policy/Policy.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 15: athrow
      // 16: aload 0
      // 17: instanceof com/l7tech/policy/assertion/composite/AllAssertion
      // 1a: ifne 2f
      // 1d: new java/lang/IllegalArgumentException
      // 20: dup
      // 21: getstatic com/l7tech/policy/Policy.b [Ljava/lang/String;
      // 24: bipush 7
      // 26: aaload
      // 27: invokespecial java/lang/IllegalArgumentException.<init> (Ljava/lang/String;)V
      // 2a: athrow
      // 2b: invokestatic com/l7tech/policy/Policy.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 2e: athrow
      // 2f: aload 0
      // 30: invokevirtual com/l7tech/policy/assertion/Assertion.getParent ()Lcom/l7tech/policy/assertion/composite/CompositeAssertion;
      // 33: ifnull 47
      // 36: new java/lang/IllegalArgumentException
      // 39: dup
      // 3a: getstatic com/l7tech/policy/Policy.b [Ljava/lang/String;
      // 3d: bipush 3
      // 3e: aaload
      // 3f: invokespecial java/lang/IllegalArgumentException.<init> (Ljava/lang/String;)V
      // 42: athrow
      // 43: invokestatic com/l7tech/policy/Policy.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 46: athrow
      // 47: aload 0
      // 48: bipush 1
      // 49: iload 1
      // 4a: invokestatic com/l7tech/policy/assertion/Assertion.simplify (Lcom/l7tech/policy/assertion/Assertion;ZZ)Lcom/l7tech/policy/assertion/Assertion;
      // 4d: astore 2
      // 4e: aload 2
      // 4f: aload 0
      // 50: if_acmpeq 82
      // 53: aload 2
      // 54: ifnonnull 6c
      // 57: goto 5e
      // 5a: invokestatic com/l7tech/policy/Policy.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 5d: athrow
      // 5e: aload 0
      // 5f: checkcast com/l7tech/policy/assertion/composite/AllAssertion
      // 62: invokevirtual com/l7tech/policy/assertion/composite/AllAssertion.clearChildren ()V
      // 65: goto 82
      // 68: invokestatic com/l7tech/policy/Policy.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 6b: athrow
      // 6c: aload 2
      // 6d: invokevirtual com/l7tech/policy/assertion/Assertion.getParent ()Lcom/l7tech/policy/assertion/composite/CompositeAssertion;
      // 70: aload 0
      // 71: if_acmpeq 82
      // 74: aload 0
      // 75: checkcast com/l7tech/policy/assertion/composite/AllAssertion
      // 78: astore 3
      // 79: aload 3
      // 7a: invokevirtual com/l7tech/policy/assertion/composite/AllAssertion.clearChildren ()V
      // 7d: aload 3
      // 7e: aload 2
      // 7f: invokevirtual com/l7tech/policy/assertion/composite/AllAssertion.addChild (Lcom/l7tech/policy/assertion/Assertion;)V
      // 82: aload 0
      // 83: areturn
      // try (0 -> 9): 9 java/lang/IllegalArgumentException
      // try (11 -> 21): 21 java/lang/IllegalArgumentException
      // try (23 -> 33): 33 java/lang/IllegalArgumentException
      // try (40 -> 45): 46 java/lang/IllegalArgumentException
      // try (43 -> 52): 52 java/lang/IllegalArgumentException
   }

   @Transient
   @Override
   public boolean isZoneable() {
      // $VF: Couldn't be decompiled
      // Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!)
      // java.lang.RuntimeException: parsing failure!
      //   at org.jetbrains.java.decompiler.modules.decompiler.decompose.DomHelper.parseGraph(DomHelper.java:211)
      //   at org.jetbrains.java.decompiler.main.rels.MethodProcessor.codeToJava(MethodProcessor.java:174)
      //
      // Bytecode:
      // 00: aload 0
      // 01: invokevirtual com/l7tech/policy/Policy.getType ()Lcom/l7tech/policy/PolicyType;
      // 04: astore 1
      // 05: aload 1
      // 06: ifnull 1f
      // 09: aload 1
      // 0a: invokevirtual com/l7tech/policy/PolicyType.isSecurityZoneable ()Z
      // 0d: ifeq 1f
      // 10: goto 17
      // 13: invokestatic com/l7tech/policy/Policy.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 16: athrow
      // 17: bipush 1
      // 18: goto 20
      // 1b: invokestatic com/l7tech/policy/Policy.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 1e: athrow
      // 1f: bipush 0
      // 20: ireturn
      // try (3 -> 8): 9 java/lang/IllegalArgumentException
      // try (5 -> 13): 13 java/lang/IllegalArgumentException
   }

   private void provideEntitiesToAssertionBeans(@NotNull DesignTimeEntityProvider var1) {
      try {
         Assertion var2 = this.getAssertion();
         if (var2 != null) {
            Iterator var3 = var2.preorderIterator();

            while (var3.hasNext()) {
               Assertion var4 = (Assertion)var3.next();
               if (var4 instanceof UsesEntitiesAtDesignTime var5) {
                  try {
                     var1.provideNeededEntities(var5, var5.getProvideEntitiesErrorHandler());
                  } catch (FindException var12) {
                     Logger var10000 = logger;
                     Level var10001 = Level.WARNING;
                     int var10002 = var4.getOrdinal();
                     String var10003 = this.getGuid();
                     String var10004 = this.getName();
                     String var7 = ExceptionUtils.getMessage(var12);
                     String var8 = var10004;
                     String var9 = var10003;
                     int var10 = var10002;
                     String[] var11 = b;
                     var10000.log(var10001, var11[15] + var10 + var11[5] + var9 + var11[0] + var8 + var11[1] + var7, ExceptionUtils.getDebugException(var12));
                  }
               }
            }
         }
      } catch (IOException var13) {
      }
   }

   static {
      String[] var5 = new String[16];
      int var3 = 0;
      String var2 = "\u0000{\u0003\ti_\b\u001c#\u0010N\u000e'*\u0000\u0016A \fG\u00150:O=_J\u00067sAs\u000fC\u0015!=T\u0006N2\u0012GZf\u0010\u0000<\u0019\u0002\u0017+?I0\u0006\u0002 \u0011\u001ads\u0002\u0002s\u001eA \fG\u00150:O=_O\u00127'\u00001\u001a\u0002&(?a \fG\u00150:O=\u000fp<\u0013K\u0004=sD:\fC\u0005(6DOp<\u0013K\u0004=s\u0003(O_Gl(\u0011.V\u0002\u000f% \u00002\u0011\u0002\u000e*%A?\u0016FG+!\u00006\u0012R\u0013=sP<\u0013K\u0004=\fX>\u0013\u0002\u0001-6L7Q\u0002G\u0011 I=\u0018\u0002\t1?Ls\u000fM\u000b-0Y}\u0002\u0002s\u0006T*\u000fGZf\u001aA \fG\u00150:O=_O\u00127'\u0000=\u0010VG&6\u0000=\nN\u000b\u0004I7B\u0000";
      int var4 = "\u0000{\u0003\ti_\b\u001c#\u0010N\u000e'*\u0000\u0016A \fG\u00150:O=_J\u00067sAs\u000fC\u0015!=T\u0006N2\u0012GZf\u0010\u0000<\u0019\u0002\u0017+?I0\u0006\u0002 \u0011\u001ads\u0002\u0002s\u001eA \fG\u00150:O=_O\u00127'\u00001\u001a\u0002&(?a \fG\u00150:O=\u000fp<\u0013K\u0004=sD:\fC\u0005(6DOp<\u0013K\u0004=s\u0003(O_Gl(\u0011.V\u0002\u000f% \u00002\u0011\u0002\u000e*%A?\u0016FG+!\u00006\u0012R\u0013=sP<\u0013K\u0004=\fX>\u0013\u0002\u0001-6L7Q\u0002G\u0011 I=\u0018\u0002\t1?Ls\u000fM\u000b-0Y}\u0002\u0002s\u0006T*\u000fGZf\u001aA \fG\u00150:O=_O\u00127'\u0000=\u0010VG&6\u0000=\nN\u000b\u0004I7B\u0000"
         .length();
      char var1 = 2;
      int var8 = -1;

      label39:
      while (true) {
         byte var10000 = 23;
         String var10001 = var2.substring(++var8, var8 + var1);
         byte var10002 = -1;

         while (true) {
            String var9 = b(var10000, b(var10001));
            switch (var10002) {
               case 0:
                  var5[var3++] = var9;
                  if ((var8 += var1) >= var4) {
                     b = var5;

                     label26: {
                        try {
                           if (!Policy.class.desiredAssertionStatus()) {
                              var10 = true;
                              break label26;
                           }
                        } catch (IllegalArgumentException var6) {
                           throw a(var6);
                        }

                        var10 = false;
                     }

                     $assertionsDisabled = var10;
                     logger = Logger.getLogger(Policy.class.getName());
                     defaultVisibility = WspReader.INCLUDE_DISABLED;
                     DISABLED_POLICY = new AllAssertion(Arrays.asList(new CommentAssertion(b[8]), new FalseAssertion()));
                     DISABLED_POLICY_XML = WspWriter.getPolicyXml(DISABLED_POLICY).trim();
                     return;
                  }

                  var1 = var2.charAt(var8);
                  break;
               default:
                  var5[var3++] = var9;
                  if ((var8 += var1) < var4) {
                     var1 = var2.charAt(var8);
                     continue label39;
                  }

                  var2 = ";Ex/L\u0004'y2\u0018Jm\u0005fk,\u0018\u001ax\u0018#;;\u0013\u001ep\u001e?;8\u0012\u00189\u000b5h;\u000f\u001ep\u0005(;1\u000f\u000ep\u0004'w~";
                  var4 = ";Ex/L\u0004'y2\u0018Jm\u0005fk,\u0018\u001ax\u0018#;;\u0013\u001ep\u001e?;8\u0012\u00189\u000b5h;\u000f\u001ep\u0005(;1\u000f\u000ep\u0004'w~"
                     .length();
                  var1 = 3;
                  var8 = -1;
            }

            var10000 = 46;
            var10001 = var2.substring(++var8, var8 + var1);
            var10002 = 0;
         }
      }
   }

   private static Exception a(Exception var0) {
      return var0;
   }

   private static char[] b(String var0) {
      char[] var10000 = var0.toCharArray();
      if (var10000.length < 2) {
         var10000[0] = (char)(var10000[0] ^ 68);
      }

      return var10000;
   }

   private static String b(int var0, char[] var1) {
      int var10003 = var1.length;
      int var10002 = var0;
      char[] var10001 = var1;
      int var10000 = var10003;

      for (int var2 = 0; var10000 > var2; var2++) {
         var10001[var2] = (char)(var10001[var2] ^ var10002 ^ switch (var2 % 7) {
            case 0 -> 55;
            case 1 -> 68;
            case 2 -> 104;
            case 3 -> 53;
            case 4 -> 112;
            case 5 -> 83;
            default -> 68;
         });
      }

      return new String(var10001).intern();
   }

   public interface GlobalPolicyValidationGroup {
   }
}
