Skip to content

Commit 49f8bf7

Browse files
committed
Avoid using non-disposed resources in LabelTest
This corrects a minor oversight introduced with 2e46a0b. One of the tests creates a new Font, but never disposes it, even though an identical Font is created that is disposed once the test finishes.
1 parent 807ec4a commit 49f8bf7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

org.eclipse.draw2d.tests/src/org/eclipse/draw2d/test/LabelTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ public void test_getPreferredSize() throws Exception {
135135
assertSame(size2, label.getPreferredSize());
136136
//
137137
// check calc preferred size if font is changed
138-
label.setFont(new Font(null, "", 100, SWT.NONE)); //$NON-NLS-1$
138+
label.setFont(testFont);
139139
assertNotSame(size2, label.getPreferredSize());
140140
assertTextSize(label);
141141
//

0 commit comments

Comments
 (0)