Created
November 13, 2019 23:34
-
-
Save abeln/02686005f88f8120a0f1a59e241548a6 to your computer and use it in GitHub Desktop.
Migrate ScalaPB to explicit nulls
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/compiler-plugin/src/main/scala/scalapb/compiler/DescriptorImplicits.scala b/compiler-plugin/src/main/scala/scalapb/compiler/DescriptorImplicits.scala | |
index cfcf0c3..24c3100 100644 | |
--- a/compiler-plugin/src/main/scala/scalapb/compiler/DescriptorImplicits.scala | |
+++ b/compiler-plugin/src/main/scala/scalapb/compiler/DescriptorImplicits.scala | |
@@ -940,7 +940,7 @@ class DescriptorImplicits(params: GeneratorParams, files: Seq[FileDescriptor]) { | |
} | |
def baseName(fileName: String) = | |
- fileName.split("/").last.replaceAll(raw"[.]proto$$|[.]protodevel", "") | |
+ fileName.split("/").last.nn.replaceAll(raw"[.]proto$$|[.]protodevel", "") | |
} | |
private[scalapb] object DescriptorImplicits { | |
diff --git a/compiler-plugin/src/main/scala/scalapb/compiler/FunctionalPrinter.scala b/compiler-plugin/src/main/scala/scalapb/compiler/FunctionalPrinter.scala | |
index ed3aa37..7739cd7 100644 | |
--- a/compiler-plugin/src/main/scala/scalapb/compiler/FunctionalPrinter.scala | |
+++ b/compiler-plugin/src/main/scala/scalapb/compiler/FunctionalPrinter.scala | |
@@ -41,7 +41,7 @@ case class FunctionalPrinter(content: Vector[String] = Vector.empty, indentLevel | |
// Strips the margin, splits lines and adds. | |
def addStringMargin(s: String): FunctionalPrinter = | |
- add(s.stripMargin.split("\n", -1).toSeq: _*) | |
+ add(s.stripMargin.split("\n", -1).toSeq.map(_.nn): _*) | |
// Adds the strings, while putting a delimiter between two lines. | |
def addWithDelimiter(delimiter: String)(s: Seq[String]) = { | |
diff --git a/compiler-plugin/src/main/scala/scalapb/compiler/ProtobufGenerator.scala b/compiler-plugin/src/main/scala/scalapb/compiler/ProtobufGenerator.scala | |
index 4a6bca3..8cd7787 100644 | |
--- a/compiler-plugin/src/main/scala/scalapb/compiler/ProtobufGenerator.scala | |
+++ b/compiler-plugin/src/main/scala/scalapb/compiler/ProtobufGenerator.scala | |
@@ -1851,7 +1851,7 @@ object ProtobufGenerator { | |
def parseParameters(params: String): Either[String, GeneratorParams] = { | |
params | |
.split(",") | |
- .map(_.trim) | |
+ .map(_.nn.trim) | |
.filter(_.nonEmpty) | |
.foldLeft[Either[String, GeneratorParams]](Right(GeneratorParams())) { | |
case (Right(params), "java_conversions") => Right(params.copy(javaConversions = true)) | |
@@ -1874,7 +1874,7 @@ object ProtobufGenerator { | |
request.getProtoFileList.asScala.foldLeft[Map[String, FileDescriptor]](Map.empty) { | |
case (acc, fp) => | |
val deps = fp.getDependencyList.asScala.map(acc) | |
- acc + (fp.getName -> FileDescriptor.buildFrom(fp, deps.toArray)) | |
+ acc + (fp.getName -> FileDescriptor.buildFrom(fp, deps.toArray.asInstanceOf[Array[com.google.protobuf.Descriptors.FileDescriptor|JavaNull]])) | |
} | |
def handleCodeGeneratorRequest(request: CodeGeneratorRequest): CodeGeneratorResponse = { | |
@@ -1886,7 +1886,7 @@ object ProtobufGenerator { | |
request.getProtoFileList.asScala.foldLeft[Map[String, FileDescriptor]](Map.empty) { | |
case (acc, fp) => | |
val deps = fp.getDependencyList.asScala.map(acc) | |
- acc + (fp.getName -> FileDescriptor.buildFrom(fp, deps.toArray)) | |
+ acc + (fp.getName -> FileDescriptor.buildFrom(fp, deps.toArray.asInstanceOf[Array[com.google.protobuf.Descriptors.FileDescriptor|Null]])) | |
} | |
val implicits = new DescriptorImplicits(params, filesByName.values.toVector) | |
val generator = new ProtobufGenerator(params, implicits) | |
diff --git a/scalapb-runtime-grpc/src/main/scala/scalapb/grpc/Grpc.scala b/scalapb-runtime-grpc/src/main/scala/scalapb/grpc/Grpc.scala | |
index b9e7d01..23b22bb 100644 | |
--- a/scalapb-runtime-grpc/src/main/scala/scalapb/grpc/Grpc.scala | |
+++ b/scalapb-runtime-grpc/src/main/scala/scalapb/grpc/Grpc.scala | |
@@ -12,8 +12,8 @@ object Grpc { | |
Futures.addCallback( | |
guavaFuture, | |
new FutureCallback[A] { | |
- override def onFailure(t: Throwable): Unit = p.failure(t) | |
- override def onSuccess(a: A): Unit = p.success(a) | |
+ override def onFailure(t: Throwable|Null): Unit = p.failure(t.nn) | |
+ override def onSuccess(a: A|Null): Unit = p.success(a.nn) | |
}, | |
MoreExecutors.directExecutor() | |
) | |
diff --git a/scalapb-runtime-grpc/src/main/scala/scalapb/grpc/Marshaller.scala b/scalapb-runtime-grpc/src/main/scala/scalapb/grpc/Marshaller.scala | |
index 0601506..c972e02 100644 | |
--- a/scalapb-runtime-grpc/src/main/scala/scalapb/grpc/Marshaller.scala | |
+++ b/scalapb-runtime-grpc/src/main/scala/scalapb/grpc/Marshaller.scala | |
@@ -6,21 +6,21 @@ import scalapb.{GeneratedMessage, GeneratedMessageCompanion, Message, TypeMapper | |
class Marshaller[T <: GeneratedMessage with Message[T]](companion: GeneratedMessageCompanion[T]) | |
extends io.grpc.MethodDescriptor.Marshaller[T] { | |
- override def stream(t: T): InputStream = new ByteArrayInputStream(t.toByteArray) | |
+ override def stream(t: T|Null): InputStream = new ByteArrayInputStream(t.nn.toByteArray) | |
- override def parse(inputStream: InputStream): T = | |
- companion.parseFrom(inputStream) | |
+ override def parse(inputStream: InputStream|Null): T = | |
+ companion.parseFrom(inputStream.nn) | |
} | |
class TypeMappedMarshaller[T <: GeneratedMessage with Message[T], Custom]( | |
typeMapper: TypeMapper[T, Custom], | |
companion: GeneratedMessageCompanion[T] | |
) extends io.grpc.MethodDescriptor.Marshaller[Custom] { | |
- override def stream(t: Custom): InputStream = | |
- new ByteArrayInputStream(typeMapper.toBase(t).toByteArray) | |
+ override def stream(t: Custom|Null): InputStream = | |
+ new ByteArrayInputStream(typeMapper.toBase(t.nn).toByteArray) | |
- override def parse(inputStream: InputStream): Custom = | |
- typeMapper.toCustom(companion.parseFrom(inputStream)) | |
+ override def parse(inputStream: InputStream|Null): Custom = | |
+ typeMapper.toCustom(companion.parseFrom(inputStream.nn)) | |
} | |
object Marshaller { | |
diff --git a/scalapb-runtime-grpc/src/main/scala/scalapb/grpc/ProtoUtils.scala b/scalapb-runtime-grpc/src/main/scala/scalapb/grpc/ProtoUtils.scala | |
index 582e6ac..51c6879 100644 | |
--- a/scalapb-runtime-grpc/src/main/scala/scalapb/grpc/ProtoUtils.scala | |
+++ b/scalapb-runtime-grpc/src/main/scala/scalapb/grpc/ProtoUtils.scala | |
@@ -8,11 +8,11 @@ object ProtoUtils { | |
class ScalaPbMetadataMarshaller[T <: GeneratedMessage with Message[T]]( | |
companion: GeneratedMessageCompanion[T] | |
) extends Metadata.BinaryMarshaller[T] { | |
- override def toBytes(value: T): Array[Byte] = value.toByteArray | |
+ override def toBytes(value: T|Null): Array[Byte] = value.nn.toByteArray | |
- override def parseBytes(serialized: Array[Byte]): T = { | |
+ override def parseBytes(serialized: Array[Byte]|Null): T = { | |
try { | |
- companion.parseFrom(serialized) | |
+ companion.parseFrom(serialized.nn) | |
} catch { | |
case ipbe: InvalidProtocolBufferException => | |
throw new IllegalArgumentException(ipbe) | |
diff --git a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/api/Api.scala b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/api/Api.scala | |
index 15765f6..2c43313 100644 | |
--- a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/api/Api.scala | |
+++ b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/api/Api.scala | |
@@ -302,14 +302,14 @@ object Api extends scalapb.GeneratedMessageCompanion[com.google.protobuf.api.Api | |
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = ApiProto.javaDescriptor.getMessageTypes.get(0) | |
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = ApiProto.scalaDescriptor.messages(0) | |
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = { | |
- var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null | |
+ var __out: _root_.scalapb.GeneratedMessageCompanion[_]|Null = null | |
(__number: @_root_.scala.unchecked) match { | |
case 2 => __out = com.google.protobuf.api.Method | |
case 3 => __out = com.google.protobuf.`type`.OptionProto | |
case 5 => __out = com.google.protobuf.source_context.SourceContext | |
case 6 => __out = com.google.protobuf.api.Mixin | |
} | |
- __out | |
+ __out.nn | |
} | |
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = Seq.empty | |
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = { | |
diff --git a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/api/Method.scala b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/api/Method.scala | |
index edb5357..a019f67 100644 | |
--- a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/api/Method.scala | |
+++ b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/api/Method.scala | |
@@ -284,11 +284,11 @@ object Method extends scalapb.GeneratedMessageCompanion[com.google.protobuf.api. | |
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = ApiProto.javaDescriptor.getMessageTypes.get(1) | |
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = ApiProto.scalaDescriptor.messages(1) | |
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = { | |
- var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null | |
+ var __out: _root_.scalapb.GeneratedMessageCompanion[_]|Null = null | |
(__number: @_root_.scala.unchecked) match { | |
case 6 => __out = com.google.protobuf.`type`.OptionProto | |
} | |
- __out | |
+ __out.nn | |
} | |
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = Seq.empty | |
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = { | |
diff --git a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/compiler/plugin/CodeGeneratorRequest.scala b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/compiler/plugin/CodeGeneratorRequest.scala | |
index e8f9eaf..c7165b7 100644 | |
--- a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/compiler/plugin/CodeGeneratorRequest.scala | |
+++ b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/compiler/plugin/CodeGeneratorRequest.scala | |
@@ -194,12 +194,12 @@ object CodeGeneratorRequest extends scalapb.GeneratedMessageCompanion[com.google | |
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = PluginProto.javaDescriptor.getMessageTypes.get(1) | |
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = PluginProto.scalaDescriptor.messages(1) | |
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = { | |
- var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null | |
+ var __out: _root_.scalapb.GeneratedMessageCompanion[_]|Null = null | |
(__number: @_root_.scala.unchecked) match { | |
case 15 => __out = com.google.protobuf.descriptor.FileDescriptorProto | |
case 3 => __out = com.google.protobuf.compiler.plugin.Version | |
} | |
- __out | |
+ __out.nn | |
} | |
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = Seq.empty | |
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber) | |
diff --git a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/compiler/plugin/CodeGeneratorResponse.scala b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/compiler/plugin/CodeGeneratorResponse.scala | |
index 9943411..8819f2d 100644 | |
--- a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/compiler/plugin/CodeGeneratorResponse.scala | |
+++ b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/compiler/plugin/CodeGeneratorResponse.scala | |
@@ -133,11 +133,11 @@ object CodeGeneratorResponse extends scalapb.GeneratedMessageCompanion[com.googl | |
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = PluginProto.javaDescriptor.getMessageTypes.get(2) | |
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = PluginProto.scalaDescriptor.messages(2) | |
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = { | |
- var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null | |
+ var __out: _root_.scalapb.GeneratedMessageCompanion[_]|Null = null | |
(__number: @_root_.scala.unchecked) match { | |
case 15 => __out = com.google.protobuf.compiler.plugin.CodeGeneratorResponse.File | |
} | |
- __out | |
+ __out.nn | |
} | |
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = | |
Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]]( | |
diff --git a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/DescriptorProto.scala b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/DescriptorProto.scala | |
index afb9a7e..b0792fa 100644 | |
--- a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/DescriptorProto.scala | |
+++ b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/DescriptorProto.scala | |
@@ -324,7 +324,7 @@ object DescriptorProto extends scalapb.GeneratedMessageCompanion[com.google.prot | |
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = DescriptorProtoCompanion.javaDescriptor.getMessageTypes.get(2) | |
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = DescriptorProtoCompanion.scalaDescriptor.messages(2) | |
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = { | |
- var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null | |
+ var __out: _root_.scalapb.GeneratedMessageCompanion[_]|Null = null | |
(__number: @_root_.scala.unchecked) match { | |
case 2 => __out = com.google.protobuf.descriptor.FieldDescriptorProto | |
case 6 => __out = com.google.protobuf.descriptor.FieldDescriptorProto | |
@@ -335,7 +335,7 @@ object DescriptorProto extends scalapb.GeneratedMessageCompanion[com.google.prot | |
case 7 => __out = com.google.protobuf.descriptor.MessageOptions | |
case 9 => __out = com.google.protobuf.descriptor.DescriptorProto.ReservedRange | |
} | |
- __out | |
+ __out.nn | |
} | |
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = | |
Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]]( | |
@@ -481,11 +481,11 @@ object DescriptorProto extends scalapb.GeneratedMessageCompanion[com.google.prot | |
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = com.google.protobuf.descriptor.DescriptorProto.javaDescriptor.getNestedTypes.get(0) | |
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = com.google.protobuf.descriptor.DescriptorProto.scalaDescriptor.nestedMessages(0) | |
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = { | |
- var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null | |
+ var __out: _root_.scalapb.GeneratedMessageCompanion[_]|Null = null | |
(__number: @_root_.scala.unchecked) match { | |
case 3 => __out = com.google.protobuf.descriptor.ExtensionRangeOptions | |
} | |
- __out | |
+ __out.nn | |
} | |
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = Seq.empty | |
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber) | |
diff --git a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/EnumDescriptorProto.scala b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/EnumDescriptorProto.scala | |
index fbd7319..a8fe161 100644 | |
--- a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/EnumDescriptorProto.scala | |
+++ b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/EnumDescriptorProto.scala | |
@@ -203,13 +203,13 @@ object EnumDescriptorProto extends scalapb.GeneratedMessageCompanion[com.google. | |
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = DescriptorProtoCompanion.javaDescriptor.getMessageTypes.get(6) | |
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = DescriptorProtoCompanion.scalaDescriptor.messages(6) | |
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = { | |
- var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null | |
+ var __out: _root_.scalapb.GeneratedMessageCompanion[_]|Null = null | |
(__number: @_root_.scala.unchecked) match { | |
case 2 => __out = com.google.protobuf.descriptor.EnumValueDescriptorProto | |
case 3 => __out = com.google.protobuf.descriptor.EnumOptions | |
case 4 => __out = com.google.protobuf.descriptor.EnumDescriptorProto.EnumReservedRange | |
} | |
- __out | |
+ __out.nn | |
} | |
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = | |
Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]]( | |
diff --git a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/EnumOptions.scala b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/EnumOptions.scala | |
index c3d7910..09a3d82 100644 | |
--- a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/EnumOptions.scala | |
+++ b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/EnumOptions.scala | |
@@ -161,11 +161,11 @@ object EnumOptions extends scalapb.GeneratedMessageCompanion[com.google.protobuf | |
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = DescriptorProtoCompanion.javaDescriptor.getMessageTypes.get(14) | |
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = DescriptorProtoCompanion.scalaDescriptor.messages(14) | |
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = { | |
- var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null | |
+ var __out: _root_.scalapb.GeneratedMessageCompanion[_]|Null = null | |
(__number: @_root_.scala.unchecked) match { | |
case 999 => __out = com.google.protobuf.descriptor.UninterpretedOption | |
} | |
- __out | |
+ __out.nn | |
} | |
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = Seq.empty | |
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber) | |
diff --git a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/EnumValueDescriptorProto.scala b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/EnumValueDescriptorProto.scala | |
index 2df7ee8..271d009 100644 | |
--- a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/EnumValueDescriptorProto.scala | |
+++ b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/EnumValueDescriptorProto.scala | |
@@ -143,11 +143,11 @@ object EnumValueDescriptorProto extends scalapb.GeneratedMessageCompanion[com.go | |
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = DescriptorProtoCompanion.javaDescriptor.getMessageTypes.get(7) | |
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = DescriptorProtoCompanion.scalaDescriptor.messages(7) | |
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = { | |
- var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null | |
+ var __out: _root_.scalapb.GeneratedMessageCompanion[_]|Null = null | |
(__number: @_root_.scala.unchecked) match { | |
case 3 => __out = com.google.protobuf.descriptor.EnumValueOptions | |
} | |
- __out | |
+ __out.nn | |
} | |
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = Seq.empty | |
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber) | |
diff --git a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/EnumValueOptions.scala b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/EnumValueOptions.scala | |
index d2e5b1e..2d8994c 100644 | |
--- a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/EnumValueOptions.scala | |
+++ b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/EnumValueOptions.scala | |
@@ -136,11 +136,11 @@ object EnumValueOptions extends scalapb.GeneratedMessageCompanion[com.google.pro | |
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = DescriptorProtoCompanion.javaDescriptor.getMessageTypes.get(15) | |
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = DescriptorProtoCompanion.scalaDescriptor.messages(15) | |
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = { | |
- var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null | |
+ var __out: _root_.scalapb.GeneratedMessageCompanion[_]|Null = null | |
(__number: @_root_.scala.unchecked) match { | |
case 999 => __out = com.google.protobuf.descriptor.UninterpretedOption | |
} | |
- __out | |
+ __out.nn | |
} | |
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = Seq.empty | |
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber) | |
diff --git a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/ExtensionRangeOptions.scala b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/ExtensionRangeOptions.scala | |
index 9b10beb..267ac20 100644 | |
--- a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/ExtensionRangeOptions.scala | |
+++ b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/ExtensionRangeOptions.scala | |
@@ -109,11 +109,11 @@ object ExtensionRangeOptions extends scalapb.GeneratedMessageCompanion[com.googl | |
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = DescriptorProtoCompanion.javaDescriptor.getMessageTypes.get(3) | |
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = DescriptorProtoCompanion.scalaDescriptor.messages(3) | |
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = { | |
- var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null | |
+ var __out: _root_.scalapb.GeneratedMessageCompanion[_]|Null = null | |
(__number: @_root_.scala.unchecked) match { | |
case 999 => __out = com.google.protobuf.descriptor.UninterpretedOption | |
} | |
- __out | |
+ __out.nn | |
} | |
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = Seq.empty | |
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber) | |
diff --git a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/FieldDescriptorProto.scala b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/FieldDescriptorProto.scala | |
index f91f60d..14cd31c 100644 | |
--- a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/FieldDescriptorProto.scala | |
+++ b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/FieldDescriptorProto.scala | |
@@ -324,11 +324,11 @@ object FieldDescriptorProto extends scalapb.GeneratedMessageCompanion[com.google | |
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = DescriptorProtoCompanion.javaDescriptor.getMessageTypes.get(4) | |
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = DescriptorProtoCompanion.scalaDescriptor.messages(4) | |
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = { | |
- var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null | |
+ var __out: _root_.scalapb.GeneratedMessageCompanion[_]|Null = null | |
(__number: @_root_.scala.unchecked) match { | |
case 8 => __out = com.google.protobuf.descriptor.FieldOptions | |
} | |
- __out | |
+ __out.nn | |
} | |
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = Seq.empty | |
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = { | |
diff --git a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/FieldOptions.scala b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/FieldOptions.scala | |
index e51f4e8..6e99303 100644 | |
--- a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/FieldOptions.scala | |
+++ b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/FieldOptions.scala | |
@@ -300,11 +300,11 @@ object FieldOptions extends scalapb.GeneratedMessageCompanion[com.google.protobu | |
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = DescriptorProtoCompanion.javaDescriptor.getMessageTypes.get(12) | |
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = DescriptorProtoCompanion.scalaDescriptor.messages(12) | |
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = { | |
- var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null | |
+ var __out: _root_.scalapb.GeneratedMessageCompanion[_]|Null = null | |
(__number: @_root_.scala.unchecked) match { | |
case 999 => __out = com.google.protobuf.descriptor.UninterpretedOption | |
} | |
- __out | |
+ __out.nn | |
} | |
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = Seq.empty | |
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = { | |
diff --git a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/FileDescriptorProto.scala b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/FileDescriptorProto.scala | |
index 19fed3e..17af974 100644 | |
--- a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/FileDescriptorProto.scala | |
+++ b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/FileDescriptorProto.scala | |
@@ -397,7 +397,7 @@ object FileDescriptorProto extends scalapb.GeneratedMessageCompanion[com.google. | |
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = DescriptorProtoCompanion.javaDescriptor.getMessageTypes.get(1) | |
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = DescriptorProtoCompanion.scalaDescriptor.messages(1) | |
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = { | |
- var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null | |
+ var __out: _root_.scalapb.GeneratedMessageCompanion[_]|Null = null | |
(__number: @_root_.scala.unchecked) match { | |
case 4 => __out = com.google.protobuf.descriptor.DescriptorProto | |
case 5 => __out = com.google.protobuf.descriptor.EnumDescriptorProto | |
@@ -406,7 +406,7 @@ object FileDescriptorProto extends scalapb.GeneratedMessageCompanion[com.google. | |
case 8 => __out = com.google.protobuf.descriptor.FileOptions | |
case 9 => __out = com.google.protobuf.descriptor.SourceCodeInfo | |
} | |
- __out | |
+ __out.nn | |
} | |
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = Seq.empty | |
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber) | |
diff --git a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/FileDescriptorSet.scala b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/FileDescriptorSet.scala | |
index d89c6c2..c5e5dcf 100644 | |
--- a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/FileDescriptorSet.scala | |
+++ b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/FileDescriptorSet.scala | |
@@ -102,11 +102,11 @@ object FileDescriptorSet extends scalapb.GeneratedMessageCompanion[com.google.pr | |
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = DescriptorProtoCompanion.javaDescriptor.getMessageTypes.get(0) | |
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = DescriptorProtoCompanion.scalaDescriptor.messages(0) | |
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = { | |
- var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null | |
+ var __out: _root_.scalapb.GeneratedMessageCompanion[_]|Null = null | |
(__number: @_root_.scala.unchecked) match { | |
case 1 => __out = com.google.protobuf.descriptor.FileDescriptorProto | |
} | |
- __out | |
+ __out.nn | |
} | |
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = Seq.empty | |
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber) | |
diff --git a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/FileOptions.scala b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/FileOptions.scala | |
index 20076e9..dc53cb9 100644 | |
--- a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/FileOptions.scala | |
+++ b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/FileOptions.scala | |
@@ -627,11 +627,11 @@ object FileOptions extends scalapb.GeneratedMessageCompanion[com.google.protobuf | |
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = DescriptorProtoCompanion.javaDescriptor.getMessageTypes.get(10) | |
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = DescriptorProtoCompanion.scalaDescriptor.messages(10) | |
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = { | |
- var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null | |
+ var __out: _root_.scalapb.GeneratedMessageCompanion[_]|Null = null | |
(__number: @_root_.scala.unchecked) match { | |
case 999 => __out = com.google.protobuf.descriptor.UninterpretedOption | |
} | |
- __out | |
+ __out.nn | |
} | |
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = Seq.empty | |
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = { | |
diff --git a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/GeneratedCodeInfo.scala b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/GeneratedCodeInfo.scala | |
index f32bebd..ea02ef3 100644 | |
--- a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/GeneratedCodeInfo.scala | |
+++ b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/GeneratedCodeInfo.scala | |
@@ -107,11 +107,11 @@ object GeneratedCodeInfo extends scalapb.GeneratedMessageCompanion[com.google.pr | |
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = DescriptorProtoCompanion.javaDescriptor.getMessageTypes.get(20) | |
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = DescriptorProtoCompanion.scalaDescriptor.messages(20) | |
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = { | |
- var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null | |
+ var __out: _root_.scalapb.GeneratedMessageCompanion[_]|Null = null | |
(__number: @_root_.scala.unchecked) match { | |
case 1 => __out = com.google.protobuf.descriptor.GeneratedCodeInfo.Annotation | |
} | |
- __out | |
+ __out.nn | |
} | |
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = | |
Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]]( | |
diff --git a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/MessageOptions.scala b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/MessageOptions.scala | |
index 61e4524..118d1a9 100644 | |
--- a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/MessageOptions.scala | |
+++ b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/MessageOptions.scala | |
@@ -247,11 +247,11 @@ object MessageOptions extends scalapb.GeneratedMessageCompanion[com.google.proto | |
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = DescriptorProtoCompanion.javaDescriptor.getMessageTypes.get(11) | |
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = DescriptorProtoCompanion.scalaDescriptor.messages(11) | |
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = { | |
- var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null | |
+ var __out: _root_.scalapb.GeneratedMessageCompanion[_]|Null = null | |
(__number: @_root_.scala.unchecked) match { | |
case 999 => __out = com.google.protobuf.descriptor.UninterpretedOption | |
} | |
- __out | |
+ __out.nn | |
} | |
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = Seq.empty | |
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber) | |
diff --git a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/MethodDescriptorProto.scala b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/MethodDescriptorProto.scala | |
index 650fc45..49e554a 100644 | |
--- a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/MethodDescriptorProto.scala | |
+++ b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/MethodDescriptorProto.scala | |
@@ -217,11 +217,11 @@ object MethodDescriptorProto extends scalapb.GeneratedMessageCompanion[com.googl | |
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = DescriptorProtoCompanion.javaDescriptor.getMessageTypes.get(9) | |
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = DescriptorProtoCompanion.scalaDescriptor.messages(9) | |
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = { | |
- var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null | |
+ var __out: _root_.scalapb.GeneratedMessageCompanion[_]|Null = null | |
(__number: @_root_.scala.unchecked) match { | |
case 4 => __out = com.google.protobuf.descriptor.MethodOptions | |
} | |
- __out | |
+ __out.nn | |
} | |
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = Seq.empty | |
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber) | |
diff --git a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/MethodOptions.scala b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/MethodOptions.scala | |
index 9a6aeb1..8cd2bbc 100644 | |
--- a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/MethodOptions.scala | |
+++ b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/MethodOptions.scala | |
@@ -158,11 +158,11 @@ object MethodOptions extends scalapb.GeneratedMessageCompanion[com.google.protob | |
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = DescriptorProtoCompanion.javaDescriptor.getMessageTypes.get(17) | |
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = DescriptorProtoCompanion.scalaDescriptor.messages(17) | |
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = { | |
- var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null | |
+ var __out: _root_.scalapb.GeneratedMessageCompanion[_]|Null = null | |
(__number: @_root_.scala.unchecked) match { | |
case 999 => __out = com.google.protobuf.descriptor.UninterpretedOption | |
} | |
- __out | |
+ __out.nn | |
} | |
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = Seq.empty | |
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = { | |
diff --git a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/OneofDescriptorProto.scala b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/OneofDescriptorProto.scala | |
index a27785e..f9bd47d 100644 | |
--- a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/OneofDescriptorProto.scala | |
+++ b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/OneofDescriptorProto.scala | |
@@ -121,11 +121,11 @@ object OneofDescriptorProto extends scalapb.GeneratedMessageCompanion[com.google | |
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = DescriptorProtoCompanion.javaDescriptor.getMessageTypes.get(5) | |
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = DescriptorProtoCompanion.scalaDescriptor.messages(5) | |
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = { | |
- var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null | |
+ var __out: _root_.scalapb.GeneratedMessageCompanion[_]|Null = null | |
(__number: @_root_.scala.unchecked) match { | |
case 2 => __out = com.google.protobuf.descriptor.OneofOptions | |
} | |
- __out | |
+ __out.nn | |
} | |
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = Seq.empty | |
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber) | |
diff --git a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/OneofOptions.scala b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/OneofOptions.scala | |
index 78bd7f8..6da9a7c 100644 | |
--- a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/OneofOptions.scala | |
+++ b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/OneofOptions.scala | |
@@ -109,11 +109,11 @@ object OneofOptions extends scalapb.GeneratedMessageCompanion[com.google.protobu | |
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = DescriptorProtoCompanion.javaDescriptor.getMessageTypes.get(13) | |
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = DescriptorProtoCompanion.scalaDescriptor.messages(13) | |
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = { | |
- var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null | |
+ var __out: _root_.scalapb.GeneratedMessageCompanion[_]|Null = null | |
(__number: @_root_.scala.unchecked) match { | |
case 999 => __out = com.google.protobuf.descriptor.UninterpretedOption | |
} | |
- __out | |
+ __out.nn | |
} | |
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = Seq.empty | |
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber) | |
diff --git a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/ServiceDescriptorProto.scala b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/ServiceDescriptorProto.scala | |
index 3476c37..b3e5178 100644 | |
--- a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/ServiceDescriptorProto.scala | |
+++ b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/ServiceDescriptorProto.scala | |
@@ -147,12 +147,12 @@ object ServiceDescriptorProto extends scalapb.GeneratedMessageCompanion[com.goog | |
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = DescriptorProtoCompanion.javaDescriptor.getMessageTypes.get(8) | |
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = DescriptorProtoCompanion.scalaDescriptor.messages(8) | |
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = { | |
- var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null | |
+ var __out: _root_.scalapb.GeneratedMessageCompanion[_]|Null = null | |
(__number: @_root_.scala.unchecked) match { | |
case 2 => __out = com.google.protobuf.descriptor.MethodDescriptorProto | |
case 3 => __out = com.google.protobuf.descriptor.ServiceOptions | |
} | |
- __out | |
+ __out.nn | |
} | |
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = Seq.empty | |
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber) | |
diff --git a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/ServiceOptions.scala b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/ServiceOptions.scala | |
index a3d98c4..9322745 100644 | |
--- a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/ServiceOptions.scala | |
+++ b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/ServiceOptions.scala | |
@@ -136,11 +136,11 @@ object ServiceOptions extends scalapb.GeneratedMessageCompanion[com.google.proto | |
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = DescriptorProtoCompanion.javaDescriptor.getMessageTypes.get(16) | |
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = DescriptorProtoCompanion.scalaDescriptor.messages(16) | |
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = { | |
- var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null | |
+ var __out: _root_.scalapb.GeneratedMessageCompanion[_]|Null = null | |
(__number: @_root_.scala.unchecked) match { | |
case 999 => __out = com.google.protobuf.descriptor.UninterpretedOption | |
} | |
- __out | |
+ __out.nn | |
} | |
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = Seq.empty | |
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber) | |
diff --git a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/SourceCodeInfo.scala b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/SourceCodeInfo.scala | |
index 9e284b7..c48bd7f 100644 | |
--- a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/SourceCodeInfo.scala | |
+++ b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/SourceCodeInfo.scala | |
@@ -147,11 +147,11 @@ object SourceCodeInfo extends scalapb.GeneratedMessageCompanion[com.google.proto | |
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = DescriptorProtoCompanion.javaDescriptor.getMessageTypes.get(19) | |
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = DescriptorProtoCompanion.scalaDescriptor.messages(19) | |
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = { | |
- var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null | |
+ var __out: _root_.scalapb.GeneratedMessageCompanion[_]|Null = null | |
(__number: @_root_.scala.unchecked) match { | |
case 1 => __out = com.google.protobuf.descriptor.SourceCodeInfo.Location | |
} | |
- __out | |
+ __out.nn | |
} | |
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = | |
Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]]( | |
diff --git a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/UninterpretedOption.scala b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/UninterpretedOption.scala | |
index a0c1830..f5a3d2c 100644 | |
--- a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/UninterpretedOption.scala | |
+++ b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/UninterpretedOption.scala | |
@@ -242,11 +242,11 @@ object UninterpretedOption extends scalapb.GeneratedMessageCompanion[com.google. | |
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = DescriptorProtoCompanion.javaDescriptor.getMessageTypes.get(18) | |
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = DescriptorProtoCompanion.scalaDescriptor.messages(18) | |
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = { | |
- var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null | |
+ var __out: _root_.scalapb.GeneratedMessageCompanion[_]|Null = null | |
(__number: @_root_.scala.unchecked) match { | |
case 2 => __out = com.google.protobuf.descriptor.UninterpretedOption.NamePart | |
} | |
- __out | |
+ __out.nn | |
} | |
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = | |
Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]]( | |
diff --git a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/struct/ListValue.scala b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/struct/ListValue.scala | |
index 70e66fc..0174d4e 100644 | |
--- a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/struct/ListValue.scala | |
+++ b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/struct/ListValue.scala | |
@@ -106,11 +106,11 @@ object ListValue extends scalapb.GeneratedMessageCompanion[com.google.protobuf.s | |
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = StructProto.javaDescriptor.getMessageTypes.get(2) | |
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = StructProto.scalaDescriptor.messages(2) | |
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = { | |
- var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null | |
+ var __out: _root_.scalapb.GeneratedMessageCompanion[_]|Null = null | |
(__number: @_root_.scala.unchecked) match { | |
case 1 => __out = com.google.protobuf.struct.Value | |
} | |
- __out | |
+ __out.nn | |
} | |
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = Seq.empty | |
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber) | |
diff --git a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/struct/Struct.scala b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/struct/Struct.scala | |
index 3fc97b2..13bef8b 100644 | |
--- a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/struct/Struct.scala | |
+++ b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/struct/Struct.scala | |
@@ -117,11 +117,11 @@ object Struct extends scalapb.GeneratedMessageCompanion[com.google.protobuf.stru | |
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = StructProto.javaDescriptor.getMessageTypes.get(0) | |
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = StructProto.scalaDescriptor.messages(0) | |
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = { | |
- var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null | |
+ var __out: _root_.scalapb.GeneratedMessageCompanion[_]|Null = null | |
(__number: @_root_.scala.unchecked) match { | |
case 1 => __out = com.google.protobuf.struct.Struct.FieldsEntry | |
} | |
- __out | |
+ __out.nn | |
} | |
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = | |
Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]]( | |
@@ -240,11 +240,11 @@ object Struct extends scalapb.GeneratedMessageCompanion[com.google.protobuf.stru | |
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = com.google.protobuf.struct.Struct.javaDescriptor.getNestedTypes.get(0) | |
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = com.google.protobuf.struct.Struct.scalaDescriptor.nestedMessages(0) | |
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = { | |
- var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null | |
+ var __out: _root_.scalapb.GeneratedMessageCompanion[_]|Null = null | |
(__number: @_root_.scala.unchecked) match { | |
case 2 => __out = com.google.protobuf.struct.Value | |
} | |
- __out | |
+ __out.nn | |
} | |
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = Seq.empty | |
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber) | |
diff --git a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/struct/Value.scala b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/struct/Value.scala | |
index 3d1c176..d285d33 100644 | |
--- a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/struct/Value.scala | |
+++ b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/struct/Value.scala | |
@@ -202,12 +202,12 @@ object Value extends scalapb.GeneratedMessageCompanion[com.google.protobuf.struc | |
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = StructProto.javaDescriptor.getMessageTypes.get(1) | |
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = StructProto.scalaDescriptor.messages(1) | |
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = { | |
- var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null | |
+ var __out: _root_.scalapb.GeneratedMessageCompanion[_]|Null = null | |
(__number: @_root_.scala.unchecked) match { | |
case 5 => __out = com.google.protobuf.struct.Struct | |
case 6 => __out = com.google.protobuf.struct.ListValue | |
} | |
- __out | |
+ __out.nn | |
} | |
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = Seq.empty | |
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = { | |
diff --git a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/type/Enum.scala b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/type/Enum.scala | |
index 420e004..79a8eab 100644 | |
--- a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/type/Enum.scala | |
+++ b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/type/Enum.scala | |
@@ -217,13 +217,13 @@ object Enum extends scalapb.GeneratedMessageCompanion[com.google.protobuf.`type` | |
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = TypeProto.javaDescriptor.getMessageTypes.get(2) | |
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = TypeProto.scalaDescriptor.messages(2) | |
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = { | |
- var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null | |
+ var __out: _root_.scalapb.GeneratedMessageCompanion[_]|Null = null | |
(__number: @_root_.scala.unchecked) match { | |
case 2 => __out = com.google.protobuf.`type`.EnumValue | |
case 3 => __out = com.google.protobuf.`type`.OptionProto | |
case 4 => __out = com.google.protobuf.source_context.SourceContext | |
} | |
- __out | |
+ __out.nn | |
} | |
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = Seq.empty | |
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = { | |
diff --git a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/type/EnumValue.scala b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/type/EnumValue.scala | |
index 8d84151..86f82ce 100644 | |
--- a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/type/EnumValue.scala | |
+++ b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/type/EnumValue.scala | |
@@ -164,11 +164,11 @@ object EnumValue extends scalapb.GeneratedMessageCompanion[com.google.protobuf.` | |
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = TypeProto.javaDescriptor.getMessageTypes.get(3) | |
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = TypeProto.scalaDescriptor.messages(3) | |
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = { | |
- var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null | |
+ var __out: _root_.scalapb.GeneratedMessageCompanion[_]|Null = null | |
(__number: @_root_.scala.unchecked) match { | |
case 3 => __out = com.google.protobuf.`type`.OptionProto | |
} | |
- __out | |
+ __out.nn | |
} | |
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = Seq.empty | |
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber) | |
diff --git a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/type/Field.scala b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/type/Field.scala | |
index fcb4a7e..c30e006 100644 | |
--- a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/type/Field.scala | |
+++ b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/type/Field.scala | |
@@ -376,11 +376,11 @@ object Field extends scalapb.GeneratedMessageCompanion[com.google.protobuf.`type | |
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = TypeProto.javaDescriptor.getMessageTypes.get(1) | |
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = TypeProto.scalaDescriptor.messages(1) | |
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = { | |
- var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null | |
+ var __out: _root_.scalapb.GeneratedMessageCompanion[_]|Null = null | |
(__number: @_root_.scala.unchecked) match { | |
case 9 => __out = com.google.protobuf.`type`.OptionProto | |
} | |
- __out | |
+ __out.nn | |
} | |
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = Seq.empty | |
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = { | |
diff --git a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/type/OptionProto.scala b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/type/OptionProto.scala | |
index 6e03e68..fb12300 100644 | |
--- a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/type/OptionProto.scala | |
+++ b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/type/OptionProto.scala | |
@@ -139,11 +139,11 @@ object OptionProto extends scalapb.GeneratedMessageCompanion[com.google.protobuf | |
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = TypeProto.javaDescriptor.getMessageTypes.get(4) | |
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = TypeProto.scalaDescriptor.messages(4) | |
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = { | |
- var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null | |
+ var __out: _root_.scalapb.GeneratedMessageCompanion[_]|Null = null | |
(__number: @_root_.scala.unchecked) match { | |
case 2 => __out = com.google.protobuf.any.Any | |
} | |
- __out | |
+ __out.nn | |
} | |
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = Seq.empty | |
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber) | |
diff --git a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/type/Type.scala b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/type/Type.scala | |
index 7198a93..d44bb34 100644 | |
--- a/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/type/Type.scala | |
+++ b/scalapb-runtime/jvm/src/main/scala/com/google/protobuf/type/Type.scala | |
@@ -242,13 +242,13 @@ object Type extends scalapb.GeneratedMessageCompanion[com.google.protobuf.`type` | |
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = TypeProto.javaDescriptor.getMessageTypes.get(0) | |
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = TypeProto.scalaDescriptor.messages(0) | |
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = { | |
- var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null | |
+ var __out: _root_.scalapb.GeneratedMessageCompanion[_]|Null = null | |
(__number: @_root_.scala.unchecked) match { | |
case 2 => __out = com.google.protobuf.`type`.Field | |
case 4 => __out = com.google.protobuf.`type`.OptionProto | |
case 5 => __out = com.google.protobuf.source_context.SourceContext | |
} | |
- __out | |
+ __out.nn | |
} | |
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = Seq.empty | |
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = { | |
diff --git a/scalapb-runtime/shared/src/main/scala/scalapb/AnyMethods.scala b/scalapb-runtime/shared/src/main/scala/scalapb/AnyMethods.scala | |
index eb0b9f1..6ba1476 100644 | |
--- a/scalapb-runtime/shared/src/main/scala/scalapb/AnyMethods.scala | |
+++ b/scalapb-runtime/shared/src/main/scala/scalapb/AnyMethods.scala | |
@@ -18,7 +18,7 @@ trait AnyMethods { | |
object AnyMethods { | |
private def typeNameFromTypeUrl(typeUrl: String): String = { | |
- typeUrl.split("/").lastOption.getOrElse(typeUrl) | |
+ typeUrl.split("/").map(_.nn).lastOption.getOrElse(typeUrl) | |
} | |
} | |
diff --git a/scalapb-runtime/shared/src/main/scala/scalapb/FieldMaskUtil.scala b/scalapb-runtime/shared/src/main/scala/scalapb/FieldMaskUtil.scala | |
index 55425c9..cc300cd 100644 | |
--- a/scalapb-runtime/shared/src/main/scala/scalapb/FieldMaskUtil.scala | |
+++ b/scalapb-runtime/shared/src/main/scala/scalapb/FieldMaskUtil.scala | |
@@ -53,7 +53,7 @@ object FieldMaskUtil { | |
toLowerCase(s.substring(1), buf) | |
} | |
- val array = name.split("\\_") | |
+ val array = name.split("\\_").map(_.nn) | |
toLowerCase(array(0), buf) | |
@tailrec | |
@@ -113,6 +113,7 @@ object FieldMaskUtil { | |
def fromJsonString(value: String): FieldMask = { | |
val result = value | |
.split(",") | |
+ .map(_.nn) | |
.toIterator | |
.withFilter(_.nonEmpty) | |
.map { path => | |
diff --git a/scalapb-runtime/shared/src/main/scala/scalapb/LimitedInputStream.scala b/scalapb-runtime/shared/src/main/scala/scalapb/LimitedInputStream.scala | |
index 1a254df..8325b48 100644 | |
--- a/scalapb-runtime/shared/src/main/scala/scalapb/LimitedInputStream.scala | |
+++ b/scalapb-runtime/shared/src/main/scala/scalapb/LimitedInputStream.scala | |
@@ -20,7 +20,7 @@ class LimitedInputStream(val is: InputStream, private var limit: Int) | |
result | |
} | |
- override def read(bytes: Array[Byte], off: Int, len: Int): Int = | |
+ override def read(bytes: Array[Byte]|Null, off: Int, len: Int): Int = | |
if (limit <= 0) { | |
-1 | |
} else { | |
diff --git a/scalapb-runtime/shared/src/main/scala/scalapb/options/ScalapbProto.scala b/scalapb-runtime/shared/src/main/scala/scalapb/options/ScalapbProto.scala | |
index 8da9573..d9dcd7a 100644 | |
--- a/scalapb-runtime/shared/src/main/scala/scalapb/options/ScalapbProto.scala | |
+++ b/scalapb-runtime/shared/src/main/scala/scalapb/options/ScalapbProto.scala | |
@@ -65,7 +65,7 @@ object ScalapbProto extends _root_.scalapb.GeneratedFileObject { | |
val javaProto = com.google.protobuf.DescriptorProtos.FileDescriptorProto.parseFrom(ProtoBytes) | |
com.google.protobuf.Descriptors.FileDescriptor.buildFrom(javaProto, Array( | |
com.google.protobuf.descriptor.DescriptorProtoCompanion.javaDescriptor | |
- )) | |
+ ).asInstanceOf[Array[com.google.protobuf.Descriptors.FileDescriptor | JavaNull]]) | |
} | |
@deprecated("Use javaDescriptor instead. In a future version this will refer to scalaDescriptor.", "ScalaPB 0.5.47") | |
def descriptor: com.google.protobuf.Descriptors.FileDescriptor = javaDescriptor | |
@@ -81,4 +81,4 @@ object ScalapbProto extends _root_.scalapb.GeneratedFileObject { | |
_root_.scalapb.GeneratedExtension.forOptionalUnknownMessageField(1020, _root_.scalapb.UnknownFieldSet.Field.lengthDelimitedLens)({__valueIn => _root_.scalapb.GeneratedExtension.readMessageFromByteString(scalapb.options.EnumValueOptions)(__valueIn)}, {__valueIn => __valueIn.toByteString}) | |
val oneof: _root_.scalapb.GeneratedExtension[com.google.protobuf.descriptor.OneofOptions, _root_.scala.Option[scalapb.options.OneofOptions]] = | |
_root_.scalapb.GeneratedExtension.forOptionalUnknownMessageField(1020, _root_.scalapb.UnknownFieldSet.Field.lengthDelimitedLens)({__valueIn => _root_.scalapb.GeneratedExtension.readMessageFromByteString(scalapb.options.OneofOptions)(__valueIn)}, {__valueIn => __valueIn.toByteString}) | |
-} | |
\ No newline at end of file | |
+} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment