Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update apache-poi from 3.11 to 3.17 #15

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

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

super(part, rel);
read(getPackagePart().getInputStream());
}

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

@@ -250,6 +242,12 @@ protected void write(OutputStream out) throws IOException {
}
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

if(fontWeight == null) {
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

@@ -294,7 +295,7 @@ public static boolean cellIsEmpty(Cell cell) {
if( cellStyle == null ) {
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

@@ -213,7 +214,7 @@ public Font correctFontColorIfBackground( FontManager fm, Workbook wb, BirtStyle
int bgRgb[] = parseColour( bgColour == null ? null : bgColour.getCssText(), "white" );

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

@@ -699,7 +700,7 @@ public void applyNumberFormat(Workbook workbook, BirtStyle birtStyle, CellStyle
protected void addFontAttributes( AttributedString attrString, Font font, int startIdx, int endIdx) {
attrString.addAttribute(TextAttribute.FAMILY, font.getFontName(), startIdx, endIdx);
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

@@ -294,7 +295,7 @@ public static boolean cellIsEmpty(Cell cell) {
if( cellStyle == null ) {
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

<packaging>eclipse-plugin</packaging>

<dependencies>
<dependency>
<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