-
Notifications
You must be signed in to change notification settings - Fork 3
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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:
Bugs: 0
Vulnerabilities: 0
Code Smells: 16
Including the following issue(s) which could not be reported in line:
super(part, rel); | ||
read(getPackagePart().getInputStream()); | ||
} | ||
|
||
protected void read(InputStream is) throws IOException, XmlException { | ||
XmlObject root = XmlObject.Factory.parse(new EvilUnclosedBRFixingInputStream(is)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Smell: Remove this use of "EvilUnclosedBRFixingInputStream"; it is deprecated. (squid:CallToDeprecatedMethod)
} | ||
|
||
/* | ||
public void setZoom(int numerator, int denominator) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Smell: This block of commented-out lines of code should be removed. (squid:CommentedOutCodeLine)
// FIXME | ||
public Comment getCellComment(int row, int column) { | ||
return sheet.getCellComment(new CellAddress(row, column)); | ||
//return sheet.getCellComment(row, column); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Smell: This block of commented-out lines of code should be removed. (squid:CommentedOutCodeLine)
@@ -250,6 +242,12 @@ protected void write(OutputStream out) throws IOException { | |||
} | |||
rootCursor.dispose(); | |||
|
|||
// google "POIXMLDocumentPart DEFAULT_XML_OPTIONS" | |||
XmlOptions DEFAULT_XML_OPTIONS = new XmlOptions(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Smell: Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. (squid:S00117)
There was a problem hiding this comment.
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)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Smell: Replace this if-then-else statement by a single return statement. (squid:S1126)
@@ -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() ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Smell: Replace this if-then-else statement by a single return statement. (squid:S1126)
@@ -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() ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Smell: Move the array designator from the variable to the type. (squid:S1197)
return sheet.getDrawingPatriarch(); | ||
} | ||
|
||
// FIXME |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Smell: Take the required action to fix the issue indicated by this comment. (squid:S1134)
@@ -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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)
@@ -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() ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Smell: Remove this use of "getFillPattern"; it is deprecated. (squid:CallToDeprecatedMethod)
target/poi-ooxml-3.17.jar, | ||
target/poi-ooxml-schemas-3.17.jar, | ||
target/curvesapi-1.04.jar, | ||
target/commons-collections4-4.1.jar |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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 --> |
There was a problem hiding this comment.
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
No description provided.