From e6a84e1ac244058f775ea0587e6612a4e899b0e6 Mon Sep 17 00:00:00 2001 From: Mahmoud Ben Hassine Date: Thu, 9 May 2019 08:46:50 +0200 Subject: [PATCH] Mark the parameter of LineTokenizer#tokenize as `@Nullable` According to the Javadoc of LineTokenizer#tokenize, the parameter `line` can be null. This commit adds `@Nullable` to that parameter. Resolves BATCH-2776 --- .../batch/item/file/transform/LineTokenizer.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/transform/LineTokenizer.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/transform/LineTokenizer.java index 9e7ac40a6..b87cb4959 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/transform/LineTokenizer.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/transform/LineTokenizer.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2007 the original author or authors. + * Copyright 2006-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,12 +16,14 @@ package org.springframework.batch.item.file.transform; +import org.springframework.lang.Nullable; /** * Interface that is used by framework to split string obtained typically from a * file into tokens. * * @author tomas.slanina + * @author Mahmoud Ben Hassine * */ public interface LineTokenizer { @@ -34,5 +36,5 @@ public interface LineTokenizer { * * @return the resulting tokens */ - FieldSet tokenize(String line); + FieldSet tokenize(@Nullable String line); }