Return-Path: X-Original-To: apmail-accumulo-user-archive@www.apache.org Delivered-To: apmail-accumulo-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F04C0DE9E for ; Tue, 26 Jun 2012 12:57:23 +0000 (UTC) Received: (qmail 80604 invoked by uid 500); 26 Jun 2012 12:57:23 -0000 Delivered-To: apmail-accumulo-user-archive@accumulo.apache.org Received: (qmail 80398 invoked by uid 500); 26 Jun 2012 12:57:22 -0000 Mailing-List: contact user-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@accumulo.apache.org Delivered-To: mailing list user@accumulo.apache.org Received: (qmail 80370 invoked by uid 99); 26 Jun 2012 12:57:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Jun 2012 12:57:21 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FSL_RCVD_USER,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of david.medinets@gmail.com designates 209.85.160.169 as permitted sender) Received: from [209.85.160.169] (HELO mail-gh0-f169.google.com) (209.85.160.169) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Jun 2012 12:57:13 +0000 Received: by ghrr18 with SMTP id r18so4506499ghr.0 for ; Tue, 26 Jun 2012 05:56:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=k8vRmwhgCr2usdR0q69Hvhhcv4bYDT3Jm1/O9wbqX5U=; b=L67RVDFr8w7ewMEqruTlPZiwTuferkJTLs0c3/D3pIyNkBxdF4qoKYPHh2b/CQTjmL GHEf5J8R6FhH3MMLGiNgMwYmld0XW9bv8gcxMHZhVYQQOeKO1pSWZ+lNdXgvrcvPe0rJ 3CIptijeKzhLxLyFeqyP4009xd2uYT6V+Q6BkwMjw0Lji+XPk50jM1k3UPHzBBtT9rPk Kf5x4rfzUoeoexdI/HtsT2ZJKjTkn21A56xzUPvq2L8YH3LqLndtQAhd+DKlNQUTa3dv Bhcn5y3GY39PLfoXBYM1vRPxJkRItwHVYOffrcuN/M3Udmf/VQZYo32mAuXpI7Av2zdr 4w/Q== MIME-Version: 1.0 Received: by 10.60.14.71 with SMTP id n7mr16254533oec.43.1340715412243; Tue, 26 Jun 2012 05:56:52 -0700 (PDT) Received: by 10.182.74.161 with HTTP; Tue, 26 Jun 2012 05:56:52 -0700 (PDT) Date: Tue, 26 Jun 2012 08:56:52 -0400 Message-ID: Subject: Incorrectly setting TKey causes NPE (to nobody's surprise) From: David Medinets To: accumulo-user Content-Type: text/plain; charset=ISO-8859-1 I did this: TKey tKey = new TKey(); tKey.setRow(row_id.getBytes()); TRange tRange = new TRange(); trange.setStart(tKey); scan.setRange(tRange); Iterator iterator = scan.iterator(); iterator.hasNext(); This resulted in an NPE in: org.apache.accumulo.core.data.Key.rowColumnStringBuilder(Key.java:472) While I have no real objection to this NPE (my code is clearly deficient), I wonder if a more cogent error message is possible. Should there be guard statements somewhere to ensure a valid object?