luetzkendorf 2005/04/04 06:40:00
Modified: src/share/org/apache/slide/extractor
AbstractContentExtractor.java
AbstractPropertyExtractor.java
Log:
fixed problem with empty or unset content-type property (e.g. with lock-null)
resources
Revision Changes Path
1.6 +7 -4
jakarta-slide/src/share/org/apache/slide/extractor/AbstractContentExtractor.java
Index: AbstractContentExtractor.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/share/org/apache/slide/extractor/AbstractContentExtractor.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- AbstractContentExtractor.java 14 Jan 2005 18:34:13 -0000 1.5
+++ AbstractContentExtractor.java 4 Apr 2005 13:40:00 -0000 1.6
@@ -60,7 +60,10 @@
* @param fileToIndexContentType The content type of the file we want
to index.
*/
public boolean isAcceptableContentType(String fileToIndexContentType) {
- if(getContentType()!=null){
+ if (fileToIndexContentType == null ||
fileToIndexContentType.length() == 0) {
+ return false;
+ }
+ if(getContentType() != null){
//return true if the contentType string contains
fileToIndexContentType
return
(getContentType().indexOf(fileToIndexContentType)>=0);
}
1.5 +7 -4
jakarta-slide/src/share/org/apache/slide/extractor/AbstractPropertyExtractor.java
Index: AbstractPropertyExtractor.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/share/org/apache/slide/extractor/AbstractPropertyExtractor.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- AbstractPropertyExtractor.java 14 Jan 2005 18:34:13 -0000 1.4
+++ AbstractPropertyExtractor.java 4 Apr 2005 13:40:00 -0000 1.5
@@ -68,7 +68,10 @@
* @param fileToIndexContentType The content type of the file we want
to index.
*/
public boolean isAcceptableContentType(String fileToIndexContentType) {
- if(getContentType()!=null){
+ if (fileToIndexContentType == null ||
fileToIndexContentType.length() == 0) {
+ return false;
+ }
+ if(getContentType() != null){
//return true if the contentType string contains
fileToIndexContentType
return
(getContentType().indexOf(fileToIndexContentType)>=0);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]