Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-33392

Checking timeZone is not null and adding DateTimeException

    Details

    • Type: Bug
    • Status: Verified
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 12.0, 19.0
    • Fix Version/s: 12.0, 19.0
    • Component/s: Chat
    • Labels:
      None
    • 12 status:
      Resolved
    • Test Plan:
      Hide

      Login to Sakai, don't change the time zone
      Write a message to the chat tool, it should write without an error

      Show
      Login to Sakai, don't change the time zone Write a message to the chat tool, it should write without an error

      Description

      If the user has never changed his Time Zone, tomcat will throw an error when trying to see or write a message in Chat tool.

      Caused by: java.lang.NullPointerException: zoneId
      	at java.util.Objects.requireNonNull(Objects.java:228)
      	at java.time.ZoneId.of(ZoneId.java:403)
      	at java.time.ZoneId.of(ZoneId.java:359)
      	at org.sakaiproject.chat2.model.impl.ChatManagerImpl.getUserTimeZone(ChatManagerImpl.java:1265)
      	at org.sakaiproject.chat2.model.impl.ChatManagerImpl.getMessageDateString(ChatManagerImpl.java:1236)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
      	at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
      	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:282)
      	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
      	at com.sun.proxy.$Proxy113.getMessageDateString(Unknown Source)
      	at org.sakaiproject.chat2.model.impl.ChatMessageEntityProvider.handleChatData(ChatMessageEntityProvider.java:344)
      	... 42 more

       

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  jcebellan Jose Cebellán (Entornos de Formación)
                  Reporter:
                  jcebellan Jose Cebellán (Entornos de Formación)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Git Source Code