Buggy code:
public class PackageResource extends AbstractResource { private static final Logger log = LoggerFactory . getLogger ( PackageResource . class ) ; private static final long serialVersionUID = 1L ; public static final class PackageResourceBlockedException extends WicketRuntimeException { private static final long serialVersionUID = 1L ; public PackageResourceBlockedException ( String message ) { } } private final String absolutePath ; private final Locale locale ; private final String path ; private final String scopeName ; private final String style ; private final String variation ; protected PackageResource ( final Class < ? > scope , final String name , final Locale locale , final String style , final String variation ) { } public final Class < ? > getScope ( ) { } public final String getStyle ( ) { } @ Override protected ResourceResponse newResourceResponse ( Attributes attributes ) { final ResourceResponse resourceResponse = new ResourceResponse ( ) ; if ( resourceResponse . dataNeedsToBeWritten ( attributes ) ) { final IResourceStream resourceStream = getResourceStream ( ) ; if ( resourceStream == null ) return sendResourceError ( resourceResponse , SC_NOT_FOUND , "Unable<seq2seq4repair_space>to<seq2seq4repair_space>find<seq2seq4repair_space>resource" ) ; resourceResponse . setContentType ( resourceStream . getContentType ( ) ) ; final Time lastModified = resourceStream . lastModifiedTime ( ) ; if ( lastModified != null ) <START_BUG> resourceResponse . setLastModified ( lastModified . toDate ( ) ) ; <END_BUG> try { final byte [ ] bytes ; try { bytes = IOUtils . toByteArray ( resourceStream . getInputStream ( ) ) ; } finally { resourceStream . close ( ) ; } resourceResponse . setContentLength ( bytes . length ) ; resourceResponse . setWriteCallback ( new WriteCallback ( ) { @ Override public void writeData ( Attributes attributes ) { attributes . getResponse ( ) . write ( bytes ) ; } } ) ; } catch ( IOException e ) { PackageResource . log . debug ( e . getMessage ( ) , e ) ; return sendResourceError ( resourceResponse , 500 , "Unable<seq2seq4repair_space>to<seq2seq4repair_space>read<seq2seq4repair_space>resource<seq2seq4repair_space>stream" ) ; } catch ( ResourceStreamNotFoundException e ) { PackageResource . log . debug ( e . getMessage ( ) , e ) ; return sendResourceError ( resourceResponse , 500 , "Unable<seq2seq4repair_space>to<seq2seq4repair_space>open<seq2seq4repair_space>resource<seq2seq4repair_space>stream" ) ; } } Application . get ( ) . getResourceSettings ( ) . getCachingStrategy ( ) . decorateResponse ( resourceResponse ) ; return resourceResponse ; } private ResourceResponse sendResourceError ( ResourceResponse resourceResponse , int errorCode , String errorMessage ) { } protected IResourceStream getResourceStream ( ) { } private boolean accept ( Class < ? > scope , String path ) { } public static boolean exists ( final Class < ? > scope , final String path , final Locale locale , final String style , final String variation ) { } @ Override public String toString ( ) { } @ Override public int hashCode ( ) { } @ Override public boolean equals ( Object obj ) { } }

Fix:
resourceResponse . setLastModified ( lastModified ) ;