{ "id": "64154", "key": "TIMOB-3522", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2017-06-07T22:53:28.000+0000", "created": "2011-04-15T03:46:15.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [ { "id": "11260", "description": "", "name": "Release 1.6.2", "archived": true, "released": true, "releaseDate": "2011-04-20" } ], "issuelinks": [], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-06-07T22:53:28.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "{html}

Titanium Mobile 1.6.1
\nAndroid SDK r10

\n

Passing an invalid URL to to a xhr invocation causes a null\npointer exception instead of a meaningful error message about a\nmalformed URL.

\n
\nvar xhr = Titanium.Network.createHTTPClient();\nxhr.open('GET', \"null/query\");\n
\n
\n[TRACE] E/KrollMethod( 622): (kroll$1: app://app.js) [5,13127] Exception calling kroll method open, invocation: null ]\n[TRACE] E/KrollMethod( 622): java.lang.NullPointerException\n[TRACE] E/KrollMethod( 622): at ti.modules.titanium.network.TiHTTPClient.getCleanUri(TiHTTPClient.java:702)\n[TRACE] E/KrollMethod( 622): at ti.modules.titanium.network.TiHTTPClient.open(TiHTTPClient.java:726)\n[TRACE] E/KrollMethod( 622): at ti.modules.titanium.network.HTTPClientProxy.open(HTTPClientProxy.java:81)\n[TRACE] E/KrollMethod( 622): at ti.modules.titanium.network.HTTPClientProxyBindingGen$23.invoke(HTTPClientProxyBindingGen.java:756)\n[TRACE] E/KrollMethod( 622): at org.appcelerator.kroll.KrollMethod.call(KrollMethod.java:51)\n[TRACE] E/KrollMethod( 622): at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1711)\n[TRACE] E/KrollMethod( 622): at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:854)\n[TRACE] E/KrollMethod( 622): at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164)\n[TRACE] E/KrollMethod( 622): at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426)\n[TRACE] E/KrollMethod( 622): at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3161)\n[TRACE] E/KrollMethod( 622): at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:175)\n[TRACE] E/KrollMethod( 622): at org.mozilla.javascript.Context.evaluateReader(Context.java:1142)\n[TRACE] E/KrollMethod( 622): at org.appcelerator.titanium.kroll.KrollContext.evaluateScript(KrollContext.java:211)\n[TRACE] E/KrollMethod( 622): at org.appcelerator.titanium.kroll.KrollContext.handleEvalFile(KrollContext.java:236)\n[TRACE] E/KrollMethod( 622): at org.appcelerator.titanium.kroll.KrollContext.handleMessage(KrollContext.java:122)\n[TRACE] E/KrollMethod( 622): at org.appcelerator.titanium.TiMessageQueue.handleMessage(TiMessageQueue.java:223)\n[TRACE] E/KrollMethod( 622): at android.os.Handler.dispatchMessage(Handler.java:95)\n[TRACE] E/KrollMethod( 622): at android.os.Looper.loop(Looper.java:123)\n[TRACE] E/KrollMethod( 622): at org.appcelerator.titanium.kroll.KrollHandlerThread.run(KrollHandlerThread.java:89)\n[TRACE] E/KrollContext( 622): (kroll$1: app://app.js) [54,13181] Error evaluating source: Wrapped java.lang.NullPointerException\n
{html}", "attachment": [], "flagged": false, "summary": "Android java.lang.NullPointerException when making HTTP call with invalid Url", "creator": { "name": "danielcameron", "key": "danielcameron", "displayName": "Daniel Cameron", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "danielcameron", "key": "danielcameron", "displayName": "Daniel Cameron", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "421320", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket due to time passed.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-06-07T22:53:28.000+0000", "updated": "2017-06-07T22:53:28.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }