Skip to content

Conversation

@KostyaSha
Copy link
Member

@KostyaSha KostyaSha commented Jun 6, 2016

fixes #592


This change is Reviewable

@KostyaSha KostyaSha changed the title Implemented Device parser WIP Implemented Device parser Jun 6, 2016
@codecov-io
Copy link

codecov-io commented Jun 6, 2016

Current coverage is 30.29%

Merging #593 into master will increase coverage by 7.45%

  1. 3 files (not in diff) in ...erjava/netty/handler were modified. more
    • Misses -19
    • Partials -2
    • Hits +21
  2. 17 files (not in diff) in ...ockerjava/netty/exec were modified. more
    • Misses -36
    • Hits +36
  3. 3 files (not in diff) in ...hub/dockerjava/netty were modified. more
    • Misses -17
    • Hits +17
  4. 5 files (not in diff) in ...kerjava/jaxrs/filter were modified. more
    • Misses -23
    • Hits +23
  5. 2 files (not in diff) in ...java/jaxrs/connector were modified. more
    • Misses -49
    • Hits +49
  6. 22 files (not in diff) in ...hub/dockerjava/jaxrs were modified. more
    • Misses -66
    • Hits +66
  7. 5 files (not in diff) in ...dockerjava/core/util were modified. more
    • Misses -17
    • Partials -6
    • Hits +23
  8. 2 files (not in diff) in ...java/core/dockerfile were modified. more
    • Misses -16
    • Partials -11
    • Hits +27
  9. 12 files (not in diff) in ...kerjava/core/command were modified. more
    • Misses -34
    • Partials -6
    • Hits +40
  10. 3 files (not in diff) in ...ockerjava/core/async were modified. more
    • Misses -5
    • Partials -2
    • Hits +7
@@             master       #593   diff @@
==========================================
  Files           296        296          
  Lines          6218       6245    +27   
  Methods           0          0          
  Messages          0          0          
  Branches        547        553     +6   
==========================================
+ Hits           1420       1892   +472   
+ Misses         4706       4353   -353   
+ Partials         92          0    -92   

Powered by Codecov. Last updated by 3a33182...430a576

@KostyaSha KostyaSha force-pushed the deviceParser branch 2 times, most recently from 5df54bf to a3880ed Compare June 7, 2016 19:35
@KostyaSha KostyaSha changed the title WIP Implemented Device parser Implemented Device parser Jun 7, 2016
@KostyaSha
Copy link
Member Author

Todo implement validator, but i have no time and daemon error would return error.

@KostyaSha
Copy link
Member Author

@marcuslinke please review

Signed-off-by: Kanstantsin Shautsou <[email protected]>
* @link https://github.com/docker/docker/blob/6b4a46f28266031ce1a1315f17fb69113a06efe1/runconfig/opts/parse.go#L796
*/
private static boolean validDeviceMode(String deviceMode) {
Map<String, Boolean> validModes = new HashMap<>(3);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The `validModes' map should be declared as static member and not declared inline.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what do you mean under not declared inline.?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean it should be declared at the class level not in the method itself.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It must be mutable, it changes true to false to exclude double letters.

@KostyaSha
Copy link
Member Author

@marcuslinke updated, feel free to squash merge (dropdown in merge button) if it LGTY.

@marcuslinke marcuslinke merged commit 3a2dcc4 into docker-java:master Jun 8, 2016
@KostyaSha KostyaSha added this to the 3.0.1 milestone Jun 13, 2016
panuse pushed a commit to TuKangTech/docker-java that referenced this pull request Aug 20, 2017
* Implement Device parser

Signed-off-by: Kanstantsin Shautsou <[email protected]>

* Add more tests, fix.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement devices string parser

3 participants