Skip to content

fix: correct lazycopy dimensions and world usage#3520

Open
dordsor21 wants to merge 1 commit into
mainfrom
fix/lazy-copy
Open

fix: correct lazycopy dimensions and world usage#3520
dordsor21 wants to merge 1 commit into
mainfrom
fix/lazy-copy

Conversation

@dordsor21
Copy link
Copy Markdown
Member

@dordsor21 dordsor21 requested a review from a team as a code owner May 10, 2026 15:59

@Override
public long getMaxSize() {
return -1;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why not just use Long.MAX_VALUE? The specification of the method in the superclass should also cover which values are valid.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I wanted to convey actually unlimited rather than functionally unlimited. It should go into the javadoc though yeah

*
* @return maximum size in blocks of this clipboard implementation.
*/
public long getMaxSize() {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

An instance method is somehow the wrong approach, mainly because it requires an escaping this in the constructor, and it also doesn't have any different use really. Maybe SimpleClipboard is generally a rather problematic abstraction?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It is, but altering the hierarchy is rather a v3 change and it would be nice to have this working a little sooner than that... We could always deprecate for removal upon implementation and put the change into V3 immediately.

Alternatively I suppose we could just reimplement in a different class entirely? Certainly the clipboard hierarchy could do with some cleanup at some point regardless

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.

LAZYCOPY will not copy clipboard source world //lazycopy dimensiona too large

2 participants