summaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-web/archiva-web-common/src/main
diff options
context:
space:
mode:
authorEric Barboni <skygo@apache.org>2014-04-11 23:46:35 +0200
committerEric Barboni <skygo@apache.org>2014-04-11 23:46:35 +0200
commit99117364be2b27ddb74fc6ffe3e052e0ad52d8dd (patch)
tree5aa6ee887b1cf3c1659f83b7c561a728c0ee4555 /archiva-modules/archiva-web/archiva-web-common/src/main
parentd44d957734badacce74293846d11b3b736b9a478 (diff)
downloadarchiva-99117364be2b27ddb74fc6ffe3e052e0ad52d8dd.tar.gz
archiva-99117364be2b27ddb74fc6ffe3e052e0ad52d8dd.zip
one move for all remaining override annotation
Diffstat (limited to 'archiva-modules/archiva-web/archiva-web-common/src/main')
-rw-r--r--archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/DefaultDataValidatorService.java7
-rw-r--r--archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/DefaultFileUploadService.java19
-rw-r--r--archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/DefaultJavascriptLogger.java13
-rw-r--r--archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/DefaultRuntimeInfoService.java4
-rw-r--r--archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/rss/RssFeedServlet.java4
-rw-r--r--archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/runtime/ldap/ArchivaLdapConnectionFactory.java1
-rw-r--r--archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaConfigurableUsersManager.java54
-rw-r--r--archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaLdapRoleMapperConfiguration.java13
-rw-r--r--archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaLockedAdminEnvironmentCheck.java1
-rw-r--r--archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaRbacManager.java89
-rw-r--r--archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaUserManagerAuthenticator.java4
-rw-r--r--archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/startup/ArchivaStartup.java2
-rw-r--r--archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/startup/SecuritySynchronization.java4
13 files changed, 149 insertions, 66 deletions
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/DefaultDataValidatorService.java b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/DefaultDataValidatorService.java
index 1210f1386..2faac2aa1 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/DefaultDataValidatorService.java
+++ b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/DefaultDataValidatorService.java
@@ -50,6 +50,7 @@ public class DefaultDataValidatorService
private RepositoryGroupAdmin repositoryGroupAdmin;
+ @Override
public Boolean managedRepositoryIdNotExists( String id )
throws ArchivaRestServiceException
{
@@ -60,7 +61,8 @@ public class DefaultDataValidatorService
catch ( RepositoryAdminException e )
{
throw new ArchivaRestServiceException( e.getMessage(), e );
- }
+ @Override
+ }
}
public Boolean remoteRepositoryIdNotExists( String id )
@@ -72,7 +74,8 @@ public class DefaultDataValidatorService
}
catch ( RepositoryAdminException e )
{
- throw new ArchivaRestServiceException( e.getMessage(), e );
+ throw new ArchivaRestServiceException( e.getMessa @Override
+ge(), e );
}
}
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/DefaultFileUploadService.java b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/DefaultFileUploadService.java
index 936e1598f..4b97ab942 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/DefaultFileUploadService.java
+++ b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/DefaultFileUploadService.java
@@ -117,6 +117,7 @@ public class DefaultFileUploadService
return attachment == null ? "" : IOUtils.toString( attachment.getDataHandler().getInputStream() );
}
+ @Override
public FileMetadata post( MultipartBody multipartBody )
throws ArchivaRestServiceException
{
@@ -175,7 +176,8 @@ public class DefaultFileUploadService
fileMetadatas = new CopyOnWriteArrayList<FileMetadata>();
httpServletRequest.getSession().setAttribute( FILES_SESSION_KEY, fileMetadatas );
}
- return fileMetadatas;
+ return fileMeta @Override
+datas;
}
public Boolean deleteFile( String fileName )
@@ -193,7 +195,8 @@ public class DefaultFileUploadService
{
return file.delete();
}
- return Boolean.FALSE;
+ r @Override
+eturn Boolean.FALSE;
}
public Boolean clearUploadedFiles()
@@ -204,7 +207,8 @@ public class DefaultFileUploadService
{
deleteFile( new File( fileMetadata.getServerFileName() ).getPath() );
}
- getSessionFileMetadatas().clear();
+ getSessionFileMetadatas().cle @Override
+ar();
return Boolean.TRUE;
}
@@ -214,7 +218,8 @@ public class DefaultFileUploadService
List<FileMetadata> fileMetadatas =
(List<FileMetadata>) httpServletRequest.getSession().getAttribute( FILES_SESSION_KEY );
- return fileMetadatas == null ? Collections.<FileMetadata>emptyList() : fileMetadatas;
+ return fileMetadatas == null ? Collec @Override
+tions.<FileMetadata>emptyList() : fileMetadatas;
}
public Boolean save( String repositoryId, String groupId, String artifactId, String version, String packaging,
@@ -260,7 +265,8 @@ public class DefaultFileUploadService
// get from the session file with groupId/artifactId
- Iterable<FileMetadata> filesToAdd = Iterables.filter( fileMetadatas, new Predicate<FileMetadata>()
+ Iterable<FileMetadata> filesToAdd = Ite @Override
+rables.filter( fileMetadatas, new Predicate<FileMetadata>()
{
public boolean apply( FileMetadata fileMetadata )
{
@@ -279,7 +285,8 @@ public class DefaultFileUploadService
deleteFile( fileMetadata.getServerFileName() );
}
- filesToAdd = Iterables.filter( fileMetadatas, new Predicate<FileMetadata>()
+ @Override
+ filesToAdd = Iterables.filter( fileMetadatas, new Predicate<FileMetadata>()
{
public boolean apply( FileMetadata fileMetadata )
{
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/DefaultJavascriptLogger.java b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/DefaultJavascriptLogger.java
index 37a320a2f..e2c3478ff 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/DefaultJavascriptLogger.java
+++ b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/DefaultJavascriptLogger.java
@@ -33,6 +33,7 @@ public class DefaultJavascriptLogger
{
private Logger logger = LoggerFactory.getLogger( getClass() );
+ @Override
public Boolean trace( JavascriptLog javascriptLog )
{
Logger toUse =
@@ -42,7 +43,8 @@ public class DefaultJavascriptLogger
return Boolean.TRUE;
}
toUse.trace( javascriptLog.getMessage() );
- return Boolean.TRUE;
+ return Boolean @Override
+.TRUE;
}
public Boolean debug( JavascriptLog javascriptLog )
@@ -56,7 +58,8 @@ public class DefaultJavascriptLogger
}
toUse.debug( javascriptLog.getMessage() );
- return Boolean.TRUE;
+ @Override
+return Boolean.TRUE;
}
public Boolean info( JavascriptLog javascriptLog )
@@ -69,7 +72,8 @@ public class DefaultJavascriptLogger
return Boolean.TRUE;
}
- toUse.info( javascriptLog.getMessage() );
+ toUse.info( javascriptLog.getMessage @Override
+() );
return Boolean.TRUE;
}
@@ -83,7 +87,8 @@ public class DefaultJavascriptLogger
return Boolean.TRUE;
}
- toUse.warn( javascriptLog.getMessage() );
+ toUse.warn( javascript @Override
+Log.getMessage() );
return Boolean.TRUE;
}
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/DefaultRuntimeInfoService.java b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/DefaultRuntimeInfoService.java
index 764241165..25945513c 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/DefaultRuntimeInfoService.java
+++ b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/DefaultRuntimeInfoService.java
@@ -62,6 +62,7 @@ public class DefaultRuntimeInfoService
this.archivaRuntimeInfo = archivaRuntimeInfo;
}
+ @Override
public ApplicationRuntimeInfo getApplicationRuntimeInfo( String locale )
throws ArchivaRestServiceException
{
@@ -101,7 +102,8 @@ public class DefaultRuntimeInfoService
{
return req.getScheme() + "://" + req.getServerName() + ( req.getServerPort() == 80
? ""
- : ":" + req.getServerPort() ) + req.getContextPath();
+ : ":" + req.getServerPort() ) + req.getContextP @Override
+ath();
}
public Boolean logMissingI18n( String key )
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/rss/RssFeedServlet.java b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/rss/RssFeedServlet.java
index ddbae53eb..3e639e006 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/rss/RssFeedServlet.java
+++ b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/rss/RssFeedServlet.java
@@ -93,6 +93,7 @@ public class RssFeedServlet
*/
private RepositorySessionFactory repositorySessionFactory;
+ @Override
public void init( ServletConfig servletConfig )
throws ServletException
{
@@ -102,7 +103,8 @@ public class RssFeedServlet
servletAuth = wac.getBean( ServletAuthenticator.class );
httpAuth = wac.getBean( "httpAuthenticator#basic", HttpAuthenticator.class );
// TODO: what if there are other types?
- repositorySessionFactory = wac.getBean( "repositorySessionFactory", RepositorySessionFactory.class );
+ repositorySessionFactory = wac.getBean( "repositorySessionFactory", RepositorySessionFactory.cl @Override
+ass );
}
public void doGet( HttpServletRequest req, HttpServletResponse res )
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/runtime/ldap/ArchivaLdapConnectionFactory.java b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/runtime/ldap/ArchivaLdapConnectionFactory.java
index 43607e9bf..cd15b1efa 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/runtime/ldap/ArchivaLdapConnectionFactory.java
+++ b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/runtime/ldap/ArchivaLdapConnectionFactory.java
@@ -46,6 +46,7 @@ public class ArchivaLdapConnectionFactory
private LdapConnectionConfiguration ldapConnectionConfiguration;
@PostConstruct
+ @Override
public void initialize()
{
try
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaConfigurableUsersManager.java b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaConfigurableUsersManager.java
index d2aae47ba..6fed3800a 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaConfigurableUsersManager.java
+++ b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaConfigurableUsersManager.java
@@ -64,6 +64,7 @@ public class ArchivaConfigurableUsersManager
private boolean useUsersCache;
@PostConstruct
+ @Override
public void initialize()
{
try
@@ -92,7 +93,8 @@ public class ArchivaConfigurableUsersManager
protected boolean useUsersCache()
{
- return this.useUsersCache;
+ return this.useUsers @Override
+Cache;
}
public User addUser( User user )
@@ -105,6 +107,7 @@ public class ArchivaConfigurableUsersManager
usersCache.put( user.getUsername(), user );
}
+ @Override
return user;
}
@@ -115,7 +118,8 @@ public class ArchivaConfigurableUsersManager
if ( useUsersCache() )
{
- usersCache.put( user.getUsername(), user );
+ usersCache.put( use @Override
+r.getUsername(), user );
}
}
@@ -142,14 +146,16 @@ public class ArchivaConfigurableUsersManager
}
if ( lastException != null && allFailed )
{
- throw new UserManagerException( lastException.getMessage(), lastException );
+ throw new UserManagerException( lastException.getMessage(), @Override
+ lastException );
}
return user;
}
public UserQuery createUserQuery()
{
- return userManagerPerId.values().iterator().next().createUserQuery();
+ return u @Override
+serManagerPerId.values().iterator().next().createUserQuery();
}
@@ -176,7 +182,8 @@ public class ArchivaConfigurableUsersManager
}
if ( lastException != null && allFailed )
{
- throw new UserManagerException( lastException.getMessage(), lastException );
+ throw new @Override
+UserManagerException( lastException.getMessage(), lastException );
}
}
@@ -235,7 +242,8 @@ public class ArchivaConfigurableUsersManager
{
throw (UserNotFoundException) lastException;
}
- throw new UserManagerException( lastException.getMessage(), lastException );
+ throw new UserManagerException( @Override
+lastException.getMessage(), lastException );
}
}
@@ -251,7 +259,8 @@ public class ArchivaConfigurableUsersManager
@Override
public User getGuestUser()
- throws UserNotFoundException, UserManagerException
+ @Override
+ throws UserNotFoundException, UserManagerException
{
return findUser( GUEST_USERNAME );
}
@@ -264,7 +273,8 @@ public class ArchivaConfigurableUsersManager
for ( UserManager userManager : userManagerPerId.values() )
{
List<User> found = userManager.findUsersByEmailKey( emailKey, orderAscending );
- if ( found != null )
+ i @Override
+f ( found != null )
{
users.addAll( found );
}
@@ -279,7 +289,8 @@ public class ArchivaConfigurableUsersManager
for ( UserManager userManager : userManagerPerId.values() )
{
- List<User> found = userManager.findUsersByFullNameKey( fullNameKey, orderAscending );
+ List<User> found = userManager.findUsersByFullNameKey( fullNameKey, orderAscending ); @Override
+
if ( found != null )
{
users.addAll( found );
@@ -295,7 +306,8 @@ public class ArchivaConfigurableUsersManager
for ( UserManager userManager : userManagerPerId.values() )
{
- List<User> found = userManager.findUsersByQuery( query );
+ List<User> found = userManager.findUsersByQ @Override
+uery( query );
if ( found != null )
{
users.addAll( found );
@@ -311,8 +323,10 @@ public class ArchivaConfigurableUsersManager
for ( UserManager userManager : userManagerPerId.values() )
{
- List<User> found = userManager.findUsersByUsernameKey( usernameKey, orderAscending );
- if ( found != null )
+ List<User> found = userManager.findUsersByUsernameKey( us @Override
+ernameKey, orderAscending );
+ if ( @Override
+found != null )
{
users.addAll( found );
}
@@ -331,7 +345,8 @@ public class ArchivaConfigurableUsersManager
List<User> users = new ArrayList<>();
for ( UserManager userManager : userManagerPerId.values() )
- {
+ @Override
+{
List<User> found = userManager.getUsers();
if ( found != null )
{
@@ -348,6 +363,7 @@ public class ArchivaConfigurableUsersManager
for ( UserManager userManager : userManagerPerId.values() )
{
+ @Override
List<User> found = userManager.getUsers( orderAscending );
if ( found != null )
{
@@ -357,7 +373,8 @@ public class ArchivaConfigurableUsersManager
return users;
}
- public boolean isReadOnly()
+ public boolean isReadOnly( @Override
+)
{
boolean readOnly = false;
@@ -372,7 +389,8 @@ public class ArchivaConfigurableUsersManager
throws UserNotFoundException, UserManagerException
{
- UserManager userManager = userManagerPerId.get( user.getUserManagerId() );
+ UserManager userManage @Override
+r = userManagerPerId.get( user.getUserManagerId() );
user = userManager.updateUser( user );
@@ -421,7 +439,8 @@ public class ArchivaConfigurableUsersManager
}
}
catch ( Exception e )
- {
+ @Override
+ {
lastException = e;
}
}
@@ -456,7 +475,8 @@ public class ArchivaConfigurableUsersManager
lastException = e;
}
}
- if ( lastException != null && allFailed )
+ if ( las @Override
+tException != null && allFailed )
{
throw new UserManagerException( lastException.getMessage(), lastException );
}
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaLdapRoleMapperConfiguration.java b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaLdapRoleMapperConfiguration.java
index ab8719983..2ce58358b 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaLdapRoleMapperConfiguration.java
+++ b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaLdapRoleMapperConfiguration.java
@@ -52,6 +52,7 @@ public class ArchivaLdapRoleMapperConfiguration
@Named( value = "redbackRuntimeConfigurationAdmin#default" )
private RedbackRuntimeConfigurationAdmin redbackRuntimeConfigurationAdmin;
+ @Override
public void addLdapMapping( String ldapGroup, List<String> roles )
throws MappingException
{
@@ -69,7 +70,8 @@ public class ArchivaLdapRoleMapperConfiguration
catch ( RepositoryAdminException e )
{
throw new MappingException( e.getMessage(), e );
- }
+ @Override
+ }
}
@@ -94,7 +96,8 @@ public class ArchivaLdapRoleMapperConfiguration
}
catch ( RepositoryAdminException e )
{
- throw new MappingException( e.getMessage(), e );
+ throw new MappingException( e.getMessa @Override
+ge(), e );
}
}
@@ -112,7 +115,8 @@ public class ArchivaLdapRoleMapperConfiguration
}
catch ( RepositoryAdminException e )
{
- throw new MappingException( e.getMessage(), e );
+ throw new MappingExceptio @Override
+n( e.getMessage(), e );
}
}
@@ -143,7 +147,8 @@ public class ArchivaLdapRoleMapperConfiguration
}
catch ( RepositoryAdminException e )
{
- throw new MappingException( e.getMessage(), e );
+ throw new @Override
+MappingException( e.getMessage(), e );
}
}
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaLockedAdminEnvironmentCheck.java b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaLockedAdminEnvironmentCheck.java
index 2b14fe227..8c1f4d790 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaLockedAdminEnvironmentCheck.java
+++ b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaLockedAdminEnvironmentCheck.java
@@ -89,6 +89,7 @@ public class ArchivaLockedAdminEnvironmentCheck
*
* @param violations
*/
+ @Override
public void validateEnvironment( List<String> violations )
{
if ( !checked )
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaRbacManager.java b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaRbacManager.java
index 8ecc97c8e..607d2dab6 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaRbacManager.java
+++ b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaRbacManager.java
@@ -100,7 +100,7 @@ public class ArchivaRbacManager
log.info( "use rbacManagerIds: '{}'", rbacManagerIds );
- this.rbacManagersPerId = new LinkedHashMap<String, RBACManager>( rbacManagerIds.size() );
+ this.rbacManagersPerId = new LinkedHashMap<>( rbacManagerIds.size() );
for ( String id : rbacManagerIds )
{
@@ -129,9 +129,11 @@ public class ArchivaRbacManager
return this.rbacManagersPerId.values().iterator().next();
}
+ @Override
public Role createRole( String name )
{
- return getRbacManagerForWrite().createRole( name );
+ return getRbacManagerForWrite().createRole( n @Override
+ame );
}
public Role saveRole( Role role )
@@ -158,6 +160,7 @@ public class ArchivaRbacManager
{
throw new RbacManagerException( lastException.getMessage(), lastException );
}
+ @Override
return role;
}
@@ -183,7 +186,8 @@ public class ArchivaRbacManager
}
if ( lastException != null && allFailed )
{
- throw new RbacManagerException( lastException.getMessage(), lastException );
+ throw new RbacManagerException( lastException.getMes @Override
+sage(), lastException );
}
}
@@ -217,7 +221,8 @@ public class ArchivaRbacManager
log.debug( "cannot find role for name: ‘{}", roleName );
if ( lastException != null )
{
- throw new RbacManagerException( lastException.getMessage(), lastException );
+ throw new RbacManagerException( lastException.getMessage(), @Override
+ lastException );
}
return null;
}
@@ -248,7 +253,8 @@ public class ArchivaRbacManager
if ( lastException != null && allFailed )
{
throw new RbacManagerException( lastException.getMessage(), lastException );
- }
+ @Override
+ }
return new ArrayList<>( allRoles.values() );
}
@@ -274,19 +280,22 @@ public class ArchivaRbacManager
if ( lastException != null && allFailed )
{
- throw new RbacManagerException( lastException.getMessage(), lastException );
+ throw new @Override
+RbacManagerException( lastException.getMessage(), lastException );
}
}
public Permission createPermission( String name )
- throws RbacManagerException
+ throws Rb @Override
+acManagerException
{
return getRbacManagerForWrite().createPermission( name );
}
public Permission createPermission( String name, String operationName, String resourceIdentifier )
throws RbacManagerException
- {
+ @Override
+ {
return getRbacManagerForWrite().createPermission( name, operationName, resourceIdentifier );
}
@@ -313,7 +322,8 @@ public class ArchivaRbacManager
if ( lastException != null && allFailed )
{
- throw new RbacManagerException( lastException.getMessage(), lastException );
+ @Override
+ throw new RbacManagerException( lastException.getMessage(), lastException );
}
return permission;
@@ -347,7 +357,8 @@ public class ArchivaRbacManager
}
}
- if ( lastException != null )
+ if ( lastException != null @Override
+ )
{
throw new RbacManagerException( lastException.getMessage(), lastException );
}
@@ -379,7 +390,8 @@ public class ArchivaRbacManager
if ( lastException != null && allFailed )
{
- throw new RbacManagerException( lastException.getMessage(), lastException );
+ @Override
+ throw new RbacManagerException( lastException.getMessage(), lastException );
}
return new ArrayList<>( allPermissions.values() );
}
@@ -401,12 +413,14 @@ public class ArchivaRbacManager
{
lastException = e;
}
- }
+ } @Override
+
if ( lastException != null && allFailed )
{
throw new RbacManagerException( lastException.getMessage(), lastException );
- }
+ @Override
+ }
}
public Operation createOperation( String name )
@@ -434,7 +448,8 @@ public class ArchivaRbacManager
{
lastException = e;
}
- }
+ @Override
+ }
if ( lastException != null && allFailed )
{
@@ -467,7 +482,8 @@ public class ArchivaRbacManager
}
catch ( Exception e )
{
- lastException = e;
+ lastExce @Override
+ption = e;
}
}
@@ -501,6 +517,7 @@ public class ArchivaRbacManager
}
}
+ @Override
if ( lastException != null && allFailed )
{
throw new RbacManagerException( lastException.getMessage(), lastException );
@@ -522,14 +539,16 @@ public class ArchivaRbacManager
allFailed = false;
}
catch ( Exception e )
- {
+ @Override
+ {
lastException = e;
}
}
if ( lastException != null && allFailed )
{
- throw new RbacManagerException( lastException.getMessage(), lastException );
+ throw new RbacMan @Override
+agerException( lastException.getMessage(), lastException );
}
}
@@ -554,7 +573,8 @@ public class ArchivaRbacManager
allFailed = false;
}
}
- catch ( Exception e )
+ catch ( Exception e ) @Override
+
{
lastException = e;
}
@@ -589,7 +609,8 @@ public class ArchivaRbacManager
return r;
}
}
- catch ( Exception e )
+ @Override
+ catch ( Exception e )
{
lastException = e;
}
@@ -620,7 +641,8 @@ public class ArchivaRbacManager
allFailed = false;
}
catch ( Exception e )
- {
+ @Override
+ {
lastException = e;
}
}
@@ -643,7 +665,8 @@ public class ArchivaRbacManager
{
rbacManager.removeResource( resource );
resourcesCache.remove( resource.getIdentifier() );
- allFailed = false;
+ @Override
+ allFailed = false;
}
catch ( Exception e )
{
@@ -651,7 +674,8 @@ public class ArchivaRbacManager
}
}
- if ( lastException != null && allFailed )
+ if ( lastException != null @Override
+&& allFailed )
{
throw new RbacManagerException( lastException.getMessage(), lastException );
}
@@ -676,7 +700,8 @@ public class ArchivaRbacManager
{
userAssignment = rbacManager.saveUserAssignment( userAssignment );
allFailed = false;
- }
+ @Override
+ }
}
catch ( Exception e )
{
@@ -768,7 +793,8 @@ public class ArchivaRbacManager
{
for ( RBACManager rbacManager : rbacManagersPerId.values() )
{
- try
+ @Override
+ try
{
boolean exists = rbacManager.userAssignmentExists( assignment );
if ( exists )
@@ -808,7 +834,8 @@ public class ArchivaRbacManager
}
allUserAssignments.put( ua.getPrincipal(), ua );
}
- allFailed = false;
+ allFai @Override
+led = false;
}
catch ( Exception e )
{
@@ -835,7 +862,8 @@ public class ArchivaRbacManager
{
List<UserAssignment> userAssignments = rbacManager.getUserAssignmentsForRoles( roleNames );
- allUserAssignments.addAll( userAssignments );
+ allUserAssignments.addAll( @Override
+userAssignments );
allFailed = false;
}
@@ -901,19 +929,22 @@ public class ArchivaRbacManager
}
catch ( Exception e )
{
- lastException = e;
+ @Override
+ lastException = e;
}
}
if ( lastException != null && allFailed )
{
- throw new RbacManagerException( lastException.getMessage(), lastException );
+ throw new RbacManagerException( lastException.getMe @Override
+ssage(), lastException );
}
return false;
}
@Override
- public boolean roleExists( Role role )
+ public b @Override
+oolean roleExists( Role role )
throws RbacManagerException
{
return roleExists( role.getName() );
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaUserManagerAuthenticator.java b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaUserManagerAuthenticator.java
index 4707c322e..4d9325305 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaUserManagerAuthenticator.java
+++ b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaUserManagerAuthenticator.java
@@ -34,7 +34,6 @@ import org.apache.archiva.redback.policy.PasswordEncoder;
import org.apache.archiva.redback.policy.UserSecurityPolicy;
import org.apache.archiva.redback.users.User;
import org.apache.archiva.redback.users.UserManager;
-import org.apache.archiva.redback.users.UserManagerException;
import org.apache.archiva.redback.users.UserNotFoundException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -92,6 +91,7 @@ public class ArchivaUserManagerAuthenticator
}
+ @Override
public AuthenticationResult authenticate( AuthenticationDataSource ds )
throws AuthenticationException, AccountLockedException, MustChangePasswordException
{
@@ -214,11 +214,13 @@ public class ArchivaUserManagerAuthenticator
return new AuthenticationResult( authenticationSuccess, username, resultException, authnResultErrors );
}
+ @Override
public boolean supportsDataSource( AuthenticationDataSource source )
{
return ( source instanceof PasswordBasedAuthenticationDataSource );
}
+ @Override
public String getId()
{
return "ArchivaUserManagerAuthenticator";
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/startup/ArchivaStartup.java b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/startup/ArchivaStartup.java
index 8e00506fc..f82304243 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/startup/ArchivaStartup.java
+++ b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/startup/ArchivaStartup.java
@@ -57,6 +57,7 @@ public class ArchivaStartup
private NexusIndexer nexusIndexer;
+ @Override
public void contextInitialized( ServletContextEvent contextEvent )
{
WebApplicationContext wac =
@@ -95,6 +96,7 @@ public class ArchivaStartup
}
}
+ @Override
public void contextDestroyed( ServletContextEvent contextEvent )
{
WebApplicationContext applicationContext =
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/startup/SecuritySynchronization.java b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/startup/SecuritySynchronization.java
index bf942cb91..7a7c87df8 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/startup/SecuritySynchronization.java
+++ b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/startup/SecuritySynchronization.java
@@ -96,6 +96,7 @@ public class SecuritySynchronization
return beans;
}
+ @Override
public void afterConfigurationChange( org.apache.archiva.redback.components.registry.Registry registry,
String propertyName, Object propertyValue )
{
@@ -105,7 +106,8 @@ public class SecuritySynchronization
{
syncRepoConfiguration( (String) propertyValue );
}
- }
+ @Override
+ }
}
public void beforeConfigurationChange( org.apache.archiva.redback.components.registry.Registry registry,