[Yanel-commits] rev 40377 - public/yanel/trunk/src/contributions/resources/calendar/src/java/org/wyona/yanel/impl/resources/calendar

michi at wyona.com michi at wyona.com
Tue Dec 9 16:15:10 CET 2008


Author: michi
Date: 2008-12-09 16:15:09 +0100 (Tue, 09 Dec 2008)
New Revision: 40377

Modified:
   public/yanel/trunk/src/contributions/resources/calendar/src/java/org/wyona/yanel/impl/resources/calendar/CalendarResource.java
Log:
obsolete else removed

Modified: public/yanel/trunk/src/contributions/resources/calendar/src/java/org/wyona/yanel/impl/resources/calendar/CalendarResource.java
===================================================================
--- public/yanel/trunk/src/contributions/resources/calendar/src/java/org/wyona/yanel/impl/resources/calendar/CalendarResource.java	2008-12-09 15:14:29 UTC (rev 40376)
+++ public/yanel/trunk/src/contributions/resources/calendar/src/java/org/wyona/yanel/impl/resources/calendar/CalendarResource.java	2008-12-09 15:15:09 UTC (rev 40377)
@@ -63,14 +63,13 @@
             }
             if (mimeType != null) {
                 return mimeType;
-            } else {
-                return "text/calendar";
             }
+            return "text/calendar";
         }
-        if(viewId != null && viewId.equals("xml")) {
+        if( viewId.equals("xml")) {
             return "application/xml";
         }
-        if (viewId != null && viewId.equals("xhtml")) {
+        if ( viewId.equals("xhtml")) {
             return "application/xhtml+xml";
         }
         log.warn("No mime type for view id: " + viewId);
@@ -256,10 +255,9 @@
         bytesR = in.read(buf);
         if (bytesR <= 0) {
             throw new Exception("InputStream seems to be empty! Current calendar will not be overwritten!");
-        } else {
-            out = getRealm().getRepository().getOutputStream(path);
-            out.write(buf, 0, bytesR);
         }
+        out = getRealm().getRepository().getOutputStream(path);
+        out.write(buf, 0, bytesR);
 
         while ((bytesR = in.read(buf)) != -1) {
             out.write(buf, 0, bytesR);
@@ -349,9 +347,8 @@
             map.put("public","PUBLIC");
             map.put("private","PRIVATE");
             return map;
-        } else {
-            return null;
         }
+        return null;
     }
 
     /**



More information about the Yanel-commits mailing list