MCPcopy Index your code
hub / github.com/apache/tomcat / removeAlias

Method removeAlias

java/org/apache/catalina/core/StandardHost.java:732–766  ·  view source on GitHub ↗
(String alias)

Source from the content-addressed store, hash-verified

730
731
732 @Override
733 public void removeAlias(String alias) {
734
735 alias = alias.toLowerCase(Locale.ENGLISH);
736
737 synchronized (aliasesLock) {
738
739 // Make sure this alias is currently present
740 int n = -1;
741 for (int i = 0; i < aliases.length; i++) {
742 if (aliases[i].equals(alias)) {
743 n = i;
744 break;
745 }
746 }
747 if (n < 0) {
748 return;
749 }
750
751 // Remove the specified alias
752 int j = 0;
753 String[] results = new String[aliases.length - 1];
754 for (int i = 0; i < aliases.length; i++) {
755 if (i != n) {
756 results[j++] = aliases[i];
757 }
758 }
759 aliases = results;
760
761 }
762
763 // Inform interested listeners
764 fireContainerEvent(REMOVE_ALIAS_EVENT, alias);
765
766 }
767
768
769 @Override

Callers

nothing calls this directly

Calls 2

equalsMethod · 0.65
fireContainerEventMethod · 0.65

Tested by

no test coverage detected