possible npes

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1896163 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
PJ Fanning 2021-12-19 16:35:31 +00:00
parent 7d18ed02d1
commit e61dc89bff
5 changed files with 10 additions and 5 deletions

View File

@ -67,7 +67,8 @@ public final class BarChartDemo {
BufferedReader modelReader = Files.newBufferedReader(Paths.get(args[1]), StandardCharsets.UTF_8)) {
String chartTitle = modelReader.readLine(); // first line is chart title
String[] series = modelReader.readLine().split(",");
String seriesText = modelReader.readLine();
String[] series = seriesText == null ? new String[0] : seriesText.split(",");
// Category Axis Data
List<String> listLanguages = new ArrayList<>(10);

View File

@ -75,7 +75,8 @@ public final class ChartFromScratch {
try (BufferedReader modelReader = Files.newBufferedReader(Paths.get(args[0]), StandardCharsets.UTF_8)) {
String chartTitle = modelReader.readLine(); // first line is chart title
String[] series = modelReader.readLine().split(",");
String seriesText = modelReader.readLine();
String[] series = seriesText == null ? new String[0] : seriesText.split(",");
// Category Axis Data
List<String> listLanguages = new ArrayList<>(10);

View File

@ -73,7 +73,8 @@ public final class DoughnutChartFromScratch {
try (BufferedReader modelReader = Files.newBufferedReader(Paths.get(args[0]), StandardCharsets.UTF_8)) {
String chartTitle = modelReader.readLine(); // first line is chart title
String[] series = modelReader.readLine().split(",");
String seriesText = modelReader.readLine();
String[] series = seriesText == null ? new String[0] : seriesText.split(",");
// Category Axis Data
List<String> listLanguages = new ArrayList<>(10);

View File

@ -66,7 +66,8 @@ public final class BarChartExample {
BufferedReader modelReader = Files.newBufferedReader(Paths.get(args[1]), StandardCharsets.UTF_8)) {
String chartTitle = modelReader.readLine(); // first line is chart title
String[] series = modelReader.readLine().split(",");
String seriesText = modelReader.readLine();
String[] series = seriesText == null ? new String[0] : seriesText.split(",");
// Category Axis Data
List<String> listLanguages = new ArrayList<>(10);

View File

@ -70,7 +70,8 @@ public final class ChartFromScratch {
try (BufferedReader modelReader = Files.newBufferedReader(Paths.get(args[0]), StandardCharsets.UTF_8)) {
String chartTitle = modelReader.readLine(); // first line is chart title
String[] series = modelReader.readLine().split(",");
String seriesText = modelReader.readLine();
String[] series = seriesText == null ? new String[0] : seriesText.split(",");
// Category Axis Data
List<String> listLanguages = new ArrayList<>(10);