Bug 48975 Comment Formatter should compare values using equals()
Currently, the preference values are read and compared by reference, which only works in special circumstances.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/comment/JavaDocRegion.java
if (!isLastCode && isCurrentCode)
					document.addPosition(CODE_POSITION_CATEGORY, new Position(index + next.getOffset() + next.getLength()));
				else if (isLastCode && !isCurrentCode)
					document.addPosition(CODE_POSITION_CATEGORY, new Position(index + previous.getOffset()));
			} catch (BadLocationException exception) {
				
			} catch (BadPositionCategoryException exception) {
				
			}
			if (previous.hasAttribute(COMMENT_IMMUTABLE) && next.hasAttribute(COMMENT_IMMUTABLE) && !isLastCode)
				return false;
		}
		return true;
	}
	/*
	 * @see org.eclipse.jdt.internal.ui.text.comment.CommentRegion#finishRegion(java.lang.String)
	 */
	protected void finalizeRegion(final String indentation) {
		final String test= indentation + MultiCommentLine.MULTI_COMMENT_CONTENT_PREFIX;
		final StringBuffer buffer= new StringBuffer();
		buffer.append(test);
		buffer.append(' ');
		final String delimiter= buffer.toString();
		try {
			final ILineTracker tracker= new ConfigurableLineTracker(new String[] { getDelimiter()});
			tracker.set(getText(0, getLength()));
			int index= 0;
			String content= null;
			IRegion range= null;
			for (int line= tracker.getNumberOfLines() - 3; line >= 1; line--) {