mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
diff: explicitly specify thrown exceptions
This commit is contained in:
@@ -39,32 +39,32 @@ public abstract class ComparisonManager {
|
||||
public abstract List<LineFragment> compareLines(@NotNull CharSequence text1,
|
||||
@NotNull CharSequence text2,
|
||||
@NotNull ComparisonPolicy policy,
|
||||
@NotNull ProgressIndicator indicator);
|
||||
@NotNull ProgressIndicator indicator) throws DiffTooBigException;
|
||||
|
||||
@NotNull
|
||||
public abstract List<LineFragment> compareLinesInner(@NotNull CharSequence text1,
|
||||
@NotNull CharSequence text2,
|
||||
@NotNull ComparisonPolicy policy,
|
||||
@NotNull ProgressIndicator indicator);
|
||||
@NotNull ProgressIndicator indicator) throws DiffTooBigException;
|
||||
|
||||
@NotNull
|
||||
public abstract List<LineFragment> compareLinesInner(@NotNull CharSequence text1,
|
||||
@NotNull CharSequence text2,
|
||||
@NotNull List<LineFragment> lineFragments,
|
||||
@NotNull ComparisonPolicy policy,
|
||||
@NotNull ProgressIndicator indicator);
|
||||
@NotNull ProgressIndicator indicator) throws DiffTooBigException;
|
||||
|
||||
@NotNull
|
||||
public abstract List<DiffFragment> compareWords(@NotNull CharSequence text1,
|
||||
@NotNull CharSequence text2,
|
||||
@NotNull ComparisonPolicy policy,
|
||||
@NotNull ProgressIndicator indicator);
|
||||
@NotNull ProgressIndicator indicator) throws DiffTooBigException;
|
||||
|
||||
@NotNull
|
||||
public abstract List<DiffFragment> compareChars(@NotNull CharSequence text1,
|
||||
@NotNull CharSequence text2,
|
||||
@NotNull ComparisonPolicy policy,
|
||||
@NotNull ProgressIndicator indicator);
|
||||
@NotNull ProgressIndicator indicator) throws DiffTooBigException;
|
||||
|
||||
public abstract boolean isEquals(@NotNull CharSequence text1, @NotNull CharSequence text2, @NotNull ComparisonPolicy policy);
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ public class ComparisonManagerImpl extends ComparisonManager {
|
||||
public List<LineFragment> compareLines(@NotNull CharSequence text1,
|
||||
@NotNull CharSequence text2,
|
||||
@NotNull ComparisonPolicy policy,
|
||||
@NotNull ProgressIndicator indicator) {
|
||||
@NotNull ProgressIndicator indicator) throws DiffTooBigException {
|
||||
if (policy == ComparisonPolicy.IGNORE_WHITESPACES) {
|
||||
return ByLine.compare(text1, text2, policy, indicator);
|
||||
}
|
||||
@@ -54,7 +54,7 @@ public class ComparisonManagerImpl extends ComparisonManager {
|
||||
public List<LineFragment> compareLinesInner(@NotNull CharSequence text1,
|
||||
@NotNull CharSequence text2,
|
||||
@NotNull ComparisonPolicy policy,
|
||||
@NotNull ProgressIndicator indicator) {
|
||||
@NotNull ProgressIndicator indicator) throws DiffTooBigException {
|
||||
List<LineFragment> fragments = compareLines(text1, text2, policy, indicator);
|
||||
return compareLinesInner(text1, text2, fragments, policy, indicator);
|
||||
}
|
||||
@@ -64,7 +64,7 @@ public class ComparisonManagerImpl extends ComparisonManager {
|
||||
@NotNull CharSequence text2,
|
||||
@NotNull List<LineFragment> lineFragments,
|
||||
@NotNull ComparisonPolicy policy,
|
||||
@NotNull ProgressIndicator indicator) {
|
||||
@NotNull ProgressIndicator indicator) throws DiffTooBigException {
|
||||
List<LineFragment> fineFragments = new ArrayList<LineFragment>(lineFragments.size());
|
||||
int tooBigChunksCount = 0;
|
||||
|
||||
@@ -128,7 +128,7 @@ public class ComparisonManagerImpl extends ComparisonManager {
|
||||
public List<DiffFragment> compareWords(@NotNull CharSequence text1,
|
||||
@NotNull CharSequence text2,
|
||||
@NotNull ComparisonPolicy policy,
|
||||
@NotNull ProgressIndicator indicator) {
|
||||
@NotNull ProgressIndicator indicator) throws DiffTooBigException {
|
||||
return ByWord.compare(text1, text2, policy, indicator);
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@ public class ComparisonManagerImpl extends ComparisonManager {
|
||||
public List<DiffFragment> compareChars(@NotNull CharSequence text1,
|
||||
@NotNull CharSequence text2,
|
||||
@NotNull ComparisonPolicy policy,
|
||||
@NotNull ProgressIndicator indicator) {
|
||||
@NotNull ProgressIndicator indicator) throws DiffTooBigException {
|
||||
if (policy == ComparisonPolicy.IGNORE_WHITESPACES) {
|
||||
return convertIntoFragments(ByChar.compareIgnoreWhitespaces(text1, text2, indicator));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user