flume-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arv...@apache.org
Subject svn commit: r1299708 - /incubator/flume/trunk/flume-ng-core/src/main/java/org/apache/flume/Context.java
Date Mon, 12 Mar 2012 15:21:48 GMT
Author: arvind
Date: Mon Mar 12 15:21:48 2012
New Revision: 1299708

URL: http://svn.apache.org/viewvc?rev=1299708&view=rev
Log:
FLUME-1018. Context can cause NullPointerException.

(Brock Noland via Arvind Prabhakar)

Modified:
    incubator/flume/trunk/flume-ng-core/src/main/java/org/apache/flume/Context.java

Modified: incubator/flume/trunk/flume-ng-core/src/main/java/org/apache/flume/Context.java
URL: http://svn.apache.org/viewvc/incubator/flume/trunk/flume-ng-core/src/main/java/org/apache/flume/Context.java?rev=1299708&r1=1299707&r2=1299708&view=diff
==============================================================================
--- incubator/flume/trunk/flume-ng-core/src/main/java/org/apache/flume/Context.java (original)
+++ incubator/flume/trunk/flume-ng-core/src/main/java/org/apache/flume/Context.java Mon Mar
12 15:21:48 2012
@@ -119,6 +119,14 @@ public class Context {
   }
   /**
    * Gets value mapped to key, returning null if unmapped.
+   * <p>
+   * Note that this method returns an object as opposed to a
+   * primitive. The configuration key requested may not be mapped
+   * to a value and by returning the primitive object wrapper we can
+   * return null. If the key does not exist the return value of
+   * this method is assigned directly to a primitive, a
+   * {@link NullPointerException} will be thrown.
+   * </p>
    * @param key to be found
    * @return value associated with key or null if unmapped
    */
@@ -140,6 +148,14 @@ public class Context {
   }
   /**
    * Gets value mapped to key, returning null if unmapped.
+   * <p>
+   * Note that this method returns an object as opposed to a
+   * primitive. The configuration key requested may not be mapped
+   * to a value and by returning the primitive object wrapper we can
+   * return null. If the key does not exist the return value of
+   * this method is assigned directly to a primitive, a
+   * {@link NullPointerException} will be thrown.
+   * </p>
    * @param key to be found
    * @return value associated with key or null if unmapped
    */
@@ -161,6 +177,14 @@ public class Context {
   }
   /**
    * Gets value mapped to key, returning null if unmapped.
+   * <p>
+   * Note that this method returns an object as opposed to a
+   * primitive. The configuration key requested may not be mapped
+   * to a value and by returning the primitive object wrapper we can
+   * return null. If the key does not exist the return value of
+   * this method is assigned directly to a primitive, a
+   * {@link NullPointerException} will be thrown.
+   * </p>
    * @param key to be found
    * @return value associated with key or null if unmapped
    */



Mime
View raw message