incubator-hama-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edwardy...@apache.org
Subject svn commit: r723187 - /incubator/hama/trunk/src/java/org/apache/hama/AbstractVector.java
Date Thu, 04 Dec 2008 02:00:19 GMT
Author: edwardyoon
Date: Wed Dec  3 18:00:18 2008
New Revision: 723187

URL: http://svn.apache.org/viewvc?rev=723187&view=rev
Log: (empty)

Modified:
    incubator/hama/trunk/src/java/org/apache/hama/AbstractVector.java

Modified: incubator/hama/trunk/src/java/org/apache/hama/AbstractVector.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/src/java/org/apache/hama/AbstractVector.java?rev=723187&r1=723186&r2=723187&view=diff
==============================================================================
--- incubator/hama/trunk/src/java/org/apache/hama/AbstractVector.java (original)
+++ incubator/hama/trunk/src/java/org/apache/hama/AbstractVector.java Wed Dec  3 18:00:18
2008
@@ -35,10 +35,16 @@
    * 
    * @param index
    * @return the value of v(index)
-   * @throws NullPointerException
    */
-  public double get(int index) throws NullPointerException {
-    return this.entries.get(index).getValue();
+  public double get(int index) {
+    double value;
+    try {
+      value = this.entries.get(index).getValue();
+    } catch (NullPointerException e) {
+      throw new NullPointerException("v("+index+") : " + e.toString());
+    }
+    
+    return value;
   }
   
   /**



Mime
View raw message