Skip to content

Suppress empty tokens when processing GUI layout string - #2766

Merged
ChristianGruen merged 2 commits into
BaseXdb:mainfrom
GuntherRademacher:#2766
Sep 22, 2026
Merged

ChristianGruen merged 2 commits into
BaseXdb:mainfrom
GuntherRademacher:#2766

Conversation

@GuntherRademacher

@GuntherRademacher GuntherRademacher commented Sep 22, 2026 •

Copy link
Copy Markdown
Member

Initially writing .basexgui comes up with this LAYOUT string:

LAYOUT = V 1.0 H 1.0 editor 1.0 folder 1.0 map 1.0 plot 1.0 - - 

This causes the result and info panes in the GUI to disappear. Before the changes in e778a95, the LAYOUT string was:

LAYOUT = V 1.0 H 1.0 editor 1.0 folder 1.0 map 1.0 plot 1.0 - H 1.0 text 1.0 info 1.0 table 1.0 tree 1.0 explore 1.0 - - 

The difference is caused by the replacement of StringTokenizer by Strings.split in ViewContainer.buildLayout. While the former suppresses empty tokens, the latter keeps them, which causes a StringIndexOutOfBoundsException in the same method. The empty token is caused by two consecutive spaces in GUIConstants.VIEWS.

@ChristianGruen
ChristianGruen merged commit d1cbe20 into BaseXdb:main Sep 22, 2026
1 check passed
@ChristianGruen
ChristianGruen deleted the #2766 branch September 22, 2026 11:11
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