eclipse-platform / eclipse-platform/eclipse.platform
Project description links information is not reconciled on project close and reopen
- Lingua principale
- Java
- Stelle
- 165
- Fork
- 174
- Merge medio
- 2g 8h
- PR unite (30g)
- 22
Descrizione
In our product, we have a builder that reads linked folders. The builder runs into a NPE, due to stale links information. The stale links information results due to the following sequence:
1. Debug Eclipse with a breakpoint at the start of `Project.reconcileLinksAndGroups()`.
2. Create a Java project.
3. Add a linked source folder to some folder on disk.
4. Close the project.
5. Delete the information about the link from the .project file on disk, e.g. delete the following block (location will be different):
```
test
2
/data/tmp/test
```
6. Open the project in Eclipse.
7. Observe `oldDescription.getLinks()` returns `null` and so nothing is done to refresh the links information.
The information about links in the project description is not persisted in `LocalMetaArea.writePrivateDescription()` and is also not read in `LocalMetaArea.readPrivateDescription()`. We should fix this, to ensure up-to-date links information in the project description after opening a closed project.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia con LocalMetaArea.writePrivateDescription() e LocalMetaArea.readPrivateDescription(), quindi segui Project.reconcileLinksAndGroups() riproducendo la sequenza di chiusura, modifica di .project e riapertura. Il lavoro è completo quando le informazioni sulle risorse collegate vengono rese persistenti e lette, in modo che la riapertura aggiorni la descrizione del progetto invece di lasciare oldDescription.getLinks() a null e causare una NPE nel builder.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java
- Ambito
- devtools, tooling
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 45/100