takes icon indicating copy to clipboard operation
takes copied to clipboard

IndexOutOfBoundsException when Identity prop value is empty String

Open golszewski86 opened this issue 6 years ago • 6 comments

The following code:

final Request req = new RqWithAuth(
    new Identity.Simple("urn", new MapOf<>(new MapEntry<>("key", "")))
);
final Identity identity = new RqAuth(req).identity();

Produces exception:

Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
	at java.util.LinkedList.checkElementIndex(LinkedList.java:555)
	at java.util.LinkedList.get(LinkedList.java:476)
	at java.util.Collections$UnmodifiableList.get(Collections.java:1311)
	at org.cactoos.list.ListEnvelope.get(ListEnvelope.java:86)
	at org.takes.facets.auth.codecs.CcPlain.decode(CcPlain.java:83)
	at org.takes.facets.auth.RqAuth.identity(RqAuth.java:78)

takes 1.19

golszewski86 avatar Jan 16 '20 07:01 golszewski86

@paulodamaso/z please, pay attention to this issue

0crat avatar Jan 16 '20 07:01 0crat

@golszewski86/z this project will fix the problem faster if you donate a few dollars to it; just click here and pay via Stripe, it's very fast, convenient and appreciated; thanks a lot!

0crat avatar Jan 16 '20 07:01 0crat

@0crat in

paulodamaso avatar Jan 27 '20 21:01 paulodamaso

@0crat in (here)

@paulodamaso Thanks for your contribution, @golszewski86/z! If you would be a member of the project, you would now earn +15 reputation points, as explained in §29. You can join and apply to it, see §2.

0crat avatar Jan 27 '20 21:01 0crat

@0crat status

baudoliver7 avatar Jan 17 '22 13:01 baudoliver7

@0crat status

baudoliver7 avatar Jan 18 '22 08:01 baudoliver7