Skip to content

Commit 8a8a2a7

Browse files
authored
Merge pull request #28 from eclipse-researchlabs/cleanup
Cleanup headers and comments
2 parents 5e98d35 + 003ef5f commit 8a8a2a7

File tree

326 files changed

+2568
-4131
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

326 files changed

+2568
-4131
lines changed

context-core/src/main/java/de/atb/context/common/Configuration.java

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* #%L
55
* ATB Context Extraction Core Lib
66
* %%
7-
* Copyright (C) 2020 ATB – Institut für angewandte Systemtechnik Bremen GmbH
7+
* Copyright (C) 2021 ATB – Institut für angewandte Systemtechnik Bremen GmbH
88
* %%
99
* This program and the accompanying materials are made
1010
* available under the terms of the Eclipse Public License 2.0
@@ -52,7 +52,7 @@ protected Configuration(final AmIMonitoringConfiguration config,
5252
this.configurationClass = clazz;
5353
this.configurationName = configurationName;
5454

55-
logger.info("Loading %s...", configurationName);
55+
logger.info("Loading {}...", configurationName);
5656
final Serializer serializer = new Persister();
5757
try {
5858
this.configurationBean = serializer.read(this.configurationClass,
@@ -74,7 +74,7 @@ protected Configuration(final String configFileName,
7474
this.configurationClass = clazz;
7575
this.configurationFileName = configFileName;
7676
this.configurationName = configurationName;
77-
logger.info("Loading %s...", configurationName);
77+
logger.info("Loading {}...", configurationName);
7878
readConfigurationFile();
7979

8080
}
@@ -97,9 +97,9 @@ public final void save() { // TODO this should maybe replace by a call to DRM AP
9797
try {
9898
if (source.exists() || source.createNewFile()) {
9999
serializer.write(getConfig(), source);
100-
logger.info("%s saved!", this.configurationName);
100+
logger.info("{} saved!", this.configurationName);
101101
} else {
102-
logger.warn("%s could not be saved, because the file %s could not be created!", this.configurationName, source.getAbsolutePath());
102+
logger.warn("{} could not be saved, because the file {} could not be created!", this.configurationName, source.getAbsolutePath());
103103
}
104104
} catch (final Exception e) {
105105
logger.error("Could not save the " + this.configurationName
@@ -108,7 +108,7 @@ public final void save() { // TODO this should maybe replace by a call to DRM AP
108108
}
109109

110110
public final void refresh() {
111-
logger.info("Reloading %s...", this.configurationName);
111+
logger.info("Reloading {}...", this.configurationName);
112112
readConfigurationFile();
113113
}
114114

context-core/src/main/java/de/atb/context/common/Version.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* #%L
55
* ATB Context Extraction Core Lib
66
* %%
7-
* Copyright (C) 2020 ATB – Institut für angewandte Systemtechnik Bremen GmbH
7+
* Copyright (C) 2021 ATB – Institut für angewandte Systemtechnik Bremen GmbH
88
* %%
99
* This program and the accompanying materials are made
1010
* available under the terms of the Eclipse Public License 2.0
@@ -54,8 +54,7 @@ public int getBuild() {
5454
}
5555

5656
public String getVersionString() {
57-
return String.format("%d.%d.%d", Integer.valueOf(major),
58-
Integer.valueOf(minor), Integer.valueOf(build));
57+
return String.format("%d.%d.%d", major, minor, build);
5958
}
6059

6160
}

context-core/src/main/java/de/atb/context/common/authentication/Credentials.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* #%L
55
* ATB Context Extraction Core Lib
66
* %%
7-
* Copyright (C) 2020 ATB – Institut für angewandte Systemtechnik Bremen GmbH
7+
* Copyright (C) 2021 ATB – Institut für angewandte Systemtechnik Bremen GmbH
88
* %%
99
* This program and the accompanying materials are made
1010
* available under the terms of the Eclipse Public License 2.0

context-core/src/main/java/de/atb/context/common/configuration/ApplicationScenarioConfiguration.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* #%L
55
* ATB Context Extraction Core Lib
66
* %%
7-
* Copyright (C) 2020 ATB – Institut für angewandte Systemtechnik Bremen GmbH
7+
* Copyright (C) 2021 ATB – Institut für angewandte Systemtechnik Bremen GmbH
88
* %%
99
* This program and the accompanying materials are made
1010
* available under the terms of the Eclipse Public License 2.0

context-core/src/main/java/de/atb/context/common/configuration/IConfigurationBean.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* #%L
55
* ATB Context Extraction Core Lib
66
* %%
7-
* Copyright (C) 2020 ATB – Institut für angewandte Systemtechnik Bremen GmbH
7+
* Copyright (C) 2021 ATB – Institut für angewandte Systemtechnik Bremen GmbH
88
* %%
99
* This program and the accompanying materials are made
1010
* available under the terms of the Eclipse Public License 2.0

context-core/src/main/java/de/atb/context/common/configuration/IConfigurationContainer.java

+3-5
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* #%L
55
* ATB Context Extraction Core Lib
66
* %%
7-
* Copyright (C) 2020 ATB – Institut für angewandte Systemtechnik Bremen GmbH
7+
* Copyright (C) 2021 ATB – Institut für angewandte Systemtechnik Bremen GmbH
88
* %%
99
* This program and the accompanying materials are made
1010
* available under the terms of the Eclipse Public License 2.0
@@ -17,14 +17,12 @@
1717
/**
1818
* IConfigurationContainer
1919
*
20+
* @param <B> B
2021
* @author scholze
2122
* @version $LastChangedRevision: 417 $
22-
* @param <B>
23-
* B
24-
*
2523
*/
2624
public interface IConfigurationContainer<B extends IConfigurationBean> {
2725

28-
void reset();
26+
void reset();
2927

3028
}

context-core/src/main/java/de/atb/context/common/exceptions/ConfigurationException.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* #%L
55
* ATB Context Extraction Core Lib
66
* %%
7-
* Copyright (C) 2020 ATB – Institut für angewandte Systemtechnik Bremen GmbH
7+
* Copyright (C) 2021 ATB – Institut für angewandte Systemtechnik Bremen GmbH
88
* %%
99
* This program and the accompanying materials are made
1010
* available under the terms of the Eclipse Public License 2.0

context-core/src/main/java/de/atb/context/common/exceptions/NotImplementedException.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* #%L
55
* ATB Context Extraction Core Lib
66
* %%
7-
* Copyright (C) 2020 ATB – Institut für angewandte Systemtechnik Bremen GmbH
7+
* Copyright (C) 2021 ATB – Institut für angewandte Systemtechnik Bremen GmbH
88
* %%
99
* This program and the accompanying materials are made
1010
* available under the terms of the Eclipse Public License 2.0

context-core/src/main/java/de/atb/context/common/io/FileUtils.java

+4-8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
package de.atb.context.common.io;
22

3-
/*-
3+
/*
44
* #%L
55
* ATB Context Extraction Core Lib
66
* %%
7-
* Copyright (C) 2020 ATB – Institut für angewandte Systemtechnik Bremen GmbH
7+
* Copyright (C) 2021 ATB – Institut für angewandte Systemtechnik Bremen GmbH
88
* %%
99
* This program and the accompanying materials are made
1010
* available under the terms of the Eclipse Public License 2.0
@@ -31,7 +31,6 @@ public class FileUtils {
3131
private FileUtils() {
3232
}
3333

34-
@SuppressWarnings("unchecked")
3534
public static <T> T deserializeObjectFromFile(final String file) {
3635
return deserializeObjectFromFile(new File(file));
3736
}
@@ -69,7 +68,7 @@ public static <T> void serializeObjectToFile(final T object, final String file)
6968
public static <T> void serializeToFile(final T object, final File file) {
7069
try (
7170
FileOutputStream fOut = new FileOutputStream(file);
72-
ObjectOutputStream oOut = new ObjectOutputStream(fOut);
71+
ObjectOutputStream oOut = new ObjectOutputStream(fOut)
7372
) {
7473
oOut.writeObject(object);
7574
} catch (IOException e) {
@@ -115,10 +114,7 @@ public static boolean ensureDirectoryExists(final String filePath) {
115114
}
116115
logger.info(path);
117116
return new File(path).mkdirs();
118-
} else if (file.exists()) {
119-
return true;
120-
}
121-
return false;
117+
} else return file.exists();
122118
}
123119

124120
// For Service Composition Editor BPMN File management

context-core/src/main/java/de/atb/context/common/io/JsonObject.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
package de.atb.context.common.io;
22

3-
/*-
3+
/*
44
* #%L
55
* ATB Context Extraction Core Lib
66
* %%
7-
* Copyright (C) 2020 ATB – Institut für angewandte Systemtechnik Bremen GmbH
7+
* Copyright (C) 2021 ATB – Institut für angewandte Systemtechnik Bremen GmbH
88
* %%
99
* This program and the accompanying materials are made
1010
* available under the terms of the Eclipse Public License 2.0
@@ -47,7 +47,7 @@
4747
* implied. See the License for the specific language governing
4848
* permissions and limitations under the License.*
4949
*/
50-
@SuppressWarnings({ "rawtypes", "serial", "unchecked" })
50+
@SuppressWarnings({ "rawtypes", "unchecked" })
5151
public class JsonObject<K, V> extends LinkedHashMap<K, V> {
5252
Object target;
5353
boolean isMap = false;
@@ -185,7 +185,7 @@ public final Object[] getArray() {
185185
return (Object[]) get("@items");
186186
}
187187

188-
public final int getLength() throws IOException {
188+
public final int getLength() {
189189
if (isArray()) {
190190
if (target == null) {
191191
Object[] items = (Object[]) get("@items");
@@ -266,7 +266,7 @@ final void clearArray() {
266266
/**
267267
* This method is deprecated. Use getLine() and getCol() to determine where
268268
* this object was read from in the JSON stream.
269-
*
269+
*
270270
* @return int line number where this object was read from
271271
*/
272272
@Deprecated

0 commit comments

Comments
 (0)