src/main/java/de/blau/android/osm/StorageDelegator.java
/**
     * Validate that the member counts of multiple relations stay in limits
     * 
     * @param relations a List of Relations
     * @param increment how much the member count will increase
     * @throws OsmIllegalOperationException if the count is larger than the maximum supported
     */
Validate that the member counts of multiple relations stay in limits

@param relations a List of Relations
@param increment how much the member count will increase
@throws OsmIllegalOperationException if the count is larger than the maximum supported
Validate that the member counts of multiple relations stay in limits @param relations a List of Relations @param increment how much the member count will increase @throws OsmIllegalOperationException if the count is larger than the maximum supported
private void validateRelationMemberCount(@Nullable List<Relation> relations, int increment) {
        if (relations != null) {
            Logic logic = App.getLogic();
            if (logic != null) {
                Preferences prefs = logic.getPrefs();
                if (prefs != null) {
                    int limit = prefs.getServer().getCachedCapabilities().getMaxRelationMembers();
                    for (Relation r : relations) {
                        if (r.getMemberCount() + increment > limit) {
                            throw new OsmIllegalOperationException(PreconditionIssue.RELATION_MEMBER_COUNT, r,
                                    App.resources().getString(R.string.exception_too_many_members, r.getDescription()));
                        }
                    }
                }
            }
        }
    }
private void validateRelationMemberCount ( @ Nullable List < Relation > relations , int increment ) { if ( relations != null ) { Logic logic = App . getLogic ( ) ; if ( logic != null ) { Preferences prefs = logic . getPrefs ( ) ; if ( prefs != null ) { int limit = prefs . getServer ( ) . getCachedCapabilities ( ) . getMaxRelationMembers ( ) ; for ( Relation r : relations ) { if ( r . getMemberCount ( ) + increment > limit ) { throw new OsmIllegalOperationException ( PreconditionIssue . RELATION_MEMBER_COUNT , r , App . resources ( ) . getString ( R . string . exception_too_many_members , r . getDescription ( ) ) ) ; } } } } } }
Validate that the member counts of multiple relations stay in limits
Validate that the member counts of multiple relations stay in limits