swiftlang / swiftlang/swift-java

Consider javaThis and null pointers some more

Open
#443 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature:wrap-java
Dominant language
Swift
Stars
1.2k
Forks
123
Avg merge
1d 7h
Merged PRs (30d)
16

Description

public var javaThis: jobject { is using a force unwrap and we've seen it trigger sometimes.

Investigate if that's a bug, or can legitimately happen if we got a null form java and therefore.

Most likely we should be preventing creating a wrapper with a null javaThis at all.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the javaThis declaration and trace where wrappers are created and where Java values enter Swift. Determine whether a null Java value can reach the force unwrap, then establish the intended behavior for null-backed wrappers. Done means the null case is understood and the issue's proposed prevention or alternative is verified with relevant tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, swift
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.