gerrithudsontrigger/src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/hudsontrigger/GerritAdministrativeMonitor.java
/**
     * Checks the Gerrit version that we are connected to.
     * If it is a snapshot or if any features will be disabled because of this.
     * It should be called whenever we got some new connection status.
     */
Checks the Gerrit version that we are connected to.
If it is a snapshot or if any features will be disabled because of this.
It should be called whenever we got some new connection status.
Checks the Gerrit version that we are connected to . If it is a snapshot or if any features will be disabled because of this . It should be called whenever we got some new connection status .
private void checkGerritVersionFeatures() {
        try {
            if (connected) {
                GerritVersionNumber version =
                        GerritVersionChecker.createVersionNumber(PluginImpl.getInstance().getGerritVersion());
                List<GerritVersionChecker.Feature> list = new LinkedList<GerritVersionChecker.Feature>();
                for (GerritVersionChecker.Feature f : GerritVersionChecker.Feature.values()) {
                    if (!GerritVersionChecker.isCorrectVersion(version, f)) {
                        list.add(f);
                    }
                }
                this.disabledFeatures = list;
                this.gerritSnapshotVersion = version.isSnapshot();
            } else {
                this.disabledFeatures = null;
                this.gerritSnapshotVersion = false;
            }
        } catch (Exception ex) {
            logger.warn("Failed to calculate version info! ", ex);
        }
    }
private void checkGerritVersionFeatures ( ) { try { if ( connected ) { GerritVersionNumber version = GerritVersionChecker . createVersionNumber ( PluginImpl . getInstance ( ) . getGerritVersion ( ) ) ; List < GerritVersionChecker . Feature > list = new LinkedList < GerritVersionChecker . Feature > ( ) ; for ( GerritVersionChecker . Feature f : GerritVersionChecker . Feature . values ( ) ) { if ( ! GerritVersionChecker . isCorrectVersion ( version , f ) ) { list . add ( f ) ; } } this . disabledFeatures = list ; this . gerritSnapshotVersion = version . isSnapshot ( ) ; } else { this . disabledFeatures = null ; this . gerritSnapshotVersion = false ; } } catch ( Exception ex ) { logger . warn ( "Failed to calculate version info! " , ex ) ; } }
Checks the Gerrit version that we are connected to.
Checks the Gerrit version that we are connected to .