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 static final double COMPLETE_PERECENTAGE = 100d;
private int percentage = -1; 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"); 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; private String clientUploadKey;
// protected static HttpServletRequest request; // protected static HttpServletRequest request;
protected String sessionKey; protected String sessionKey;

View File

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

View File

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

View File

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

View File

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