private PortType replaceSimpleSwitch()

in java-samples/src/main/java/com/jetbrains/inspections/SwitchExpressions.java [6:23]


    private PortType replaceSimpleSwitch(int port) {
        PortType type;
        switch (port) {
            case 20:
                type = PortType.FTP;
                break;
            case 80:
            case 8080:
                type = PortType.HTTP;
                break;
            case 27017:
                type = PortType.DATABASE;
                break;
            default:
                type = PortType.UNKNOWN;
        }
        return type;
    }