You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by yurelle <gi...@git.apache.org> on 2016/11/26 22:49:20 UTC

[GitHub] commons-lang pull request #219: LANG-341: Add number to byte array methods t...

GitHub user yurelle opened a pull request:

    https://github.com/apache/commons-lang/pull/219

    LANG-341: Add number to byte array methods to org.apache.commons.lang3.Conversion

    LANG-341: Add number to byte array methods to org.apache.commons.lang3.Conversion
    
    - Add toPrimitive(byte[]) and toByteArray(primitive) functions
    - Add hexToPrimitive(String) and toHex(primitive) functions
    - Add bitString functions
    - Add invertBitOrder() functions

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/yurelle/commons-lang LANG-341_AddNumToByteArrayMethods

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/commons-lang/pull/219.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #219
    
----
commit d55aa3ff4e2953d372b97023ce75af04ffb8ae1e
Author: yurelle <yu...@gmail.com>
Date:   2016-11-26T22:38:08Z

    LANG-341: Add number to byte array methods to org.apache.commons.lang3.Conversion
    
    - Add toPrimitive(byte[]) and toByteArray(primitive) functions
    - Add hexToPrimitive(String) and toHex(primitive) functions
    - Add bitString functions
    - Add invertBitOrder() functions

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] commons-lang issue #219: LANG-341: Add number to byte array methods to org.a...

Posted by dmjones500 <gi...@git.apache.org>.
Github user dmjones500 commented on the issue:

    https://github.com/apache/commons-lang/pull/219
  
    Might be worth splitting this into smaller PRs that can be more easily reviewed?
    
    The LANG-341 stuff was pretty much ready to go last time it was reviewed, so splitting that out would help get it into the code base sooner. 
    
    Some of the other methods are new (to me at least), and might warrant individual conversation - do we want/need these methods, etc. (Not saying we don't, but easier to have a coherent discussion about a smaller scope of change).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] commons-lang issue #219: LANG-341: Add number to byte array methods to org.a...

Posted by coveralls <gi...@git.apache.org>.
Github user coveralls commented on the issue:

    https://github.com/apache/commons-lang/pull/219
  
    
    [![Coverage Status](https://coveralls.io/builds/9010143/badge)](https://coveralls.io/builds/9010143)
    
    Coverage decreased (-0.05%) to 94.239% when pulling **d55aa3ff4e2953d372b97023ce75af04ffb8ae1e on yurelle:LANG-341_AddNumToByteArrayMethods** into **e56ac1c37d236c9a0e4e7b86bd7d1b7201ac177d on apache:master**.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] commons-lang issue #219: LANG-341: Add number to byte array methods to org.a...

Posted by yurelle <gi...@git.apache.org>.
Github user yurelle commented on the issue:

    https://github.com/apache/commons-lang/pull/219
  
    I got a little carried away; this PR is 4,500 lines. I'm sure this is probably going to take quite a while to validate and get accepted into the code base. I'm just glad I could get the ball rolling. If someone could check on my big/little endian implementations, I'd appreciate it. I can never keep those straight. I went off of these references:
    https://www.cs.umd.edu/class/sum2003/cmsc311/Notes/Data/endian.html
    https://en.wikipedia.org/wiki/Endianness
    https://en.wikipedia.org/wiki/Bit_numbering
    
    I'm not sure why it's saying that test coverage went down. As far as I can tell, I've got tests for all my new functions.
    
    One thing to note: in all my new functions that had a pre-existing alternate implementation, I added a chunk in the unit test to compare my results with the existing implementation. However, I had some trouble getting proper data out of the pre-existing hexToPrimitive() functions. The test code to do this validation is in the JUnit functions, but it's commented out. I'm probably just not understanding the existing implementation properly.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] commons-lang issue #219: LANG-341: Add number to byte array methods to org.a...

Posted by coveralls <gi...@git.apache.org>.
Github user coveralls commented on the issue:

    https://github.com/apache/commons-lang/pull/219
  
    
    [![Coverage Status](https://coveralls.io/builds/9010209/badge)](https://coveralls.io/builds/9010209)
    
    Coverage decreased (-0.04%) to 94.246% when pulling **41103d1fc59c79d2dc1bbd3871131342b3d1dabd on yurelle:LANG-341_AddNumToByteArrayMethods** into **e56ac1c37d236c9a0e4e7b86bd7d1b7201ac177d on apache:master**.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] commons-lang issue #219: LANG-341: Add number to byte array methods to org.a...

Posted by dmjones500 <gi...@git.apache.org>.
Github user dmjones500 commented on the issue:

    https://github.com/apache/commons-lang/pull/219
  
    Avoiding a mixture of white-space and code changes is also welcome :-)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] commons-lang issue #219: LANG-341: Add number to byte array methods to org.a...

Posted by yurelle <gi...@git.apache.org>.
Github user yurelle commented on the issue:

    https://github.com/apache/commons-lang/pull/219
  
    Crap. I used a primitive integer constant that's only in java 8. I'll fix.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---