# HG changeset patch # User Michael Van De Vanter # Date 1449461563 28800 # Node ID 64d5619ebbce023ee7dbf4f3ce1e9373738979ce # Parent ff91249da77d04cf7e1b64b2ff8a5ef3e9134b58 Truffle/SourceSection: change the default name for "unknown" to a public static for comparisions. diff -r ff91249da77d -r 64d5619ebbce truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/source/SourceSection.java --- a/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/source/SourceSection.java Sun Dec 06 20:10:47 2015 -0800 +++ b/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/source/SourceSection.java Sun Dec 06 20:12:43 2015 -0800 @@ -37,6 +37,12 @@ * @see #createUnavailable */ public final class SourceSection { + + /** + * The identifier stored when source information is unavailable. + */ + public static String UNKNOWN = ""; + private final Source source; private final String identifier; private final int startLine; @@ -262,6 +268,6 @@ * @return source section which is mostly empty */ public static SourceSection createUnavailable(String kind, String name) { - return new SourceSection(kind, null, name == null ? "" : name, -1, -1, -1, -1); + return new SourceSection(kind, null, name == null ? UNKNOWN : name, -1, -1, -1, -1); } }