PL-7445 Remove empty class comments

This commit is contained in:
Yuriy Artamonov 2016-06-28 15:49:47 +04:00
parent 11de3cdc91
commit 7a6db2cdd4
32 changed files with 51 additions and 37 deletions

View File

@ -228,6 +228,7 @@ public class ClusterManager implements ClusterManagerAPI, AppContext.Listener {
return globalConfig.getWebContextName() + ".jgroups"; return globalConfig.getWebContextName() + ".jgroups";
} }
@Override
public int getActiveThreadsCount() { public int getActiveThreadsCount() {
return executor.getActiveCount(); return executor.getActiveCount();
} }
@ -294,6 +295,7 @@ public class ClusterManager implements ClusterManagerAPI, AppContext.Listener {
return clusterStateStat.toString(); return clusterStateStat.toString();
} }
@Override
public String printMessagesStat() { public String printMessagesStat() {
StringBuilder messagesStats = new StringBuilder(); StringBuilder messagesStats = new StringBuilder();
for (Map.Entry<String, MessageStat> entry : messagesStat.entrySet()) { for (Map.Entry<String, MessageStat> entry : messagesStat.entrySet()) {

View File

@ -59,6 +59,7 @@ public class EmailSender implements EmailSenderAPI {
this.mailSender = mailSender; this.mailSender = mailSender;
} }
@Override
public void sendEmail(SendingMessage sendingMessage) throws MessagingException { public void sendEmail(SendingMessage sendingMessage) throws MessagingException {
MimeMessage msg = createMimeMessage(sendingMessage); MimeMessage msg = createMimeMessage(sendingMessage);

View File

@ -182,6 +182,7 @@ public class DynamicAttributesManager implements DynamicAttributesManagerAPI {
return targetMetaClass; return targetMetaClass;
} }
@Override
public void storeDynamicAttributes(BaseGenericIdEntity entity) { public void storeDynamicAttributes(BaseGenericIdEntity entity) {
if (persistence.isInTransaction()) { if (persistence.isInTransaction()) {
doStoreDynamicAttributes(entity); doStoreDynamicAttributes(entity);
@ -196,6 +197,7 @@ public class DynamicAttributesManager implements DynamicAttributesManagerAPI {
} }
} }
@Override
public <E extends BaseGenericIdEntity> void fetchDynamicAttributes(List<E> entities) { public <E extends BaseGenericIdEntity> void fetchDynamicAttributes(List<E> entities) {
if (persistence.isInTransaction()) { if (persistence.isInTransaction()) {
doFetchDynamicAttributes(entities); doFetchDynamicAttributes(entities);

View File

@ -94,6 +94,7 @@ public class Emailer implements EmailerMBean {
return config.getSmtpStarttlsEnable(); return config.getSmtpStarttlsEnable();
} }
@Override
public boolean getSmtpSslEnabled() { public boolean getSmtpSslEnabled() {
return config.getSmtpSslEnabled(); return config.getSmtpSslEnabled();
} }

View File

@ -97,17 +97,21 @@ public class EntityCacheRemoteConnection extends BroadcastRemoteConnection {
processReceivedObject(object, ""); processReceivedObject(object, "");
} }
@Override
protected boolean areAllResourcesFreedOnClose() { protected boolean areAllResourcesFreedOnClose() {
return !isLocal(); return !isLocal();
} }
@Override
protected void closeInternal() { protected void closeInternal() {
} }
@Override
protected void createDisplayString() { protected void createDisplayString() {
this.displayString = Helper.getShortClassName(this) + "[" + serviceId.toString() + "]"; this.displayString = Helper.getShortClassName(this) + "[" + serviceId.toString() + "]";
} }
@Override
protected boolean shouldCheckServiceId() { protected boolean shouldCheckServiceId() {
return false; return false;
} }
@ -131,4 +135,4 @@ public class EntityCacheRemoteConnection extends BroadcastRemoteConnection {
'}'; '}';
} }
} }
} }

View File

@ -239,6 +239,7 @@ public class UserSessionManager implements UserSessionFinder {
* @param sessionId session's ID * @param sessionId session's ID
* @return session instance or null if not found * @return session instance or null if not found
*/ */
@Override
public UserSession findSession(UUID sessionId) { public UserSession findSession(UUID sessionId) {
return sessions.get(sessionId, false); return sessions.get(sessionId, false);
} }

View File

@ -39,10 +39,12 @@ public class TestListener implements
public static final List<String> events = new ArrayList<>(); public static final List<String> events = new ArrayList<>();
@Override
public void onAfterInsert(Server entity) { public void onAfterInsert(Server entity) {
events.add("onAfterInsert: " + entity.getId()); events.add("onAfterInsert: " + entity.getId());
} }
@Override
public void onAfterUpdate(Server entity) { public void onAfterUpdate(Server entity) {
events.add("onAfterUpdate: " + entity.getId()); events.add("onAfterUpdate: " + entity.getId());
@ -75,7 +77,8 @@ public class TestListener implements
} }
} }
@Override
public void onAfterDelete(Server entity) { public void onAfterDelete(Server entity) {
events.add("onAfterDelete: " + entity.getId()); events.add("onAfterDelete: " + entity.getId());
} }
} }

