File tree Expand file tree Collapse file tree 2 files changed +4
-9
lines changed
main/java/ch/xxx/aidoclibchat/adapter/client
test/java/ch/xxx/aidoclibchat/architecture Expand file tree Collapse file tree 2 files changed +4
-9
lines changed Original file line number Diff line number Diff line change 1212 */
1313package ch .xxx .aidoclibchat .adapter .client ;
1414
15- import java .io .IOException ;
1615import java .util .List ;
1716
1817import org .springframework .stereotype .Component ;
3332import ch .xxx .aidoclibchat .domain .model .entity .WorkLink ;
3433import ch .xxx .aidoclibchat .usecase .mapping .TableMapper ;
3534import tools .jackson .dataformat .csv .CsvMapper ;
35+ import tools .jackson .dataformat .csv .CsvSchema ;
3636
3737@ Component
3838public class ImportRestClient implements ImportClient {
@@ -56,12 +56,8 @@ public List<Artist> importArtists() {
5656
5757 private <T > List <T > mapString (String result , Class <T > myClass ) {
5858 List <T > zipcodes = List .of ();
59- try {
60- zipcodes = this .csvMapper .readerFor (myClass ).with (CsvSchema .builder ().setUseHeader (true ).build ())
61- .<T >readValues (result ).readAll ();
62- } catch (IOException e ) {
63- throw new RuntimeException (e );
64- }
59+ zipcodes = this .csvMapper .readerFor (myClass ).with (CsvSchema .builder ().setUseHeader (true ).build ())
60+ .<T >readValues (result ).readAll ();
6561 return zipcodes ;
6662 }
6763
Original file line number Diff line number Diff line change 2020import org .junit .jupiter .api .Test ;
2121import org .slf4j .Logger ;
2222import org .slf4j .LoggerFactory ;
23- import org .springframework .boot .web .reactive .error .DefaultErrorAttributes ;
2423import org .springframework .context .annotation .Configuration ;
2524import org .springframework .core .annotation .Order ;
2625import org .springframework .scheduling .annotation .Scheduled ;
@@ -91,7 +90,7 @@ public void ruleControllerAnnotations() {
9190 @ Test
9291 public void ruleExceptionsType () {
9392 ArchRule exceptionType = ArchRuleDefinition .classes ().that ().resideInAPackage ("..domain.exceptions.." ).should ()
94- .beAssignableTo (RuntimeException .class ). orShould (). beAssignableTo ( DefaultErrorAttributes . class ) ;
93+ .beAssignableTo (RuntimeException .class );
9594 exceptionType .check (this .importedClasses );
9695 }
9796
You can’t perform that action at this time.
0 commit comments