Skip to content

Fixed NPE in VectorStepper due to dirty display vector. #117

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 20, 2019

Conversation

Ichoran
Copy link
Contributor

@Ichoran Ichoran commented Jul 28, 2018

(Could occur with structurally shared vectors.)

Fixed by creating an iterator, which creates a clean display. (Would probably be more efficient for everyone if this was handled a different way, but this is the easiest to code.)

(Could occur with structurally shared vectors.)
@SethTisue
Copy link
Member

review by @joshlemer?

public static <A> Object[] getDisplay5(scala.collection.immutable.Vector<A> v) { return v.display5(); }
public static <A> Object[] getDisplay5(scala.collection.immutable.VectorIterator<A> p) { return p.display5(); }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could all these duplicates just take a scala.collection.immutable.VectorPointer<A>?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh I see

// (Manually specialized this way for speed.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it cuts off about 20% of the runtime in my ad-hoc testing.

@SethTisue SethTisue merged commit d418b84 into scala:master Feb 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants