Fixed use of generics to remove compiler warnings.

This commit is contained in:
Jeff Wallace 2013-11-27 11:26:30 -05:00
parent 47ebc70435
commit 757e1ffa97
6 changed files with 9 additions and 6 deletions

View File

@ -174,6 +174,7 @@ public class DataResultViewerTable extends AbstractDataResultViewer {
* @param parent Node with at least one child to get properties from
* @return Properties,
*/
@SuppressWarnings("rawtypes")
private Node.Property[] getAllChildPropertyHeaders(Node parent) {
Node firstChild = parent.getChildren().getNodeAt(0);
@ -432,6 +433,7 @@ public class DataResultViewerTable extends AbstractDataResultViewer {
* @param table the object table
* @return max the maximum width of the column
*/
@SuppressWarnings("rawtypes")
private int getMaxColumnWidth(int index, FontMetrics metrics, int margin, int padding, List<Node.Property> header, Object[][] table) {
// set the tree (the node / names column) width
String headerName = header.get(index - 1).getDisplayName();

View File

@ -109,6 +109,7 @@
</Properties>
<AuxValues>
<AuxValue name="JavaCodeGenerator_CreateCodeCustom" type="java.lang.String" value="new javax.swing.JComboBox&lt;String&gt;()"/>
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="&lt;String&gt;"/>
</AuxValues>
</Component>
<Component class="javax.swing.JLabel" name="tagLabel">

View File

@ -242,7 +242,7 @@ public class TagAndCommentDialog extends JDialog {
private javax.swing.JTextField commentText;
private javax.swing.JButton newTagButton;
private javax.swing.JButton okButton;
private javax.swing.JComboBox tagCombo;
private javax.swing.JComboBox<String> tagCombo;
private javax.swing.JLabel tagLabel;
// End of variables declaration//GEN-END:variables
}

View File

@ -307,7 +307,7 @@ public class IngestManager {
* @param pipelineContext ingest context used to ingest parent of the file
* to be scheduled
*/
void scheduleFile(AbstractFile file, PipelineContext pipelineContext) {
void scheduleFile(AbstractFile file, PipelineContext<IngestModuleAbstractFile> pipelineContext) {
scheduler.getFileScheduler().schedule(file, pipelineContext);
}

View File

@ -320,7 +320,7 @@ class IngestScheduler {
*
* @param task tasks similar to this one should be removed
*/
private void removeDupTasks(ScheduledTask task) {
private <T extends IngestModuleAbstract> void removeDupTasks(ScheduledTask<T> task) {
final Content inputContent = task.getContent();
//remove from root queue
@ -365,8 +365,8 @@ class IngestScheduler {
* @param originalContext original content schedule context that was used
* to schedule the parent origin content, with the modules, settings, etc.
*/
synchronized void schedule(AbstractFile file, PipelineContext originalContext) {
ScheduledTask originalTask = originalContext.getScheduledTask();
synchronized void schedule(AbstractFile file, PipelineContext<IngestModuleAbstractFile> originalContext) {
ScheduledTask<IngestModuleAbstractFile> originalTask = originalContext.getScheduledTask();
//skip if task contains no modules
if (originalTask.getModules().isEmpty()) {

View File

@ -136,7 +136,7 @@ public class IngestServices {
* @param file file to be scheduled
* @param pipelineContext the ingest context for the file ingest pipeline
*/
public <T extends IngestModuleAbstract> void scheduleFile(AbstractFile file, PipelineContext<T> pipelineContext) {
public void scheduleFile(AbstractFile file, PipelineContext<IngestModuleAbstractFile> pipelineContext) {
logger.log(Level.INFO, "Scheduling file: " + file.getName());
manager.scheduleFile(file, pipelineContext);
}