mirror of
https://github.com/sbt/sbt.git
synced 2026-09-04 16:54:29 +02:00
Merge pull request #1619 from gkossakowski/ClassToAPI-NPE
Use Option.apply instead of Some.apply in ClassToAPI
This commit is contained in:
@@ -138,7 +138,7 @@ object ClassToAPI {
|
||||
}
|
||||
|
||||
def methodToDef(enclPkg: Option[String])(m: Method): api.Def =
|
||||
defLike(m.getName, m.getModifiers, m.getDeclaredAnnotations, typeParameterTypes(m), m.getParameterAnnotations, parameterTypes(m), Some(returnType(m)), exceptionTypes(m), m.isVarArgs, enclPkg)
|
||||
defLike(m.getName, m.getModifiers, m.getDeclaredAnnotations, typeParameterTypes(m), m.getParameterAnnotations, parameterTypes(m), Option(returnType(m)), exceptionTypes(m), m.isVarArgs, enclPkg)
|
||||
|
||||
def constructorToDef(enclPkg: Option[String])(c: Constructor[_]): api.Def =
|
||||
defLike("<init>", c.getModifiers, c.getDeclaredAnnotations, typeParameterTypes(c), c.getParameterAnnotations, parameterTypes(c), None, exceptionTypes(c), c.isVarArgs, enclPkg)
|
||||
|
||||
Reference in New Issue
Block a user