lksudha / gravl

Automatically exported from code.google.com/p/gravl
0 stars 0 forks source link

npe after deleting an entry #8

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. apply patch for issue#7
2. delete entry
3. go to http://localhost:8080/gravl/sample/

What is the expected output? What do you see instead?
should be a blog with no entries.
but got a npe 

Message: Cannot invoke method minus() on null object
Caused by: Cannot invoke method minus() on null object
Class: TagCloudCustomTagLib
At Line: [32]
Code Snippet:
32: def distrib = maxFreq - minFreq
33: def catSize = (distrib / 5).intValue() + 1 // add 1 to simulate ceil()

java.lang.NullPointerException: Cannot invoke method minus() on null object
    at
TagCloudCustomTagLib$_closure1_closure2.doCall(TagCloudCustomTagLib.groovy:32)
    at $Proxy8.doInTransaction(Unknown Source)
    at TagCloudCustomTagLib$_closure1.doCall(TagCloudCustomTagLib.groovy:6)
    at
Users_sonwh98_workspace_gravl_grails_app_views__sidebar_gsp.run(Users_sonwh98_wo
rkspace_gravl_grails_app_views__sidebar_gsp:91)
    at
Users_sonwh98_workspace_gravl_grails_app_views_layouts_main_gsp.run(Users_sonwh9
8_workspace_gravl_grails_app_views_layouts_main_gsp:68)

What version of the product are you using? On what operating system?
grails-1.0.3 on macOSX

Please provide any additional information below.

Original issue reported on code.google.com by son.c...@gmail.com on 12 Aug 2008 at 6:51

GoogleCodeExporter commented 9 years ago
this patch to TagCloudCustomTagLib.groovy should fix the problem

22c22
<             if (tagCount > 0)
---
>             if (tagCount >= 0)

Original comment by son.c...@gmail.com on 12 Aug 2008 at 7:15