Bug 40339 - HSSF: Compilation failed for org.apache.poi.hssf.record.formula.Ref3DPtg
Summary: HSSF: Compilation failed for org.apache.poi.hssf.record.formula.Ref3DPtg
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: unspecified
Hardware: Other other
: P2 major (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-29 06:05 UTC by Yegor Kozlov
Modified: 2006-08-29 07:49 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yegor Kozlov 2006-08-29 06:05:59 UTC
After the latest commit Ref3DPtg doesn't compile:

compile-main:
    [javac] Compiling 60 source files to
D:\java\apache\jakarta-poi\poi\trunk\build\classes
    [javac]
D:\java\apache\jakarta-poi\poi\trunk\src\java\org\apache\poi\hssf\record\formula\Ref3DPtg.java:164:
cannot resolve symbol
    [javac] symbol  : method contains (java.lang.String)
    [javac] location: class java.lang.String
    [javac]             boolean appendQuotes = sheetName.contains(" ");
    [javac]                                                 ^
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -deprecation for details.
    [javac] 1 error

BUILD FAILED

I think it should be corrected as follows:
 boolean appendQuotes = sheetName.indexOf(" ") != -1;

Please apply the fix. 

Regards, Yegor
Comment 1 Amol Deshmukh 2006-08-29 14:49:23 UTC
Fixed.
replaced:
        	boolean appendQuotes = sheetName.contains(" ");
with:
        	boolean appendQuotes = sheetName.indexOf(" ") >= 0;

to make it JDK1.4 compliant.