BCStyle contains
DefaultLookUp.put("jurisdictionCountry", JURISDICTION_C);
DefaultLookUp.put("jurisdictionState", JURISDICTION_ST);
DefaultLookUp.put("jurisdictionLocality", JURISDICTION_L);
but this is wrong, the keys has to be lowercase jurisdictioncountry instead of jurisdictionCountry,...
I tested a simple fix in my application with
public static class MyStyle extends BCStyle {
public MyStyle() {
super();
this.defaultLookUp.put("jurisdictioncountry", JURISDICTION_C);
this.defaultLookUp.put("jurisdictionstate", JURISDICTION_ST);
this.defaultLookUp.put("jurisdictionlocality", JURISDICTION_L);
}
}
whcih works perfectly. all ohter default lookups are lowercase only the 3 jurisitcations are not.
the probm is the IETFUtils decodeAttrName whcih seams to not work wrok if the lookup contains upcates chars
public class ScratchTest {
@Test
void myStyle() { // this works
var name1 = new MyStyle().attrNameToOID("jurisdictionstate");
Assertions.assertNotNull(name1);
var name2 = new MyStyle().attrNameToOID("jurisdictionState");
Assertions.assertNotNull(name2);
}
@Test // this fails
void bcStyle() {
var name = BCStyle.INSTANCE.attrNameToOID("jurisdictionstate");
Assertions.assertNotNull(name);
}
public static class MyStyle extends BCStyle {
public MyStyle() {
super();
this.defaultLookUp.put("jurisdictioncountry", JURISDICTION_C);
this.defaultLookUp.put("jurisdictionstate", JURISDICTION_ST);
this.defaultLookUp.put("jurisdictionlocality", JURISDICTION_L);
}
}
}
`
BCStyle contains
but this is wrong, the keys has to be lowercase jurisdictioncountry instead of jurisdictionCountry,...
I tested a simple fix in my application with
whcih works perfectly. all ohter default lookups are lowercase only the 3 jurisitcations are not.
the probm is the IETFUtils decodeAttrName whcih seams to not work wrok if the lookup contains upcates chars
`