question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to use enum as arg without warning

See original GitHub issue

enum is a Serializable and seems like I can’t implement Parcelable for it. Performance is not a big problem here, so how can i dismiss the warning?

warning: mRequestType will be stored as Serializable

public enum RequestType {
    UNDEFINED, STOCK, FAST_PD, TRANSFER, TRADE, INSPECTION_GOODS, CONFIRM_INSPECTION
}

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
sockeqwecommented, Jul 20, 2017

is there still demand for this?

0reactions
AndreasBoehmcommented, Apr 18, 2018

I am currently working on adding a annotation processor argument to suppress warnings about serializable enums

Read more comments on GitHub >

github_iconTop Results From Across the Web

Should i pass an enum as a parameter or pass its literal value
I would recommend passing the enum value as it is more strongly typed. In your example, if "candy" and "apple" are the only...
Read more >
Enum - Choices - Typer - tiangolo
Notice that the function parameter network will be an Enum , not a str . To get the str value in your function's...
Read more >
Enumerations - Scala 3 - EPFL
The values method returns all enum values defined in an enumeration in an ... There is no need to provide constructor arguments (as...
Read more >
Diagnostic flags in Clang — Clang 16.0.0git documentation
This diagnostic flag exists for GCC compatibility, and has no effect in Clang. -Waix-compat¶. This diagnostic is enabled by default. Diagnostic text: warning: ......
Read more >
TypeScript enums: How do they work? What can they be used ...
String-based enums # ... Instead of numbers, we can also use strings as enum member values: enum NoYes { No = 'No', Yes...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found