mirror of https://github.com/apache/poi.git
[github-356] accept some of the changes in this PR (not all)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902784 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
46b14041bf
commit
773ad5e825
|
@ -142,7 +142,7 @@ public class Msg2txt {
|
|||
* @param args the list of MSG files to process
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
if(args.length <= 0) {
|
||||
if(args.length == 0) {
|
||||
System.err.println("No files names provided");
|
||||
} else {
|
||||
for (String arg : args) {
|
||||
|
|
|
@ -110,7 +110,7 @@ public class XWPFHeaderFooterPolicy {
|
|||
CTHdrFtrRef ref = sectPr.getHeaderReferenceArray(i);
|
||||
POIXMLDocumentPart relatedPart = doc.getRelationById(ref.getId());
|
||||
XWPFHeader hdr = null;
|
||||
if (relatedPart != null && relatedPart instanceof XWPFHeader) {
|
||||
if (relatedPart instanceof XWPFHeader) {
|
||||
hdr = (XWPFHeader) relatedPart;
|
||||
}
|
||||
// Assign it; treat invalid options as "default" POI-60293
|
||||
|
@ -128,7 +128,7 @@ public class XWPFHeaderFooterPolicy {
|
|||
CTHdrFtrRef ref = sectPr.getFooterReferenceArray(i);
|
||||
POIXMLDocumentPart relatedPart = doc.getRelationById(ref.getId());
|
||||
XWPFFooter ftr = null;
|
||||
if (relatedPart != null && relatedPart instanceof XWPFFooter) {
|
||||
if (relatedPart instanceof XWPFFooter) {
|
||||
ftr = (XWPFFooter) relatedPart;
|
||||
}
|
||||
// Assign it; treat invalid options as "default" POI-60293
|
||||
|
|
|
@ -290,7 +290,7 @@ public abstract class XWPFHeaderFooter extends POIXMLDocumentPart implements IBo
|
|||
*/
|
||||
public XWPFPictureData getPictureDataByID(String blipID) {
|
||||
POIXMLDocumentPart relatedPart = getRelationById(blipID);
|
||||
if (relatedPart != null && relatedPart instanceof XWPFPictureData) {
|
||||
if (relatedPart instanceof XWPFPictureData) {
|
||||
return (XWPFPictureData) relatedPart;
|
||||
}
|
||||
return null;
|
||||
|
|
|
@ -428,7 +428,7 @@ public final class FunctionEval {
|
|||
Collection<String> lst = new TreeSet<>();
|
||||
for (int i = 0; i < functions.length; i++) {
|
||||
Function func = functions[i];
|
||||
if (func != null && (func instanceof NotImplementedFunction)) {
|
||||
if ((func instanceof NotImplementedFunction)) {
|
||||
FunctionMetadata metaData = FunctionMetadataRegistry.getFunctionByIndex(i);
|
||||
lst.add(metaData.getName());
|
||||
}
|
||||
|
|
|
@ -414,7 +414,7 @@ final class MathX {
|
|||
*/
|
||||
public static double nChooseK(int n, int k) {
|
||||
double d = 1;
|
||||
if (n<0 || k<0 || n<k) {
|
||||
if (k < 0 || n < k) {
|
||||
d= Double.NaN;
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Reference in New Issue