GitOrigin-RevId: 034169c14d41e0c736e7bc7e133718b084c149ff
This commit is contained in:
Vladimir Krivosheev
2019-07-30 21:03:07 +03:00
committed by intellij-monorepo-bot
parent 14541e62d8
commit 1a476dd114
+7 -12
View File
@@ -23,7 +23,7 @@ class MyPrettyPrinter : DefaultPrettyPrinter() {
_arrayIndenter = NopIndenter.instance
}
override fun createInstance(): MyPrettyPrinter = MyPrettyPrinter()
override fun createInstance() = MyPrettyPrinter()
override fun writeObjectFieldValueSeparator(jg: JsonGenerator) {
jg.writeRaw(": ")
@@ -86,17 +86,12 @@ class ReadonlySource(var url: String? = null, var active: Boolean = true) {
val path: String?
@JsonIgnore
get() {
if (url == null) {
return null
}
else {
var fileName = PathUtilRt.getFileName(url!!)
val suffix = ".git"
if (fileName.endsWith(suffix)) {
fileName = fileName.substring(0, fileName.length - suffix.length)
}
// the convention is that the .git extension should be used for bare repositories
return "${sanitizeFileName(fileName)}.${Integer.toHexString(url!!.hashCode())}.git"
var fileName = PathUtilRt.getFileName(url ?: return null)
val suffix = ".git"
if (fileName.endsWith(suffix)) {
fileName = fileName.substring(0, fileName.length - suffix.length)
}
// the convention is that the .git extension should be used for bare repositories
return "${sanitizeFileName(fileName)}.${Integer.toHexString(url!!.hashCode())}.git"
}
}