[prev in list] [next in list] [prev in thread] [next in thread]
List: httpclient-commons-dev
Subject: [jira] [Created] (HTTPCORE-681) Inconsistent behavior between WWWFormCodec and URLEncodedUtils for n
From: "Siqi Li (Jira)" <jira () apache ! org>
Date: 2021-06-13 5:23:00
Message-ID: JIRA.13383607.1623561777000.593357.1623561780096 () Atlassian ! JIRA
[Download RAW message or body]
Siqi Li created HTTPCORE-681:
--------------------------------
Summary: Inconsistent behavior between WWWFormCodec and URLEnc=
odedUtils for null input
Key: HTTPCORE-681
URL: https://issues.apache.org/jira/browse/HTTPCORE-681
Project: HttpComponents HttpCore
Issue Type: Bug
Components: HttpCore
Affects Versions: 5.1
Reporter: Siqi Li
Simple code example:
{code:java}
public static void main(String[] args) {
=09System.out.println(URLEncodedUtils.parse((String) null, StandardCharsets=
.UTF_8)); // []
=09System.out.println(WWWFormCodec.parse((String) null, StandardCharsets.UT=
F_8)); // null
}
{code}
=C2=A0
Basically when the input String is null, URLEncodedUtils.parse returns an =
empty list and WWWFormCodec.parse returns null. It's by no means a big deal=
, but it did catch me off guard, because I expected WWWFormCodec to be a dr=
op-in replacement.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic