This page is part of a searchable archive of the Code Style site log. Technical implementation notes that shed light on when, why and how the site has evolved since 2000.
Follow the latest entries to the site log.
Added a setRequestedSessionIdValid method to the AbstractMockHttpServletRequest class to simulate invalidated sessions and adapted the servlet API method isRequestedSessionIdValid as necessary. Added test cases to the JUnit suite for the class.
Actions: Ask a question about this post, seek clarification or offer a correction.
Reversed the class hierarchy so that LimitedInputStream is now a subclass of MeasuredInputStream, which better follows common sense. The former arrangement, where MeasuredInputStream was a practically unlimited LimitedInputStream, was purely a legacy. Required a modification of AbstractIORequest to take a LimitedInputStream as its primary source type.
Actions: Ask a question about this post, seek clarification or offer a correction.
Updated the ResultProxy class to complete reporting via the new SourceBroker getLength method and ResultLog setBytesRequested. Removed the overloaded getCacheValue method without ResultLog parameter; now a log is created and returned whether it is used or not.
Added unit tests for the new SourceBroker getLength implementations in all concrete classes. Removed the openOutputStream method from the StreamBroker interface, since it is unused and was causing unnecessary problems in testing FileBroker.
Actions: Ask a question about this post, seek clarification or offer a correction.
Simplified the skip, mark and reset methods of LimitedInputStream to avoid inconsistencies with the BufferedInputStream implementation. These methods are disabled and markSupported returns false, since they are not required and were causing unnecessary complications in testing. This allowed the completion of the MeasuredInputStream class, with a limit of Integer.MAX_VALUE bytes, which will be more than enough for general purposes.
Added a getLength method to the SourceBroker interface to report the number of bytes transferred from the primary source. Applied the new specification to all implementations and their underlying requestor classes:
TrustedHttpBroker and HttpRequest.
UntrustedHttpBroker and UntrustedHttpRequest.
FileBroker and FileRequest.
This modification required a change to the primary input stream field in the AbstractIORequest class to a LimitedInputStream type, and relevant assignments in subclasses FileRequest, HttpRequest and UntrustedHttpRequest.
Actions: Ask a question about this post, seek clarification or offer a correction.
Updated the skip and available methods of MockInputStream to respond according to the "unlimited" mode with a random byte generator, or underlying ByteArrayInputStream as appropriate.
Actions: Ask a question about this post, seek clarification or offer a correction.
Added answers to a range of FAQ pages:
Actions: Ask a question about this post, seek clarification or offer a correction.
Find technical implementation notes on all aspects of the Code Style site.
For a summary overview, see the annotated site log contents.