Modify

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#8620 closed defect (fixed)

JOSM does not compile after JMapViewer update

Reported by: akks Owned by: team
Priority: critical Milestone:
Component: JMapViewer Version: latest
Keywords: Cc: galo.higueras@…, The111

Description

The tree of layer was added to JMapViewer classes in [o29513] by galo, but JOSM core was not changed and does not compile now:

F:\Java\josm\core\src\org\openstreetmap\josm\gui\bbox\SlippyMapBBoxChooser.java:382: error: no suitable constructor found for MapMarkerDot(double,double)
        MapMarkerDot xmax_ymax = new MapMarkerDot(bbox.getMax().lat(), bbox.getMax().lon());

F:\Java\josm\core\src\org\openstreetmap\josm\gui\bbox\TileSelectionBBoxChooser.java:147: error: no suitable constructor found for MapMarkerDot(double,double)
        MapMarkerDot xmin_ymin = new MapMarkerDot(bbox.getMin().lat(), bbox.getMin().lon());

F:\Java\josm\core\src\org\openstreetmap\josm\gui\bbox\TileSelectionBBoxChooser.java:148: error: no suitable constructor found for MapMarkerDot(double,double)
        MapMarkerDot xmax_ymax = new MapMarkerDot(bbox.getMax().lat(), bbox.getMax().lon());
    constructor MapMarkerDot.MapMarkerDot(Layer,String,Coordinate,Style) is not applicable
...

F:\Java\josm\core\src\org\openstreetmap\josm\gui\preferences\imagery\ImageryPreference.java:384: error: no suitable constructor found for MapPolygonImpl(List<Coordinate>)
                                    MapPolygon polygon = new MapPolygonImpl(shape.getPoints());
...
F:\Java\josm\core\src\org\openstreetmap\josm\gui\preferences\imagery\ImageryPreference.java:403: error: no suitable constructor found for MapRectangleImpl(Coordinate,Coordinate)
                                MapRectangle rectangle = new MapRectangleImpl(topLeft, bottomRight);

All of these constructors now need some "Layer" object as first parameter.

Attachments (0)

Change History (9)

comment:1 Changed 6 years ago by akks

JOSM can still be compiled after manual updating JMapVIewer folder to older revision.

comment:3 Changed 6 years ago by stoecker

Cc: galo.higueras@… added; galo removed

@galo:

Please be more careful when doing changes that affect the interface to outside world and if API changes are necessary at least inform about them beforehand.

The above issue should be fixable by reestablishing the old constructors additionally to the new ones.

For future changes you should verify that JOSM is not affected negatively when doing JMapViewer changes, as JOSM is still the major user of that component.

comment:4 Changed 6 years ago by Don-vip

Cc: The111 added

comment:5 Changed 6 years ago by Don-vip

More over, the code is in Java 7, this has to be changed back to Java 6.

EDIT: done in [o29514]

Last edited 6 years ago by Don-vip (previous) (diff)

comment:6 Changed 6 years ago by The111

Galo is a new committer that introduced himself to me and showed me an executable containing his changes. I did not see the source code, but I did advise him that before committing any changes he should be sure that all default constructors still worked as they did before so as not to break JOSM. I am away from development computer for some time, if anything is still broken when I get back I will try my best to fix ASAP.

comment:7 Changed 6 years ago by Don-vip

Resolution: fixed
Status: newclosed

comment:8 Changed 6 years ago by galo

Sorry for the nuisance caused. I tried to be careful about the changes. Being the first time to the changes, did not know that before had to discuss them in this forum, I'll remember that for next time and I will be more careful.
I've seen Don-vip has fixed all the problems in the repository, seeing them, I have noticed I should be more careful in some changes I've made too lightly. Thanks.

galo

comment:9 in reply to:  8 Changed 6 years ago by stoecker

Replying to galo:

Sorry for the nuisance caused. I tried to be careful about the changes.

No problem. Everytime you make an error you learn something new...

Being the first time to the changes, did not know that before had to discuss them in this forum, I'll remember that for next time and I will be more careful.

It is not a MUST, but a good idea (for larger changes). When you supply a patch as ticket here, someone will have a look and review it. Especially for a beginner this is usually helpful. Still we're happy when you do the checkin yourself later.

I've seen Don-vip has fixed all the problems in the repository, seeing them, I have noticed I should be more careful in some changes I've made too lightly. Thanks.

While probably nobody really likes to fix errors of such checkins, without people doing something development would be dead. So try to minimize negative effects and continue development if you have good ideas. Don't have to much fear to break stuff.

comment:10 Changed 6 years ago by Don-vip

The layers are a good idea by the way. Thanks a lot for this nice enhancement. We'll see if we can make use of them in josm :)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.