Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
NetBeans
Apache NetBeans
Commits
802e9264
Commit
802e9264
authored
Jul 01, 2020
by
Laszlo Kishalmi
Browse files
[NETBEANS-4420] Fix IAE on tooltip images with unknown size.
parent
143ef555
Changes
2
Hide whitespace changes
Inline
Side-by-side
platform/openide.util.ui/manifest.mf
View file @
802e9264
Manifest-Version: 1.0
Manifest-Version: 1.0
OpenIDE-Module: org.openide.util.ui
OpenIDE-Module: org.openide.util.ui
OpenIDE-Module-Localizing-Bundle: org/openide/util/Bundle.properties
OpenIDE-Module-Localizing-Bundle: org/openide/util/Bundle.properties
OpenIDE-Module-Specification-Version: 9.16
OpenIDE-Module-Specification-Version: 9.16
.1
platform/openide.util.ui/src/org/openide/util/ImageUtilities.java
View file @
802e9264
...
@@ -811,8 +811,8 @@ public final class ImageUtilities {
...
@@ -811,8 +811,8 @@ public final class ImageUtilities {
ensureLoaded
(
image1
);
ensureLoaded
(
image1
);
ensureLoaded
(
image2
);
ensureLoaded
(
image2
);
int
w
=
Math
.
max
(
image1
.
getWidth
(
null
),
x
+
image2
.
getWidth
(
null
));
int
w
=
Math
.
max
(
1
,
Math
.
max
(
image1
.
getWidth
(
null
),
x
+
image2
.
getWidth
(
null
))
)
;
int
h
=
Math
.
max
(
image1
.
getHeight
(
null
),
y
+
image2
.
getHeight
(
null
));
int
h
=
Math
.
max
(
1
,
Math
.
max
(
image1
.
getHeight
(
null
),
y
+
image2
.
getHeight
(
null
))
)
;
boolean
bitmask
=
(
image1
instanceof
Transparency
)
&&
((
Transparency
)
image1
).
getTransparency
()
!=
Transparency
.
TRANSLUCENT
boolean
bitmask
=
(
image1
instanceof
Transparency
)
&&
((
Transparency
)
image1
).
getTransparency
()
!=
Transparency
.
TRANSLUCENT
&&
(
image2
instanceof
Transparency
)
&&
((
Transparency
)
image2
).
getTransparency
()
!=
Transparency
.
TRANSLUCENT
;
&&
(
image2
instanceof
Transparency
)
&&
((
Transparency
)
image2
).
getTransparency
()
!=
Transparency
.
TRANSLUCENT
;
...
@@ -1064,8 +1064,8 @@ public final class ImageUtilities {
...
@@ -1064,8 +1064,8 @@ public final class ImageUtilities {
ImageUtilities
.
ensureLoaded
(
image
);
ImageUtilities
.
ensureLoaded
(
image
);
boolean
bitmask
=
(
image
instanceof
Transparency
)
&&
((
Transparency
)
image
).
getTransparency
()
!=
Transparency
.
TRANSLUCENT
;
boolean
bitmask
=
(
image
instanceof
Transparency
)
&&
((
Transparency
)
image
).
getTransparency
()
!=
Transparency
.
TRANSLUCENT
;
ColorModel
model
=
colorModel
(
bitmask
?
Transparency
.
BITMASK
:
Transparency
.
TRANSLUCENT
);
ColorModel
model
=
colorModel
(
bitmask
?
Transparency
.
BITMASK
:
Transparency
.
TRANSLUCENT
);
int
w
=
image
.
getWidth
(
null
);
int
w
=
Math
.
max
(
1
,
image
.
getWidth
(
null
)
)
;
int
h
=
image
.
getHeight
(
null
);
int
h
=
Math
.
max
(
1
,
image
.
getHeight
(
null
)
)
;
if
(
url
==
null
)
{
if
(
url
==
null
)
{
Object
value
=
image
.
getProperty
(
"url"
,
null
);
Object
value
=
image
.
getProperty
(
"url"
,
null
);
url
=
(
value
instanceof
URL
)
?
(
URL
)
value
:
null
;
url
=
(
value
instanceof
URL
)
?
(
URL
)
value
:
null
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment