Skip to content

Commit

Permalink
[core] TextDocument: Add backwards compatible factory method
Browse files Browse the repository at this point in the history
This method is needed by pmd-designer 7.0.0-rc1, which is shipped with the distribution.
  • Loading branch information
adangel committed May 30, 2023
1 parent 8f486e1 commit 17beee6
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

import org.checkerframework.checker.nullness.qual.NonNull;

import net.sourceforge.pmd.annotation.DeprecatedUntil700;
import net.sourceforge.pmd.cpd.SourceCode;
import net.sourceforge.pmd.lang.LanguageVersion;
import net.sourceforge.pmd.util.datasource.DataSource;
Expand Down Expand Up @@ -281,4 +282,10 @@ static TextDocument readOnlyString(@NonNull CharSequence source, @NonNull FileId
}
}

@Deprecated
@DeprecatedUntil700
// note: this method is for backwards compatibility only - currently used by pmd-designer
static TextDocument readOnlyString(@NonNull CharSequence source, @NonNull String filename, @NonNull LanguageVersion lv) {
return readOnlyString(source, FileId.fromPathLikeString(filename), lv);
}
}

0 comments on commit 17beee6

Please sign in to comment.