@@ -35,6 +35,9 @@ import xsbti.compile.ClassFileManager
3535import xsbti .compile .IncOptions
3636import xsbti .compile .Output
3737import xsbti .compile .analysis .ReadStamps
38+ import xsbti .{Action , DiagnosticCode , DiagnosticRelatedInformation }
39+
40+ import collection .JavaConverters ._
3841
3942/**
4043 * This class provides a thread-safe implementation of `xsbti.AnalysisCallback` which is required to compile with the
@@ -123,21 +126,56 @@ final class ConcurrentAnalysisCallback(
123126 startSource(converter.toVirtualFile(source.toPath()))
124127 }
125128
126- def problem (
129+ def problem2 (
127130 category : String ,
128131 pos : Position ,
129132 msg : String ,
130133 severity : Severity ,
131- reported : Boolean
134+ reported : Boolean ,
135+ rendered : ju.Optional [String ],
136+ diagnosticCode : ju.Optional [DiagnosticCode ],
137+ diagnosticRelatedInformation : ju.List [DiagnosticRelatedInformation ],
138+ actions : ju.List [Action ]
132139 ): Unit = {
133140 for (source <- InterfaceUtil .jo2o(pos.sourceFile)) {
134141 val map = if (reported) reportedProblems else unreportedProblems
135142 map
136143 .getOrElseUpdate(source.toPath(), new ConcurrentLinkedQueue )
137- .add(InterfaceUtil .problem(category, pos, msg, severity, None , None , Nil ))
144+ .add(
145+ InterfaceUtil .problem(
146+ category,
147+ pos,
148+ msg,
149+ severity,
150+ None ,
151+ InterfaceUtil .toOption(diagnosticCode),
152+ diagnosticRelatedInformation.asScala.toList,
153+ actions.asScala.toList
154+ )
155+ )
138156 }
139157 }
140158
159+ def problem (
160+ category : String ,
161+ pos : Position ,
162+ msg : String ,
163+ severity : Severity ,
164+ reported : Boolean
165+ ): Unit = {
166+ problem2(
167+ category,
168+ pos,
169+ msg,
170+ severity,
171+ reported,
172+ rendered = ju.Optional .empty(),
173+ diagnosticCode = ju.Optional .empty(),
174+ diagnosticRelatedInformation = Nil .asJava,
175+ actions = Nil .asJava
176+ )
177+ }
178+
141179 def classDependency (
142180 onClassName : String ,
143181 sourceClassName : String ,
0 commit comments