﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
12888	cannot download the french cadastre using the plugin cadastre.	anonymous	pieren	"==== What steps will reproduce the problem?
1. load the map for Saint Bonnet les oules in france
2. choose ""grab cadastre"" from Cadastre
3. Choose the town and departement you want to laod (saint bonnet les oules 42)

==== What is the expected result?
The cadastre should be loaded

==== What happens instead?
I get the window : ""unexpected exception that may have come from 'Cadastre-fr' plugin.....""
then 'update plugin' 'disable plugin' 'keep plugin' 'Help'

If I try updating the plugin nothing happens. 

Of course if I retry downloading the cadastre after that I get the normal window 'Contacting wms server' and nothing happen the plugin being hanged 

==== Please provide any additional information below. Attach a screenshot if possible.

{{{
URL:http://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2016-05-02 10:23:17 +0200 (Mon, 02 May 2016)
Build-Date:2016-05-03 01:31:45
Revision:10168
Relative:URL: ^/trunk

Identification: JOSM/1.5 (10168 en) Linux Ubuntu 15.10
Memory Usage: 640 MB / 1778 MB (482 MB allocated, but free)
Java version: 1.8.0_91-b14, Oracle Corporation, Java HotSpot(TM) Server VM
Dataset consistency test: No problems found

Plugins:
- Mapillary (32040)
- apache-commons (31895)
- apache-http (31895)
- buildings_tools (31895)
- cadastre-fr (32165)
- ejml (31895)
- geotools (31895)
- jts (31772)
- undelete (32158)

Last errors/warnings:
- E: java.lang.StringIndexOutOfBoundsException: String index out of range: -1

java.lang.StringIndexOutOfBoundsException: String index out of range: -1
	at java.lang.String.substring(String.java:1967)
	at cadastre_fr.CadastreInterface.getCookie(CadastreInterface.java:124)
	at cadastre_fr.CadastreInterface.retrieveInterface(CadastreInterface.java:81)
	at cadastre_fr.DownloadWMSVectorImage.realRun(DownloadWMSVectorImage.java:33)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:93)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:161)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
}}}
"	defect	closed	normal		Plugin cadastre-fr		duplicate	template_report	
