Commits

Ivo Hinkelmann  committed 4bfe53b

txtl10n: #i113008# #i113125# don't die by empty sdf file

  • Participants
  • Parent commits eb5b2df

Comments (0)

Files changed (1)

File l10ntools/java/jpropex/java/SdfEntity.java

 
 	public void setProperties( String line ){
 	
-		String[] splitted		= line.split("\t");
-		
-		setProject( 		splitted[ SdfEntity.PROJECT_POS ] 		);
-		setSource_file( 	splitted[ SdfEntity.SOURCE_FILE_POS ] 	);
-		setDummy1( 			splitted[ SdfEntity.DUMMY1_POS ] 		);
-		setResource_type(	splitted[ SdfEntity.RESOURCE_TYPE_POS ] );
-		setGid( 			splitted[ SdfEntity.GID_POS ] 			);
-		setLid( 			splitted[ SdfEntity.LID_POS ] 			);
-		setHelpid( 			splitted[ SdfEntity.HELPID_POS ] 		);
-		setPlatform( 		splitted[ SdfEntity.PLATFORM_POS ] 		);
-		setDummy2( 			splitted[ SdfEntity.DUMMY2_POS ] 		);
-		setLangid( 			splitted[ SdfEntity.LANGID_POS ] 		);
-		setText( 			splitted[ SdfEntity.TEXT_POS ] 			);
-		setHelptext( 		splitted[ SdfEntity.HELPTEXT_POS ] 		);
-		setQuickhelptext(	splitted[ SdfEntity.QUICKHELPTEXT_POS ] );
-		setTitle( 			splitted[ SdfEntity.TITLE_POS ] 		);
-		setDate(			splitted[ SdfEntity.DATE_POS ]			);
+		String test = new String( line );
+        test.trim();
+        if( line != null && test.length()>0 )
+        {
+            String[] splitted		= line.split("\t");
+		    if( splitted.length == 15 )
+            {
+		        setProject( 		splitted[ SdfEntity.PROJECT_POS ] 		);
+		        setSource_file( 	splitted[ SdfEntity.SOURCE_FILE_POS ] 	);
+		        setDummy1( 			splitted[ SdfEntity.DUMMY1_POS ] 		);
+		        setResource_type(	splitted[ SdfEntity.RESOURCE_TYPE_POS ] );
+		        setGid( 			splitted[ SdfEntity.GID_POS ] 			);
+		        setLid( 			splitted[ SdfEntity.LID_POS ] 			);
+		        setHelpid( 			splitted[ SdfEntity.HELPID_POS ] 		);
+		        setPlatform( 		splitted[ SdfEntity.PLATFORM_POS ] 		);
+		        setDummy2( 			splitted[ SdfEntity.DUMMY2_POS ] 		);
+		        setLangid( 			splitted[ SdfEntity.LANGID_POS ] 		);
+		        setText( 			splitted[ SdfEntity.TEXT_POS ] 			);
+		        setHelptext( 		splitted[ SdfEntity.HELPTEXT_POS ] 		);
+		        setQuickhelptext(	splitted[ SdfEntity.QUICKHELPTEXT_POS ] );
+		        setTitle( 			splitted[ SdfEntity.TITLE_POS ] 		);
+		        setDate(			splitted[ SdfEntity.DATE_POS ]			);
+            }
+        }
 	}
 
 	public String getFileId(){