Browser js console warning: unreachable code after return statement
nicolaichuk opened this issue · 3 comments
nicolaichuk commented
When i start my application in browser js console i see warning
unreachable code after return statement
for this generate js code:
dragomeJs.StringInit$$init_$void = function()
{
return "";
return this;
};
dragomeJs.StringInit$$init____java_lang_String$void = function(value)
{
return value.$toString$java_lang_String();
return this;
};
dragomeJs.StringInit$$init____char_ARRAYTYPE$void = function(data)
{
return java_lang_String.$valueOf___char_ARRAYTYPE$java_lang_String(data);
return this;
};
dragomeJs.StringInit$$init____char_ARRAYTYPE__int__int$void = function(data, offset, count)
{
return java_lang_String.$valueOf___char_ARRAYTYPE__int__int$java_lang_String(data, offset, count);
return this;
};
dragomeJs.StringInit$$init____byte_ARRAYTYPE__int__int__java_lang_String$void = function(bytes, offset, count, enc)
{
return java_lang_String.$init___byte_ARRAYTYPE__int__int__java_lang_String$java_lang_String(bytes, offset, count, enc);
return this;
};
dragomeJs.StringInit$$init____byte_ARRAYTYPE__java_lang_String$void = function(bytes, enc)
{
return java_lang_String.$init___byte_ARRAYTYPE__int__int__java_lang_String$java_lang_String(bytes, 0, bytes.length, enc);
return this;
};
dragomeJs.StringInit$$init____byte_ARRAYTYPE__int__int$void = function(bytes, offset, count)
{
return java_lang_String.$init___byte_ARRAYTYPE__int__int__java_lang_String$java_lang_String(bytes, offset, count, null);
return this;
};
dragomeJs.StringInit$$init____byte_ARRAYTYPE$void = function(bytes)
{
return java_lang_String.$init___byte_ARRAYTYPE__int__int__java_lang_String$java_lang_String(bytes, 0, bytes.length, null);
return this;
};
dragomeJs.StringInit$$init____java_lang_StringBuffer$void = function(buffer)
{
return buffer.$toString$java_lang_String();
return this;
};
All string function have dublicate return statement.
@fpetrola @xpenatan i see that you something done in string dragome/dragome-sdk@71a458b
Can you also fix this warning?
xpenatan commented
This bug related to dragomesdk. Ive seem this some time ago. Post it here https://github.com/dragome/dragome-sdk/issues
nicolaichuk commented
Done. dragome/dragome-sdk#146
fpetrola commented
fixed in dragome/dragome-sdk@e3fd2f1