airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From machris...@apache.org
Subject [05/51] [abbrv] [partial] airavata git commit: AIRAVATA-2505 Upgrade Airavata to Thrift 0.10.0
Date Mon, 07 Aug 2017 14:00:41 GMT
http://git-wip-us.apache.org/repos/asf/airavata/blob/14ff0916/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/ValidationResults.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/ValidationResults.java
b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/ValidationResults.java
index 9baedd4..0651523 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/ValidationResults.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/ValidationResults.java
@@ -16,66 +16,36 @@
  */
 
 /**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
  *
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  *  @generated
  */
 package org.apache.airavata.model.error;
 
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
 public class ValidationResults implements org.apache.thrift.TBase<ValidationResults, ValidationResults._Fields>,
java.io.Serializable, Cloneable, Comparable<ValidationResults> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ValidationResults");
 
   private static final org.apache.thrift.protocol.TField VALIDATION_STATE_FIELD_DESC = new
org.apache.thrift.protocol.TField("validationState", org.apache.thrift.protocol.TType.BOOL,
(short)1);
   private static final org.apache.thrift.protocol.TField VALIDATION_RESULT_LIST_FIELD_DESC
= new org.apache.thrift.protocol.TField("validationResultList", org.apache.thrift.protocol.TType.LIST,
(short)2);
 
-  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes =
new HashMap<Class<? extends IScheme>, SchemeFactory>();
-  static {
-    schemes.put(StandardScheme.class, new ValidationResultsStandardSchemeFactory());
-    schemes.put(TupleScheme.class, new ValidationResultsTupleSchemeFactory());
-  }
+  private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new
ValidationResultsStandardSchemeFactory();
+  private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new
ValidationResultsTupleSchemeFactory();
 
   private boolean validationState; // required
-  private List<ValidatorResult> validationResultList; // required
+  private java.util.List<ValidatorResult> validationResultList; // required
 
   /** The set of fields this struct contains, along with convenience methods for finding
and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
     VALIDATION_STATE((short)1, "validationState"),
     VALIDATION_RESULT_LIST((short)2, "validationResultList");
 
-    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+    private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String,
_Fields>();
 
     static {
-      for (_Fields field : EnumSet.allOf(_Fields.class)) {
+      for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
         byName.put(field.getFieldName(), field);
       }
     }
@@ -100,21 +70,21 @@ public class ValidationResults implements org.apache.thrift.TBase<ValidationResu
      */
     public static _Fields findByThriftIdOrThrow(int fieldId) {
       _Fields fields = findByThriftId(fieldId);
-      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't
exist!");
+      if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId
+ " doesn't exist!");
       return fields;
     }
 
     /**
      * Find the _Fields constant that matches name, or null if its not found.
      */
-    public static _Fields findByName(String name) {
+    public static _Fields findByName(java.lang.String name) {
       return byName.get(name);
     }
 
     private final short _thriftId;
-    private final String _fieldName;
+    private final java.lang.String _fieldName;
 
-    _Fields(short thriftId, String fieldName) {
+    _Fields(short thriftId, java.lang.String fieldName) {
       _thriftId = thriftId;
       _fieldName = fieldName;
     }
@@ -123,7 +93,7 @@ public class ValidationResults implements org.apache.thrift.TBase<ValidationResu
       return _thriftId;
     }
 
-    public String getFieldName() {
+    public java.lang.String getFieldName() {
       return _fieldName;
     }
   }
@@ -131,15 +101,15 @@ public class ValidationResults implements org.apache.thrift.TBase<ValidationResu
   // isset id assignments
   private static final int __VALIDATIONSTATE_ISSET_ID = 0;
   private byte __isset_bitfield = 0;
-  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+  public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData>
metaDataMap;
   static {
-    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields,
org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+    java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new
java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
     tmpMap.put(_Fields.VALIDATION_STATE, new org.apache.thrift.meta_data.FieldMetaData("validationState",
org.apache.thrift.TFieldRequirementType.REQUIRED, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
     tmpMap.put(_Fields.VALIDATION_RESULT_LIST, new org.apache.thrift.meta_data.FieldMetaData("validationResultList",
org.apache.thrift.TFieldRequirementType.REQUIRED, 
         new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,

             new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT,
ValidatorResult.class))));
-    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
     org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ValidationResults.class,
metaDataMap);
   }
 
