Skip to content
This repository was archived by the owner on Mar 31, 2023. It is now read-only.

Commit 65b8c53

Browse files
authored
[Port Mgr] Fix Update Port Exception in DatabaseProcessor (#368)
1 parent ee0dcb3 commit 65b8c53

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

services/port_manager/src/main/java/com/futurewei/alcor/portmanager/processor/DatabaseProcessor.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,10 @@ void createProcess(PortContext context) throws Exception {
6868
@Override
6969
void updateProcess(PortContext context) throws Exception {
7070
List<InternalPortEntity> internalPortEntities = context.getNetworkConfig().getPortEntities();
71-
NeighborInfo neighborInfo = buildNeighborInfo(internalPortEntities.get(0));
71+
NeighborInfo neighborInfo = null;
72+
if (internalPortEntities.size() > 0) {
73+
neighborInfo = buildNeighborInfo(internalPortEntities.get(0));
74+
}
7275
PortEntity oldPortEntity = context.getOldPortEntity();
7376
context.getPortRepository().updatePort(oldPortEntity, neighborInfo);
7477
}

0 commit comments

Comments
 (0)