janhoy commented on a change in pull request #371:
URL: https://github.com/apache/solr/pull/371#discussion_r738234381



##########
File path: 
solr/core/src/java/org/apache/solr/cloud/OverseerSolrResponseSerializer.java
##########
@@ -34,40 +33,22 @@
    * <li>"Unknown" elements for the Javabin format will be serialized as 
Strings. See {@link org.apache.solr.common.util.JavaBinCodec#writeVal}</li>
    * </ul>
    */
-  @SuppressWarnings("deprecation")
   public static byte[] serialize(OverseerSolrResponse responseObject) {
     Objects.requireNonNull(responseObject);
-    if (useUnsafeSerialization()) {
-      return SolrResponse.serializable(responseObject);
-    }
     try {
       return Utils.toJavabin(responseObject.getResponse()).readAllBytes();
     } catch (IOException|RuntimeException e) {
       throw new SolrException(ErrorCode.SERVER_ERROR, "Exception serializing 
response to Javabin", e);
     }
   }
   
-  static boolean useUnsafeSerialization() {
-    String useUnsafeOverseerResponse = 
System.getProperty("solr.useUnsafeOverseerResponse");
-    return useUnsafeOverseerResponse != null && 
("true".equals(useUnsafeOverseerResponse));
-  }
-  
-  static boolean useUnsafeDeserialization() {
-    String useUnsafeOverseerResponse = 
System.getProperty("solr.useUnsafeOverseerResponse");
-    return useUnsafeOverseerResponse != null && 
("true".equals(useUnsafeOverseerResponse) || 
"deserialization".equals(useUnsafeOverseerResponse));
-  }
-
-  @SuppressWarnings("deprecation")
   public static OverseerSolrResponse deserialize(byte[] responseBytes) {
     Objects.requireNonNull(responseBytes);
     try {
       @SuppressWarnings("unchecked")
       NamedList<Object> response = (NamedList<Object>) 
Utils.fromJavabin(responseBytes);
       return new OverseerSolrResponse(response);
     } catch (IOException|RuntimeException e) {
-      if (useUnsafeDeserialization()) {
-        return (OverseerSolrResponse) SolrResponse.deserialize(responseBytes);

Review comment:
       I added a check for the existence of the param with a different 
exception msg, and also a test for it. Marked these as deprecated, so we can 
remove these checks in 10.0




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to