commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <>
Subject [jira] Commented: (CODEC-95) Base64: optionally allow strict parsing of base64 strings
Date Wed, 26 Jan 2011 14:36:43 GMT


Sebb commented on CODEC-95:

The problem with setters is that they cannot be used with final variables.
This means that the setting may be changed subsequently, and cause odd errors.
It also make testing much harder because of the additional mutable state.

Adding a setter "grows the API" just as much as adding another constructor.
If there are several setters, then the API grows further for each one.
With my suggestion, only the Validation API will grow, and it's optional.

> Base64: optionally allow strict parsing of base64 strings
> ---------------------------------------------------------
>                 Key: CODEC-95
>                 URL:
>             Project: Commons Codec
>          Issue Type: Improvement
>    Affects Versions: 1.4
>            Reporter: Adam Rabung
>            Priority: Minor
>         Attachments:
> Currently, Codec skips base64 characters that are outside of the encode table.  I realize
this is perfectly to spec, but I wonder if other users might appreciate a "strict" mode that
throws an exception when one of these illegal characters are encountered.  For example, I
would love an exception to be thrown here:
> new Base64().decode("!@#$ iHaveIllegalCharsAtBeginningAndEnd %^&"));

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message