From 4874e4d32145ef5f82e0a4502aefe53c1e32f7d4 Mon Sep 17 00:00:00 2001 From: John Cortell Date: Thu, 18 Jan 2007 13:44:09 +0000 Subject: [PATCH] Comment change only. Be explicit that the createAddress() methods are expected to throw NumberFormatException on bad input. --- .../src/org/eclipse/cdt/core/IAddressFactory.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/IAddressFactory.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/IAddressFactory.java index 1474b1e65b4..586773feb55 100644 --- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/IAddressFactory.java +++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/IAddressFactory.java @@ -35,12 +35,17 @@ public interface IAddressFactory /** * Creates address from string representation. * - * 1. This method should be able to create address from hex + * 1. Method should be able to create address from hex * address string (string produced with * IAddress.toHexAddressString() method). * 2. Method should be case insensetive * 3. Method should be able to create address from decimal address * representation + * 4. Method should throw NumberFormatException if the given string + * cannot be decoded. + * 5. Method should not attempt to evaluate string as expression (i.e., + * "0x1000 + 5" should not result in an IAddress for 0x1005.) Input + * must be a straightforward, absolute value. * * Please see Addr32Factory.createAddress() for reference implementation. * @@ -56,6 +61,13 @@ public interface IAddressFactory * * Method should be case insensetive * + * Method should throw NumberFormatException if the given string + * cannot be decoded. + * + * Method should not attempt to evaluate string as expression (i.e., + * "1000 + 5" should not result in an IAddress for 1005.) Input + * must be a straightforward, absolute value. + * * @param addr * @param radix * @return