8286398: Address possibly lossy conversions in jdk.internal.le
Reviewed-by: jlahoda
This commit is contained in:
parent
e21b527b18
commit
e534c133af
@ -183,26 +183,26 @@ public final class WindowsAnsiWriter extends AnsiWriter {
|
|||||||
protected void processCursorUpLine(int count) throws IOException {
|
protected void processCursorUpLine(int count) throws IOException {
|
||||||
getConsoleInfo();
|
getConsoleInfo();
|
||||||
info.dwCursorPosition.X = 0;
|
info.dwCursorPosition.X = 0;
|
||||||
info.dwCursorPosition.Y -= count;
|
info.dwCursorPosition.Y -= (short)count;
|
||||||
applyCursorPosition();
|
applyCursorPosition();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void processCursorDownLine(int count) throws IOException {
|
protected void processCursorDownLine(int count) throws IOException {
|
||||||
getConsoleInfo();
|
getConsoleInfo();
|
||||||
info.dwCursorPosition.X = 0;
|
info.dwCursorPosition.X = 0;
|
||||||
info.dwCursorPosition.Y += count;
|
info.dwCursorPosition.Y += (short)count;
|
||||||
applyCursorPosition();
|
applyCursorPosition();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void processCursorLeft(int count) throws IOException {
|
protected void processCursorLeft(int count) throws IOException {
|
||||||
getConsoleInfo();
|
getConsoleInfo();
|
||||||
info.dwCursorPosition.X -= count;
|
info.dwCursorPosition.X -= (short)count;
|
||||||
applyCursorPosition();
|
applyCursorPosition();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void processCursorRight(int count) throws IOException {
|
protected void processCursorRight(int count) throws IOException {
|
||||||
getConsoleInfo();
|
getConsoleInfo();
|
||||||
info.dwCursorPosition.X += count;
|
info.dwCursorPosition.X += (short)count;
|
||||||
applyCursorPosition();
|
applyCursorPosition();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -210,7 +210,7 @@ public final class WindowsAnsiWriter extends AnsiWriter {
|
|||||||
getConsoleInfo();
|
getConsoleInfo();
|
||||||
int nb = Math.max(0, info.dwCursorPosition.Y + count - info.dwSize.Y + 1);
|
int nb = Math.max(0, info.dwCursorPosition.Y + count - info.dwSize.Y + 1);
|
||||||
if (nb != count) {
|
if (nb != count) {
|
||||||
info.dwCursorPosition.Y += count;
|
info.dwCursorPosition.Y += (short)count;
|
||||||
applyCursorPosition();
|
applyCursorPosition();
|
||||||
}
|
}
|
||||||
if (nb > 0) {
|
if (nb > 0) {
|
||||||
@ -226,7 +226,7 @@ public final class WindowsAnsiWriter extends AnsiWriter {
|
|||||||
|
|
||||||
protected void processCursorUp(int count) throws IOException {
|
protected void processCursorUp(int count) throws IOException {
|
||||||
getConsoleInfo();
|
getConsoleInfo();
|
||||||
info.dwCursorPosition.Y -= count;
|
info.dwCursorPosition.Y -= (short)count;
|
||||||
applyCursorPosition();
|
applyCursorPosition();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user