@@ -148,7 +118,7 @@ public class ValidationResults implements org.apache.thrift.TBase<ValidationResu
 
   public ValidationResults(
     boolean validationState,
-    List<ValidatorResult> validationResultList)
+    java.util.List<ValidatorResult> validationResultList)
   {
     this();
     this.validationState = validationState;
@@ -163,7 +133,7 @@ public class ValidationResults implements org.apache.thrift.TBase<ValidationResu
     __isset_bitfield = other.__isset_bitfield;
     this.validationState = other.validationState;
     if (other.isSetValidationResultList()) {
-      List<ValidatorResult> __this__validationResultList = new ArrayList<ValidatorResult>(other.validationResultList.size());
+      java.util.List<ValidatorResult> __this__validationResultList = new java.util.ArrayList<ValidatorResult>(other.validationResultList.size());
       for (ValidatorResult other_element : other.validationResultList) {
         __this__validationResultList.add(new ValidatorResult(other_element));
       }
@@ -192,16 +162,16 @@ public class ValidationResults implements org.apache.thrift.TBase<ValidationResu
   }
 
   public void unsetValidationState() {
-    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __VALIDATIONSTATE_ISSET_ID);
+    __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __VALIDATIONSTATE_ISSET_ID);
   }
 
   /** Returns true if field validationState is set (has been assigned a value) and false
otherwise */
   public boolean isSetValidationState() {
-    return EncodingUtils.testBit(__isset_bitfield, __VALIDATIONSTATE_ISSET_ID);
+    return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __VALIDATIONSTATE_ISSET_ID);
   }
 
   public void setValidationStateIsSet(boolean value) {
-    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __VALIDATIONSTATE_ISSET_ID,
value);
+    __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __VALIDATIONSTATE_ISSET_ID,
value);
   }
 
   public int getValidationResultListSize() {
@@ -214,16 +184,16 @@ public class ValidationResults implements org.apache.thrift.TBase<ValidationResu
 
   public void addToValidationResultList(ValidatorResult elem) {
     if (this.validationResultList == null) {
-      this.validationResultList = new ArrayList<ValidatorResult>();
+      this.validationResultList = new java.util.ArrayList<ValidatorResult>();
     }
     this.validationResultList.add(elem);
   }
 
-  public List<ValidatorResult> getValidationResultList() {
+  public java.util.List<ValidatorResult> getValidationResultList() {
     return this.validationResultList;
   }
 
-  public void setValidationResultList(List<ValidatorResult> validationResultList) {
+  public void setValidationResultList(java.util.List<ValidatorResult> validationResultList)
{
     this.validationResultList = validationResultList;
   }
 
@@ -242,13 +212,13 @@ public class ValidationResults implements org.apache.thrift.TBase<ValidationResu
     }
   }
 
-  public void setFieldValue(_Fields field, Object value) {
+  public void setFieldValue(_Fields field, java.lang.Object value) {
     switch (field) {
     case VALIDATION_STATE:
       if (value == null) {
         unsetValidationState();
       } else {
-        setValidationState((Boolean)value);
+        setValidationState((java.lang.Boolean)value);
       }
       break;
 
@@ -256,14 +226,14 @@ public class ValidationResults implements org.apache.thrift.TBase<ValidationResu
       if (value == null) {
         unsetValidationResultList();
       } else {
-        setValidationResultList((List<ValidatorResult>)value);
+        setValidationResultList((java.util.List<ValidatorResult>)value);
       }
       break;
 
     }
   }
 
-  public Object getFieldValue(_Fields field) {
+  public java.lang.Object getFieldValue(_Fields field) {
     switch (field) {
     case VALIDATION_STATE:
       return isValidationState();
@@ -272,13 +242,13 @@ public class ValidationResults implements org.apache.thrift.TBase<ValidationResu
       return getValidationResultList();
 
     }
-    throw new IllegalStateException();
+    throw new java.lang.IllegalStateException();
   }
 
   /** Returns true if field corresponding to fieldID is set (has been assigned a value) and
false otherwise */
   public boolean isSet(_Fields field) {
     if (field == null) {
-      throw new IllegalArgumentException();
+      throw new java.lang.IllegalArgumentException();
     }
 
     switch (field) {
@@ -287,11 +257,11 @@ public class ValidationResults implements org.apache.thrift.TBase<ValidationResu
     case VALIDATION_RESULT_LIST:
       return isSetValidationResultList();
     }
-    throw new IllegalStateException();
+    throw new java.lang.IllegalStateException();
   }
 
   @Override
-  public boolean equals(Object that) {
+  public boolean equals(java.lang.Object that) {
     if (that == null)
       return false;
     if (that instanceof ValidationResults)
@@ -302,6 +272,8 @@ public class ValidationResults implements org.apache.thrift.TBase<ValidationResu
   public boolean equals(ValidationResults that) {
     if (that == null)
       return false;
+    if (this == that)
+      return true;
 
     boolean this_present_validationState = true;
     boolean that_present_validationState = true;
@@ -326,19 +298,15 @@ public class ValidationResults implements org.apache.thrift.TBase<ValidationResu
 
   @Override
   public int hashCode() {
-    List<Object> list = new ArrayList<Object>();
+    int hashCode = 1;
 
-    boolean present_validationState = true;
-    list.add(present_validationState);
-    if (present_validationState)
-      list.add(validationState);
+    hashCode = hashCode * 8191 + ((validationState) ? 131071 : 524287);
 
-    boolean present_validationResultList = true && (isSetValidationResultList());
-    list.add(present_validationResultList);
-    if (present_validationResultList)
-      list.add(validationResultList);
+    hashCode = hashCode * 8191 + ((isSetValidationResultList()) ? 131071 : 524287);
+    if (isSetValidationResultList())
+      hashCode = hashCode * 8191 + validationResultList.hashCode();
 
-    return list.hashCode();
+    return hashCode;
   }
 
   @Override
@@ -349,7 +317,7 @@ public class ValidationResults implements org.apache.thrift.TBase<ValidationResu
 
     int lastComparison = 0;
 
-    lastComparison = Boolean.valueOf(isSetValidationState()).compareTo(other.isSetValidationState());
+    lastComparison = java.lang.Boolean.valueOf(isSetValidationState()).compareTo(other.isSetValidationState());
     if (lastComparison != 0) {
       return lastComparison;
     }
@@ -359,7 +327,7 @@ public class ValidationResults implements org.apache.thrift.TBase<ValidationResu
         return lastComparison;
       }
     }
-    lastComparison = Boolean.valueOf(isSetValidationResultList()).compareTo(other.isSetValidationResultList());
+    lastComparison = java.lang.Boolean.valueOf(isSetValidationResultList()).compareTo(other.isSetValidationResultList());
     if (lastComparison != 0) {
       return lastComparison;
     }
@@ -377,16 +345,16 @@ public class ValidationResults implements org.apache.thrift.TBase<ValidationResu
   }
 
   public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException
{
-    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+    scheme(iprot).read(iprot, this);
   }
 
   public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException
{
-    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+    scheme(oprot).write(oprot, this);
   }
 
   @Override
-  public String toString() {
-    StringBuilder sb = new StringBuilder("ValidationResults(");
+  public java.lang.String toString() {
+    java.lang.StringBuilder sb = new java.lang.StringBuilder("ValidationResults(");
     boolean first = true;
 
     sb.append("validationState:");
@@ -425,7 +393,7 @@ public class ValidationResults implements org.apache.thrift.TBase<ValidationResu
     }
   }
 
-  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException
{
+  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException
{
     try {
       // it doesn't seem like you should have to do this, but java serialization is wacky,
and doesn't call the default constructor.
       __isset_bitfield = 0;
@@ -435,13 +403,13 @@ public class ValidationResults implements org.apache.thrift.TBase<ValidationResu
     }
   }
 
-  private static class ValidationResultsStandardSchemeFactory implements SchemeFactory {
+  private static class ValidationResultsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory
{
     public ValidationResultsStandardScheme getScheme() {
       return new ValidationResultsStandardScheme();
     }
   }
 
-  private static class ValidationResultsStandardScheme extends StandardScheme<ValidationResults>
{
+  private static class ValidationResultsStandardScheme extends org.apache.thrift.scheme.StandardScheme<ValidationResults>
{
 
     public void read(org.apache.thrift.protocol.TProtocol iprot, ValidationResults struct)
throws org.apache.thrift.TException {
       org.apache.thrift.protocol.TField schemeField;
@@ -465,7 +433,7 @@ public class ValidationResults implements org.apache.thrift.TBase<ValidationResu
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
                 org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
-                struct.validationResultList = new ArrayList<ValidatorResult>(_list0.size);
+                struct.validationResultList = new java.util.ArrayList<ValidatorResult>(_list0.size);
                 ValidatorResult _elem1;
                 for (int _i2 = 0; _i2 < _list0.size; ++_i2)
                 {
@@ -514,17 +482,17 @@ public class ValidationResults implements org.apache.thrift.TBase<ValidationResu
 
   }
 
-  private static class ValidationResultsTupleSchemeFactory implements SchemeFactory {
+  private static class ValidationResultsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory
{
     public ValidationResultsTupleScheme getScheme() {
       return new ValidationResultsTupleScheme();
     }
   }
 
-  private static class ValidationResultsTupleScheme extends TupleScheme<ValidationResults>
{
+  private static class ValidationResultsTupleScheme extends org.apache.thrift.scheme.TupleScheme<ValidationResults>
{
 
     @Override
     public void write(org.apache.thrift.protocol.TProtocol prot, ValidationResults struct)
throws org.apache.thrift.TException {
-      TTupleProtocol oprot = (TTupleProtocol) prot;
+      org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol)
prot;
       oprot.writeBool(struct.validationState);
       {
         oprot.writeI32(struct.validationResultList.size());
@@ -537,12 +505,12 @@ public class ValidationResults implements org.apache.thrift.TBase<ValidationResu
 
     @Override
     public void read(org.apache.thrift.protocol.TProtocol prot, ValidationResults struct)
throws org.apache.thrift.TException {
-      TTupleProtocol iprot = (TTupleProtocol) prot;
+      org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol)
prot;
       struct.validationState = iprot.readBool();
       struct.setValidationStateIsSet(true);
       {
         org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT,
iprot.readI32());
-        struct.validationResultList = new ArrayList<ValidatorResult>(_list5.size);
+        struct.validationResultList = new java.util.ArrayList<ValidatorResult>(_list5.size);
         ValidatorResult _elem6;
         for (int _i7 = 0; _i7 < _list5.size; ++_i7)
         {
@@ -555,5 +523,8 @@ public class ValidationResults implements org.apache.thrift.TBase<ValidationResu
     }
   }
 
+  private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol
proto) {
+    return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY
: TUPLE_SCHEME_FACTORY).getScheme();
+  }
 }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/14ff0916/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/ValidatorResult.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/ValidatorResult.java
b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/ValidatorResult.java
index e3de8dc..94c18a7 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/ValidatorResult.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/ValidatorResult.java
@@ -16,66 +16,36 @@
  */
 
 /**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
  *
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  *  @generated
  */
 package org.apache.airavata.model.error;
 
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
 public class ValidatorResult implements org.apache.thrift.TBase<ValidatorResult, ValidatorResult._Fields>,
java.io.Serializable, Cloneable, Comparable<ValidatorResult> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ValidatorResult");
 
   private static final org.apache.thrift.protocol.TField RESULT_FIELD_DESC = new org.apache.thrift.protocol.TField("result",
org.apache.thrift.protocol.TType.BOOL, (short)1);
   private static final org.apache.thrift.protocol.TField ERROR_DETAILS_FIELD_DESC = new org.apache.thrift.protocol.TField("errorDetails",
org.apache.thrift.protocol.TType.STRING, (short)2);
 
-  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes =
new HashMap<Class<? extends IScheme>, SchemeFactory>();
-  static {
-    schemes.put(StandardScheme.class, new ValidatorResultStandardSchemeFactory());
-    schemes.put(TupleScheme.class, new ValidatorResultTupleSchemeFactory());
-  }
+  private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new
ValidatorResultStandardSchemeFactory();
+  private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new
ValidatorResultTupleSchemeFactory();
 
   private boolean result; // required
-  private String errorDetails; // optional
+  private java.lang.String errorDetails; // optional
 
   /** The set of fields this struct contains, along with convenience methods for finding
and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
     RESULT((short)1, "result"),
     ERROR_DETAILS((short)2, "errorDetails");
 
-    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+    private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String,
_Fields>();
 
     static {
-      for (_Fields field : EnumSet.allOf(_Fields.class)) {
+      for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
         byName.put(field.getFieldName(), field);
       }
     }
@@ -100,21 +70,21 @@ public class ValidatorResult implements org.apache.thrift.TBase<ValidatorResult,
      */
     public static _Fields findByThriftIdOrThrow(int fieldId) {
       _Fields fields = findByThriftId(fieldId);
-      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't
exist!");
+      if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId
+ " doesn't exist!");
       return fields;
     }
 
     /**
      * Find the _Fields constant that matches name, or null if its not found.
      */
-    public static _Fields findByName(String name) {
+    public static _Fields findByName(java.lang.String name) {
       return byName.get(name);
     }
 
     private final short _thriftId;
-    private final String _fieldName;
+    private final java.lang.String _fieldName;
 
-    _Fields(short thriftId, String fieldName) {
+    _Fields(short thriftId, java.lang.String fieldName) {
       _thriftId = thriftId;
       _fieldName = fieldName;
     }
@@ -123,7 +93,7 @@ public class ValidatorResult implements org.apache.thrift.TBase<ValidatorResult,
       return _thriftId;
     }
 
-    public String getFieldName() {
+    public java.lang.String getFieldName() {
       return _fieldName;
     }
   }
@@ -132,14 +102,14 @@ public class ValidatorResult implements org.apache.thrift.TBase<ValidatorResult,
   private static final int __RESULT_ISSET_ID = 0;
   private byte __isset_bitfield = 0;
   private static final _Fields optionals[] = {_Fields.ERROR_DETAILS};
-  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+  public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData>
metaDataMap;
   static {
-    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields,
org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+    java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new
java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
     tmpMap.put(_Fields.RESULT, new org.apache.thrift.meta_data.FieldMetaData("result", org.apache.thrift.TFieldRequirementType.REQUIRED,

         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
     tmpMap.put(_Fields.ERROR_DETAILS, new org.apache.thrift.meta_data.FieldMetaData("errorDetails",
org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
     org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ValidatorResult.class,
metaDataMap);
   }
 
@@ -186,23 +156,23 @@ public class ValidatorResult implements org.apache.thrift.TBase<ValidatorResult,
   }
 
   public void unsetResult() {
-    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RESULT_ISSET_ID);
+    __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __RESULT_ISSET_ID);
   }
 
   /** Returns true if field result is set (has been assigned a value) and false otherwise
*/
   public boolean isSetResult() {
-    return EncodingUtils.testBit(__isset_bitfield, __RESULT_ISSET_ID);
+    return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __RESULT_ISSET_ID);
   }
 
   public void setResultIsSet(boolean value) {
-    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RESULT_ISSET_ID, value);
+    __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __RESULT_ISSET_ID,
value);
   }
 
-  public String getErrorDetails() {
+  public java.lang.String getErrorDetails() {
     return this.errorDetails;
   }
 
-  public void setErrorDetails(String errorDetails) {
+  public void setErrorDetails(java.lang.String errorDetails) {
     this.errorDetails = errorDetails;
   }
 
@@ -221,13 +191,13 @@ public class ValidatorResult implements org.apache.thrift.TBase<ValidatorResult,
     }
   }
 
-  public void setFieldValue(_Fields field, Object value) {
+  public void setFieldValue(_Fields field, java.lang.Object value) {
     switch (field) {
     case RESULT:
       if (value == null) {
         unsetResult();
       } else {
-        setResult((Boolean)value);
+        setResult((java.lang.Boolean)value);
       }
       break;
 
@@ -235,14 +205,14 @@ public class ValidatorResult implements org.apache.thrift.TBase<ValidatorResult,
       if (value == null) {
         unsetErrorDetails();
       } else {
-        setErrorDetails((String)value);
+        setErrorDetails((java.lang.String)value);
       }
       break;
 
     }
   }
 
-  public Object getFieldValue(_Fields field) {
+  public java.lang.Object getFieldValue(_Fields field) {
     switch (field) {
     case RESULT:
       return isResult();
@@ -251,13 +221,13 @@ public class ValidatorResult implements org.apache.thrift.TBase<ValidatorResult,
       return getErrorDetails();
 
     }
-    throw new IllegalStateException();
+    throw new java.lang.IllegalStateException();
   }
 
   /** Returns true if field corresponding to fieldID is set (has been assigned a value) and
false otherwise */
   public boolean isSet(_Fields field) {
     if (field == null) {
-      throw new IllegalArgumentException();
+      throw new java.lang.IllegalArgumentException();
     }
 
     switch (field) {
@@ -266,11 +236,11 @@ public class ValidatorResult implements org.apache.thrift.TBase<ValidatorResult,
     case ERROR_DETAILS:
       return isSetErrorDetails();
     }
-    throw new IllegalStateException();
+    throw new java.lang.IllegalStateException();
   }
 
   @Override
-  public boolean equals(Object that) {
+  public boolean equals(java.lang.Object that) {
     if (that == null)
       return false;
     if (that instanceof ValidatorResult)
@@ -281,6 +251,8 @@ public class ValidatorResult implements org.apache.thrift.TBase<ValidatorResult,
   public boolean equals(ValidatorResult that) {
     if (that == null)
       return false;
+    if (this == that)
+      return true;
 
     boolean this_present_result = true;
     boolean that_present_result = true;
@@ -305,19 +277,15 @@ public class ValidatorResult implements org.apache.thrift.TBase<ValidatorResult,
 
   @Override
   public int hashCode() {
-    List<Object> list = new ArrayList<Object>();
+    int hashCode = 1;
 
-    boolean present_result = true;
-    list.add(present_result);
-    if (present_result)
-      list.add(result);
+    hashCode = hashCode * 8191 + ((result) ? 131071 : 524287);
 
-    boolean present_errorDetails = true && (isSetErrorDetails());
-    list.add(present_errorDetails);
-    if (present_errorDetails)
-      list.add(errorDetails);
+    hashCode = hashCode * 8191 + ((isSetErrorDetails()) ? 131071 : 524287);
+    if (isSetErrorDetails())
+      hashCode = hashCode * 8191 + errorDetails.hashCode();
 
-    return list.hashCode();
+    return hashCode;
   }
 
   @Override
@@ -328,7 +296,7 @@ public class ValidatorResult implements org.apache.thrift.TBase<ValidatorResult,
 
     int lastComparison = 0;
 
-    lastComparison = Boolean.valueOf(isSetResult()).compareTo(other.isSetResult());
+    lastComparison = java.lang.Boolean.valueOf(isSetResult()).compareTo(other.isSetResult());
     if (lastComparison != 0) {
       return lastComparison;
     }
@@ -338,7 +306,7 @@ public class ValidatorResult implements org.apache.thrift.TBase<ValidatorResult,
         return lastComparison;
       }
     }
-    lastComparison = Boolean.valueOf(isSetErrorDetails()).compareTo(other.isSetErrorDetails());
+    lastComparison = java.lang.Boolean.valueOf(isSetErrorDetails()).compareTo(other.isSetErrorDetails());
     if (lastComparison != 0) {
       return lastComparison;
     }
@@ -356,16 +324,16 @@ public class ValidatorResult implements org.apache.thrift.TBase<ValidatorResult,
   }
 
   public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException
{
-    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+    scheme(iprot).read(iprot, this);
   }
 
   public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException
{
-    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+    scheme(oprot).write(oprot, this);
   }
 
   @Override
-  public String toString() {
-    StringBuilder sb = new StringBuilder("ValidatorResult(");
+  public java.lang.String toString() {
+    java.lang.StringBuilder sb = new java.lang.StringBuilder("ValidatorResult(");
     boolean first = true;
 
     sb.append("result:");
@@ -402,7 +370,7 @@ public class ValidatorResult implements org.apache.thrift.TBase<ValidatorResult,
     }
   }
 
-  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException
{
+  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException
{
     try {
       // it doesn't seem like you should have to do this, but java serialization is wacky,
and doesn't call the default constructor.
       __isset_bitfield = 0;
@@ -412,13 +380,13 @@ public class ValidatorResult implements org.apache.thrift.TBase<ValidatorResult,
     }
   }
 
-  private static class ValidatorResultStandardSchemeFactory implements SchemeFactory {
+  private static class ValidatorResultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory
{
     public ValidatorResultStandardScheme getScheme() {
       return new ValidatorResultStandardScheme();
     }
   }
 
-  private static class ValidatorResultStandardScheme extends StandardScheme<ValidatorResult>
{
+  private static class ValidatorResultStandardScheme extends org.apache.thrift.scheme.StandardScheme<ValidatorResult>
{
 
     public void read(org.apache.thrift.protocol.TProtocol iprot, ValidatorResult struct)
throws org.apache.thrift.TException {
       org.apache.thrift.protocol.TField schemeField;
@@ -475,19 +443,19 @@ public class ValidatorResult implements org.apache.thrift.TBase<ValidatorResult,
 
   }
 
-  private static class ValidatorResultTupleSchemeFactory implements SchemeFactory {
+  private static class ValidatorResultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory
{
     public ValidatorResultTupleScheme getScheme() {
       return new ValidatorResultTupleScheme();
     }
   }
 
-  private static class ValidatorResultTupleScheme extends TupleScheme<ValidatorResult>
{
+  private static class ValidatorResultTupleScheme extends org.apache.thrift.scheme.TupleScheme<ValidatorResult>
{
 
     @Override
     public void write(org.apache.thrift.protocol.TProtocol prot, ValidatorResult struct)
throws org.apache.thrift.TException {
-      TTupleProtocol oprot = (TTupleProtocol) prot;
+      org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol)
prot;
       oprot.writeBool(struct.result);
-      BitSet optionals = new BitSet();
+      java.util.BitSet optionals = new java.util.BitSet();
       if (struct.isSetErrorDetails()) {
         optionals.set(0);
       }
@@ -499,10 +467,10 @@ public class ValidatorResult implements org.apache.thrift.TBase<ValidatorResult,
 
     @Override
     public void read(org.apache.thrift.protocol.TProtocol prot, ValidatorResult struct) throws
org.apache.thrift.TException {
-      TTupleProtocol iprot = (TTupleProtocol) prot;
+      org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol)
prot;
       struct.result = iprot.readBool();
       struct.setResultIsSet(true);
-      BitSet incoming = iprot.readBitSet(1);
+      java.util.BitSet incoming = iprot.readBitSet(1);
       if (incoming.get(0)) {
         struct.errorDetails = iprot.readString();
         struct.setErrorDetailsIsSet(true);
@@ -510,5 +478,8 @@ public class ValidatorResult implements org.apache.thrift.TBase<ValidatorResult,
     }
   }
 
+  private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol
proto) {
+    return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY
: TUPLE_SCHEME_FACTORY).getScheme();
+  }
 }
 


Mime
View raw message