Résultats CPD
Le document suivant contient les résultats de l'inspection CPD CPD 6.13.0.
Duplicatas
Fichier |
Ligne |
fr/paris/lutece/plugins/mylutece/business/attribute/AttributeDAO.java |
248 |
fr/paris/lutece/plugins/mylutece/business/attribute/AttributeDAO.java |
348 |
try( DAOUtil daoUtil = new DAOUtil( SQL_QUERY_SELECT_ALL, plugin ) )
{
daoUtil.executeQuery( );
while ( daoUtil.next( ) )
{
IAttribute attribute = null;
try
{
attribute = (IAttribute) Class.forName( daoUtil.getString( 2 ) ).newInstance( );
}
catch( ClassNotFoundException | InstantiationException | IllegalAccessException e )
{
// class doesn't exist
// Class is abstract or is an interface or isn't accessible
// can't access to rhe class
AppLogService.error( e );
}
if( attribute != null )
{
attribute.setIdAttribute( daoUtil.getInt( 1 ) );
attribute.setTitle( daoUtil.getString( 3 ) );
attribute.setHelpMessage( daoUtil.getString( 4 ) );
attribute.setMandatory( daoUtil.getBoolean( 5 ) );
attribute.setShownInSearch( daoUtil.getBoolean( 6 ) );
attribute.setPosition( daoUtil.getInt( 7 ) );
attribute.setAnonymize( daoUtil.getBoolean( 8 ) ); |
Fichier |
Ligne |
fr/paris/lutece/plugins/mylutece/business/attribute/AttributeDAO.java |
300 |
fr/paris/lutece/plugins/mylutece/business/attribute/AttributeDAO.java |
350 |
daoUtil.executeQuery( );
while ( daoUtil.next( ) )
{
IAttribute attribute = null;
try
{
attribute = (IAttribute) Class.forName( daoUtil.getString( 2 ) ).newInstance( );
}
catch( ClassNotFoundException | InstantiationException | IllegalAccessException e )
{
// class doesn't exist
// Class is abstract or is an interface or isn't accessible
// can't access to rhe class
AppLogService.error( e );
}
if( attribute != null )
{
attribute.setIdAttribute( daoUtil.getInt( 1 ) );
attribute.setTitle( daoUtil.getString( 3 ) );
attribute.setHelpMessage( daoUtil.getString( 4 ) );
attribute.setMandatory( daoUtil.getBoolean( 5 ) );
attribute.setShownInSearch( daoUtil.getBoolean( 6 ) );
attribute.setPosition( daoUtil.getInt( 7 ) );
attribute.setAttributeType( locale ); |
Fichier |
Ligne |
fr/paris/lutece/plugins/mylutece/business/attribute/AttributeDAO.java |
250 |
fr/paris/lutece/plugins/mylutece/business/attribute/AttributeDAO.java |
300 |
daoUtil.executeQuery( );
while ( daoUtil.next( ) )
{
IAttribute attribute = null;
try
{
attribute = (IAttribute) Class.forName( daoUtil.getString( 2 ) ).newInstance( );
}
catch( ClassNotFoundException | InstantiationException | IllegalAccessException e )
{
// class doesn't exist
// Class is abstract or is an interface or isn't accessible
// can't access to rhe class
AppLogService.error( e );
}
if( attribute != null )
{
attribute.setIdAttribute( daoUtil.getInt( 1 ) );
attribute.setTitle( daoUtil.getString( 3 ) );
attribute.setHelpMessage( daoUtil.getString( 4 ) );
attribute.setMandatory( daoUtil.getBoolean( 5 ) );
attribute.setShownInSearch( daoUtil.getBoolean( 6 ) );
attribute.setPosition( daoUtil.getInt( 7 ) );
attribute.setAnonymize( daoUtil.getBoolean( 8 ) ); |
Fichier |
Ligne |
fr/paris/lutece/plugins/mylutece/business/attribute/AttributeDAO.java |
149 |
fr/paris/lutece/plugins/mylutece/business/attribute/AttributeFieldDAO.java |
178 |
daoUtil.setInt( 1, nIdAttribute );
daoUtil.executeQuery( );
if ( daoUtil.next( ) )
{
try
{
attribute = (IAttribute) Class.forName( daoUtil.getString( 1 ) ).newInstance( );
}
catch( ClassNotFoundException | InstantiationException | IllegalAccessException e )
{
// class doesn't exist
// Class is abstract or is an interface or isn't accessible
// can't access to rhe class
AppLogService.error( e );
}
if( attribute != null )
{
attribute.setIdAttribute( daoUtil.getInt( 2 ) );
attribute.setTitle( daoUtil.getString( 3 ) );
attribute.setHelpMessage( daoUtil.getString( 4 ) );
attribute.setMandatory( daoUtil.getBoolean( 5 ) );
attribute.setShownInSearch( daoUtil.getBoolean( 6 ) ); |
Fichier |
Ligne |
fr/paris/lutece/plugins/mylutece/service/AbstractAccountLifeTimeDaemon.java |
125 |
fr/paris/lutece/plugins/mylutece/service/AbstractAccountLifeTimeDaemon.java |
189 |
fr/paris/lutece/plugins/mylutece/service/AbstractAccountLifeTimeDaemon.java |
255 |
for ( Integer nIdUser : accountsToSetAsExpired )
{
try
{
String strUserMail = accountLifeTimeService.getUserMainEmail( nIdUser );
if ( ( strUserMail != null ) && StringUtils.isNotBlank( strUserMail ) )
{
Map<String, String> model = new HashMap<String, String>( );
accountLifeTimeService.addParametersToModel( model, nIdUser );
HtmlTemplate template = AppTemplateService.getTemplateFromStringFtl( strBody, Locale.getDefault( ), model );
MailService.sendMailHtml( strUserMail, strSenderName, strSenderEmail, strSubject, template.getHtml( ) );
}
}
catch( Exception e )
{
AppLogService.error( getDaemonName( ) + " - Error sending expiration alert to user : " + e.getMessage( ), e ); |
Fichier |
Ligne |
fr/paris/lutece/plugins/mylutece/web/attribute/AttributeFieldJspBean.java |
131 |
fr/paris/lutece/plugins/mylutece/web/attribute/AttributeFieldJspBean.java |
208 |
String strDefaultValue = request.getParameter( PARAMETER_DEFAULT_VALUE );
String strCancel = request.getParameter( PARAMETER_CANCEL );
if ( strCancel == null )
{
if ( ( strTitle == null ) || strTitle.equals( EMPTY_STRING ) )
{
return AdminMessageService.getMessageUrl( request, Messages.MANDATORY_FIELDS, AdminMessage.TYPE_STOP );
}
if ( ( strValue == null ) || strValue.equals( EMPTY_STRING ) )
{
return AdminMessageService.getMessageUrl( request, Messages.MANDATORY_FIELDS, AdminMessage.TYPE_STOP );
}
Plugin plugin = PluginService.getPlugin( MyLutecePlugin.PLUGIN_NAME );
AttributeField attributeField = new AttributeField( );
attributeField.setTitle( strTitle ); |
Fichier |
Ligne |
fr/paris/lutece/plugins/mylutece/web/security/AuthenticationFilterJspBean.java |
128 |
fr/paris/lutece/plugins/mylutece/web/security/AuthenticationFilterJspBean.java |
175 |
public String doCreatePublicUrl( HttpServletRequest request ) throws AccessDeniedException
{
if ( !RBACService.isAuthorized( MyLuteceResourceIdService.RESOURCE_TYPE, RBAC.WILDCARD_RESOURCES_ID,
MyLuteceResourceIdService.PERMISSION_MANAGE_AUTHENTICATION_FILTER, getUser( ) ) )
{
throw new AccessDeniedException(
"User " + getUser( ) + " is not authorized to permission " + MyLuteceResourceIdService.PERMISSION_MANAGE_AUTHENTICATION_FILTER );
}
if ( request.getParameter( PARAMETER_CANCEL ) == null )
{
ReferenceItem publicUrlData = getPublicUrlData( request );
normalizedPublicUrlCode( publicUrlData );
String strError = StringUtils.EMPTY;
if ( StringUtils.isBlank( publicUrlData.getCode( ) ) || StringUtils.isBlank( publicUrlData.getName( ) ) ) |