return bucket;
}
- if (mustExist && lock.isLocked() && !ResourceUtils.isLibrary(resource)) {
- throw new SonarException("The following resource has not been registered before saving violation/measure/event: " + resource);
+ if (mustExist && lock.isLocked() && !ResourceUtils.isLibrary(resource)) {
+ LOG.warn("The following resource has not been registered before saving violation/measure/event: " + resource);
}
prepareResource(resource);
*/
package org.sonar.batch.indexer;
+import org.junit.Ignore;
import org.junit.Test;
import org.sonar.api.measures.CoreMetrics;
import org.sonar.api.measures.Measure;
}
@Test(expected = SonarException.class)
+ @Ignore("Temporarily log warnings instead of throwing an exception")
public void failIfLockedAndAddingMeasureOnUnknownResource() {
DefaultResourceCreationLock lock = new DefaultResourceCreationLock();
lock.lock();