Arbeitsbereich Programmiersprachen Foren-Übersicht
Autor Nachricht

<  Softwaretechnik  ~  esc/java2 Problem

se
Verfasst am: 10 Jun 2012 19:34 Antworten mit Zitat
Anmeldungsdatum: 24.04.2012 Beiträge: 9
Hello,

I just tried to do Task 7 of the portfolio, but whenever I start running esc/java2, I get a fatal error Fatal error:
"Expected an identifier, found <private ArrayList<Boulder> boulders;
^"
In this pretty old post it is said that generics are not supported by the tool:
https://oss.itu.dk/trac/mobius/ticket/1725
So I wonder if there is a work around, because I think an ArrayList is a pretty important thing.

Thanks in advance for an answer,
Susanne
Benutzer-Profile anzeigen Private Nachricht senden
Matthias Keil
Verfasst am: 13 Jun 2012 9:55 Antworten mit Zitat
Anmeldungsdatum: 26.03.2012 Beiträge: 76
It looks like that the current version of ESC/Java2 is still not able to parse Java Generics.
I’ve tried to reconstruct the problem. The error message I got is quite different from yours - but I think the problem is the same.
Benutzer-Profile anzeigen Private Nachricht senden
se
Verfasst am: 13 Jun 2012 12:21 Antworten mit Zitat
Anmeldungsdatum: 24.04.2012 Beiträge: 9
So the only way to get esc working is to comment out the parts that use the generics? Or is there any other way to complete the task?
Benutzer-Profile anzeigen Private Nachricht senden
Matthias Keil
Verfasst am: 13 Jun 2012 17:39 Antworten mit Zitat
Anmeldungsdatum: 26.03.2012 Beiträge: 76
Currently I don’t know any way to get the ESC/Java2 working by using Java Generics.
I think the easiest way - if possible - is to abstain from Java Generics and to use standard arrays or alternative implementations without Java Generics.

Otherwise you can use a newer tool to verify your code.
Benutzer-Profile anzeigen Private Nachricht senden

Beiträge vom vorherigen Thema anzeigen:  

Alle Zeiten sind GMT + 2 Stunden
Seite 1 von 1
Dieses Forum ist gesperrt, du kannst keine Beiträge editieren, schreiben oder beantworten.

Gehe zu:  

Du kannst keine Beiträge in dieses Forum schreiben.
Du kannst auf Beiträge in diesem Forum nicht antworten.
Du kannst deine Beiträge in diesem Forum nicht bearbeiten.
Du kannst deine Beiträge in diesem Forum nicht löschen.
Du kannst an Umfragen in diesem Forum nicht mitmachen.