added L to long primitive variable

added int instead of Integer


git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/widgets/workspace-uploader@169895 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Francesco Mangiacrapa 2018-07-23 12:42:31 +00:00
parent a571b0bca9
commit 0a9194ae1a
5 changed files with 18 additions and 19 deletions

View File

@ -25,7 +25,7 @@ public abstract class AbstractUploadProgressListener implements ProgressListener
/**
*
*/
private static final long serialVersionUID = -7542788161740799624L;
private static final long serialVersionUID = -785329339005951465L;
private static final double COMPLETE_PERECENTAGE = 100d;
private int percentage = -1;
@ -47,7 +47,8 @@ public abstract class AbstractUploadProgressListener implements ProgressListener
throw new RuntimeException("Implement the static method 'current' in your customized class");
}
protected Long bytesRead = 0L, contentLength = 0L;
protected Long bytesRead = 0L;
protected Long contentLength = 0L;
private String clientUploadKey;
// protected static HttpServletRequest request;
protected String sessionKey;

View File

@ -19,8 +19,8 @@ import org.slf4j.LoggerFactory;
public final class UploadProgressInputStream extends FilterInputStream {
private List<ProgressListener> listeners;
private long bytesRead = 0;
private long totalBytes = 0;
private long bytesRead = 0L;
private long totalBytes = 0L;
private static Logger logger = LoggerFactory.getLogger(UploadProgressInputStream.class);
/**

View File

@ -144,8 +144,6 @@ public class UploadProgressListener extends AbstractUploadProgressListener {
}
/**
* Instantiates a new upload listener.
*

View File

@ -12,25 +12,25 @@ public interface UploadEvent {
*
* @return the read percentage
*/
Integer getReadPercentage();
int getReadPercentage();
/**
* Sets the read percentage.
*
* @param percentage the new read percentage
*/
void setReadPercentage(Integer percentage);
void setReadPercentage(int percentage);
/**
* Sets the read time. (in millisecond)
*
*
* the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC.
*
* @param time the new read time
*/
void setReadTime(long time);
/**
* Gets the read time (in millisecond)
*

View File

@ -11,11 +11,11 @@ import java.io.Serializable;
*/
public final class UploadProgressChangeEvent implements UploadEvent, Serializable {
/**
*
*
*/
private static final long serialVersionUID = -3445585716145899197L;
private Integer readPercentage = -1;
private long readTime = 0;
private int readPercentage = -1;
private long readTime = 0L;
/**
* Instantiates a new upload progress change event.
@ -26,7 +26,7 @@ public final class UploadProgressChangeEvent implements UploadEvent, Serializabl
/* (non-Javadoc)
* @see org.gcube.portlets.widgets.workspaceuploader.shared.event.UploadEvent#getReadPercentage()
*/
public Integer getReadPercentage() {
public int getReadPercentage() {
return readPercentage;
}
@ -34,17 +34,17 @@ public final class UploadProgressChangeEvent implements UploadEvent, Serializabl
/* (non-Javadoc)
* @see org.gcube.portlets.widgets.workspaceuploader.shared.event.UploadEvent#setReadPercentage(java.lang.Integer)
*/
public void setReadPercentage(Integer percentage) {
public void setReadPercentage(int percentage) {
this.readPercentage = percentage;
}
/* (non-Javadoc)
* @see org.gcube.portlets.widgets.workspaceuploader.shared.event.UploadEvent#setReadTime(long)
*/
@Override
public void setReadTime(long time) {
this.readTime = time;
}
/* (non-Javadoc)