Commits

Bryan Turner committed 07554f8

Adding missing @Override annotations.

- EmptyStringUserType originated in a codebase still supporting Java 5,
so it didn't have @Override annotations on its methods

  • Participants
  • Parent commits 9b0ab79

Comments (0)

Files changed (3)

File atlassian-hibernate3-extras/src/main/java/com/atlassian/hibernate/extras/type/EmptyStringUserType.java

     private static final String EMPTY_STRING = "";
     private static final int[] TYPES = {Types.VARCHAR};
 
+    @Override
     public Object assemble(Serializable cached, Object owner) throws HibernateException
     {
         return deepCopy(cached);
     }
 
+    @Override
     public Object deepCopy(Object value)
     {
         return value;
     }
 
+    @Override
     public Serializable disassemble(Object value)
     {
         return (Serializable) deepCopy(value);
     }
 
+    @Override
     public boolean equals(Object x, Object y)
     {
         return x == y || !(x == null || y == null) && x.equals(y);
     /* (non-Javadoc)
      *  (at) see org (dot) hibernate.usertype.UserType#hashCode(java.lang.Object)
      */
+    @Override
     public int hashCode(Object x) throws HibernateException
     {
         return x.hashCode();
     }
 
+    @Override
     public boolean isMutable()
     {
         return false;
     }
 
+    @Override
     public Object nullSafeGet(ResultSet rs, String[] names, Object owner) throws HibernateException, SQLException
     {
         Object dbValue = Hibernate.STRING.nullSafeGet(rs, names[0]);
         }
     }
 
+    @Override
     public void nullSafeSet(PreparedStatement st, Object value, int index) throws HibernateException, SQLException
     {
         Hibernate.STRING.nullSafeSet(st, value, index);
     /* (non-Javadoc)
      *  (at) see org (dot) hibernate.usertype.UserType#replace(java.lang.Object, java.lang.Object, java.lang.Object)
      */
+    @Override
     public Object replace(Object original, Object target, Object owner) throws HibernateException
     {
         return deepCopy(original);
     }
 
+    @Override
     public Class returnedClass()
     {
         return String.class;
     }
 
+    @Override
     public int[] sqlTypes()
     {
         return TYPES;

File atlassian-hibernate3.6-extras/src/main/java/com/atlassian/hibernate/extras/type/EmptyStringUserType.java

     private static final String EMPTY_STRING = "";
     private static final int[] TYPES = {Types.VARCHAR};
 
+    @Override
     public Object assemble(Serializable cached, Object owner) throws HibernateException
     {
         return deepCopy(cached);
     }
 
+    @Override
     public Object deepCopy(Object value)
     {
         return value;
     }
 
+    @Override
     public Serializable disassemble(Object value)
     {
         return (Serializable) deepCopy(value);
     }
 
+    @Override
     public boolean equals(Object x, Object y)
     {
         return x == y || !(x == null || y == null) && x.equals(y);
     /* (non-Javadoc)
      *  (at) see org (dot) hibernate.usertype.UserType#hashCode(java.lang.Object)
      */
+    @Override
     public int hashCode(Object x) throws HibernateException
     {
         return x.hashCode();
     }
 
+    @Override
     public boolean isMutable()
     {
         return false;
     }
 
+    @Override
     public Object nullSafeGet(ResultSet rs, String[] names, Object owner) throws HibernateException, SQLException
     {
         String dbValue = StandardBasicTypes.STRING.nullSafeGet(rs, names[0]);
         }
     }
 
+    @Override
     public void nullSafeSet(PreparedStatement st, Object value, int index) throws HibernateException, SQLException
     {
         StandardBasicTypes.STRING.nullSafeSet(st, (String) value, index);
     /* (non-Javadoc)
      *  (at) see org (dot) hibernate.usertype.UserType#replace(java.lang.Object, java.lang.Object, java.lang.Object)
      */
+    @Override
     public Object replace(Object original, Object target, Object owner) throws HibernateException
     {
         return deepCopy(original);
     }
 
+    @Override
     public Class returnedClass()
     {
         return String.class;
     }
 
+    @Override
     public int[] sqlTypes()
     {
         return TYPES;

File atlassian-hibernate4-extras/src/main/java/com/atlassian/hibernate/extras/type/EmptyStringUserType.java

     private static final String EMPTY_STRING = "";
     private static final int[] TYPES = {Types.VARCHAR};
 
+    @Override
     public Object assemble(Serializable cached, Object owner) throws HibernateException
     {
         return deepCopy(cached);
     }
 
+    @Override
     public Object deepCopy(Object value)
     {
         return value;
     }
 
+    @Override
     public Serializable disassemble(Object value)
     {
         return (Serializable) deepCopy(value);
     }
 
+    @Override
     public boolean equals(Object x, Object y)
     {
         return x == y || !(x == null || y == null) && x.equals(y);
     /* (non-Javadoc)
      *  (at) see org (dot) hibernate.usertype.UserType#hashCode(java.lang.Object)
      */
+    @Override
     public int hashCode(Object x) throws HibernateException
     {
         return x.hashCode();
     }
 
+    @Override
     public boolean isMutable()
     {
         return false;
     }
 
+    @Override
     public Object nullSafeGet(ResultSet rs, String[] names, SessionImplementor session, Object owner)
             throws HibernateException, SQLException
     {
         }
     }
 
+    @Override
     public void nullSafeSet(PreparedStatement st, Object value, int index, SessionImplementor session)
             throws HibernateException, SQLException
     {
     /* (non-Javadoc)
      *  (at) see org (dot) hibernate.usertype.UserType#replace(java.lang.Object, java.lang.Object, java.lang.Object)
      */
+    @Override
     public Object replace(Object original, Object target, Object owner) throws HibernateException
     {
         return deepCopy(original);
     }
 
+    @Override
     public Class returnedClass()
     {
         return String.class;
     }
 
+    @Override
     public int[] sqlTypes()
     {
         return TYPES;