r/badcode • • Apr 07 '21

java Apparently Java can only handle 255 parameters in a constructor...

Post image
4.0k Upvotes

249 comments sorted by

View all comments

Show parent comment

6

u/sharpened_ Apr 07 '21

But why on earth would it need to pass in All The Views if you're only ever going to use 1 at a time?

Seems like a refactor of that function is in order, what hellish software will write code like that? Or is programmatically generated code generally simple?

I've only ever touched it once, and that basically created getters and setters from a table.

4

u/646c726f576f6c6c6548 Apr 07 '21

It's pretty simple, but creates thing thing called a binding and is a wrapper that makes it easier to refer to different views.

We also weren't using Fragments like we should have and ended up having to after this.