Skip to content

Commit

Permalink
Sonar issues
Browse files Browse the repository at this point in the history
  • Loading branch information
fugerit79 committed Mar 9, 2024
1 parent e63f2a5 commit 14b8eb2
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import org.fugerit.java.core.util.result.ResultHelper;
import org.fugerit.java.daogen.quickstart.def.facade.QuickstartLogicFacade;
import org.fugerit.java.daogen.quickstart.def.facade.QuickstartLogicFacadeHelper;
import org.fugerit.java.daogen.quickstart.impl.facade.data.QuickstartDataLogicFacade;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand All @@ -22,6 +21,8 @@

public class ServiceProviderHelper<T> {

protected static Logger logger = LoggerFactory.getLogger( ServiceProviderHelper.class );

/**
*
*/
Expand All @@ -30,10 +31,9 @@ public class ServiceProviderHelper<T> {
@Inject
private DataSource dataSource;

protected static Logger logger = LoggerFactory.getLogger( ServiceProviderHelper.class );

private static final QuickstartLogicFacade FACADE = new QuickstartDataLogicFacade();

@Inject
private QuickstartLogicFacade facade;

public Object createResultFromList( SimpleServiceResult<List<T>> result ) {
return result.getContent();
}
Expand All @@ -56,7 +56,7 @@ protected CloseableDAOContext newDefaultContext() throws DAOException {
try {
//
CloseableDAOContext context = new CloseableDAOContextSC( this.dataSource.getConnection() ); // NOSONAR
context.setAttribute( QuickstartLogicFacadeHelper.ATT_NAME , FACADE );
context.setAttribute( QuickstartLogicFacadeHelper.ATT_NAME , this.facade );
return context;
} catch (Exception e) {
throw new DAOException( e );
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
package org.fugerit.java.daogen.quickstart.impl.facade.data;

import jakarta.enterprise.context.ApplicationScoped;

/**
* QuickstartDataLogicFacade, version : 1.0.0
*
* author: fugerit
*/
@ApplicationScoped
public class QuickstartDataLogicFacade extends QuickstartDataLogicFacadeHelper implements org.fugerit.java.daogen.quickstart.def.facade.QuickstartLogicFacade, java.io.Serializable {

private static final long serialVersionUID = 694602991838L;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package org.fugerit.java.fjdaogenquickstart;

import io.quarkus.runtime.annotations.RegisterForReflection;
import jakarta.ws.rs.Path;

// custom import start ( code above here will be overwritten )
Expand All @@ -16,7 +15,6 @@
* // custom code end ( code below here will be overwritten )
*/
@Path("/person/load")
@RegisterForReflection( targets = { LoadPerson.class, LoadPersonHelper.class })
public class LoadPerson extends LoadPersonHelper {

// custom code start ( code above here will be overwritten )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ void testJUnit5ModelDocument() {
current.setModel( new HelperDocument() );
current.setId( 1000L );
Assertions.assertNotNull( current );
Assertions.assertNotNull( DocumentFinder.newInstance( current.getId() ) );
Assertions.assertNotNull( DocumentFinder.newInstance( current.getModel() ) );
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ void testJUnit5ModelDocument() {
current.setModel( new HelperExample01() );
current.setId( 1001L );
Assertions.assertNotNull( current );
Assertions.assertNotNull( Example01Finder.newInstance( current.getModel() ) );
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ void testJUnit5ModelDocument() {
current.setModel( new HelperMappedTable() );
current.setId( 1002L );
Assertions.assertNotNull( current );
Assertions.assertNotNull( MappedTableFinder.newInstance( current.getId() ) );
Assertions.assertNotNull( MappedTableFinder.newInstance( current.getModel() ) );
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ void testJUnit5ModelDocument() {
current.setModel( new HelperPerson() );
current.setId( 1003L );
Assertions.assertNotNull( current );
Assertions.assertNotNull( PersonFinder.newInstance( current.getId() ) );
Assertions.assertNotNull( PersonFinder.newInstance( current.getModel() ) );
}

}

0 comments on commit 14b8eb2

Please sign in to comment.