You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@texera.apache.org by "Yicong-Huang (via GitHub)" <gi...@apache.org> on 2026/05/03 03:58:21 UTC

[I] AmberFIFOChannel.getPortId throws NoSuchElementException when called before setPortId [texera]

Yicong-Huang opened a new issue, #4818:
URL: https://github.com/apache/texera/issues/4818

   ### What happened?
   
   `amber/src/main/scala/org/apache/texera/amber/engine/architecture/messaginglayer/AmberFIFOChannel.scala::getPortId` does `this.portId.get` on an `Option[PortIdentity]` that defaults to `None`. Calling `getPortId` before `setPortId` therefore throws a bare `NoSuchElementException` with no contextual message — quite different from a guard-and-raise (`require(...)`, `assert(...)`) that would point the caller at the missing setup step.
   
   `portId` is also untyped at the API level (the public getter declares `PortIdentity`, not `Option[PortIdentity]`), so callers cannot pattern-match safely; their only options today are blind `.get` access or wrapping in a try/catch.
   
   ### How to reproduce?
   
   ```scala
   import org.apache.texera.amber.core.virtualidentity.{ActorVirtualIdentity, ChannelIdentity}
   import org.apache.texera.amber.engine.architecture.messaginglayer.AmberFIFOChannel
   
   val ch = new AmberFIFOChannel(
     ChannelIdentity(ActorVirtualIdentity("from"), ActorVirtualIdentity("to"), isControl = false)
   )
   ch.getPortId
   // java.util.NoSuchElementException: None.get
   ```
   
   ### Version
   
   1.1.0-incubating (Pre-release/Master)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] AmberFIFOChannel.getPortId throws NoSuchElementException when called before setPortId [texera]

Posted by "aglinxinyuan (via GitHub)" <gi...@apache.org>.
aglinxinyuan closed issue #4818: AmberFIFOChannel.getPortId throws NoSuchElementException when called before setPortId
URL: https://github.com/apache/texera/issues/4818


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] AmberFIFOChannel.getPortId throws NoSuchElementException when called before setPortId [texera]

Posted by "Ma77Ball (via GitHub)" <gi...@apache.org>.
Ma77Ball commented on issue #4818:
URL: https://github.com/apache/texera/issues/4818#issuecomment-4393867923

   /take


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org