Skip to content

Commit

Permalink
qa: fix checkstyle warnings, use parameterized logging statements (#75)
Browse files Browse the repository at this point in the history
* joshariassurvival, checkstyle warnings.
* use parameterized logger statements.
* toString not necessary

Co-authored-by: jdrueckert <[email protected]>
  • Loading branch information
soloturn and jdrueckert authored Jan 6, 2024
1 parent 16b4ee8 commit 53b221d
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 78 deletions.
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
/*
* Copyright 2015 MovingBlocks
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2015 The Terasology Foundation
// SPDX-License-Identifier: Apache-2.0

package org.terasology.joshariasSurvival.systems;

import org.joml.RoundingMode;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
/*
* Copyright 2017 MovingBlocks
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2015 The Terasology Foundation
// SPDX-License-Identifier: Apache-2.0

package org.terasology.joshariasSurvival.systems;

import com.google.common.collect.HashMultimap;
Expand Down Expand Up @@ -91,12 +79,12 @@ public String logItemsWithoutOutputProcess() {
int count = 0;
for (ResourceUrn input : knownInputs) {
if (!knownOutputs.contains(input)) {
logger.info(input.toString() + " does not have a known output process");
logger.info("{} does not have a known output process", input);
count++;
}
}

logger.info("--- finished logging items without an output process (" + count + " items)");
logger.info("--- finished logging items without an output process ({} items)", count);

return "Logged as info all items without assembly processes defined";
}
Expand Down Expand Up @@ -161,7 +149,7 @@ public String logItemCraftingComplexity() {
}

for (Map.Entry<ResourceUrn, Integer> entry : maxDepthMap.entrySet()) {
logger.info(entry.getKey().toString() + " MaxDepth=" + entry.getValue() + " MaxComplexity=" + maxComplexityMap.get(entry.getKey()));
logger.info("{} MaxDepth={} MaxComplexity={}", entry.getKey(), entry.getValue(), maxComplexityMap.get(entry.getKey()));

Check warning on line 152 in src/main/java/org/terasology/joshariasSurvival/systems/WorkstationDiagnosticsSystem.java

View check run for this annotation

Terasology Jenkins.io / PMD

GuardLogStatementJavaUtil

HIGH: Logger calls should be surrounded by log level guards.
}

logger.info("--- finished logging item crafting complexity");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
/*
* Copyright 2015 MovingBlocks
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2015 The Terasology Foundation
// SPDX-License-Identifier: Apache-2.0

package org.terasology.joshariasSurvival.world;

import org.terasology.engine.world.block.BlockRegion;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
/*
* Copyright 2015 MovingBlocks
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2015 The Terasology Foundation
// SPDX-License-Identifier: Apache-2.0

package org.terasology.joshariasSurvival.world;

import com.google.common.collect.ImmutableList;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
/*
* Copyright 2015 MovingBlocks
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2015 The Terasology Foundation
// SPDX-License-Identifier: Apache-2.0

package org.terasology.joshariasSurvival.world;

Expand Down

0 comments on commit 53b221d

Please sign in to comment.