Pattern selector

Most relevant patterns first. Most helpful ones displayed. Click here to show all.

  1. LiftFilter.doFilter() has thrown an InvocationTargetException
    Unsorted
    0
    3
    0
  2. Get on empty Option
    Scala Library
    36
    213
    33

Your stack trace compared to the selected pattern

Jump to solutionsExpand frames
java.util.NoSuchElementException: None.get
    at scala.None$.get(Option.scala:347)
    at scala.None$.get(Option.scala:345)
    at code.snippet.OBPTransactionSnippet.displayAll(TransactionsList.scala:381)

Solution

Nwabunnia11 months ago

In Scala, don't use the get method on Option to access the value of it. Use getOrElse, a match expression, or foreach instead.

External results for this pattern (10)

  1. Tagarvia GitHub1 month ago
    None.get
    Show stack trace
  2. scabugvia GitHub1 month ago
    None.get
    Show stack trace
  3. Unknown authorvia Google Groups1 month ago
  4. Unknown authorvia Google Groups1 month ago
  5. lindholcvia GitHub1 month ago
    None.get
    Show stack trace
  6. gtiaovia GitHub2 months ago
    None.get
    Show stack trace