@@ -91,11 +91,11 @@ public class Configuration implements IConfiguration {
91
91
public Configuration (final ServletConfig servletConfig ) {
92
92
this .servletConf = servletConfig ;
93
93
this .xmlFilePath = servletConfig .getInitParameter ("XMLConfig" );
94
- this .plugins = new ArrayList <PluginInfo >();
95
- this .htmlExtensions = new ArrayList <String >();
96
- this .hiddenFolders = new ArrayList <String >();
97
- this .hiddenFiles = new ArrayList <String >();
98
- this .defaultResourceTypes = new ArrayList <String >();
94
+ this .plugins = new ArrayList <>();
95
+ this .htmlExtensions = new ArrayList <>();
96
+ this .hiddenFolders = new ArrayList <>();
97
+ this .hiddenFiles = new ArrayList <>();
98
+ this .defaultResourceTypes = new ArrayList <>();
99
99
}
100
100
101
101
/**
@@ -111,8 +111,8 @@ private void clearConfiguration() {
111
111
this .imgWidth = DEFAULT_IMG_WIDTH ;
112
112
this .imgHeight = DEFAULT_IMG_HEIGHT ;
113
113
this .imgQuality = DEFAULT_IMG_QUALITY ;
114
- this .types = new HashMap <String , ResourceType >();
115
- this .typesOrder = new ArrayList <String >();
114
+ this .types = new HashMap <>();
115
+ this .typesOrder = new ArrayList <>();
116
116
this .thumbsEnabled = false ;
117
117
this .thumbsURL = "" ;
118
118
this .thumbsDir = "" ;
@@ -121,18 +121,18 @@ private void clearConfiguration() {
121
121
this .thumbsDirectAccess = false ;
122
122
this .thumbsMaxHeight = DEFAULT_THUMB_MAX_HEIGHT ;
123
123
this .thumbsMaxWidth = DEFAULT_THUMB_MAX_WIDTH ;
124
- this .accessControlLevels = new ArrayList <AccessControlLevel >();
125
- this .hiddenFolders = new ArrayList <String >();
126
- this .hiddenFiles = new ArrayList <String >();
124
+ this .accessControlLevels = new ArrayList <>();
125
+ this .hiddenFolders = new ArrayList <>();
126
+ this .hiddenFiles = new ArrayList <>();
127
127
this .doubleExtensions = false ;
128
128
this .forceASCII = false ;
129
129
this .checkSizeAfterScaling = false ;
130
130
this .uriEncoding = DEFAULT_URI_ENCODING ;
131
131
this .userRoleSessionVar = "" ;
132
- this .plugins = new ArrayList <PluginInfo >();
132
+ this .plugins = new ArrayList <>();
133
133
this .secureImageUploads = false ;
134
- this .htmlExtensions = new ArrayList <String >();
135
- this .defaultResourceTypes = new ArrayList <String >();
134
+ this .htmlExtensions = new ArrayList <>();
135
+ this .defaultResourceTypes = new ArrayList <>();
136
136
this .events = new Events ();
137
137
this .basePathBuilder = null ;
138
138
this .disallowUnsafeCharacters = false ;
@@ -385,7 +385,7 @@ private void setHiddenFolders(final NodeList childNodes) {
385
385
* @param childNodes nodes with ACL configuration.
386
386
*/
387
387
private void setACLs (final NodeList childNodes ) {
388
- this .accessControlLevels = new ArrayList <AccessControlLevel >();
388
+ this .accessControlLevels = new ArrayList <>();
389
389
for (int i = 0 ; i < childNodes .getLength (); i ++) {
390
390
Node childNode = childNodes .item (i );
391
391
if (childNode .getNodeName ().equals ("accessControl" )) {
@@ -508,8 +508,8 @@ private void setThumbs(final NodeList childNodes) {
508
508
* @param doc XML document.
509
509
*/
510
510
private void setTypes (final Document doc ) {
511
- types = new HashMap <String , ResourceType >();
512
- typesOrder = new ArrayList <String >();
511
+ types = new HashMap <>();
512
+ typesOrder = new ArrayList <>();
513
513
NodeList list = doc .getElementsByTagName ("type" );
514
514
515
515
for (int i = 0 ; i < list .getLength (); i ++) {
@@ -1077,19 +1077,19 @@ protected void copyConfFields(final Configuration configuration) {
1077
1077
configuration .events = this .events ;
1078
1078
configuration .basePathBuilder = this .basePathBuilder ;
1079
1079
1080
- configuration .htmlExtensions = new ArrayList <String >();
1080
+ configuration .htmlExtensions = new ArrayList <>();
1081
1081
configuration .htmlExtensions .addAll (this .htmlExtensions );
1082
- configuration .hiddenFolders = new ArrayList <String >();
1083
- configuration .hiddenFiles = new ArrayList <String >();
1082
+ configuration .hiddenFolders = new ArrayList <>();
1083
+ configuration .hiddenFiles = new ArrayList <>();
1084
1084
configuration .hiddenFiles .addAll (this .hiddenFiles );
1085
1085
configuration .hiddenFolders .addAll (this .hiddenFolders );
1086
- configuration .typesOrder = new ArrayList <String >();
1086
+ configuration .typesOrder = new ArrayList <>();
1087
1087
configuration .typesOrder .addAll (this .typesOrder );
1088
- configuration .defaultResourceTypes = new ArrayList <String >();
1088
+ configuration .defaultResourceTypes = new ArrayList <>();
1089
1089
configuration .defaultResourceTypes .addAll (this .defaultResourceTypes );
1090
- configuration .types = new HashMap <String , ResourceType >();
1091
- configuration .accessControlLevels = new ArrayList <AccessControlLevel >();
1092
- configuration .plugins = new ArrayList <PluginInfo >();
1090
+ configuration .types = new HashMap <>();
1091
+ configuration .accessControlLevels = new ArrayList <>();
1092
+ configuration .plugins = new ArrayList <>();
1093
1093
copyTypes (configuration .types );
1094
1094
copyACls (configuration .accessControlLevels );
1095
1095
copyPlugins (configuration .plugins );
0 commit comments