Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/keenwrite.git

Replace magic string with related constant

AuthorDaveJarvis <email>
Date2020-09-12 18:55:30 GMT-0700
Commit4ef5259e0932882354f2f0fa9e350afa6fa4ba95
Parent034228b
src/main/java/com/scrivenvar/util/ProtocolResolver.java
import java.net.URL;
+import static com.scrivenvar.util.ProtocolScheme.UNKNOWN;
+
/**
* Responsible for determining the protocol of a resource.
result = file.toURI().toURL().getProtocol();
} catch( final MalformedURLException ex ) {
- // Arbitrary value to avoid identification as a standard protocol.
- result = "unknown";
+ // Value guaranteed to avoid identification as a standard protocol.
+ result = UNKNOWN.toString();
}
Delta4 lines added, 2 lines removed, 2-line increase