[ 
https://issues.apache.org/jira/browse/PDFBOX-2852?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15647954#comment-15647954
 ] 

Lorenz Pahl commented on PDFBOX-2852:
-------------------------------------

In the patch for {{PDType3CharProc::parseWidth()}} I noticed that you used 
{{List<COSBase>}} instead of {{List<?>}}. I know that this method is private 
and only used once, but the body of the method contains the following if 
statement:

{code:java}
if (obj instanceof Number)
{
    return ((Number) obj).floatValue();
}
{code}

Shouldn't this if statement be removed as well, because {{obj}} can never be of 
type {{Number}}?

> Improve code quality (2)
> ------------------------
>
>                 Key: PDFBOX-2852
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2852
>             Project: PDFBox
>          Issue Type: Task
>    Affects Versions: 2.0.0
>            Reporter: Tilman Hausherr
>         Attachments: PDNameTreeNode.java.patch, StringBuffer.patch, 
> XMPSchema.java.patch, explicit_array_creation.patch, fix_javadoc.patch, 
> foreach.patch, foreach2.patch, generic_type_arguments.patch, noarray.patch, 
> semicolon.patch, stringbuilder.patch, unnecessary_type_casting.patch, 
> unused_imports.patch, usestatic.patch, winansiencoding.patch, 
> winansiencoding2.patch
>
>
> This is a longterm issue for the task to improve code quality, by using the 
> [SonarQube 
> report|https://analysis.apache.org/dashboard/index/org.apache.pdfbox:pdfbox-reactor],
>  hints in different IDEs, the FindBugs tool and other code quality tools.
> This is a follow-up of PDFBOX-2576, which was getting too long.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to