Skip to content

Commit

Permalink
Merge pull request #10075 from bencomp/10074-modifiers
Browse files Browse the repository at this point in the history
Put modifiers in the correct order
  • Loading branch information
ofahimIQSS authored Oct 10, 2024
2 parents 45bdf5a + a32b9ed commit c44ad65
Show file tree
Hide file tree
Showing 9 changed files with 179 additions and 180 deletions.
313 changes: 156 additions & 157 deletions src/main/java/edu/harvard/iq/dataverse/DatasetFieldConstant.java

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/main/java/edu/harvard/iq/dataverse/WidgetWrapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
@Named
public class WidgetWrapper implements java.io.Serializable {

private final static String WIDGET_PARAMETER = "widget";
private final static char WIDGET_SEPARATOR = '@';
private static final String WIDGET_PARAMETER = "widget";
private static final char WIDGET_SEPARATOR = '@';

private Boolean widgetView;
private String widgetHome;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
*/
public abstract class AbstractOAuth2AuthenticationProvider implements AuthenticationProvider {

final static Logger logger = Logger.getLogger(AbstractOAuth2AuthenticationProvider.class.getName());
static final Logger logger = Logger.getLogger(AbstractOAuth2AuthenticationProvider.class.getName());

protected static class ParsedUserResponse {
public final AuthenticatedUserDisplayInfo displayInfo;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
*/
public class OrcidOAuth2AP extends AbstractOAuth2AuthenticationProvider {

final static Logger logger = Logger.getLogger(OrcidOAuth2AP.class.getName());
static final Logger logger = Logger.getLogger(OrcidOAuth2AP.class.getName());

public static final String PROVIDER_ID_PRODUCTION = "orcid";
public static final String PROVIDER_ID_SANDBOX = "orcid-sandbox";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ public class DataverseRequest {
private final String invocationId;
private final HttpServletRequest httpServletRequest;

private final static String undefined = "0.0.0.0";
private static final String undefined = "0.0.0.0";

private final static String MDKEY_PREFIX="mdkey.";
private static final String MDKEY_PREFIX="mdkey.";

private static final Logger logger = Logger.getLogger(DataverseRequest.class.getName());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@ public class ShapefileHandler{
private static final Logger logger = Logger.getLogger(ShapefileHandler.class.getCanonicalName());

// Reference for these extensions: http://en.wikipedia.org/wiki/Shapefile
public final static String SHAPEFILE_FILE_TYPE = "application/zipped-shapefile";
public final static String SHAPEFILE_FILE_TYPE_FRIENDLY_NAME = "Shapefile as ZIP Archive";
public final static List<String> SHAPEFILE_MANDATORY_EXTENSIONS = Arrays.asList("shp", "shx", "dbf", "prj");
public final static String SHP_XML_EXTENSION = "shp.xml";
public final static String BLANK_EXTENSION = "__PLACEHOLDER-FOR-BLANK-EXTENSION__";
public final static List<String> SHAPEFILE_ALL_EXTENSIONS = Arrays.asList("shp", "shx", "dbf", "prj", "sbn", "sbx", "fbn", "fbx", "ain", "aih", "ixs", "mxs", "atx", "cpg", "qpj", "qmd", SHP_XML_EXTENSION);
public static final String SHAPEFILE_FILE_TYPE = "application/zipped-shapefile";
public static final String SHAPEFILE_FILE_TYPE_FRIENDLY_NAME = "Shapefile as ZIP Archive";
public static final List<String> SHAPEFILE_MANDATORY_EXTENSIONS = Arrays.asList("shp", "shx", "dbf", "prj");
public static final String SHP_XML_EXTENSION = "shp.xml";
public static final String BLANK_EXTENSION = "__PLACEHOLDER-FOR-BLANK-EXTENSION__";
public static final List<String> SHAPEFILE_ALL_EXTENSIONS = Arrays.asList("shp", "shx", "dbf", "prj", "sbn", "sbx", "fbn", "fbx", "ain", "aih", "ixs", "mxs", "atx", "cpg", "qpj", "qmd", SHP_XML_EXTENSION);

public boolean DEBUG = false;

Expand Down
14 changes: 7 additions & 7 deletions src/main/java/edu/harvard/iq/dataverse/util/SystemConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ public class SystemConfig {
private static final long DEFAULT_THUMBNAIL_SIZE_LIMIT_IMAGE = 3000000L; // 3 MB
private static final long DEFAULT_THUMBNAIL_SIZE_LIMIT_PDF = 1000000L; // 1 MB

public final static String DEFAULTCURATIONLABELSET = "DEFAULT";
public final static String CURATIONLABELSDISABLED = "DISABLED";
public static final String DEFAULTCURATIONLABELSET = "DEFAULT";
public static final String CURATIONLABELSDISABLED = "DISABLED";

public String getVersion() {
return getVersion(false);
Expand Down Expand Up @@ -473,7 +473,7 @@ public Integer getSearchHighlightFragmentSize() {
String fragSize = settingsService.getValueForKey(SettingsServiceBean.Key.SearchHighlightFragmentSize);
if (fragSize != null) {
try {
return new Integer(fragSize);
return Integer.valueOf(fragSize);
} catch (NumberFormatException nfe) {
logger.info("Could not convert " + SettingsServiceBean.Key.SearchHighlightFragmentSize + " to int: " + nfe);
}
Expand All @@ -490,7 +490,7 @@ public long getTabularIngestSizeLimit() {

if (limitEntry != null) {
try {
Long sizeOption = new Long(limitEntry);
Long sizeOption = Long.valueOf(limitEntry);
return sizeOption;
} catch (NumberFormatException nfe) {
logger.warning("Invalid value for TabularIngestSizeLimit option? - " + limitEntry);
Expand All @@ -515,7 +515,7 @@ public long getTabularIngestSizeLimit(String formatName) {

if (limitEntry != null) {
try {
Long sizeOption = new Long(limitEntry);
Long sizeOption = Long.valueOf(limitEntry);
return sizeOption;
} catch (NumberFormatException nfe) {
logger.warning("Invalid value for TabularIngestSizeLimit:" + formatName + "? - " + limitEntry );
Expand Down Expand Up @@ -1061,7 +1061,7 @@ public long getDatasetValidationSizeLimit() {

if (limitEntry != null) {
try {
Long sizeOption = new Long(limitEntry);
Long sizeOption = Long.valueOf(limitEntry);
return sizeOption;
} catch (NumberFormatException nfe) {
logger.warning("Invalid value for DatasetValidationSizeLimit option? - " + limitEntry);
Expand All @@ -1076,7 +1076,7 @@ public long getFileValidationSizeLimit() {

if (limitEntry != null) {
try {
Long sizeOption = new Long(limitEntry);
Long sizeOption = Long.valueOf(limitEntry);
return sizeOption;
} catch (NumberFormatException nfe) {
logger.warning("Invalid value for FileValidationSizeLimit option? - " + limitEntry);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import java.util.Date;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.logging.Level;
import java.util.logging.Logger;
Expand Down Expand Up @@ -83,8 +84,7 @@ private enum ValidatorTypes {
GoodStrengthValidator, StandardValidator
}

@SuppressWarnings("unchecked")
private final static LinkedHashMap<ValidatorTypes, PasswordValidator> validators = new LinkedHashMap(2);
private static final Map<ValidatorTypes, PasswordValidator> validators = new LinkedHashMap<>(2);
private int goodStrength;
private int maxLength;
private int minLength;
Expand All @@ -100,7 +100,7 @@ private enum ValidatorTypes {
public PasswordValidatorServiceBean() {
final Properties properties = PropertiesMessageResolver.getDefaultProperties();
properties.setProperty(GoodStrengthRule.ERROR_CODE_GOODSTRENGTH, GoodStrengthRule.ERROR_MESSAGE_GOODSTRENGTH);
messageResolver = new PropertiesMessageResolver(properties);
messageResolver = new PropertiesMessageResolver(properties);
}

public PasswordValidatorServiceBean(List<CharacterRule> characterRules) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

public class AuthenticationProviderTest {

private final static String[] authProviders = {"null", "builtin", "github", "google", "orcid", "orcid-sandbox", "shib"};
private static final String[] authProviders = {"null", "builtin", "github", "google", "orcid", "orcid-sandbox", "shib"};
private static Map<String, String> bundleTestMap;

@BeforeAll
Expand Down

0 comments on commit c44ad65

Please sign in to comment.