Skip to content

Conversation

@asl-acx
Copy link

@asl-acx asl-acx commented Sep 20, 2018

No description provided.

Copy link

@sonarqubecloud sonarqubecloud bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SonarQube analysis found issues:
Bug Bugs: 0
Vulnerability Vulnerabilities: 0
Code Smell Code Smells: 16

Including the following issue(s) which could not be reported in line:

  1. Code Smell Code Smell: Remove this use of "getCellType"; it is deprecated. (more)
  2. Code Smell Code Smell: Remove this use of "EMU_PER_POINT"; it is deprecated. (more)
  3. Code Smell Code Smell: Remove this use of "CELL_TYPE_BLANK"; it is deprecated. (more)
  4. Code Smell Code Smell: Remove this use of "BLACK"; it is deprecated. (more)

See all issues in SonarCloud

}

protected void read(InputStream is) throws IOException, XmlException {
XmlObject root = XmlObject.Factory.parse(new EvilUnclosedBRFixingInputStream(is));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Smell Code Smell: Remove this use of "EvilUnclosedBRFixingInputStream"; it is deprecated. (squid:CallToDeprecatedMethod)

See it in SonarCloud

}

/*
public void setZoom(int numerator, int denominator) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Smell Code Smell: This block of commented-out lines of code should be removed. (squid:CommentedOutCodeLine)

See it in SonarCloud

// FIXME
public Comment getCellComment(int row, int column) {
return sheet.getCellComment(new CellAddress(row, column));
//return sheet.getCellComment(row, column);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Smell Code Smell: This block of commented-out lines of code should be removed. (squid:CommentedOutCodeLine)

See it in SonarCloud

rootCursor.dispose();

// google "POIXMLDocumentPart DEFAULT_XML_OPTIONS"
XmlOptions DEFAULT_XML_OPTIONS = new XmlOptions();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Smell Code Smell: Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. (squid:S00117)

See it in SonarCloud

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually it should be static final variable in this class

return 0;
return false;
}
if("bold".equals(fontWeight)) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Smell Code Smell: Replace this if-then-else statement by a single return statement. (squid:S1126)

See it in SonarCloud

return true;
}
if( cellStyle.getFillPattern() == CellStyle.NO_FILL ) {
if( cellStyle.getFillPattern() == FillPatternType.NO_FILL.getCode() ) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Smell Code Smell: Replace this if-then-else statement by a single return statement. (squid:S1126)

See it in SonarCloud


XSSFColor colour = ((XSSFFont)font).getXSSFColor();
int fgRgb[] = rgbOnly( colour.getARgb() );
int fgRgb[] = rgbOnly( colour.getARGB() );

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Smell Code Smell: Move the array designator from the variable to the type. (squid:S1197)

See it in SonarCloud

return sheet.getDrawingPatriarch();
}

// FIXME

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Smell Code Smell: Take the required action to fix the issue indicated by this comment. (squid:S1134)

See it in SonarCloud

attrString.addAttribute(TextAttribute.SIZE, (float)font.getFontHeightInPoints(), startIdx, endIdx);
if (font.getBoldweight() == Font.BOLDWEIGHT_BOLD) attrString.addAttribute(TextAttribute.WEIGHT, TextAttribute.WEIGHT_BOLD, startIdx, endIdx);
if (font.getBold()) attrString.addAttribute(TextAttribute.WEIGHT, TextAttribute.WEIGHT_BOLD, startIdx, endIdx);
if (font.getItalic() ) attrString.addAttribute(TextAttribute.POSTURE, TextAttribute.POSTURE_OBLIQUE, startIdx, endIdx);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Smell Code Smell: This line will not be executed conditionally; only the first line of this 2-line block will be. The rest will execute unconditionally. (squid:S2681)

See it in SonarCloud

return true;
}
if( cellStyle.getFillPattern() == CellStyle.NO_FILL ) {
if( cellStyle.getFillPattern() == FillPatternType.NO_FILL.getCode() ) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Smell Code Smell: Remove this use of "getFillPattern"; it is deprecated. (squid:CallToDeprecatedMethod)

See it in SonarCloud

target/poi-ooxml-3.17.jar,
target/poi-ooxml-schemas-3.17.jar,
target/curvesapi-1.04.jar,
target/commons-collections4-4.1.jar

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would move collections to separate bundle, so it can be reused without apache poi.

org.apache.commons.collections4.splitmap,
org.apache.commons.collections4.trie,
org.apache.commons.collections4.trie.analyzer,
com.graphbuilder.curve,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to expose graphbuilder packages

<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.11</version>
<version>3.17</version> <!-- latest 4.0.0 -->

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comments about latest are very relative. today it is latest, tomorrow it is not true anymore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants