(String alias)
| 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 |
nothing calls this directly
no test coverage detected