roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject svn commit: r1206540 - in /roller/trunk: weblogger-business/src/main/java/org/apache/roller/weblogger/business/jpa/ weblogger-business/src/main/java/org/apache/roller/weblogger/pojos/ weblogger-web/src/main/java/org/apache/roller/weblogger/ui/rendering...
Date Sat, 26 Nov 2011 18:55:48 GMT
Author: snoopdave
Date: Sat Nov 26 18:55:46 2011
New Revision: 1206540

URL: http://svn.apache.org/viewvc?rev=1206540&view=rev
Log:
Couple of fixes in refactorings that I did yesterday

Modified:
    roller/trunk/weblogger-business/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWeblogManagerImpl.java
    roller/trunk/weblogger-business/src/main/java/org/apache/roller/weblogger/pojos/WeblogThemeTemplateCode.java
    roller/trunk/weblogger-web/src/main/java/org/apache/roller/weblogger/ui/rendering/mobile/MobileDeviceRepository.java

Modified: roller/trunk/weblogger-business/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWeblogManagerImpl.java
URL: http://svn.apache.org/viewvc/roller/trunk/weblogger-business/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWeblogManagerImpl.java?rev=1206540&r1=1206539&r2=1206540&view=diff
==============================================================================
--- roller/trunk/weblogger-business/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWeblogManagerImpl.java
(original)
+++ roller/trunk/weblogger-business/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWeblogManagerImpl.java
Sat Nov 26 18:55:46 2011
@@ -618,7 +618,7 @@ public class JPAWeblogManagerImpl implem
             throw  new WebloggerException("Type is null");
         }
 
-        Query query = strategy.getNamedQuery("WeblogThemplateCode.getTemplateCodeByType");
+        Query query = strategy.getNamedQuery("WeblogThemeTemplateCode.getTemplateCodeByType");
         query.setParameter(1, templateId);
         query.setParameter(2, type);
         try {
@@ -731,7 +731,7 @@ public class JPAWeblogManagerImpl implem
     }
 
     private void removeTemplateCodeObjs(WeblogTemplate page) throws WebloggerException {
-        Query codeQuery = strategy.getNamedQuery("WeblogThemplateCode.getTemplateCodesByTemplateId");
+        Query codeQuery = strategy.getNamedQuery("WeblogThemeTemplateCode.getTemplateCodesByTemplateId");
         codeQuery.setParameter(1, page.getId());
         List codeList = codeQuery.getResultList();
 

Modified: roller/trunk/weblogger-business/src/main/java/org/apache/roller/weblogger/pojos/WeblogThemeTemplateCode.java
URL: http://svn.apache.org/viewvc/roller/trunk/weblogger-business/src/main/java/org/apache/roller/weblogger/pojos/WeblogThemeTemplateCode.java?rev=1206540&r1=1206539&r2=1206540&view=diff
==============================================================================
--- roller/trunk/weblogger-business/src/main/java/org/apache/roller/weblogger/pojos/WeblogThemeTemplateCode.java
(original)
+++ roller/trunk/weblogger-business/src/main/java/org/apache/roller/weblogger/pojos/WeblogThemeTemplateCode.java
Sat Nov 26 18:55:46 2011
@@ -38,11 +38,11 @@ import javax.persistence.Table;
 @Entity
 @Table(name = "rol_templatecode")
 @NamedQueries({
-@NamedQuery(name = "WeblogThemplateCode.getTemplateCodeByType",
-        query = "SELECT c FROM WeblogTemplateCode c WHERE c.templateId = ?1 AND c.type =?2"),
+@NamedQuery(name =            "WeblogThemeTemplateCode.getTemplateCodeByType",
+        query = "SELECT c FROM WeblogThemeTemplateCode c WHERE c.templateId = ?1 AND c.type
=?2"),
 
-     @NamedQuery(name = "WeblogThemplateCode.getTemplateCodesByTemplateId",
-        query = "SELECT c FROM WeblogTemplateCode c WHERE c.templateId = ?1 ")
+     @NamedQuery(name =       "WeblogThemeTemplateCode.getTemplateCodesByTemplateId",
+        query = "SELECT c FROM WeblogThemeTemplateCode c WHERE c.templateId = ?1 ")
 })
 public class WeblogThemeTemplateCode implements Serializable, TemplateCode {
 

Modified: roller/trunk/weblogger-web/src/main/java/org/apache/roller/weblogger/ui/rendering/mobile/MobileDeviceRepository.java
URL: http://svn.apache.org/viewvc/roller/trunk/weblogger-web/src/main/java/org/apache/roller/weblogger/ui/rendering/mobile/MobileDeviceRepository.java?rev=1206540&r1=1206539&r2=1206540&view=diff
==============================================================================
--- roller/trunk/weblogger-web/src/main/java/org/apache/roller/weblogger/ui/rendering/mobile/MobileDeviceRepository.java
(original)
+++ roller/trunk/weblogger-web/src/main/java/org/apache/roller/weblogger/ui/rendering/mobile/MobileDeviceRepository.java
Sat Nov 26 18:55:46 2011
@@ -80,7 +80,7 @@ public class MobileDeviceRepository {
 	private static String getCookieValue(Cookie[] cookies,
 			String cookieName,
 			String defaultValue) {
-		for (int i = 0; i < cookies.length; i++) {
+		if (cookies != null) for (int i = 0; i < cookies.length; i++) {
 			Cookie cookie = cookies[i];
 			if (cookieName.equals(cookie.getName())) {
 				return (cookie.getValue());



Mime
View raw message