View File

@ -35,8 +35,6 @@ import java.util.HashSet;
import static org.junit.Assert.*; import static org.junit.Assert.*;
/**
*/
public class SoftDeleteMany2ManyTest { public class SoftDeleteMany2ManyTest {
@ClassRule @ClassRule

View File

@ -23,8 +23,6 @@ import com.haulmont.cuba.core.global.DeletePolicy;
import javax.persistence.*; import javax.persistence.*;
import java.util.Set; import java.util.Set;
/**
*/
@Entity(name = "test$Many2ManyA") @Entity(name = "test$Many2ManyA")
@Table(name = "TEST_MANY2MANY_A") @Table(name = "TEST_MANY2MANY_A")
public class Many2ManyA extends StandardEntity { public class Many2ManyA extends StandardEntity {

View File

@ -25,8 +25,6 @@ import javax.persistence.ManyToMany;
import javax.persistence.Table; import javax.persistence.Table;
import java.util.Set; import java.util.Set;
/**
*/
@Entity(name = "test$Many2ManyB") @Entity(name = "test$Many2ManyB")
@Table(name = "TEST_MANY2MANY_B") @Table(name = "TEST_MANY2MANY_B")
public class Many2ManyB extends StandardEntity { public class Many2ManyB extends StandardEntity {

View File

@ -95,10 +95,12 @@ public abstract class DesktopAbstractUploadComponent<T extends JComponent>
return dropZone; return dropZone;
} }
@Override
public String getDropZonePrompt() { public String getDropZonePrompt() {
return dropZonePrompt; return dropZonePrompt;
} }
@Override
public void setDropZonePrompt(String dropZonePrompt) { public void setDropZonePrompt(String dropZonePrompt) {
this.dropZonePrompt = dropZonePrompt; this.dropZonePrompt = dropZonePrompt;
} }

View File

@ -650,11 +650,13 @@ public class DesktopTokenList extends DesktopAbstractField<JPanel> implements To
return editable; return editable;
} }
@Override
public void setEnabled(boolean enabled) { public void setEnabled(boolean enabled) {
this.enabled = enabled; this.enabled = enabled;
removeButton.setEnabled(enabled); removeButton.setEnabled(enabled);
} }
@Override
public boolean isEnabled() { public boolean isEnabled() {
return enabled; return enabled;
} }

View File

@ -52,6 +52,7 @@ public class DatePicker extends JXDatePicker {
setUI(new CustomDatePickerUI()); setUI(new CustomDatePickerUI());
} }
@Override
public void setEditor(final JFormattedTextField editor) { public void setEditor(final JFormattedTextField editor) {
final int ENTER_CODE = 10; final int ENTER_CODE = 10;
@ -89,6 +90,7 @@ public class DatePicker extends JXDatePicker {
setFormats(format); setFormats(format);
} }
@Override
public void setLinkDay(Date linkDay) { public void setLinkDay(Date linkDay) {
MessageFormat todayFormat = new MessageFormat(AppBeans.get(Messages.class).getMessage("com.haulmont.cuba.desktop", "DatePicker.linkFormat")); MessageFormat todayFormat = new MessageFormat(AppBeans.get(Messages.class).getMessage("com.haulmont.cuba.desktop", "DatePicker.linkFormat"));
todayFormat.setFormat(0, new SimpleDateFormat(Datatypes.getFormatStrings(AppBeans.get(UserSessionSource.class).getLocale()).getDateFormat())); todayFormat.setFormat(0, new SimpleDateFormat(Datatypes.getFormatStrings(AppBeans.get(UserSessionSource.class).getLocale()).getDateFormat()));
@ -96,6 +98,7 @@ public class DatePicker extends JXDatePicker {
super.setLinkDay(linkDay); super.setLinkDay(linkDay);
} }
@Override
public void setFormats(String... formats) { public void setFormats(String... formats) {
super.setFormats(formats); super.setFormats(formats);
format = formats[0]; format = formats[0];
@ -108,6 +111,7 @@ public class DatePicker extends JXDatePicker {
getEditor().setValue(prevVal); getEditor().setValue(prevVal);
} }
@Override
public void setFormats(DateFormat... formats) { public void setFormats(DateFormat... formats) {
if (formats != null) { if (formats != null) {
Contract.asNotNull(formats, "the array of formats " + "must not contain null elements"); Contract.asNotNull(formats, "the array of formats " + "must not contain null elements");
@ -133,6 +137,7 @@ public class DatePicker extends JXDatePicker {
return mask.toString(); return mask.toString();
} }
@Override
public DateFormat[] getFormats() { public DateFormat[] getFormats() {
if (getEditor() != null) { if (getEditor() != null) {
return super.getFormats(); return super.getFormats();
@ -141,6 +146,7 @@ public class DatePicker extends JXDatePicker {
} }
public class CustomDatePickerFormatter extends DatePickerFormatter { public class CustomDatePickerFormatter extends DatePickerFormatter {
@Override
public void install(final JFormattedTextField ftf) { public void install(final JFormattedTextField ftf) {
try { try {
if (valueToString(ftf.getValue()) == null && format != null) { if (valueToString(ftf.getValue()) == null && format != null) {
@ -158,6 +164,7 @@ public class DatePicker extends JXDatePicker {
super(formats, locale); super(formats, locale);
} }
@Override
public Object stringToValue(String text) throws ParseException { public Object stringToValue(String text) throws ParseException {
if (text == null || text.trim().length() == 0 || ObjectUtils.equals(getMask(format), text)) { if (text == null || text.trim().length() == 0 || ObjectUtils.equals(getMask(format), text)) {
return null; return null;

View File

@ -162,6 +162,7 @@ public class DatePickerDocument extends PlainDocument {
result.setCharAt(i + shift + 1, '0'); result.setCharAt(i + shift + 1, '0');
else result.insert(i + shift + 1, '0'); else result.insert(i + shift + 1, '0');
SwingUtilities.invokeLater(new Runnable() { SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() { public void run() {
field.setCaretPosition(field.getCaretPosition() - 1); field.setCaretPosition(field.getCaretPosition() - 1);
} }
@ -204,6 +205,7 @@ public class DatePickerDocument extends PlainDocument {
result.setCharAt(i + shift, text.charAt(i)); result.setCharAt(i + shift, text.charAt(i));
result.insert(i + shift + 1, '0'); result.insert(i + shift + 1, '0');
SwingUtilities.invokeLater(new Runnable() { SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() { public void run() {
field.setCaretPosition(field.getCaretPosition() - 1); field.setCaretPosition(field.getCaretPosition() - 1);
} }
@ -245,6 +247,7 @@ public class DatePickerDocument extends PlainDocument {
result.insert(i + shift + 1 + 1, '0'); result.insert(i + shift + 1 + 1, '0');
shift++; shift++;
SwingUtilities.invokeLater(new Runnable() { SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() { public void run() {
field.setCaretPosition(field.getCaretPosition() - 1); field.setCaretPosition(field.getCaretPosition() - 1);
} }
@ -269,6 +272,7 @@ public class DatePickerDocument extends PlainDocument {
result.insert(i + shift + 2, '0'); result.insert(i + shift + 2, '0');
shift++; shift++;
SwingUtilities.invokeLater(new Runnable() { SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() { public void run() {
field.setCaretPosition(field.getCaretPosition() - 1); field.setCaretPosition(field.getCaretPosition() - 1);
} }
@ -290,4 +294,4 @@ public class DatePickerDocument extends PlainDocument {
} }
return result.toString(); return result.toString();
} }
} }

View File

@ -180,6 +180,7 @@ import java.util.Comparator;
* </ul> * </ul>
* *
*/ */
@SuppressWarnings("override")
public final class SearchAutoCompleteSupport<E> { public final class SearchAutoCompleteSupport<E> {
private static final ParsePosition PARSE_POSITION = new ParsePosition(0); private static final ParsePosition PARSE_POSITION = new ParsePosition(0);

View File

@ -344,6 +344,7 @@ public class VclTestApp extends JFrame {
final Timer timer = new Timer(3000, null); final Timer timer = new Timer(3000, null);
timer.addActionListener( timer.addActionListener(
new ActionListener() { new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
if (!MouseInfo.getPointerInfo().getLocation().equals(location)) { if (!MouseInfo.getPointerInfo().getLocation().equals(location)) {
System.out.println("Hide popup " + popup); System.out.println("Hide popup " + popup);

View File

@ -20,11 +20,6 @@ package com.haulmont.cuba.core.sys.jpql;
import com.haulmont.cuba.core.sys.jpql.pointer.EntityPointer; import com.haulmont.cuba.core.sys.jpql.pointer.EntityPointer;
import com.haulmont.cuba.core.sys.jpql.pointer.Pointer; import com.haulmont.cuba.core.sys.jpql.pointer.Pointer;
/**
* User: Alex Chevelev
* Date: 13.10.2010
* Time: 23:27:26
*/
public class EntityPath { public class EntityPath {
public String topEntityVariableName; public String topEntityVariableName;
public String[] traversedFields; public String[] traversedFields;

View File

@ -17,11 +17,6 @@
package com.haulmont.cuba.core.sys.jpql.model; package com.haulmont.cuba.core.sys.jpql.model;
/**
* User: Alex Chevelev
* Date: 13.10.2010
* Time: 23:12:41
*/
public class AttributeImpl implements Attribute { public class AttributeImpl implements Attribute {
private final Class simpleType; private final Class simpleType;
private final String name; private final String name;
@ -83,6 +78,7 @@ public class AttributeImpl implements Attribute {
this.userFriendlyName = userFriendlyName; this.userFriendlyName = userFriendlyName;
} }
@Override
public boolean isEmbedded() { public boolean isEmbedded() {
return isEmbedded; return isEmbedded;
} }

View File

@ -21,11 +21,6 @@ import com.haulmont.chile.core.model.MetaClass;
import com.haulmont.cuba.core.global.AppBeans; import com.haulmont.cuba.core.global.AppBeans;
import com.haulmont.cuba.core.global.MessageTools; import com.haulmont.cuba.core.global.MessageTools;
/**
* User: Alex Chevelev
* Date: 13.10.2010
* Time: 20:41:42
*/
public class EntityBuilder { public class EntityBuilder {
private EntityImpl result; private EntityImpl result;

View File

@ -264,6 +264,7 @@ public class QueryTransformerAstBased implements QueryTransformer {
addedParams.clear(); addedParams.clear();
} }
@Override
public void replaceInCondition(String paramName) { public void replaceInCondition(String paramName) {
getQueryTransformer().replaceInCondition(paramName); getQueryTransformer().replaceInCondition(paramName);
} }

View File

@ -238,6 +238,7 @@ public class EditorWindowDelegate extends WindowDelegate {
return ((DatasourceImplementation) ds).getParent(); return ((DatasourceImplementation) ds).getParent();
} }
@Override
public boolean isModified() { public boolean isModified() {
if (readOnly) if (readOnly)
return false; return false;

View File

@ -33,6 +33,7 @@ public interface TokenList extends Field, Component.BelongToFrame, Component.Has
CaptionMode getCaptionMode(); CaptionMode getCaptionMode();
void setCaptionMode(CaptionMode captionMode); void setCaptionMode(CaptionMode captionMode);
@Override
CollectionDatasource getDatasource(); CollectionDatasource getDatasource();
void setDatasource(CollectionDatasource datasource); void setDatasource(CollectionDatasource datasource);

View File

@ -282,6 +282,7 @@ public interface Window extends Frame, Component.HasCaption {
* Called by the framework to validate, commit and close the screen if commit was successful. * Called by the framework to validate, commit and close the screen if commit was successful.
* <p/> Passes {@link #COMMIT_ACTION_ID} to associated {@link CloseListener}s. * <p/> Passes {@link #COMMIT_ACTION_ID} to associated {@link CloseListener}s.
*/ */
@Override
void commitAndClose(); void commitAndClose();
/** /**

View File

@ -44,7 +44,6 @@ import java.util.regex.Pattern;
/** /**
* Builds a {@link com.haulmont.bali.datastruct.Tree} of {@link com.haulmont.cuba.gui.components.filter.descriptor.AbstractConditionDescriptor}. * Builds a {@link com.haulmont.bali.datastruct.Tree} of {@link com.haulmont.cuba.gui.components.filter.descriptor.AbstractConditionDescriptor}.
* These descriptors are used in a new condition dialog. * These descriptors are used in a new condition dialog.
*
*/ */
@Component(ConditionDescriptorsTreeBuilderAPI.NAME) @Component(ConditionDescriptorsTreeBuilderAPI.NAME)
@Scope("prototype") @Scope("prototype")
@ -79,6 +78,7 @@ public class ConditionDescriptorsTreeBuilder implements ConditionDescriptorsTree
excludedProperties = new ArrayList<>(); excludedProperties = new ArrayList<>();
} }
@Override
public Tree<AbstractConditionDescriptor> build() { public Tree<AbstractConditionDescriptor> build() {
Messages messages = AppBeans.get(Messages.class); Messages messages = AppBeans.get(Messages.class);
String messagesPack = filter.getFrame().getMessagesPack(); String messagesPack = filter.getFrame().getMessagesPack();
@ -274,4 +274,4 @@ public class ConditionDescriptorsTreeBuilder implements ConditionDescriptorsTree
return cd1.getLocCaption().compareTo(cd2.getLocCaption()); return cd1.getLocCaption().compareTo(cd2.getLocCaption());
} }
} }
} }

View File

@ -19,10 +19,6 @@ package com.haulmont.cuba.gui.data.aggregation;
import java.util.Collection; import java.util.Collection;
/**
*
* @param <T>
*/
public interface Aggregation<T> { public interface Aggregation<T> {
T sum(Collection<T> items); T sum(Collection<T> items);

View File

@ -85,6 +85,7 @@ public class RuntimePropsDatasourceImpl
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }
@Override
public MetaClass resolveCategorizedEntityClass() { public MetaClass resolveCategorizedEntityClass() {
if (categorizedEntityClass == null) { if (categorizedEntityClass == null) {
return mainDs.getMetaClass(); return mainDs.getMetaClass();

View File

@ -36,11 +36,6 @@ import java.util.Set;
import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
/**
* User: Alex Chevelev
* Date: 13.10.2010
* Time: 18:01:03
*/
public class HintProviderTest { public class HintProviderTest {
@Test @Test
public void requestHint_entityNameHint_simple() throws RecognitionException { public void requestHint_entityNameHint_simple() throws RecognitionException {

View File

@ -32,6 +32,7 @@ import java.util.*;
public class ConverterHelper { public class ConverterHelper {
public static final Comparator<MetaProperty> PROPERTY_COMPARATOR = new Comparator<MetaProperty>() { public static final Comparator<MetaProperty> PROPERTY_COMPARATOR = new Comparator<MetaProperty>() {
@Override
public int compare(MetaProperty p1, MetaProperty p2) { public int compare(MetaProperty p1, MetaProperty p2) {
return p1.getName().compareTo(p2.getName()); return p1.getName().compareTo(p2.getName());
} }
@ -71,4 +72,4 @@ public class ConverterHelper {
} }
} }
} }
} }

View File

@ -50,6 +50,7 @@ public class MyJSONObject implements MyJSON {
return asString(0).toString(); return asString(0).toString();
} }
@Override
public StringBuilder asString(int indent) { public StringBuilder asString(int indent) {
StringBuilder buf = new StringBuilder().append(OBJECT_START); StringBuilder buf = new StringBuilder().append(OBJECT_START);
if (!Strings.isNullOrEmpty(_id)) { if (!Strings.isNullOrEmpty(_id)) {
@ -86,7 +87,6 @@ public class MyJSONObject implements MyJSON {
return new StringBuilder().append(tabs); return new StringBuilder().append(tabs);
} }
String ior() { String ior() {
return _id; return _id;
} }
@ -122,6 +122,7 @@ public class MyJSONObject implements MyJSON {
return asString(0).toString(); return asString(0).toString();
} }
@Override
public StringBuilder asString(int indent) { public StringBuilder asString(int indent) {
StringBuilder buf = new StringBuilder().append(ARRAY_START); StringBuilder buf = new StringBuilder().append(ARRAY_START);
StringBuilder tab = MyJSONObject.newIndent(indent+1); StringBuilder tab = MyJSONObject.newIndent(indent+1);
@ -152,6 +153,7 @@ public class MyJSONObject implements MyJSON {
return asString(0).toString(); return asString(0).toString();
} }
@Override
public StringBuilder asString(int indent) { public StringBuilder asString(int indent) {
StringBuilder buf = new StringBuilder().append(ARRAY_START); StringBuilder buf = new StringBuilder().append(ARRAY_START);
StringBuilder tab = MyJSONObject.newIndent(indent+1); StringBuilder tab = MyJSONObject.newIndent(indent+1);

View File

@ -93,10 +93,12 @@ public abstract class WebAbstractUploadComponent<T extends com.vaadin.ui.Compone
this.dropZone = dropZone; this.dropZone = dropZone;
} }
@Override
public String getDropZonePrompt() { public String getDropZonePrompt() {
return dropZonePrompt; return dropZonePrompt;
} }
@Override
public void setDropZonePrompt(String dropZonePrompt) { public void setDropZonePrompt(String dropZonePrompt) {
this.dropZonePrompt = dropZonePrompt; this.dropZonePrompt = dropZonePrompt;
} }

View File

@ -187,6 +187,7 @@ public class WebTwinColumn extends WebAbstractOptionsField<CubaTwinColSelect> im
this.styleProvider = styleProvider; this.styleProvider = styleProvider;
if (styleProvider != null) { if (styleProvider != null) {
component.setStyleGenerator(new CubaTwinColSelect.OptionStyleGenerator() { component.setStyleGenerator(new CubaTwinColSelect.OptionStyleGenerator() {
@Override
public String generateStyle(AbstractSelect source, Object itemId, boolean selected) { public String generateStyle(AbstractSelect source, Object itemId, boolean selected) {
final Entity item = optionsDatasource.getItem(itemId); final Entity item = optionsDatasource.getItem(itemId);
return styleProvider.getStyleName(item, itemId, component.isSelected(itemId)); return styleProvider.getStyleName(item, itemId, component.isSelected(itemId));

View File

@ -97,6 +97,7 @@ public class SingleAppWebContextLoader extends WebAppContextLoader {
filterReg.addMappingForUrlPatterns(EnumSet.of(DispatcherType.REQUEST), false, "/dispatch/*"); filterReg.addMappingForUrlPatterns(EnumSet.of(DispatcherType.REQUEST), false, "/dispatch/*");
} }
@Override
protected ClassPathXmlApplicationContext createClassPathXmlApplicationContext(String[] locations) { protected ClassPathXmlApplicationContext createClassPathXmlApplicationContext(String[] locations) {
return new CubaClassPathXmlApplicationContext(locations) { return new CubaClassPathXmlApplicationContext(locations) {
/** /**