Поправил неправильноую 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> <groupId>org.sadtech.autoresponder</groupId>
<artifactId>core</artifactId> <artifactId>core</artifactId>
<version>1.0</version> <version>1.1-SNAPSHOT</version>
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
@ -41,6 +41,7 @@
<version>${log4j}</version> <version>${log4j}</version>
</dependency> </dependency>
<!-- https://mvnrepository.com/artifact/junit/junit --> <!-- https://mvnrepository.com/artifact/junit/junit -->
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>

View File

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

View File

@ -1,7 +1,7 @@
package org.sadtech.autoresponder.service.impl; package org.sadtech.autoresponder.service.impl;
import com.sun.istack.internal.NotNull;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.NonNull;
import lombok.extern.log4j.Log4j; import lombok.extern.log4j.Log4j;
import org.sadtech.autoresponder.entity.Unit; import org.sadtech.autoresponder.entity.Unit;
import org.sadtech.autoresponder.repository.UnitRepository; import org.sadtech.autoresponder.repository.UnitRepository;
@ -17,7 +17,7 @@ public class UnitServiceImpl implements UnitService {
private UnitRepository unitRepository; 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(); ArrayList<Unit> nextUnits = (ArrayList<Unit>) unit.getNextUnits();
if (nextUnits.size() > 0) { if (nextUnits.size() > 0) {
Parser parser = new Parser(); Parser parser = new Parser();
@ -38,7 +38,7 @@ public class UnitServiceImpl implements UnitService {
} }
@Override @Override
public Unit getUnitById(@NotNull Integer idUnit) { public Unit getUnitById(@NonNull Integer idUnit) {
return unitRepository.getUnitById(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.Getter;
import lombok.Setter; 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.After;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Test; import org.junit.Test;
import org.sadtech.autoresponder.submodule.insertwords.InsertWords;
import java.util.ArrayList; import java.util.ArrayList;