{"action":"opened","issue":{"url":"https://api.github.com/repos/Samsung/GearVRf/issues/240","labels_url":"https://api.github.com/repos/Samsung/GearVRf/issues/240/labels{/name}","comments_url":"https://api.github.com/repos/Samsung/GearVRf/issues/240/comments","events_url":"https://api.github.com/repos/Samsung/GearVRf/issues/240/events","html_url":"https://github.com/Samsung/GearVRf/issues/240","id":104082361,"number":240,"title":"GVRBitmapTexture does not throws IllegalArgumentException for byte[] grayscaleData constructor","user":{"login":"elidelsonc","id":11890859,"avatar_url":"https://avatars.githubusercontent.com/u/11890859?v=3","gravatar_id":"","url":"https://api.github.com/users/elidelsonc","html_url":"https://github.com/elidelsonc","followers_url":"https://api.github.com/users/elidelsonc/followers","following_url":"https://api.github.com/users/elidelsonc/following{/other_user}","gists_url":"https://api.github.com/users/elidelsonc/gists{/gist_id}","starred_url":"https://api.github.com/users/elidelsonc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elidelsonc/subscriptions","organizations_url":"https://api.github.com/users/elidelsonc/orgs","repos_url":"https://api.github.com/users/elidelsonc/repos","events_url":"https://api.github.com/users/elidelsonc/events{/privacy}","received_events_url":"https://api.github.com/users/elidelsonc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-31T16:07:03Z","updated_at":"2015-08-31T16:07:03Z","closed_at":null,"body":"Hello,\r\n\r\nWhen writing unit test for GVRBitmapTexture (byte[] grayscaledata), I noted that the constructor does not throws IllegalArgumentException as described in the constructor header.\r\n\r\nI have tested with height=0, width=0 and grayscaleData.length < height * width.\r\n\r\nClass: GVRBitmapTexture\r\nConstructor: Create a new, grayscale texture, from an array of luminance bytes.\r\n\r\n```\r\n    /**\r\n     * Create a new, grayscale texture, from an array of luminance bytes.\r\n     * \r\n     * @param gvrContext\r\n     *            Current {@link GVRContext}\r\n     * @param width\r\n     *            Texture width, in pixels\r\n     * @param height\r\n     *            Texture height, in pixels\r\n     * @param grayscaleData\r\n     *            {@code width * height} bytes of gray scale data\r\n     * \r\n     * @throws IllegalArgumentException\r\n     *             If {@code width} or {@code height} is {@literal <= 0,} or if\r\n     *             {@code grayScaleData} is {@code null}, or if\r\n     *             {@code grayscaleData.length < height * width}\r\n     * \r\n     * @since 1.6.3\r\n     */\r\n    public GVRBitmapTexture(GVRContext gvrContext, int width, int height,\r\n            byte[] grayscaleData) throws IllegalArgumentException {\r\n        this(gvrContext, width, height, grayscaleData,\r\n                gvrContext.DEFAULT_TEXTURE_PARAMETERS);\r\n    }\r\n```\r\n\r\nBest regards,\r\n\r\nElidelson Carvalho\r\n\r\nSIDIA-BRAZIL\r\nUX TEAM"}}