PD4ML v4 Forums PD4ML v3 Archived Forums (Read Only) Troubleshooting NullPointerException sometimes during render Re: Re: NullPointerException sometimes during render


The exception is thrown in the following code (in StringTokenizer constructor)
[language=java:24yvxgeh]for (int i = 1; (headerName = conn.getHeaderFieldKey(i)) != null; i++) {
if (headerName.equalsIgnoreCase(SET_COOKIE)) {
Map cookie = new HashMap();
StringTokenizer st = new StringTokenizer(conn.getHeaderField(i), COOKIE_VALUE_DELIMITER);

Where conn is URLConnection.
It seems, conn.getHeaderField(i) returns null, which should not be possible according to the method specification.

We added an extra check for the null value to the development build. The fix will be available with the new beta release.