wordStart=docTok.getCurrentWordPosition(); if(wordEnd!=-1)
if(wordEnd!=-1){
	private void markupSpelling(StyledDocument doc, int start, int end){		int						wordStart=-1,								wordEnd=-1;		String					word;		DocumentWordTokenizer	docTok;		Segment					seg=new Segment();				docTok=new DocumentWordTokenizer(doc);				if(start>0){			docTok.posStartFullWordFrom(start);		}				while(docTok.hasMoreWords() && docTok.getCurrentWordPosition()<=end){			word=docTok.nextWord();						wordStart=docTok.getCurrentWordPosition();			if(wordEnd!=-1)				markAsCorrect(doc, wordEnd, wordStart);			wordEnd=docTok.getCurrentWordEnd();						if(wordEnd>=doc.getLength())				wordEnd=doc.getLength()-1;			if(wordStart>=wordEnd)				continue;			if(sCheck.isCorrect(word) || sCheck.isIgnored(word)){				markAsCorrect(doc, wordStart, wordEnd);			}else{				markAsMisspelled(doc, wordStart, wordEnd);			}		}		if(wordStart>=wordEnd && wordEnd!=-1){			markAsCorrect(doc, wordEnd, end);		}	}