Question

I am using an external library called superCSV and this library apparently makes use of isEmpty. After a search on SO, I found that this method was introduced in 2.3 and indeed the crash I am getting is from 2.2

Is there anyway I can fix it that while still using the library? Perhaps provide an implementation of isEmpty? or somehow get it not to crash? Thank you

Était-ce utile?

La solution

Are you using the latest version of SuperCSV?
This has been fixed with SuperCSV 2.0.1 (and higher) by restoring Java 5 compatibility.

You can see the related commit here: http://sourceforge.net/p/supercsv/code/264/

Instead of calling java.lang.String.isEmpty() the library is now doing a simple check for String.length() == 0. That should fix your problem.

Autres conseils

If you have the source of the library, change the call to from isEmpty() to equals("").

If you don't have the source of the library, not really.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top