Buggy code:
public class MediaServerController extends AbstractCommandController implements LastModified { private IOBiz ioBiz ; private MediaBiz mediaBiz ; private ExecutorService executorService ; private static final EnumSet < MediaSize > THUMB_SIZES = EnumSet . of ( THUMB_BIG , THUMB_BIGGER , THUMB_NORMAL , THUMB_SMALL ) ; public long getLastModified ( HttpServletRequest request ) { } @ SuppressWarnings ( "unchecked" ) private BasicMediaRequest getMediaRequest ( HttpServletRequest request , MediaServerController . Command cmd ) { MediaSize size = MediaSize . valueOf ( cmd . size ) ; MediaQuality quality = MediaQuality . valueOf ( cmd . quality ) ; BasicMediaRequest mediaRequest = new BasicMediaRequest ( ) ; mediaRequest . setMediaItemId ( cmd . id ) ; mediaRequest . setOriginal ( cmd . original ) ; mediaRequest . getParameters ( ) . putAll ( request . getParameterMap ( ) ) ; mediaRequest . setQuality ( quality ) ; mediaRequest . setSize ( size ) ; StringBuilder headerDebugBuf = null ; if ( logger . isTraceEnabled ( ) ) { headerDebugBuf = new StringBuilder ( "HTTP<seq2seq4repair_space>headers:\n" ) ; } Enumeration < String > headers = request . getHeaderNames ( ) ; while ( headers . hasMoreElements ( ) ) { String header = headers . nextElement ( ) ; if ( headerDebugBuf != null ) { headerDebugBuf . append ( header ) . append ( "<seq2seq4repair_space>=<seq2seq4repair_space>" ) . append ( request . getHeader ( header ) ) . append ( "\n" ) ; } if ( HTTP_USER_AGENT_HEADER . equalsIgnoreCase ( header ) ) { String ua = request . getHeader ( header ) ; if ( StringUtils . hasText ( ua ) ) { mediaRequest . getParameters ( ) . put ( USER_AGENT_KEY , ua ) ; } } else if ( HTTP_RANGE_HEADER . equalsIgnoreCase ( header ) ) { String range = request . getHeader ( header ) ; if ( range . toLowerCase ( ) . startsWith ( "bytes=" ) ) { range = range . substring ( 6 ) ; int idx = range . indexOf ( '-' ) ; long start = 0 ; if ( idx > 0 ) { start = Long . valueOf ( range . substring ( 0 , idx ) ) ; } <START_BUG> long end = 0 ; <END_BUG> if ( ( idx + 1 ) < ( range . length ( ) ) ) { end = Long . valueOf ( range . substring ( ( idx + 1 ) ) ) ; } mediaRequest . setPartialContentByteRange ( new LongRange ( start , end ) ) ; } } } if ( headerDebugBuf != null ) { logger . trace ( headerDebugBuf . toString ( ) ) ; } return mediaRequest ; } @ Override protected ModelAndView handle ( final HttpServletRequest request , final HttpServletResponse response , Object command , BindException errors ) throws Exception { } @ SuppressWarnings ( "unchecked" ) private void handleHitCount ( HttpServletRequest request , MediaServerController . Command cmd , MediaRequest mediaRequest ) { } public static class Command { private Long id ; private boolean download = false ; private boolean original = false ; private String size = NORMAL . toString ( ) ; private String quality = GOOD . toString ( ) ; private String albumKey = null ; public String getAlbumKey ( ) { } public void setAlbumKey ( String albumKey ) { } public boolean isDownload ( ) { } public void setDownload ( boolean download ) { } public Long getId ( ) { } public void setId ( Long id ) { } public String getQuality ( ) { } public void setQuality ( String quality ) { } public String getSize ( ) { } public void setSize ( String size ) { } public boolean isOriginal ( ) { } public void setOriginal ( boolean original ) { } } public IOBiz getIoBiz ( ) { } public void setIoBiz ( IOBiz ioBiz ) { } public ExecutorService getExecutorService ( ) { } public void setExecutorService ( ExecutorService executorService ) { } public MediaBiz getMediaBiz ( ) { } public void setMediaBiz ( MediaBiz mediaBiz ) { } }

Fix:
long end = Long . MAX_VALUE ;