commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebbASF <...@git.apache.org>
Subject [GitHub] commons-lang issue #231: Evaluate Architecure
Date Fri, 10 Mar 2017 19:35:31 GMT
Github user sebbASF commented on the issue:

    https://github.com/apache/commons-lang/pull/231
  
    In which case, I think they belong on the Processor class.
    
    The user code would look like:
    ```
    Processor proc = ArchUtils.getProcessor([String]);
    if (proc != null) {
        if (proc.isX86() && proc.isPPC()) {
        }
    } // else not supported
    ```
    
    At present the same code is
    
    ```
    if (ArchUtils.isSupported([String])) {
        if (ArchUtils.isX86([String]) && ArchUtils.isPPC([String]) )
        }
    }
    ```
    I think that looks more complicated. 
    Also all the isXXX methods have to be overloaded with an optional string parameter.
    And the map is accessed at least 3 times.


---
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.
---

Mime
View raw message