You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by lk...@apache.org on 2022/09/11 18:02:47 UTC
[netbeans] branch master updated: FIX-3732: Prevent possible IAE in DocumentViewOp.
This is an automated email from the ASF dual-hosted git repository.
lkishalmi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans.git
The following commit(s) were added to refs/heads/master by this push:
new 0b33041d2a FIX-3732: Prevent possible IAE in DocumentViewOp.
0b33041d2a is described below
commit 0b33041d2a20a4b5e6ae548711787ff76fc6ba22
Author: Laszlo Kishalmi <la...@gmail.com>
AuthorDate: Sun Sep 11 08:30:48 2022 -0700
FIX-3732: Prevent possible IAE in DocumentViewOp.
---
.../src/org/netbeans/modules/editor/lib2/view/DocumentViewOp.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ide/editor.lib2/src/org/netbeans/modules/editor/lib2/view/DocumentViewOp.java b/ide/editor.lib2/src/org/netbeans/modules/editor/lib2/view/DocumentViewOp.java
index 06cbd5a31f..7475b0937d 100644
--- a/ide/editor.lib2/src/org/netbeans/modules/editor/lib2/view/DocumentViewOp.java
+++ b/ide/editor.lib2/src/org/netbeans/modules/editor/lib2/view/DocumentViewOp.java
@@ -1391,7 +1391,7 @@ public final class DocumentViewOp
TextLayout createTextLayout(String text, Font font) {
checkSettingsInfo();
- if (fontRenderContext != null && font != null) {
+ if (fontRenderContext != null && font != null && text.length() > 0) {
ViewStats.incrementTextLayoutCreated(text.length());
FontInfo fontInfo = getFontInfo(font);
TextLayout textLayout = new TextLayout(text, fontInfo.renderFont, fontRenderContext);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists