Demo entry 6637380

servlet

   

Submitted by anonymous on Sep 01, 2017 at 12:05
Language: Java. Code size: 484 Bytes.

         WrapperBuffer buffer = null;
         //获取Token
         Token token = localPool.getToken();
-        //借用buffer完成后归还weight
-        int orgWeight = token.getWeigth();
-        token.setWeigth(weight);
         if (token != null)
         {
+            //借用buffer完成后归还weight
+            int orgWeight = token.getWeigth();
+            token.setWeigth(weight);
             try
             {
                 buffer = factory.createBuffer(token.getWeigth());

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).