Hi,
I dont really know if this is a bug or not.
But if I use a key that does not exist with a map it returns a "null" instead of the generic Null.
B4X:
Dim imgFile As String
imgFile = MimeTypeMap.Get(db.GetFileExt(sft.FilePath))
If imgFile= Null OR imgFile = "null" Then
imgFile = MimeTypeMap.Get("default")
End If
Dim m As Map
m.Initialize
Dim s, t As String
Dim o As Object
o = m.Get("bill")
If o = Null Then
t = "null"
Else
t = "not null"
End If
s = m.Get("fred")
Msgbox(s & CRLF & t,"")
The Java static valueOf method is documented to return "null" if given a null. I don't know why Erel chose valueOf for string conversions instead of toString.