You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2019/05/28 08:49:41 UTC

[GitHub] [incubator-openwhisk] chetanmeh opened a new pull request #4495: Make project compile with JDK 11

chetanmeh opened a new pull request #4495: Make project compile with JDK 11
URL: https://github.com/apache/incubator-openwhisk/pull/4495
 
 
   As mentioned in #4181 compilation fails with JDK 11 with errors like
   
   ```
   > Task :core:invoker:compileScala
   Pruning sources from previous analysis, due to incompatible CompileSetup.
   /home/rahullfo/IdeaProjects/incubator-openwhisk/core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/docker/DockerClient.scala:164: value toSeq is not a member of java.util.stream.Stream[String]
       runCmd(cmd, config.timeouts.ps).map(_.lines.toSeq.map(ContainerId.apply))
                                                   ^
   /home/rahullfo/IdeaProjects/incubator-openwhisk/core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/docker/DockerClient.scala:164: missing argument list for method apply in object ContainerId
   Unapplied methods are only converted to functions when a function type is expected.
   You can make this conversion explicit by writing `apply _` or `apply(_)` instead of `apply`.
       runCmd(cmd, config.timeouts.ps).map(_.lines.toSeq.map(ContainerId.apply))
   ```
   
   This is due to the fact that `lines` method is now part of String class. As mentioned in [SO answer](https://stackoverflow.com/a/52815819/1035417) the fix is to use `linesIterator` instead.
   
   With this change now at least the project compiles  successfully with JDK 11 (as well as JDK 8). 
   
   This PR is part of work being done under #4217 to enable JDK 11 support
   
   ## Related issue and scope
   <!--- Please include a link to a related issue if there is one. -->
   - [ ] I opened an issue to propose and discuss this change (#4217)
   
   ## My changes affect the following components
   <!--- Select below all system components are affected by your change. -->
   <!--- Enter an `x` in all applicable boxes. -->
   - [ ] API
   - [ ] Controller
   - [ ] Message Bus (e.g., Kafka)
   - [ ] Loadbalancer
   - [ ] Invoker
   - [ ] Intrinsic actions (e.g., sequences, conductors)
   - [ ] Data stores (e.g., CouchDB)
   - [ ] Tests
   - [ ] Deployment
   - [ ] CLI
   - [ ] General tooling
   - [ ] Documentation
   
   ## Types of changes
   <!--- What types of changes does your code introduce? Use `x` in all the boxes that apply: -->
   - [ ] Bug fix (generally a non-breaking change which closes an issue).
   - [ ] Enhancement or new feature (adds new functionality).
   - [ ] Breaking change (a bug fix or enhancement which changes existing behavior).
   
   ## Checklist:
   <!--- Please review the points below which help you make sure you've covered all aspects of the change you're making. -->
   
   - [ ] I signed an [Apache CLA](https://github.com/apache/incubator-openwhisk/blob/master/CONTRIBUTING.md).
   - [ ] I reviewed the [style guides](https://github.com/apache/incubator-openwhisk/wiki/Contributing:-Git-guidelines#code-readiness) and followed the recommendations (Travis CI will check :).
   - [ ] I added tests to cover my changes.
   - [ ] My changes require further changes to the documentation.
   - [ ] I updated the documentation where necessary.
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services