Ho pensato di eliminare
inserendo un controllo sul valore di ritorno della classe, per esempio:codice:throw new DatiMeseInvalidiException("Identificatore non presente");
e quindi se String == null, mi mostra il warning message..che ne dici?codice:private String parseString(final BufferedReader reader, final String name1, final String name2, final boolean skipLast) throws DatiMeseInvalidiException { try { final String input = reader.readLine(); if (input != null && !input.trim().isEmpty() && (input.startsWith(name1) || input.startsWith(name2))) { int index = input.indexOf(":"); if (index < 0) { return null; } if (skipLast) { int indexV = input.indexOf(","); return input.substring(index + 1, indexV); } else { return input.substring(index + 1); } } return null; } catch (IOException ex) { Logger.getLogger(ApriFileMese.class.getName()).log(Level.SEVERE, null, ex); } return null; }

Rispondi quotando