Bug 51593 - Code Cleanup -unused imports, variables, StringBuffer to StringBuilder conversion in toString()
Summary: Code Cleanup -unused imports, variables, StringBuffer to StringBuilder conver...
Status: NEW
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 3.8-dev
Hardware: PC All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-31 19:54 UTC by kalyan
Modified: 2015-05-31 21:54 UTC (History)
0 users



Attachments
Diff file of all changes from Eclipse IDE. (105.19 KB, application/octet-stream)
2011-07-31 20:18 UTC, kalyan
Details
Actual Java files Modified zipped. (105.34 KB, application/x-zip-compressed)
2011-07-31 20:20 UTC, kalyan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kalyan 2011-07-31 19:54:56 UTC
- The following variables may not be needed in the method stack ( though method call in the same line may be needed in few cases)
    In EscherChildRecordAnchor.java, Variable: bytesRemaining @ Line 40
    HSSFWorkbook.java, Variable: font @ Line 1064
    EncryptionInfo.java Variable: hSize @ Line 61. (This method call also may not be needed as it is not updating any instance data)
    HSSFName.java Variable: oldName @ Line 153. (This method call also may not be needed as it is not updating any instance data)
    PolygonShape.java Variable: shape @ Line 132.
    EcmaDecryptor.java Variable: size @ Line 128.

- All the toString() implementations can now be updated to StringBuilder from StringBuffer.

Currently refactored package:org.apache.poi.hssf.record.chart.* ; There are other packages as well for which a new bug shall be raised later.

- SSTRecord.java Line 295. The same null check is being done two times.
Comment 1 kalyan 2011-07-31 20:18:55 UTC
Created attachment 27334 [details]
Diff file of all changes from Eclipse IDE.

Diff file of all changes from Eclipse IDE.
Comment 2 kalyan 2011-07-31 20:20:18 UTC
Created attachment 27335 [details]
Actual Java files Modified zipped.
Comment 3 kalyan 2011-07-31 20:22:12 UTC
- In EscherChildRecordAnchor.java, Variable: bytesRemaining @ Line 40
- HSSFWorkbook.java, Variable: font @ Line 1064
- EncryptionInfo.java Variable: hSize @ Line 61.
- HSSFName.java Variable: oldName @ Line 153.
- PolygonShape.java Variable: shape @ Line 132.
- EcmaDecryptor.java Variable: size @ Line 128.
- All the toString() implementations can now be updated to StringBuilder from StringBuffer in the package "org.apache.poi.hssf.record.chart"
- SSTRecord.java Line 295. The same null check is being done two times. removed once.

Once the files are committed, the status needs to changed to fixed.