mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-07-07 10:32:37 +02:00
fixed some sonarqube findings
This commit is contained in:
@@ -24,8 +24,6 @@
|
||||
|
||||
package sonia.scm.store;
|
||||
|
||||
//~--- non-JDK imports --------------------------------------------------------
|
||||
|
||||
import com.google.common.collect.Collections2;
|
||||
import com.google.common.collect.Maps;
|
||||
import org.slf4j.Logger;
|
||||
@@ -45,32 +43,13 @@ import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
import static javax.xml.stream.XMLStreamConstants.END_ELEMENT;
|
||||
|
||||
/**
|
||||
* @param <V>
|
||||
* @author Sebastian Sdorra
|
||||
*/
|
||||
public class JAXBConfigurationEntryStore<V> implements ConfigurationEntryStore<V> {
|
||||
|
||||
/**
|
||||
* Field description
|
||||
*/
|
||||
private static final String TAG_CONFIGURATION = "configuration";
|
||||
|
||||
/**
|
||||
* Field description
|
||||
*/
|
||||
private static final String TAG_ENTRY = "entry";
|
||||
|
||||
/**
|
||||
* Field description
|
||||
*/
|
||||
private static final String TAG_KEY = "key";
|
||||
|
||||
/**
|
||||
* Field description
|
||||
*/
|
||||
private static final String TAG_VALUE = "value";
|
||||
|
||||
/**
|
||||
@@ -191,7 +170,7 @@ public class JAXBConfigurationEntryStore<V> implements ConfigurationEntryStore<V
|
||||
}
|
||||
|
||||
// closed or new entry tag
|
||||
if (reader.nextTag() == XMLStreamReader.END_ELEMENT) {
|
||||
if (reader.nextTag() == END_ELEMENT) {
|
||||
|
||||
// fixed format, start new entry
|
||||
reader.nextTag();
|
||||
@@ -203,9 +182,6 @@ public class JAXBConfigurationEntryStore<V> implements ConfigurationEntryStore<V
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*/
|
||||
private void store() {
|
||||
LOG.debug("store configuration to {}", file);
|
||||
|
||||
|
||||
@@ -24,18 +24,11 @@
|
||||
|
||||
package sonia.scm.store;
|
||||
|
||||
//~--- non-JDK imports --------------------------------------------------------
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
import java.io.File;
|
||||
|
||||
import javax.xml.bind.JAXBContext;
|
||||
import javax.xml.bind.JAXBException;
|
||||
import javax.xml.bind.Marshaller;
|
||||
|
||||
/**
|
||||
* JAXB implementation of {@link ConfigurationStore}.
|
||||
*
|
||||
|
||||
@@ -24,24 +24,15 @@
|
||||
|
||||
package sonia.scm.store;
|
||||
|
||||
//~--- non-JDK imports --------------------------------------------------------
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.google.common.collect.ImmutableMap.Builder;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import sonia.scm.security.KeyGenerator;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
import java.io.File;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import javax.xml.bind.JAXBContext;
|
||||
import javax.xml.bind.JAXBException;
|
||||
import javax.xml.bind.Marshaller;
|
||||
|
||||
/**
|
||||
* Jaxb implementation of {@link DataStore}.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user