Fix NPE in OpenSslEngine

This commit is contained in:
Trustin Lee 2014-05-21 20:02:15 +09:00
parent cf3e4e7043
commit 46ed3d4c97

View File

@ -808,7 +808,11 @@ public final class OpenSslEngine extends SSLEngine {
if (applicationProtocol == null) { if (applicationProtocol == null) {
applicationProtocol = fallbackApplicationProtocol; applicationProtocol = fallbackApplicationProtocol;
} }
this.applicationProtocol = applicationProtocol.replace(':', '_'); if (applicationProtocol != null) {
this.applicationProtocol = applicationProtocol.replace(':', '_');
} else {
this.applicationProtocol = null;
}
return FINISHED; return FINISHED;
} }