An advice: Can List/Set/Map support limited size?

BlueDavy Lin bluedavy at
Mon Dec 6 05:30:37 UTC 2010


     In our applications,many oom cases are caused by auto expand
List/Set/Map/StringBuilder,so if JDK API can add limited size api,I
think it'll be helpful,such as:
     new ArrayList(initialCapacity,maxCapacity). :)

     Such as in google collections,MapMaker.maximumSize(1000) can do this.

     Expected your reply.

|     BlueDavy                                      |
|     OSGi China User Group Director    |
|               |
|     |

More information about the core-libs-dev mailing list