Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Caused by java.lang.NullPointerException: Null lastPlatform
- x.x.x.x.AutoValue_Session. (SourceFile:27)
- x.x.x.x.Session.from (SourceFile:28)
- x.x.x.x.Session. (SourceFile:22)
- x.x.x.x.Session.from (SourceFile:32)
- [...]
- sealed class Platform {
- abstract val name : String
- sealed class Local : Platform() {
- object Default : Local() {
- override val name: String = "android"
- }
- object Amazon : Local() {
- override val name: String = "android-amazon"
- }
- }
- object Missing : ResumePlatform() {
- override val name: String = "missing"
- }
- data class Remote(override val name: String) : ResumePlatform()
- companion object {
- @JvmName("from")
- @JvmStatic
- operator fun invoke(name: String?): ResumePlatform = when (name) {
- Local.Default.name -> Local.Default
- Local.Amazon.name -> Local.Amazon
- Missing.name -> Missing
- null -> Missing
- else -> Remote(name)
- }
- @JvmField
- val LOCAL : Platform = if (BuildConfig.amazon) Local.Amazon else Local.Generic
- @JvmField
- val MISSING : Platform = Missing
- }
- }
- @AutoValue
- public abstract class Session implements Serializable {
- public static final Session NONE_FOUND = from(0, new DateTime(0), Platform.MISSING);
- public static Session from(String id, @Nullable Platform lastPlatform) {
- Platform platform = lastPlatform == null ? Platform.MISSING : lastPlatform;
- return new AutoValue_Session(id, platform);
- }
- public static Session from(RemoreSession remote) {
- return from(
- remote.id(),
- remote.lastPlatform()
- );
- }
- public abstract String id();
- public abstract Platform lastPlatform();
- }
Add Comment
Please, Sign In to add comment