I'm not entirely sure what the issue is, but here is a snippet of my code. I get the warning for my line variable
StringBuffer stringBuffer = new StringBuffer();
String line = "" ;
while(( line = bufferedReader.readLine()) != null ){
stringBuffer.append(line);
}
new String(Files.readAllBytes(...), UTF-8)