Uploaded image for project: 'Crucible'
  1. Crucible
  2. CRUC-2112

NullPointerException when posting/updating comments through the SPI

    XMLWordPrintable

Details

    Description

      When the caller omits the CreateDate property when creating a new comment, Crucible throws a NPE:

      <?xml version='1.0' encoding='UTF-8'?><error><code>NullPointer</code><message xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" /><stacktrace>java.lang.NullPointerException
      	at com.cenqua.crucible.model.Comment.setCreateDate(Comment.java:98)
      	at com.atlassian.crucible.spi.impl.DefaultReviewService.updateComment(DefaultReviewService.java:985)
      	at com.atlassian.crucible.spi.impl.DefaultReviewService.createComment(DefaultReviewService.java:978)
      	at com.atlassian.crucible.spi.impl.DefaultReviewService.access$1100(DefaultReviewService.java:112)
      	at com.atlassian.crucible.spi.impl.DefaultReviewService$12.doInTransaction(DefaultReviewService.java:800)
      	at com.atlassian.crucible.spi.impl.DefaultReviewService$12.doInTransaction(DefaultReviewService.java:797)
      	at com.atlassian.fisheye.spi.TxTemplate.execute(TxTemplate.java:137)
      	at com.atlassian.crucible.spi.impl.DefaultReviewService.addGeneralComment(DefaultReviewService.java:796)
      	at com.atlassian.crucible.spi.rpc.RestReviewService.addGeneralComment(RestReviewService.java:745)
      ...
      

      Attachments

        Issue Links

          Activity

            People

              evzijst Erik van Zijst (Inactive)
              evzijst Erik van Zijst (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 1h
                  1h
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h
                  1h