Поправил неправильноую lombok анотацию на правильную

This commit is contained in:
Mark Struchkov 2019-01-19 01:36:41 +03:00
parent cc8f6c2b1d
commit 2f05b55706
5 changed files with 12 additions and 10 deletions

View File

@ -6,7 +6,7 @@
<groupId>org.sadtech.autoresponder</groupId>
<artifactId>core</artifactId>
<version>1.0</version>
<version>1.1-SNAPSHOT</version>
<build>
<plugins>
<plugin>
@ -41,6 +41,7 @@
<version>${log4j}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/junit/junit -->
<dependency>
<groupId>junit</groupId>

View File

@ -1,12 +1,12 @@
package org.sadtech.autoresponder;
import com.sun.istack.internal.NotNull;
import lombok.AllArgsConstructor;
import lombok.NonNull;
import org.sadtech.autoresponder.entity.Person;
import org.sadtech.autoresponder.entity.Unit;
import org.sadtech.autoresponder.service.PersonService;
import org.sadtech.autoresponder.service.UnitService;
import org.sadtech.autoresponder.submodule.parser.InsertWords;
import org.sadtech.autoresponder.submodule.insertwords.InsertWords;
import java.util.List;
@ -16,7 +16,7 @@ public class Autoresponder {
private UnitService unitService;
private PersonService personService;
public String answer(@NotNull Integer idPerson, @NotNull String message) {
public String answer(@NonNull Integer idPerson, @NonNull String message) {
Person person = CheckAndAddPerson(idPerson);
Unit unit;
if (person.getUnit() == null) {
@ -28,7 +28,7 @@ public class Autoresponder {
return unit.getAnswer();
}
public String answer(@NotNull Integer idPerson, @NotNull String message, @NotNull List<String> words) {
public String answer(@NonNull Integer idPerson, @NonNull String message, @NonNull List<String> words) {
String answer = answer(idPerson, message);
InsertWords insertWords = new InsertWords();
insertWords.setInText(answer);

View File

@ -1,7 +1,7 @@
package org.sadtech.autoresponder.service.impl;
import com.sun.istack.internal.NotNull;
import lombok.AllArgsConstructor;
import lombok.NonNull;
import lombok.extern.log4j.Log4j;
import org.sadtech.autoresponder.entity.Unit;
import org.sadtech.autoresponder.repository.UnitRepository;
@ -17,7 +17,7 @@ public class UnitServiceImpl implements UnitService {
private UnitRepository unitRepository;
public Unit nextUnit(Unit unit, @NotNull String message) {
public Unit nextUnit(Unit unit, @NonNull String message) {
ArrayList<Unit> nextUnits = (ArrayList<Unit>) unit.getNextUnits();
if (nextUnits.size() > 0) {
Parser parser = new Parser();
@ -38,7 +38,7 @@ public class UnitServiceImpl implements UnitService {
}
@Override
public Unit getUnitById(@NotNull Integer idUnit) {
public Unit getUnitById(@NonNull Integer idUnit) {
return unitRepository.getUnitById(idUnit);
}

View File

@ -1,4 +1,4 @@
package org.sadtech.autoresponder.submodule.parser;
package org.sadtech.autoresponder.submodule.insertwords;
import lombok.Getter;
import lombok.Setter;

View File

@ -1,8 +1,9 @@
package org.sadtech.autoresponder.submodule.parser;
package org.sadtech.autoresponder.submodule.insertwords;
import org.junit.After;
import org.junit.Assert;
import org.junit.Test;
import org.sadtech.autoresponder.submodule.insertwords.InsertWords;
import java.util.ArrayList;