Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 362742

Summary: NotUtf8Exception should provide context on what failed
Product: [RT] Jetty Reporter: Joakim Erdfelt <joakim.erdfelt>
Component: otherAssignee: Project Inbox <jetty-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: gregw
Version: 7.5.4   
Target Milestone: 7.5.x   
Hardware: All   
OS: All   
Whiteboard:

Description Joakim Erdfelt CLA 2011-11-02 20:21:38 EDT
org.eclipse.jetty.util.Utf8Appendable$NotUtf8Exception: Not valid UTF8!

This is insufficient to detail what was invalid.
Ideas for what could be included...
+ Incomplete Sequence ___
+ Invalid byte at offset ___ in array [0-9A-F] ...
Comment 1 Greg Wilkins CLA 2011-11-27 22:00:02 EST
The exception now records the hex byte being added and the current state of the UTF-8 engine, but it does not give a detailed explanation of the reason.

The virtual method call isUtf8SequenceComplete was also removed from the appendByte algorithm as it was used 3 times and would greatly slow the algorithm.