OpenConcerto

Dépôt officiel du code source de l'ERP OpenConcerto
sonarqube

svn://code.openconcerto.org/openconcerto

Rev

Rev 142 | Rev 177 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 142 Rev 156
Line 138... Line 138...
138
        // SetStateRunnable since this must not be cancelled by an updateAll, but it shouldn't
138
        // SetStateRunnable since this must not be cancelled by an updateAll, but it shouldn't
139
        // prevent earlier updates to be cancelled
139
        // prevent earlier updates to be cancelled
140
        this.put(new SetStateRunnable() {
140
        this.put(new SetStateRunnable() {
141
            @Override
141
            @Override
142
            public void run() {
142
            public void run() {
143
                getModel().getSearchQueue().start();
143
                getModel().startSearchQueue();
144
            }
144
            }
145
        });
145
        });
146
    }
146
    }
147
 
147
 
148
    @Override
148
    @Override
Line 242... Line 242...
242
                                put = true;
242
                                put = true;
243
                            }
243
                            }
244
                        }
244
                        }
245
                        // if the modified row isn't in the existing line, it might still affect it
245
                        // if the modified row isn't in the existing line, it might still affect it
246
                        // if it's a referent row insertion
246
                        // if it's a referent row insertion
247
                        if (!put && lastReferentField != null && r.exists()) {
247
                        if (!put && lastReferentField != null && r.exists() && !r.isForeignEmpty(lastReferentField)) {
-
 
248
                            // no NPE, even without an undefined ID since we tested isForeignEmpty()
248
                            final int foreignID = r.getInt(lastReferentField);
249
                            final int foreignID = r.getInt(lastReferentField);
249
                            for (final SQLRowValues current : line.getRow().followPath(p.minusLast(), CreateMode.CREATE_NONE, false)) {
250
                            for (final SQLRowValues current : line.getRow().followPath(p.minusLast(), CreateMode.CREATE_NONE, false)) {
250
                                if (current.getID() == foreignID) {
251
                                if (current.getID() == foreignID) {
251
                                    put = true;
252
                                    put = true;
252
                                }
253
                                }