use shifts for division

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-catalogue/catalogue-ws@146530 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Costantino Perciante 2017-04-03 16:32:25 +00:00
parent 9093618785
commit 52d136e582
2 changed files with 2 additions and 1 deletions

View File

@ -1023,7 +1023,7 @@ public class CatalogueUtils {
if(upload != null){
File file = upload.getValueAs(File.class);
long fileLenghtBytes = file.length();
long fileLenghtMegaByte = fileLenghtBytes/(1024 * 1024) ;
long fileLenghtMegaByte = fileLenghtBytes >> 20;
logger.trace("File lenght in MegaByte is " + fileLenghtMegaByte);
if(fileLenghtMegaByte > MAX_UPLOADABLE_FILE_SIZE_MB)

View File

@ -17,6 +17,7 @@ import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;
import org.junit.Test;