From 8d48e0ec97122d72a5ab224c535e51de6a2bef77 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 14 Feb 2022 12:22:48 +0100 Subject: Always pass charset in String constructor; don't treat strings as binary safe --- src/main/java/org/openslx/libvirt/domain/device/Video.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/main/java/org/openslx/libvirt/domain') diff --git a/src/main/java/org/openslx/libvirt/domain/device/Video.java b/src/main/java/org/openslx/libvirt/domain/device/Video.java index f3ee13f..a674715 100644 --- a/src/main/java/org/openslx/libvirt/domain/device/Video.java +++ b/src/main/java/org/openslx/libvirt/domain/device/Video.java @@ -73,8 +73,8 @@ public class Video extends Device // only set acceleration on supported Virtio GPUs this.setXmlElementAttributeValueYesNo( "model/acceleration", "accel2d", acceleration ); } else { - String errorMsg = new String( - "Video card model '" + model.toString() + "' does not support enabled 2D hardware acceleration." ); + String errorMsg = + "Video card model '" + model.toString() + "' does not support enabled 2D hardware acceleration."; throw new IllegalArgumentException( errorMsg ); } } @@ -103,8 +103,8 @@ public class Video extends Device // only set acceleration on supported Virtio GPUs this.setXmlElementAttributeValueYesNo( "model/acceleration", "accel3d", acceleration ); } else { - String errorMsg = new String( - "Video card model '" + model.toString() + "' does not support enabled 3D hardware acceleration." ); + String errorMsg = + "Video card model '" + model.toString() + "' does not support enabled 3D hardware acceleration."; throw new IllegalArgumentException( errorMsg ); } } -- cgit v1.2.3-55-g7522