We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f7dd97b commit bbd9101Copy full SHA for bbd9101
tests/org.eclipse.ui.tests.harness/src/org/eclipse/ui/tests/harness/util/DialogCheck.java
@@ -156,7 +156,8 @@ private static void verifyButtonText(Button button) {
156
//if (size.y/preferred.y) == X, then label spans X lines, so divide
157
//the calculated value of preferred.x by X
158
if (preferred.y * size.y > 0) {
159
- preferred.y /= button.getText().lines().count(); // check for '\n\'
+ String buttonText = button.getText();
160
+ preferred.y /= buttonText.isEmpty() ? 1 : buttonText.lines().count(); // check for '\n\'
161
if (size.y / preferred.y > 1) {
162
preferred.x /= (size.y / preferred.y);
163
}
0 commit comments