Skip to content

Commit

Permalink
fix: package resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
ngyewch committed Dec 26, 2023
1 parent 685ec22 commit 8b7f4ed
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions generator/wrapperFileDescriptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,15 @@ type FileDescriptorWrapper struct {
}

func WrapFileDescriptor(fd protoreflect.FileDescriptor, includeServices bool) FileDescriptorWrapper {
javaPackage := ""
javaPackage := string(fd.Package())
javaOuterClassName := filenameToJavaClassName(fd.Path())
javaMultipleFiles := false
options, ok := fd.Options().(*descriptorpb.FileOptions)
if ok {
javaPackage = options.GetJavaPackage()
javaPackage1 := options.GetJavaPackage()
if javaPackage1 != "" {
javaPackage = javaPackage1
}
javaOuterClassName1 := options.GetJavaOuterClassname()
if javaOuterClassName1 != "" {
javaOuterClassName = JavaClassName(javaOuterClassName1)
Expand Down

0 comments on commit 8b7f4ed

Please sign in to comment.