Cyberduck Mountain Duck CLI

Changeset 41271


Ignore:
Timestamp:
Jun 7, 2017 9:00:18 PM (14 months ago)
Author:
dkocher
Message:

Overload lookup by scheme.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • shelves/02.06.2017/core/src/main/java/ch/cyberduck/core/ProtocolFactory.java

    r41268 r41271  
    149149     */
    150150    public static Protocol forScheme(final Scheme scheme) {
     151        return forScheme(scheme.name());
     152    }
     153
     154    public static Protocol forScheme(final String scheme) {
    151155        return ProtocolFactory.forScheme(ProtocolFactory.getEnabledProtocols(), scheme);
    152156    }
    153157
    154     public static Protocol forScheme(final Set<Protocol> protocols, final Scheme scheme) {
     158    public static Protocol forScheme(final Set<Protocol> protocols, final String scheme) {
    155159        for(Protocol protocol : protocols) {
    156160            for(int k = 0; k < protocol.getSchemes().length; k++) {
    157                 if(protocol.getSchemes()[k].equals(scheme.name())) {
     161                if(protocol.getSchemes()[k].equals(scheme)) {
    158162                    return protocol;
    159163                }
Note: See TracChangeset for help on using the changeset viewer.
swiss made software