You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jcs-dev@jakarta.apache.org by hc...@apache.org on 2005/01/24 11:40:13 UTC

cvs commit: jakarta-turbine-jcs/sandbox/yajcache/src/org/apache/jcs/yajcache/file CacheFileDAO.java

hchar       2005/01/24 02:40:13

  Modified:    sandbox/yajcache/src/org/apache/jcs/yajcache/file
                        CacheFileDAO.java
  Log:
  annotate non-nullable
  
  Revision  Changes    Path
  1.2       +6 -4      jakarta-turbine-jcs/sandbox/yajcache/src/org/apache/jcs/yajcache/file/CacheFileDAO.java
  
  Index: CacheFileDAO.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-jcs/sandbox/yajcache/src/org/apache/jcs/yajcache/file/CacheFileDAO.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CacheFileDAO.java	24 Jan 2005 10:29:45 -0000	1.1
  +++ CacheFileDAO.java	24 Jan 2005 10:40:13 -0000	1.2
  @@ -52,7 +52,8 @@
        * @return true if successful; false otherwise.
        */
       public boolean writeCacheItem(
  -            String cacheName, CacheFileContentType type, String key, byte[] val)
  +            @NonNullable String cacheName, @NonNullable CacheFileContentType type, 
  +            @NonNullable String key, @NonNullable byte[] val)
       {
           File file = CacheFileUtils.inst.getCacheFile(cacheName, key);
           RandomAccessFile raf = null;
  @@ -83,7 +84,8 @@
        * @return the byte array of a specified cache item from the file system;
        * or null if it can't.
        */
  -    public byte[] readCacheItem(String cacheName, String key) {
  +    public byte[] readCacheItem(@NonNullable String cacheName, @NonNullable String key) 
  +    {
           File file = CacheFileUtils.inst.getCacheFile(cacheName, key);
           
           if (!file.exists())
  @@ -139,14 +141,14 @@
        *
        * @return true if successful; false otherwise.
        */
  -    public boolean removeCacheItem(String cacheName, String key)
  +    public boolean removeCacheItem(@NonNullable String cacheName, @NonNullable String key)
       {
           File file = CacheFileUtils.inst.getCacheFile(cacheName, key);
           return file.delete();
       }
   
       @Override 
  -    public String toString() {
  +    public @NonNullable String toString() {
           return ToStringBuilder.reflectionToString(this);
       }
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-jcs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-jcs-dev-help@jakarta.apache.org