mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
bug 319512: Compilation warnings
This commit is contained in:
parent
b6712569b7
commit
e61e00092b
4 changed files with 18 additions and 21 deletions
|
@ -22,7 +22,7 @@ import org.eclipse.cdt.managedbuilder.core.IOutputType;
|
|||
|
||||
public class BuildIOType implements IBuildIOType {
|
||||
private BuildStep fStep;
|
||||
private List fResources = new ArrayList();
|
||||
private List<BuildResource> fResources = new ArrayList<BuildResource>();
|
||||
private boolean fIsInput;
|
||||
private boolean fIsPrimary;
|
||||
private String fLinkId;
|
||||
|
@ -52,7 +52,7 @@ public class BuildIOType implements IBuildIOType {
|
|||
}
|
||||
|
||||
public IBuildResource[] getResources() {
|
||||
return (BuildResource[])fResources.toArray(new BuildResource[fResources.size()]);
|
||||
return fResources.toArray(new BuildResource[fResources.size()]);
|
||||
}
|
||||
|
||||
public IBuildStep getStep() {
|
||||
|
|
|
@ -13,7 +13,6 @@ package org.eclipse.cdt.managedbuilder.internal.core;
|
|||
|
||||
import org.eclipse.cdt.managedbuilder.core.IBuildObject;
|
||||
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.osgi.framework.Version;
|
||||
|
||||
public class BuildObject implements IBuildObject {
|
||||
|
@ -90,11 +89,7 @@ public class BuildObject implements IBuildObject {
|
|||
|
||||
|
||||
public Version getVersionFromId() {
|
||||
String versionNumber;
|
||||
IStatus status = null;
|
||||
|
||||
|
||||
versionNumber = ManagedBuildManager.getVersionFromIdAndVersion( getId());
|
||||
String versionNumber = ManagedBuildManager.getVersionFromIdAndVersion( getId());
|
||||
|
||||
if( versionNumber == null) {
|
||||
// It means, Tool Integrator either not provided version information in 'id' or provided in wrong format,
|
||||
|
|
|
@ -49,13 +49,13 @@ public class BuildObjectProperties extends BuildProperties implements
|
|||
IBuildPropertyType types[] = BuildPropertyManager.getInstance().getPropertyTypes();
|
||||
|
||||
if(fRestriction != null && types.length != 0){
|
||||
List list = new ArrayList(types.length);
|
||||
for(int i = 0; i < types.length; i++){
|
||||
if(fRestriction.supportsType(types[i].getId()))
|
||||
list.add(types[i]);
|
||||
List<IBuildPropertyType> list = new ArrayList<IBuildPropertyType>(types.length);
|
||||
for (IBuildPropertyType type : types) {
|
||||
if(fRestriction.supportsType(type.getId()))
|
||||
list.add(type);
|
||||
}
|
||||
|
||||
types = (IBuildPropertyType[])list.toArray(new IBuildPropertyType[list.size()]);
|
||||
types = list.toArray(new IBuildPropertyType[list.size()]);
|
||||
}
|
||||
|
||||
return types;
|
||||
|
@ -66,13 +66,13 @@ public class BuildObjectProperties extends BuildProperties implements
|
|||
if(type != null){
|
||||
IBuildPropertyValue values[] = type.getSupportedValues();
|
||||
if(fRestriction != null && values.length != 0){
|
||||
List list = new ArrayList(values.length);
|
||||
for(int i = 0; i < values.length; i++){
|
||||
if(fRestriction.supportsValue(type.getId(), values[i].getId()))
|
||||
list.add(values[i]);
|
||||
List<IBuildPropertyValue> list = new ArrayList<IBuildPropertyValue>(values.length);
|
||||
for (IBuildPropertyValue value : values) {
|
||||
if(fRestriction.supportsValue(type.getId(), value.getId()))
|
||||
list.add(value);
|
||||
}
|
||||
|
||||
return (IBuildPropertyValue[])list.toArray(new IBuildPropertyValue[list.size()]);
|
||||
return list.toArray(new IBuildPropertyValue[list.size()]);
|
||||
}
|
||||
}
|
||||
return new IBuildPropertyValue[0];
|
||||
|
|
|
@ -17,6 +17,7 @@ import java.util.Iterator;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
|
||||
import org.eclipse.cdt.core.settings.model.ICStorageElement;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
|
@ -66,6 +67,7 @@ public class MapStorageElement implements ICStorageElement {
|
|||
}
|
||||
|
||||
public Map<String, String> toStringMap(){
|
||||
@SuppressWarnings("unchecked")
|
||||
Map<String, String> map = (Map<String, String>)fMap.clone();
|
||||
if(fName != null)
|
||||
map.put(getMapKey(NAME_KEY), fName);
|
||||
|
@ -291,9 +293,9 @@ public class MapStorageElement implements ICStorageElement {
|
|||
|
||||
public String[] getAttributeNames() {
|
||||
List<String> list = new ArrayList<String>(fMap.size());
|
||||
for(Iterator iter = fMap.entrySet().iterator(); iter.hasNext();){
|
||||
Map.Entry entry = (Map.Entry)iter.next();
|
||||
String key = (String)entry.getKey();
|
||||
Set<Entry<String, String>> entrySet = fMap.entrySet();
|
||||
for (Entry<String, String> entry : entrySet) {
|
||||
String key = entry.getKey();
|
||||
if(!isSystemKey(key)){
|
||||
list.add(key);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue