# ToastBar Return Value

DevFeed: [ToastBar Return Value](<https://devfeed.tech/articles/toastbar-return-value-19616.md>)

Original publisher: [Read original article](<https://www.codenameone.com/blog/toastbar-return-value/>)

Author: Shai Almog

Published: 2018-06-25T00:00:00Z

Content type: release

Language: en

Sources: [CodeName One](<https://devfeed.tech/sources/codename-one.md>)

Topics: [Java](<https://devfeed.tech/topics/java.md>), [Java Language](<https://devfeed.tech/topics/java-language.md>)

Tags: [bytecode](<https://devfeed.tech/tags/bytecode.md>), [compatibility](<https://devfeed.tech/tags/compatibility.md>), [java](<https://devfeed.tech/tags/java.md>), [jvm](<https://devfeed.tech/tags/jvm.md>), [language](<https://devfeed.tech/tags/language.md>), [libraries](<https://devfeed.tech/tags/libraries.md>), [update](<https://devfeed.tech/tags/update.md>)

## AI overview

An enhancement changed ToastBar static showMessage methods to return a Status object instead of void, enabling more control after displaying a toast. Because Java return types contribute to method signatures, the change can break binary compatibility for users compiled against older libraries. Updating client libraries and performing a clean build is recommended before sending a new build.

## Source excerpt

Last week I pushed out an enhancement to ToastBar that changed the static showMessage methods. I made them return the Status object instead of void which would allow more control of the toast message after it's shown. Unfortunately, I totally forgot that I can't do that without breaking some binary compatibility. In Java return types create a distinct method signature, so even though the language doesn't allow you to do this: