@Override
	public void setName(String newName) throws InvalidNameException, DuplicateNameException {
		testName(newName);
		mgr.lock.acquire();
		try {
			checkDeleted();
			CategoryPath oldPath = getCategoryPath();
			if (isRoot()) {
				mgr.setName(newName);
				return;
			}
			if (newName.equals(name)) {
				return;
			}
			if (parent.getCategory(newName) != null) {
				throw new DuplicateNameException("Category named " + newName + " already exists");
			}
			String oldName = name;
			name = newName;
			try {
				mgr.getCategoryDBAdapter().updateRecord(key, parent.key, newName);
			}
			catch (IOException e) {
				mgr.dbError(e);
			}
			parent.catagoryRenamed(this, oldName);
			mgr.categoryRenamed(oldPath, this);
		}
		finally {
			mgr.lock.release();
		}
	}
@see ghidra.program.model.data.Category#setName(java.lang.String)
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/data/CategoryDB.java