From 742417162a1a94605dee78728733be03dbb1fa4b Mon Sep 17 00:00:00 2001 From: Daniel Naber Date: Tue, 23 Nov 2004 22:36:10 +0000 Subject: [PATCH] throw NullPointerException instead of IllegalArgumentException; small typo fixes git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150667 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/lucene/document/NumberTools.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/java/org/apache/lucene/document/NumberTools.java b/src/java/org/apache/lucene/document/NumberTools.java index 11a8cd4678e..d202519fe11 100644 --- a/src/java/org/apache/lucene/document/NumberTools.java +++ b/src/java/org/apache/lucene/document/NumberTools.java @@ -55,7 +55,7 @@ public class NumberTools { + "1y2p0ij32e8e7"; /** - * the length of (all) strings returned by {@link #longToString} + * The length of (all) strings returned by {@link #longToString} */ public static final int STR_SIZE = MIN_STRING_VALUE.length(); @@ -89,7 +89,7 @@ public class NumberTools { } /** - * Converts a String that was returned by {@link #longToString}back to a + * Converts a String that was returned by {@link #longToString} back to a * long. * * @throws IllegalArgumentException @@ -100,7 +100,7 @@ public class NumberTools { */ public static long stringToLong(String str) { if (str == null) { - throw new IllegalArgumentException("string cannot be null"); + throw new NullPointerException("string cannot be null"); } if (str.length() != STR_SIZE) { throw new NumberFormatException("string is the wrong size");