Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TeeTime-Framework
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nelson Tavares de Sousa
TeeTime-Framework
Commits
f25c732e
Commit
f25c732e
authored
9 years ago
by
Christian Wulf
Browse files
Options
Downloads
Patches
Plain Diff
fixed some pmd issues
parent
96b5f39f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
conf/quality-config/pmd-ruleset.xml
+1
-0
1 addition, 0 deletions
conf/quality-config/pmd-ruleset.xml
src/main/java/teetime/stage/FileExtensionSwitch.java
+2
-1
2 additions, 1 deletion
src/main/java/teetime/stage/FileExtensionSwitch.java
with
3 additions
and
1 deletion
conf/quality-config/pmd-ruleset.xml
+
1
−
0
View file @
f25c732e
...
@@ -78,6 +78,7 @@
...
@@ -78,6 +78,7 @@
<rule
ref=
"rulesets/java/optimizations.xml"
>
<rule
ref=
"rulesets/java/optimizations.xml"
>
<exclude
name=
"LocalVariableCouldBeFinal"
/>
<exclude
name=
"LocalVariableCouldBeFinal"
/>
<exclude
name=
"SimplifyStartsWith"
/>
</rule>
</rule>
...
...
This diff is collapsed.
Click to expand it.
src/main/java/teetime/stage/FileExtensionSwitch.java
+
2
−
1
View file @
f25c732e
...
@@ -27,7 +27,7 @@ import com.google.common.io.Files;
...
@@ -27,7 +27,7 @@ import com.google.common.io.Files;
public
final
class
FileExtensionSwitch
extends
AbstractConsumerStage
<
File
>
{
public
final
class
FileExtensionSwitch
extends
AbstractConsumerStage
<
File
>
{
private
final
OutputPort
<
File
>
unknownFileExtensionOutputPort
=
createOutputPort
();
private
final
OutputPort
<
File
>
unknownFileExtensionOutputPort
=
createOutputPort
(
File
.
class
);
// BETTER use the hppc ObjectObjectMap that provide getOrDefault()
// BETTER use the hppc ObjectObjectMap that provide getOrDefault()
private
final
Map
<
String
,
OutputPort
<
File
>>
fileExtensions
=
new
HashMapWithDefault
<
String
,
OutputPort
<
File
>>(
new
ValueFactory
<
OutputPort
<
File
>>()
{
private
final
Map
<
String
,
OutputPort
<
File
>>
fileExtensions
=
new
HashMapWithDefault
<
String
,
OutputPort
<
File
>>(
new
ValueFactory
<
OutputPort
<
File
>>()
{
...
@@ -48,6 +48,7 @@ public final class FileExtensionSwitch extends AbstractConsumerStage<File> {
...
@@ -48,6 +48,7 @@ public final class FileExtensionSwitch extends AbstractConsumerStage<File> {
outputPort
.
send
(
file
);
outputPort
.
send
(
file
);
}
}
@SuppressWarnings
(
"PMD.AvoidReassigningParameters"
)
public
OutputPort
<
File
>
addFileExtension
(
String
fileExtension
)
{
public
OutputPort
<
File
>
addFileExtension
(
String
fileExtension
)
{
if
(
fileExtension
.
startsWith
(
"."
))
{
if
(
fileExtension
.
startsWith
(
"."
))
{
fileExtension
=
fileExtension
.
substring
(
1
);
fileExtension
=
fileExtension
.
substring
(
1
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment