We planned to upgrade GitLab and Mattermost to the latest version this Friday morning (early). You may experience some downtime!

Commit b2e61b6d authored by Atze Dijkstra's avatar Atze Dijkstra

fixes for java 8

parent 2cfbde22
......@@ -9,13 +9,14 @@
package nl.uu.cs.ssm ;
import java.util.Enumeration;
import java.util.EventListener;
abstract class AbstractMemoryCellModel extends Model
implements MemoryCellModel
{
protected void fireCellChange( MemoryCellModel m, MemoryCellEvent ev )
{
for( Enumeration e = getListeners() ; e.hasMoreElements() ; )
for( Enumeration<EventListener> e = getListeners() ; e.hasMoreElements() ; )
{
MemoryCellListener l = (MemoryCellListener)e.nextElement() ;
l.cellChanged( ev ) ;
......@@ -42,4 +43,4 @@ abstract class AbstractMemoryCellModel extends Model
removeListener( l ) ;
}
}
\ No newline at end of file
}
......@@ -14,6 +14,7 @@ import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.EventListener;
public class MachineState extends Model
{
......@@ -46,7 +47,7 @@ public class MachineState extends Model
protected void fireStateChange( MachineStateEvent ev )
{
for( Enumeration e = getListeners() ; e.hasMoreElements() ; )
for( Enumeration<EventListener> e = getListeners() ; e.hasMoreElements() ; )
{
MachineStateListener l = (MachineStateListener)e.nextElement() ;
l.stateChanged( ev ) ;
......@@ -245,4 +246,4 @@ public class MachineState extends Model
// cannot remove from filePtrs, as that messes up index
filePtrs.set(index, null);
}
}
\ No newline at end of file
}
......@@ -26,7 +26,7 @@ public class Model
listeners.removeElement( l ) ;
}
protected Enumeration getListeners()
protected Enumeration<EventListener> getListeners()
{
return listeners.elements() ;
}
......
......@@ -173,7 +173,7 @@ public class Utils
{
private Vector<Object> extensions = new Vector<Object>() ;
public ExtensionFileFilter( Enumeration exts )
public ExtensionFileFilter( Enumeration<Object> exts )
{
while ( exts.hasMoreElements() )
addExtension( (String)exts.nextElement() ) ;
......
......@@ -362,7 +362,7 @@ public class CodeTableModel extends AbstractTableModel
return columnNames[ column ] ;
}
public Class getColumnClass( int column )
public Class<?> getColumnClass( int column )
{
if ( column == C_PC || column == C_BP )
return ImageIcon.class ;
......
......@@ -104,7 +104,7 @@ public class HeapTableModel extends AbstractTableModel implements MemoryCellList
return columnNames[column] ;
}
public Class getColumnClass(int column) {
public Class<?> getColumnClass(int column) {
if (column == C_ANNOTE)
return ColoredText.class;
......@@ -116,4 +116,4 @@ public class HeapTableModel extends AbstractTableModel implements MemoryCellList
fireTableDataChanged();
}
}
\ No newline at end of file
}
......@@ -62,7 +62,7 @@ public class HelpFromProp
if ( topics == null )
{
Hashtable<String,String> ts = new Hashtable<String,String>() ;
for ( Enumeration ps = props.propertyNames() ; ps.hasMoreElements() ; )
for ( Enumeration<?> ps = props.propertyNames() ; ps.hasMoreElements() ; )
{
String s = (String)ps.nextElement() ;
if ( doForInstr )
......
......@@ -51,7 +51,7 @@ public class SSMAbout extends JFrame
versionLabel.setFont(null);
versionLabel.setSize(new java.awt.Dimension(80, 20));
authorLabel.setText("Author & :");
authorLabel.setText("Copyright:");
authorLabel.setLocation(new java.awt.Point(10, 50));
authorLabel.setVisible(true);
authorLabel.setFont(null);
......
......@@ -44,7 +44,7 @@ public class SSMHelp extends JFrame
javax.swing.JButton findButton = new javax.swing.JButton();
javax.swing.JButton allTopicsButton = new javax.swing.JButton();
javax.swing.JScrollPane foundTopicsScrollPane = new javax.swing.JScrollPane();
javax.swing.JList foundTopicsList = new javax.swing.JList();
javax.swing.JList<HelpTopic> foundTopicsList = new javax.swing.JList<HelpTopic>();
// END GENERATED CODE
public SSMHelp( Help h )
......@@ -324,7 +324,7 @@ public class SSMHelp extends JFrame
public void foundTopicsListMouseReleased(java.awt.event.MouseEvent e)
{
HelpTopic helpTopic = (HelpTopic)foundTopicsList.getSelectedValue() ;
HelpTopic helpTopic = foundTopicsList.getSelectedValue() ;
if ( helpTopic != null )
displayOneSelectedHelp( helpTopic ) ;
}
......
......@@ -62,7 +62,7 @@ public class SSMRunner extends JFrame
public final static int SETUP_READY = 1 ;
public static Class tableModelColumnClass ;
public static Class<?> tableModelColumnClass ;
static
{
......
......@@ -145,7 +145,7 @@ public class StackTableModel extends AbstractTableModel
return columnNames[ column ] ;
}
public Class getColumnClass( int column )
public Class<?> getColumnClass( int column )
{
if ( column == C_ANNOTE )
return ColoredText.class ;
......
......@@ -104,7 +104,7 @@ public class StatusTableModel extends AbstractTableModel
return column == C_SR ? "SR" : Registers.getRegNAliasName( column ) ;
}
public Class getColumnClass( int column )
public Class<?> getColumnClass( int column )
{
return SSMRunner.tableModelColumnClass ;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment