Bug 40038 [typing] Smart semicolon fooled by method braces
Build: I20030710 Start writing a setter method, like this: public void setValue(int i) {} Then position cursor between the braces and fill in the method body. You end up with this: public void setValue(int i) {this.value=i}; Problem: when you type the semicolon, it jumps over the closing method body brace and places it at the end of the line, resulting in a syntax error.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/SmartSemicolonAutoEditStrategy.java
if (IJavaPartitions.JAVA_DOC.equals(partition.getType()))
			return INVALID;
		if (IJavaPartitions.JAVA_MULTI_LINE_COMMENT.equals(partition.getType()))
			return INVALID;
		if (IJavaPartitions.JAVA_SINGLE_LINE_COMMENT.equals(partition.getType()))
			return INVALID;
		int endOffset= Math.min(maxOffset, partition.getOffset() + partition.getLength());
		if (IJavaPartitions.JAVA_CHARACTER.equals(partition.getType()))
			return endOffset;
		if (IJavaPartitions.JAVA_STRING.equals(partition.getType()))
			return endOffset;
		if (IDocument.DEFAULT_CONTENT_TYPE.equals(partition.getType())) {
			try {
				if (doc.get(partition.getOffset(), endOffset - partition.getOffset()).trim().length() == 0)
					return INVALID;
				else
					return endOffset;
			} catch (BadLocationException e) {
				return INVALID;
			}
		}
		 
		return endOffset;
	}
	/**
	 * Determines whether the current line contains a for statement.
	 * Algorithm: any "for" word in the line is a positive, "for" contained in a string literal will
	 * produce a false positive.
	 * 
	 * @param line the line where the change is being made