mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-25 18:05:33 +02:00
Bug 310345: Made validate methods public
This commit is contained in:
parent
4dea12d98e
commit
e5328c3106
1 changed files with 4 additions and 3 deletions
|
@ -52,6 +52,7 @@ public abstract class Transaction<V> {
|
||||||
fRm.done();
|
fRm.done();
|
||||||
}
|
}
|
||||||
fRm = rm;
|
fRm = rm;
|
||||||
|
assert fRm != null;
|
||||||
execute();
|
execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -124,7 +125,7 @@ public abstract class Transaction<V> {
|
||||||
* @throws CoreException
|
* @throws CoreException
|
||||||
* if an error was encountered getting the data from the source
|
* if an error was encountered getting the data from the source
|
||||||
*/
|
*/
|
||||||
protected void validate(ICache<?> cache) throws InvalidCacheException, CoreException {
|
public void validate(ICache<?> cache) throws InvalidCacheException, CoreException {
|
||||||
if (cache.isValid()) {
|
if (cache.isValid()) {
|
||||||
if (!cache.getStatus().isOK()) {
|
if (!cache.getStatus().isOK()) {
|
||||||
throw new CoreException(cache.getStatus());
|
throw new CoreException(cache.getStatus());
|
||||||
|
@ -148,7 +149,7 @@ public abstract class Transaction<V> {
|
||||||
* See {@link #validate(RequestCache)}. This variant simply validates
|
* See {@link #validate(RequestCache)}. This variant simply validates
|
||||||
* multiple cache objects.
|
* multiple cache objects.
|
||||||
*/
|
*/
|
||||||
protected void validate(ICache<?> ... caches) throws InvalidCacheException, CoreException {
|
public void validate(ICache<?> ... caches) throws InvalidCacheException, CoreException {
|
||||||
validate(Arrays.asList(caches));
|
validate(Arrays.asList(caches));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -156,7 +157,7 @@ public abstract class Transaction<V> {
|
||||||
* See {@link #validate(RequestCache)}. This variant simply validates
|
* See {@link #validate(RequestCache)}. This variant simply validates
|
||||||
* multiple cache objects.
|
* multiple cache objects.
|
||||||
*/
|
*/
|
||||||
protected void validate(Iterable<ICache<?>> caches) throws InvalidCacheException, CoreException {
|
public void validate(Iterable<ICache<?>> caches) throws InvalidCacheException, CoreException {
|
||||||
// Check if any of the caches have errors:
|
// Check if any of the caches have errors:
|
||||||
boolean allValid = true;
|
boolean allValid = true;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue