Closed Bug 1518592 Opened Last year Closed Last year

GeckoView session setter and getter need to have consistent nullibility

Categories

(GeckoView :: General, enhancement)

All
Android
enhancement
Not set

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: eeejay, Unassigned)

References

Details

getSession() returns a nullable session, setSession() requires nonnull.

This breaks kotlin property assignments. So this won't work:

view.session = newSession

...it will fail with Val cannot be reassigned.

This is a limitation of Kotlin-Java interop I think. session can be null (before it's ever assigned) but we don't want it to be assigned to a null value.

We discussed it during prioritization and we're fine leaving it as is (assuming you can use setSession to set the session in kotlin).

Note that Kotlin is considering allowing this case (although it might be a while).

Status: NEW → RESOLVED
Closed: Last year
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.