Merge "Omaha #3163 Fix NPE when styleless strings are sent to 14.3" into omaha_14.4.1
Former-commit-id:181a87e72d
[formerly181a87e72d
[formerly 34250721f97f05be61e9e4e8b6f71758347a9f60]] Former-commit-id:5908a4501a
Former-commit-id:442a3d9683
This commit is contained in:
commit
e01ddac6ad
1 changed files with 9 additions and 5 deletions
|
@ -114,7 +114,6 @@ public class DrawStringEvent extends AbstractRemoteGraphicsRenderEvent {
|
||||||
@Deprecated
|
@Deprecated
|
||||||
private RGB boxColor;
|
private RGB boxColor;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated Once backwards compatibility is not needed switch to
|
* @deprecated Once backwards compatibility is not needed switch to
|
||||||
* {@link #textStyleColorMap}
|
* {@link #textStyleColorMap}
|
||||||
|
@ -249,6 +248,9 @@ public class DrawStringEvent extends AbstractRemoteGraphicsRenderEvent {
|
||||||
.get(TextStyle.DROP_SHADOW);
|
.get(TextStyle.DROP_SHADOW);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else if (!SUPPORT_STYLE_COLORS) {
|
||||||
|
/* No TextStyle 14.3 is an empty set, not null. */
|
||||||
|
this.textStyles = EnumSet.noneOf(TextStyle.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -257,7 +259,7 @@ public class DrawStringEvent extends AbstractRemoteGraphicsRenderEvent {
|
||||||
DrawableString ds = new DrawableString(text, colors);
|
DrawableString ds = new DrawableString(text, colors);
|
||||||
ds.basics.alpha = alpha;
|
ds.basics.alpha = alpha;
|
||||||
ds.basics.xOrColors = xOrColors;
|
ds.basics.xOrColors = xOrColors;
|
||||||
|
|
||||||
ds.horizontalAlignment = horizontalAlignment;
|
ds.horizontalAlignment = horizontalAlignment;
|
||||||
ds.verticallAlignment = verticalAlignment;
|
ds.verticallAlignment = verticalAlignment;
|
||||||
ds.magnification = magnification;
|
ds.magnification = magnification;
|
||||||
|
@ -267,9 +269,9 @@ public class DrawStringEvent extends AbstractRemoteGraphicsRenderEvent {
|
||||||
for (Entry<TextStyle, RGB> entry : textStyleColorMap.entrySet()) {
|
for (Entry<TextStyle, RGB> entry : textStyleColorMap.entrySet()) {
|
||||||
ds.addTextStyle(entry.getKey(), entry.getValue());
|
ds.addTextStyle(entry.getKey(), entry.getValue());
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
if(textStyles != null){
|
if (textStyles != null) {
|
||||||
for(TextStyle style : textStyles){
|
for (TextStyle style : textStyles) {
|
||||||
if (style.equals(TextStyle.BOXED)) {
|
if (style.equals(TextStyle.BOXED)) {
|
||||||
ds.addTextStyle(style);
|
ds.addTextStyle(style);
|
||||||
ds.addTextStyle(TextStyle.BLANKED, boxColor);
|
ds.addTextStyle(TextStyle.BLANKED, boxColor);
|
||||||
|
@ -280,6 +282,8 @@ public class DrawStringEvent extends AbstractRemoteGraphicsRenderEvent {
|
||||||
ds.addTextStyle(style);
|
ds.addTextStyle(style);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
System.out.println();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ds;
|
return ds;
|
||||||
|
|
Loading…
Add table
Reference in a new issue