Commit b2ed4ad6 authored by Uwe Peuker's avatar Uwe Peuker

Merge branch 'release/1.6.0'

parents 75f29672 9688e87c
<?xml version="1.0" encoding="UTF-8"?>
<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="false">
<local-check-config name="Local CS" location="releng/checkstyle.xml" type="project" description="">
<fileset-config file-format-version="1.2.0" simple-config="false" sync-formatter="false">
<local-check-config name="Local CS" location="src/main/config/checkstyle.xml" type="project" description="">
<additional-data name="protect-config-file" value="false"/>
</local-check-config>
<fileset name="all" enabled="true" check-config-name="Local CS" local="true">
<file-match-pattern match-pattern="." include-pattern="true"/>
<local-check-config name="maven-checkstyle-plugin default" location="file:/Users/uwe/Projekte/BitCtrl/de.bsvrz.sys.funclib.bitctrl.dua/src/main/config/checkstyle.xml" type="remote" description="maven-checkstyle-plugin configuration default">
<property name="checkstyle.cache.file" value="${project_loc}/target/checkstyle-cachefile"/>
<property name="checkstyle.header.file" value="/Users/uwe/Projekte/Neon/Dav/KernsoftwareNeu/.metadata/.plugins/org.eclipse.core.resources/.projects/de.bsvrz.sys.funclib.bitctrl.dua/com.basistech.m2e.code.quality.checkstyleConfigurator/checkstyle-header-default.txt"/>
</local-check-config>
<fileset name="java-sources-default" enabled="true" check-config-name="maven-checkstyle-plugin default" local="true">
<file-match-pattern match-pattern="src/test/java/.*\.java" include-pattern="true"/>
<file-match-pattern match-pattern="src/main/java/.*\.java" include-pattern="true"/>
<file-match-pattern match-pattern="src/main/resources.*\.properties" include-pattern="true"/>
<file-match-pattern match-pattern="src/test/resources.*\.properties" include-pattern="true"/>
</fileset>
</fileset-config>
......@@ -100,3 +100,4 @@ local.properties
# TeXlipse plugin
.texlipse
/.fbExcludeFilterFile
......@@ -10,6 +10,11 @@
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>edu.umd.cs.findbugs.plugin.eclipse.findbugsBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>net.sf.eclipsecs.core.CheckstyleBuilder</name>
<arguments>
......@@ -24,6 +29,7 @@
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>edu.umd.cs.findbugs.plugin.eclipse.findbugsNature</nature>
<nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
</natures>
</projectDescription>
activeProfiles=
activeProfiles=bintray
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
language: java
jdk:
- oraclejdk8
install: true
script: mvn -P bintray install -B -V
This diff is collapsed.
[![Build Status](https://travis-ci.org/bitctrl/de.bsvrz.sys.funclib.bitctrl.dua.svg?branch=develop)](https://travis-ci.org/bitctrl/de.bsvrz.sys.funclib.bitctrl.dua)
[![Build Status](https://api.bintray.com/packages/bitctrl/maven/de.bsvrz.sys.funclib.bitctrl.dua/images/download.svg)](https://bintray.com/bitctrl/maven/de.bsvrz.sys.funclib.bitctrl.dua)
********************************************************************************
* Allgemeine DuA-Funktionen *
********************************************************************************
......
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<!--
This configuration file was written by the eclipse-cs plugin configuration editor
-->
<!--
Checkstyle-Configuration: Local CS
Description: none
-->
<module name="Checker">
<property name="severity" value="warning"/>
<module name="TreeWalker">
<module name="JavadocMethod">
<property name="scope" value="public"/>
<property name="suppressLoadErrors" value="true"/>
</module>
<module name="JavadocType">
<property name="scope" value="protected"/>
<property name="authorFormat" value="BitCtrl Systems GmbH, \S"/>
</module>
<module name="JavadocVariable">
<property name="scope" value="protected"/>
</module>
<module name="JavadocStyle">
<property name="checkEmptyJavadoc" value="true"/>
</module>
<module name="ConstantName"/>
<module name="LocalFinalVariableName"/>
<module name="LocalVariableName"/>
<module name="MemberName"/>
<module name="MethodName"/>
<module name="PackageName"/>
<module name="ParameterName"/>
<module name="StaticVariableName"/>
<module name="TypeName"/>
<module name="AvoidStarImport"/>
<module name="IllegalImport"/>
<module name="RedundantImport"/>
<module name="UnusedImports"/>
<module name="MethodLength">
<property name="severity" value="info"/>
</module>
<module name="ParameterNumber"/>
<module name="LineLength">
<property name="severity" value="ignore"/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
<module name="EmptyForIteratorPad"/>
<module name="MethodParamPad"/>
<module name="NoWhitespaceAfter">
<property name="tokens" value="BNOT,DEC,DOT,INC,LNOT,UNARY_MINUS,UNARY_PLUS"/>
</module>
<module name="NoWhitespaceBefore"/>
<module name="OperatorWrap"/>
<module name="ParenPad"/>
<module name="TypecastParenPad"/>
<module name="WhitespaceAfter"/>
<module name="WhitespaceAround"/>
<module name="ModifierOrder"/>
<module name="RedundantModifier"/>
<module name="AvoidNestedBlocks"/>
<module name="EmptyBlock"/>
<module name="LeftCurly"/>
<module name="NeedBraces"/>
<module name="RightCurly"/>
<module name="AvoidInlineConditionals">
<property name="severity" value="info"/>
</module>
<module name="EmptyStatement"/>
<module name="EqualsHashCode"/>
<module name="HiddenField">
<property name="ignoreConstructorParameter" value="true"/>
<property name="ignoreSetter" value="true"/>
</module>
<module name="IllegalInstantiation"/>
<module name="InnerAssignment"/>
<module name="MagicNumber">
<property name="severity" value="info"/>
</module>
<module name="MissingSwitchDefault"/>
<module name="SimplifyBooleanExpression"/>
<module name="SimplifyBooleanReturn"/>
<module name="FinalClass"/>
<module name="HideUtilityClassConstructor"/>
<module name="InterfaceIsType"/>
<module name="VisibilityModifier"/>
<module name="ArrayTypeStyle"/>
<module name="FinalParameters"/>
<module name="TodoComment"/>
<module name="UpperEll"/>
<module name="AnnotationUseStyle"/>
<module name="MissingDeprecated"/>
<module name="PackageAnnotation"/>
<module name="SuppressWarnings"/>
<module name="MissingOverride"/>
<module name="CovariantEquals"/>
<module name="DefaultComesLast"/>
<module name="EqualsAvoidNull"/>
<module name="ExplicitInitialization"/>
<module name="FallThrough"/>
<module name="FinalLocalVariable">
<property name="tokens" value="PARAMETER_DEF,VARIABLE_DEF"/>
</module>
<module name="IllegalCatch"/>
<module name="IllegalThrows"/>
<module name="ModifiedControlVariable"/>
<module name="MultipleVariableDeclarations">
<property name="severity" value="info"/>
</module>
<module name="MultipleStringLiterals">
<property name="severity" value="info"/>
</module>
<module name="NestedIfDepth">
<property name="severity" value="info"/>
</module>
<module name="NestedTryDepth">
<property name="severity" value="info"/>
</module>
<module name="NoClone">
<property name="severity" value="info"/>
</module>
<module name="PackageDeclaration"/>
<module name="ParameterAssignment"/>
<module name="ReturnCount">
<property name="severity" value="info"/>
</module>
<module name="StringLiteralEquality"/>
<module name="SuperClone"/>
<module name="SuperFinalize"/>
<module name="UnnecessaryParentheses">
<property name="severity" value="info"/>
</module>
<module name="MutableException"/>
<module name="ThrowsCount">
<property name="severity" value="info"/>
</module>
<module name="UncommentedMain">
<property name="severity" value="info"/>
</module>
</module>
<module name="JavadocPackage"/>
<module name="Translation"/>
<module name="FileLength"/>
<module name="Header">
<property name="severity" value="info"/>
<property name="headerFile" value="${basedir}/releng/java.header"/>
<property name="fileExtensions" value="java"/>
</module>
<module name="NewlineAtEndOfFile">
<property name="lineSeparator" value="lf"/>
</module>
</module>
<?xml version="1.0" encoding="UTF-8"?>
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3 http://maven.apache.org/xsd/assembly-1.1.3.xsd">
<id>distributionspaket</id>
<formats>
<format>zip</format>
</formats>
<baseDirectory>${project.artifactId}</baseDirectory>
<componentDescriptors>
<componentDescriptor>assemblies/distributionspaket-bin.xml</componentDescriptor>
<componentDescriptor>assemblies/distributionspaket-test.xml</componentDescriptor>
</componentDescriptors>
<fileSets>
<fileSet>
<directory>${project.basedir}/src/main/dist</directory>
<outputDirectory>.</outputDirectory>
</fileSet>
</fileSets>
</assembly>
<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
<id>swe</id>
<includeBaseDirectory>false</includeBaseDirectory>
<formats>
<format>zip</format>
</formats>
<fileSets>
<fileSet>
<directory>src/main/dist</directory>
<outputDirectory>${project.artifactId}</outputDirectory>
</fileSet>
<fileSet>
<directory>${project.build.directory}/dependencies</directory>
<outputDirectory>${project.artifactId}/lib</outputDirectory>
<includes>
<include>*</include>
</includes>
<excludes>
<exclude>de.bsvrz.*</exclude>
</excludes>
</fileSet>
</fileSets>
<files>
<file>
<source>${project.build.directory}/${artifactId}-runtime.jar</source>
<outputDirectory>${artifactId}</outputDirectory>
</file>
<file>
<source>${project.build.directory}/${artifactId}-${version}.jar</source>
<outputDirectory>${artifactId}</outputDirectory>
<destName>${artifactId}.jar</destName>
</file>
<file>
<source>${project.build.directory}/${artifactId}-${version}-doc-api-javadoc.jar</source>
<outputDirectory>${artifactId}</outputDirectory>
<destName>${artifactId}-doc-api.zip</destName>
</file>
<file>
<source>${project.build.directory}/${artifactId}-${version}-doc-design-javadoc.jar</source>
<outputDirectory>${artifactId}</outputDirectory>
<destName>${artifactId}-doc-design.zip</destName>
</file>
<file>
<source>${project.build.directory}/${artifactId}-${version}-sources.jar</source>
<outputDirectory>${artifactId}</outputDirectory>
<destName>${artifactId}-src.zip</destName>
</file>
<file>
<source>LICENSE.txt</source>
<outputDirectory>${artifactId}</outputDirectory>
<destName>${artifactId}-Lizenz.txt</destName>
</file>
<file>
<source>README.txt</source>
<outputDirectory>${artifactId}</outputDirectory>
<destName>${artifactId}-Build-Report.txt</destName>
<filtered>true</filtered>
</file>
<file>
<source>${project.build.directory}/${artifactId}-${version}-tests.jar</source>
<outputDirectory>${artifactId}</outputDirectory>
<destName>${artifactId}-test.jar</destName>
</file>
<file>
<source>${project.build.directory}/${artifactId}-${version}-doc-api-test-javadoc.jar</source>
<outputDirectory>${artifactId}</outputDirectory>
<destName>${artifactId}-test-doc-api.zip</destName>
</file>
<file>
<source>${project.build.directory}/${artifactId}-${version}-doc-design-test-javadoc.jar</source>
<outputDirectory>${artifactId}</outputDirectory>
<destName>${artifactId}-test-doc-design.zip</destName>
</file>
<file>
<source>${project.build.directory}/${artifactId}-${version}-test-sources.jar</source>
<outputDirectory>${artifactId}</outputDirectory>
<destName>${artifactId}-test-src.zip</destName>
</file>
<file>
<source>LICENSE.txt</source>
<outputDirectory>${artifactId}</outputDirectory>
<destName>${artifactId}-test-Lizenz.txt</destName>
</file>
</files>
</assembly>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<module name="Checker">
<property name="severity" value="warning"/>
<!-- Headers -->
<module name="Header">
<property name="headerFile" value="${checkstyle.header.file}"/>
<property name="fileExtensions" value="java"/>
</module>
<!-- Size Violations -->
<module name="FileLength"/>
<!-- Miscellaneous -->
<module name="UniqueProperties"/>
<module name="TreeWalker">
<!-- Annotations -->
<module name="MissingDeprecated"/>
<module name="MissingOverride"/>
<module name="PackageAnnotation"/>
<!-- Class Design -->
<module name="InterfaceIsType"/>
<module name="OneTopLevelClass"/>
<!-- Coding -->
<module name="CovariantEquals"/>
<module name="DefaultComesLast"/>
<module name="EqualsHashCode"/>
<module name="StringLiteralEquality"/>
<module name="SuperClone"/>
<module name="SuperFinalize"/>
<!-- Imports -->
<module name="IllegalImport"/>
<!-- Metrics -->
<module name="BooleanExpressionComplexity"/>
<module name="ClassDataAbstractionCoupling"/>
<module name="ClassFanOutComplexity"/>
<module name="CyclomaticComplexity"/>
<module name="JavaNCSS"/>
<module name="NPathComplexity"/>
<!-- Miscellaneous -->
<module name="OuterTypeFilename"/>
<module name="UpperEll"/>
<!-- Modifiers -->
<module name="ModifierOrder"/>
<module name="RedundantModifier"/>
<!-- Naming Conventions -->
<module name="AbbreviationAsWordInName"/>
<module name="ClassTypeParameterName"/>
<module name="ConstantName"/>
<module name="InterfaceTypeParameterName"/>
<module name="LocalFinalVariableName"/>
<module name="LocalVariableName">
<property name="allowOneCharVarInForLoop" value="true"/>
</module>
<module name="MemberName"/>
<module name="MethodName"/>
<module name="MethodTypeParameterName"/>
<module name="PackageName"/>
<module name="ParameterName"/>
<module name="StaticVariableName"/>
<module name="TypeName"/>
<!-- Size Violations -->
<module name="AnonInnerLength"/>
<module name="ExecutableStatementCount"/>
<module name="LineLength">
<property name="max" value="120"/>
</module>
<module name="MethodCount"/>
<module name="MethodLength"/>
<module name="OuterTypeNumber"/>
<module name="ParameterNumber"/>
</module>
</module>
<?xml version="1.0" encoding="UTF-8"?>
<FindBugsFilter>
<Match>
<Bug pattern="STCAL_STATIC_SIMPLE_DATE_FORMAT_INSTANCE"/>
</Match>
<!-- <Match> -->
<!-- <Package name="com.mypackage.something"/> -->
<!-- </Match> -->
</FindBugsFilter>
\ No newline at end of file
......@@ -87,6 +87,11 @@ public class AllgemeinerDatenContainer {
return false;
}
@Override
public int hashCode() {
throw new UnsupportedOperationException();
}
/**
* Erfragt eine Zeichenkette, welche die aktuellen Werte aller über
* Getter-Methoden zugänglichen Member-Variable enthält.
......
......@@ -26,6 +26,8 @@
package de.bsvrz.sys.funclib.bitctrl.dua;
import java.nio.channels.UnsupportedAddressTypeException;
import com.bitctrl.Constants;
import de.bsvrz.sys.funclib.bitctrl.daf.AbstractDavZustand;
......@@ -265,6 +267,11 @@ public class GanzZahl implements Comparable<GanzZahl> {
return gleich;
}
@Override
public int hashCode() {
throw new UnsupportedOperationException();
}
@Override
public int compareTo(final GanzZahl that) {
if (that == null) {
......
......@@ -252,6 +252,11 @@ public class MesswertMarkierung implements Cloneable {
return gleich;
}
@Override
public int hashCode() {
throw new UnsupportedOperationException();
}
@Override
public String toString() {
return (nichtErfasst ? "nErf " : Constants.EMPTY_STRING) + (formalMax ? "fMax " : Constants.EMPTY_STRING)
......
......@@ -129,15 +129,13 @@ public class DAVObjektAnmeldung implements Comparable<DAVObjektAnmeldung> {
@Override
public int compareTo(final DAVObjektAnmeldung that) {
int result = Long.valueOf(getObjekt().getId()).compareTo(that.getObjekt().getId());
int result = Long.compare(getObjekt().getId(), that.getObjekt().getId());
if (result == 0) {
result = Long.valueOf(getDatenBeschreibung().getAttributeGroup().getId())
.compareTo(that.getDatenBeschreibung().getAttributeGroup().getId());
result = Long.compare(getDatenBeschreibung().getAttributeGroup().getId(), that.getDatenBeschreibung().getAttributeGroup().getId());
}
if (result == 0) {
result = Long.valueOf(getDatenBeschreibung().getAspect().getId())
.compareTo(that.getDatenBeschreibung().getAspect().getId());
result = Long.compare(getDatenBeschreibung().getAspect().getId(), that.getDatenBeschreibung().getAspect().getId());
}
return result;
......
......@@ -196,10 +196,10 @@ public class DatenFlussSteuerungFuerModul implements IDatenFlussSteuerungFuerMod
@Override
public int compareTo(final PublikationObjAtg that) {
int result = Long.valueOf(obj.getId()).compareTo(that.obj.getId());
int result = Long.compare(obj.getId(), that.obj.getId());
if (result == 0) {
result = Long.valueOf(atg.getId()).compareTo(that.atg.getId());
result = Long.compare(atg.getId(), that.atg.getId());
}
return result;
......
......@@ -51,7 +51,8 @@ public abstract class MessQuerschnittAllgemein extends AbstractSystemObjekt {
/**
* Menge aller allgemeinen Messquerschnitte.
*/
private static Collection<MessQuerschnittAllgemein> mqaMenge;
private static final Collection<MessQuerschnittAllgemein> mqaMenge = new HashSet<>();
private static boolean initialized;
/**
* Systemobjekt des Ersatzmessquerschnitts für die Messwertersetzung.
......@@ -98,10 +99,10 @@ public abstract class MessQuerschnittAllgemein extends AbstractSystemObjekt {
* @return alle statischen Instanzen dieser Klasse
*/
public static Collection<MessQuerschnittAllgemein> getAlleInstanzen() {
if (MessQuerschnittAllgemein.mqaMenge == null) {
MessQuerschnittAllgemein.mqaMenge = new HashSet<>();
if (!initialized) {
MessQuerschnittAllgemein.mqaMenge.addAll(MessQuerschnitt.getInstanzen());
MessQuerschnittAllgemein.mqaMenge.addAll(MessQuerschnittVirtuell.getInstanzen());
initialized = true;
}
return MessQuerschnittAllgemein.mqaMenge;
......
......@@ -28,8 +28,11 @@ package de.bsvrz.sys.funclib.bitctrl.dua.test;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.charset.Charset;
import com.bitctrl.Constants;
......@@ -67,7 +70,7 @@ public class CSVImporter {
*/
public CSVImporter(final File csvDatei) throws Exception {
this.csvDatei = csvDatei;
leser = new BufferedReader(new FileReader(csvDatei));
leser = new BufferedReader(new InputStreamReader(new FileInputStream(csvDatei), Charset.defaultCharset()));
}
/**
......@@ -84,7 +87,7 @@ public class CSVImporter {
name += ".csv";
}
csvDatei = new File(name);
leser = new BufferedReader(new FileReader(csvDatei));
leser = new BufferedReader(new InputStreamReader(new FileInputStream(csvDatei), Charset.defaultCharset()));
}
/**
......@@ -140,7 +143,7 @@ public class CSVImporter {
public final void reset() {
try {
leser.close();
leser = new BufferedReader(new FileReader(csvDatei));
leser = new BufferedReader(new InputStreamReader(new FileInputStream(csvDatei), Charset.defaultCharset()));
} catch (final IOException ex) {
Debug.getLogger().error(Constants.EMPTY_STRING, ex);
}
......
......@@ -297,6 +297,11 @@ public class UmfeldDatenSensorWert implements Comparable<UmfeldDatenSensorWert>
return gleich;
}
@Override
public int hashCode() {
throw new UnsupportedOperationException();
}
@Override
public int compareTo(final UmfeldDatenSensorWert that) {
if (that == null) {
......
......@@ -52,7 +52,8 @@ public final class DUAUmfeldDatenMessStelle {
/**
* statische Instanzen dieser Klasse.
*/
private static Map<SystemObject, DUAUmfeldDatenMessStelle> instanzen;
private static final Map<SystemObject, DUAUmfeldDatenMessStelle> instanzen = new HashMap<>();
private static boolean initialized;
/**
* das Systemobjekt.
......@@ -79,11 +80,12 @@ public final class DUAUmfeldDatenMessStelle {
if (messStellenObjekte == null) {
throw new NullPointerException("Menge der Umfelddaten-Messstellen ist <<null>>");
}
if (DUAUmfeldDatenMessStelle.instanzen != null) {
if (initialized) {
Debug.getLogger().error("UFD-Modell darf nur einmal initialisiert werden");
return;
}
DUAUmfeldDatenMessStelle.instanzen = new HashMap<>();
initialized = true;
for (final SystemObject mStObj : messStellenObjekte) {
DUAUmfeldDatenMessStelle.instanzen.put(mStObj, new DUAUmfeldDatenMessStelle(dav, mStObj));
}
......@@ -98,7 +100,7 @@ public final class DUAUmfeldDatenMessStelle {
* @return die statischen Instanzen dieser Klasse (ggf. leere Liste)
*/
public static Collection<DUAUmfeldDatenMessStelle> getInstanzen() {