java - Warning thrown by using multiple Iterables on Cactoos Joined class -
while refactoring rultor use cactoos instead of guava, i’m having issue dockerrun
class, in envs
method.
the current refactored result is:
final list<string> entries = new linkedlist<>(); (final entry<string, string> ent : extra.entryset()) { entries.add( string.format( "%s=%s", ent.getkey(), ent.getvalue() ) ); } return new joined<>( dockerrun.envs(this.profile.read(), "/p/entry[@key='env']"), dockerrun.envs(this.node(), "entry[@key='env']"), new listof<>(entries) );
when build project, following warning message thrown:
[warning] (...)rultor/src/main/java/com/rultor/agents/req/dockerrun.java: [132,16] unchecked generic array creation varargs parameter of type java.lang.iterable<java.lang.string>[]
note line 132 in case line of new joined<>(
after searching found similar issues, one, no hints on how can fix warning message in case.
so question is, how can still concatenate iterables without getting warning message, still use cactoos.
try write way:
new joined<string>(
Comments
Post a Comment