From 1804d703f50746178176655954a37e6bc356127b Mon Sep 17 00:00:00 2001 From: nchakarovvmw <53603160+nchakarovvmw@users.noreply.github.com> Date: Fri, 27 Jan 2023 16:36:56 +0200 Subject: [PATCH] Bugfix/fix java8 buffers (#17) * Fix comments regex. Signed-off-by: Nikolay Chakarov * Fix buffers flipping. Signed-off-by: Nikolay Chakarov * Update FileIOUtil.java Signed-off-by: Nikolay Chakarov Signed-off-by: Nikolay Chakarov Co-authored-by: Nikolay Chakarov Co-authored-by: Emrah Yasar <97783508+emyasarvmw@users.noreply.github.com> --- src/main/java/org/sonar/plugins/its/utils/FileIOUtil.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/sonar/plugins/its/utils/FileIOUtil.java b/src/main/java/org/sonar/plugins/its/utils/FileIOUtil.java index 830feef..3d34b9f 100644 --- a/src/main/java/org/sonar/plugins/its/utils/FileIOUtil.java +++ b/src/main/java/org/sonar/plugins/its/utils/FileIOUtil.java @@ -1,5 +1,5 @@ /*********************************************************** - * Copyright 2022 VMware, Inc. + * Copyright 2023 VMware, Inc. * SPDX-License-Identifier: BSD-2 ***********************************************************/ package org.sonar.plugins.its.utils; @@ -44,7 +44,7 @@ public static String readFileAsString(final Path path, final int failWhenCharact LOG.warn("Its scanner (RequiredStringNotPresentRegexMatchCheck) maximum scan depth ( " + (failWhenCharacterCountExceeds-1) + " chars) encountered for file '" + path.toFile().getAbsolutePath() + "'. Did not check this file AT ALL."); throw new LargeFileEncounteredException(); } else { - fileContentBuffer.flip(); + ((Buffer)fileContentBuffer).flip(); } } catch (BufferOverflowException ex) {