mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-05 23:35:48 +02:00
Fixes warnings
This commit is contained in:
parent
5001cf3e33
commit
c10395201b
2 changed files with 6 additions and 5 deletions
|
@ -19,6 +19,11 @@ public final class EmptyIterator<T> implements Iterator<T>
|
||||||
|
|
||||||
public static final EmptyIterator<?> EMPTY_ITERATOR = new EmptyIterator<Object>();
|
public static final EmptyIterator<?> EMPTY_ITERATOR = new EmptyIterator<Object>();
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public static <T> EmptyIterator<T> empty() {
|
||||||
|
return (EmptyIterator<T>) EMPTY_ITERATOR;
|
||||||
|
}
|
||||||
|
|
||||||
private EmptyIterator()
|
private EmptyIterator()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,12 +76,8 @@ public class PartialWorkingCopyCodeReaderFactory
|
||||||
return cache.get( path );
|
return cache.get( path );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
protected Iterator<IWorkingCopy> createWorkingCopyIterator() {
|
protected Iterator<IWorkingCopy> createWorkingCopyIterator() {
|
||||||
if( provider == null ) return EmptyIterator.EMPTY_ITERATOR;
|
if( provider == null ) return EmptyIterator.empty();
|
||||||
return Arrays.asList( provider.getWorkingCopies() ).iterator();
|
return Arrays.asList( provider.getWorkingCopies() ).iterator();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue