public Boolean clearUploadedFiles()
throws ArchivaRestServiceException
{
- List<FileMetadata> fileMetadatas = getSessionFileMetadatas();
+ List<FileMetadata> fileMetadatas = new ArrayList( getSessionFileMetadatas() );
for ( FileMetadata fileMetadata : fileMetadatas )
{
deleteFile( fileMetadata.getServerFileName() );
{
public boolean apply( FileMetadata fileMetadata )
{
- if ( fileMetadata == null )
- {
- return false;
- }
- return StringUtils.equals( groupId, fileMetadata.getGroupId() ) && StringUtils.equals( artifactId,
- fileMetadata.getArtifactId() )
- && !fileMetadata.isPomFile();
+ return fileMetadata != null && !fileMetadata.isPomFile();
}
} );
Iterator<FileMetadata> iterator = filesToAdd.iterator();
{
public boolean apply( @Nullable FileMetadata fileMetadata )
{
- return fileMetadata.isPomFile();
+ return fileMetadata != null && fileMetadata.isPomFile();
}
} );
});
$('#fileupload').fileupload({
add: function (e, data) {
+ if(!mainContent.find("#fileupload" ).valid()){
+ return;
+ }
data.formData = {
groupId: artifactUploadViewModel.groupId(),
artifactId: artifactUploadViewModel.artifactId(),