Summary: | CellUtil.class with print strings | ||
---|---|---|---|
Product: | POI | Reporter: | kamile.demirel |
Component: | XSSF | Assignee: | POI Developers List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | All | ||
Bug Depends on: | |||
Bug Blocks: | 60805 | ||
Attachments: | Methods with printed lines |
What are you asking to change with the existing implementation? I use this methods in my program and get these lines. Is this necessary? I am asking for removing this lines. If it is possible. The logging code did exactly what it was intended to do--notify the user that the current code will not work in a future version of POI. https://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/util/CellUtil.java?revision=1760630&view=markup#l519 I added these INFO-level warnings to the POI logger to let users know that CellUtil will switch to using enums in the future. See bug 59836 if you're curious. Enums are safer, faster (checked at compile time instead of runtime--if checked at all), require less code, and give more informative error messages (enum name instead of integer code), and easier to use. They also make the POI API more flexible since users are unable to hard-code integer literals in place of enums. Finally, it makes the method signatures easier to read. If you have code that is tripping these warnings that is originating from POI code, post it here so we can fix it (it may not be possible without breaking backwards compatibility, in which case we'll defer those changes). If the code that is tripping these warnings comes from your code, consider upgrading that code to use enums. You could also choose to ignore the POI log, change the logger level (log.check), or have your logger write to a different destination if it's causing you problems. Suppressing the problem now will make it more difficult to update down the road. Your call, but not a call that I would want to make for all users. Maybe someone else wants those warnings written to the log. Ah I see, there is a new version poi3.16-beta2. But there are the lines, too. I think you may have misunterstood me. At line 525 in CellUtil.class there is this line --> System.out.println("BorderStyle short usage"); This is nothing about the log level. The attachment, which I added, shows the functions with the lines. Please look at this. You will agree with me. I missed the println. You're correct, we shouldn't be writing to stdout here. |
Created attachment 34786 [details] Methods with printed lines The CellUtil.class has got methods, which print lines like "BorderStyle short usage" in method getBorderStyle(Map<String, Object> properties, String name) at line 525. The same is in method getFillPattern(Map<String, Object> properties, String name) with "FillPatternType short usage" at line 558, in method getHorizontalAlignment(Map<String, Object> properties, String name) with "HorizontalAlignment short usage" at line 5910 and in method getVerticalAlignment(Map<String, Object> properties, String name) with "VerticalAlignment usage " + name + " " + value" at line 624.