Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

squid:S1854 - Dead stores should be removed #557

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

![License](http://img.shields.io/:license-apache-blue.svg)
[![Gitter](https://badges.gitter.im/davidsowerby/krail.svg)](https://gitter.im/davidsowerby/krail?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[![Build Status](https://travis-ci.org/davidsowerby/krailkrail.svg?branch=master)](https://travis-ci.org/davidsowerby/krail)
[![Build Status](https://travis-ci.org/davidsowerby/krail.svg?branch=master)](https://travis-ci.org/davidsowerby/krail)
[![Coverage Status](https://coveralls.io/repos/github/davidsowerby/krail/badge.svg?branch=master)](https://coveralls.io/github/davidsowerby/krail?branch=master)

Krail provides a framework for rapid Java web development by combining Vaadin, Guice, Apache Shiro, Apache Commons Configuration and others. For more information, see the comprehensive [Tutorial](http://krail.readthedocs.org/en/master/), which also makes a reasonable demo. (You can clone directly from the [Tutorial repo](https://github.com/davidsowerby/krail-tutorial))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public boolean load(@Nonnull MasterSitemap sitemap) {

// process the View annotations
for (Class<?> clazz : typesWithView) {
Class<? extends KrailView> viewClass = null;
Class<? extends KrailView> viewClass;
if (KrailView.class.isAssignableFrom(clazz)) {
viewClass = (Class<? extends KrailView>) clazz;
View annotation = viewClass.getAnnotation(View.class);
Expand Down Expand Up @@ -108,7 +108,7 @@ public boolean load(@Nonnull MasterSitemap sitemap) {
}
// process the RedirectFrom annotations
for (Class<?> clazz : typesWithRedirectFrom) {
Class<? extends KrailView> viewClass = null;
Class<? extends KrailView> viewClass;
if (KrailView.class.isAssignableFrom(clazz)) {
viewClass = (Class<? extends KrailView>) clazz;
RedirectFrom redirectAnnotation = viewClass.getAnnotation(RedirectFrom.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -410,10 +410,10 @@ public synchronized List<T> nodeChainFor(NavigationState navigationState, boolea
public synchronized List<T> nodeChainForSegments(List<String> segments, boolean allowPartialPath) {
List<T> nodeChain = new ArrayList<>();
int i = 0;
String currentSegment = null;
String currentSegment;
List<T> nodes = forest.getRoots();
boolean segmentNotFound = false;
T node = null;
T node;
while ((i < segments.size()) && (!segmentNotFound)) {
currentSegment = segments.get(i);
node = findNodeBySegment(nodes, currentSegment, false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public String userId() {
String userId = subject.getPrincipal()
.toString();
if (StringUtils.isEmpty(userId)) {
return userId = "?";
return "?";
}
return userId;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public MenuBarNodeModifier(MenuBar menuBar, Navigator navigator, CaptionReader<U
public MenuItem create(MenuItem parentNode, @Nonnull UserSitemapNode sourceNode) {
checkNotNull(sourceNode);
checkNotNull(captionReader, "This implementation requires a caption reader");
MenuItem newTargetNode = null;
MenuItem newTargetNode;
if (parentNode == null) {
newTargetNode = menuBar.addItem(captionReader.getCaption(sourceNode), null);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ protected void organiseButtons(List<UserSitemapNode> nodeList) {
}
} else {
// chain continues
NavigationButton button = null;
NavigationButton button;
// steps still exist, re-use
if (i < buttons.size()) {
button = buttons.get(i);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ public ViewFieldChecker(ViewBase view, Set<String> fieldsWithoutI18N, Set<String
public boolean check() throws IllegalAccessException {
Class<? extends ViewBase> cut = view.getClass();
System.out.println("Checking " + cut + " for I18N annotated component fields");
boolean allI18N = true;
Field[] declaredFields = cut.getDeclaredFields();
for (int i = 0; i < declaredFields.length; i++) {
Field field = declaredFields[i];
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/uk/q3c/util/TreeCopy.java
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public void copy() {

private void loadNodeList(T parentNode, List<S> sourceNodeList, int level) {

Map<T, S> targetToSourceNodeMap = null;
Map<T, S> targetToSourceNodeMap;
switch (sortOption) {
// some target nodes can only be created from their parent, and cannot be sorted after creation
// so the sort order must be determined before constructing target nodes. This could be used as default
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ public void getSection_sectionNameNotPresent() throws ConfigurationException {
// given
config1 = config("config1.ini");
config2 = config("config2.ini");
String key1 = "a";
// when
configuration.addConfiguration(config1);
configuration.addConfiguration(config2);
Expand Down