Skip to content

Fix assorted exceptions from bots/crawlers#6608

Merged
labkey-jeckels merged 6 commits intodevelopfrom
fb_miscFixes
Apr 29, 2025
Merged

Fix assorted exceptions from bots/crawlers#6608
labkey-jeckels merged 6 commits intodevelopfrom
fb_miscFixes

Conversation

@labkey-jeckels
Copy link
Copy Markdown
Contributor

Rationale

Changes

  • Avoid a race condition in creating custom views
  • Avoid a race condition subscribing to an announcement thread
  • Fix thread-level subscribe/unsubscribe for announcements with multiple messages in thread
  • Minor code cleanup

@labkey-jeckels labkey-jeckels requested a review from a team April 27, 2025 15:43
Copy link
Copy Markdown
Contributor

@labkey-adam labkey-adam left a comment

Choose a reason for hiding this comment

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

ThreadView user isn't used

if (reshow)
{
String rendererTypeName = (String) form.get("rendererType");
String rendererTypeName = form.get("rendererType");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

FYI: Could replace these five lines with a one-line call to EnumUtils.getEnum()

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Replaced


@RequiresPermission(ReadPermission.class)
public class RssAction extends SimpleViewAction
public class RssAction extends SimpleViewAction<Object>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good old RssAction!

}

protected void init(Container c, AnnouncementModel ann, URLHelper currentURL, Permissions perm, boolean isResponse, boolean print)
protected void init(Container c, AnnouncementModel ann, URLHelper currentURL, Permissions perm, boolean isResponse, boolean print, User user)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Am I missing something? user is not used.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Correct, I ended up not needing it. Reverted.

}

public ThreadView(Container c, ActionURL url, AnnouncementModel ann, Permissions perm)
public ThreadView(Container c, ActionURL url, AnnouncementModel ann, Permissions perm, User user)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't really care, but user is unused

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Oh, yes. I removed one but not the other levels. Another try now pushed.

}

public ThreadView(AnnouncementForm form, Container c, ActionURL url, Permissions perm, boolean print)
public ThreadView(AnnouncementForm form, Container c, ActionURL url, Permissions perm, boolean print, User user)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

user is unused

@labkey-jeckels labkey-jeckels merged commit f1ece61 into develop Apr 29, 2025
5 of 7 checks passed
@labkey-jeckels labkey-jeckels deleted the fb_miscFixes branch April 29, 2025 00:13
XingY pushed a commit that referenced this pull request Apr 30, 2025
* Try to track down OutOfMemoryError saving custom view
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.

2 participants