-
Notifications
You must be signed in to change notification settings - Fork 17
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
Add plexus 13 parent and reformat #344
Conversation
gnodet
commented
May 22, 2023
- Add plexus 13 parent
- Reformat using spotless
return method; | ||
} | ||
|
||
private JMethod getCheckUnknownAttributeMethod() { | ||
JMethod method; | ||
JSourceCode sc; | ||
method = new JMethod( "checkUnknownAttribute", null, null ); | ||
method = new JMethod("checkUnknownAttribute", null, null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NULL_DEREFERENCE: object null
is dereferenced by call to JMethod(...)
at line 1254.
❗❗ 6 similar findings have been found in this PR
🔎 Expand here to view all instances of this finding
File Path | Line Number |
---|---|
modello-test/src/main/java/org/codehaus/modello/AbstractModelloJavaGeneratorTest.java | 151 |
modello-plugins/modello-plugin-java/src/main/java/org/codehaus/modello/plugin/java/JavaModelloGenerator.java | 1892 |
modello-plugins/modello-plugin-xpp3/src/main/java/org/codehaus/modello/plugin/xpp3/Xpp3ReaderGenerator.java | 1189 |
modello-test/src/main/java/org/codehaus/modello/AbstractModelloJavaGeneratorTest.java | 130 |
modello-plugins/modello-plugin-java/src/main/java/org/codehaus/modello/plugin/java/javasource/JMethod.java | 116 |
modello-plugins/modello-plugin-java/src/main/java/org/codehaus/modello/plugin/java/JavaModelloGenerator.java | 1318 |
Visit the Lift Web Console to find more details in your report.
ℹ️ Expand to see all @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
{ | ||
try { | ||
out.write(chars); | ||
} catch (java.io.IOException ioe) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EmptyCatch: Caught exceptions should not be ignored
❗❗ 19 similar findings have been found in this PR
🔎 Expand here to view all instances of this finding
File Path | Line Number |
---|---|
modello-plugins/modello-plugin-java/src/main/java/org/codehaus/modello/plugin/java/javasource/JSourceWriter.java | 437 |
modello-core/src/main/java/org/codehaus/modello/plugin/AbstractModelloGenerator.java | 118 |
modello-plugins/modello-plugin-java/src/main/java/org/codehaus/modello/plugin/java/javasource/JSourceWriter.java | 367 |
modello-plugins/modello-plugin-java/src/main/java/org/codehaus/modello/plugin/java/javasource/JSourceWriter.java | 449 |
modello-plugins/modello-plugin-java/src/main/java/org/codehaus/modello/plugin/java/javasource/JSourceWriter.java | 412 |
modello-plugins/modello-plugin-java/src/main/java/org/codehaus/modello/plugin/java/javasource/JSourceWriter.java | 327 |
modello-plugins/modello-plugin-java/src/main/java/org/codehaus/modello/plugin/java/javasource/JSourceWriter.java | 313 |
modello-plugins/modello-plugin-java/src/main/java/org/codehaus/modello/plugin/java/javasource/JSourceWriter.java | 480 |
modello-plugins/modello-plugin-java/src/main/java/org/codehaus/modello/plugin/java/javasource/JSourceWriter.java | 354 |
modello-plugins/modello-plugin-java/src/main/java/org/codehaus/modello/plugin/java/javasource/JSourceWriter.java | 502 |
Showing 10 of 19 findings. Visit the Lift Web Console to see all.
ℹ️ Expand to see all @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
{ | ||
try { | ||
out.write(string); | ||
} catch (java.io.IOException ioe) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UnnecessarilyFullyQualified: This fully qualified name is unambiguous to the compiler if imported.
} catch (java.io.IOException ioe) { | |
} catch (IOException ioe) { |
❗❗ 19 similar findings have been found in this PR
🔎 Expand here to view all instances of this finding
File Path | Line Number |
---|---|
modello-plugins/modello-plugin-java/src/main/java/org/codehaus/modello/plugin/java/javasource/JSourceWriter.java | 367 |
modello-plugins/modello-plugin-java/src/main/java/org/codehaus/modello/plugin/java/javasource/JSourceWriter.java | 502 |
modello-plugins/modello-plugin-java/src/main/java/org/codehaus/modello/plugin/java/javasource/JSourceWriter.java | 300 |
modello-plugins/modello-plugin-java/src/main/java/org/codehaus/modello/plugin/java/javasource/JSourceWriter.java | 480 |
modello-plugins/modello-plugin-java/src/main/java/org/codehaus/modello/plugin/java/javasource/JSourceWriter.java | 424 |
modello-plugins/modello-plugin-java/src/main/java/org/codehaus/modello/plugin/java/javasource/JSourceWriter.java | 261 |
modello-plugins/modello-plugin-java/src/main/java/org/codehaus/modello/plugin/java/javasource/JSourceWriter.java | 382 |
modello-plugins/modello-plugin-java/src/main/java/org/codehaus/modello/plugin/java/javasource/JSourceWriter.java | 354 |
modello-plugins/modello-plugin-java/src/main/java/org/codehaus/modello/plugin/java/javasource/JSourceWriter.java | 287 |
modello-plugins/modello-plugin-java/src/main/java/org/codehaus/modello/plugin/java/javasource/JStructure.java | 559 |
Showing 10 of 19 findings. Visit the Lift Web Console to see all.
ℹ️ Expand to see all @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
if ( modelClass == locationTrackerClass ) | ||
{ | ||
jClass.addInterface( locationTrackerInterface ); | ||
if (modelClass == locationTrackerClass) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ReferenceEquality: Comparison using reference equality instead of value equality
if (modelClass == locationTrackerClass) { | |
if (modelClass.equals(locationTrackerClass)) { |
❗❗ 3 similar findings have been found in this PR
🔎 Expand here to view all instances of this finding
File Path | Line Number |
---|---|
modello-plugins/modello-plugin-java/src/main/java/org/codehaus/modello/plugin/java/JavaModelloGenerator.java | 266 |
modello-plugins/modello-plugin-java/src/main/java/org/codehaus/modello/plugin/java/JavaModelloGenerator.java | 1849 |
modello-plugins/modello-plugin-xsd/src/main/java/org/codehaus/modello/plugin/xsd/XsdGenerator.java | 262 |
Visit the Lift Web Console to find more details in your report.
ℹ️ Expand to see all @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
protected String[] getParameterClassNames() | ||
{ | ||
List<String> names = new ArrayList<String>( params.size() ); | ||
protected String[] getParameterClassNames() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ProtectedMembersInFinalClass: Make members of final classes package-private: getParameterClassNames
protected String[] getParameterClassNames() { | |
String[] getParameterClassNames() { |
ℹ️ Expand to see all @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
{ | ||
return getElementXmlDescriptor( rootModelClass, null, new Stack<String>() ); | ||
private String getModelXmlDescriptor(ModelClass rootModelClass) { | ||
return getElementXmlDescriptor(rootModelClass, null, new Stack<String>()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JdkObsolete: Stack is a nonstandard class that predates the Java Collections Framework; prefer ArrayDeque. Note that the Stack methods push/pop/peek correspond to the Deque methods addFirst/removeFirst/peekFirst.
ℹ️ Expand to see all @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
JInnerClass( String name ) | ||
{ | ||
super( name ); | ||
final class JInnerClass extends JClass { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ClassCanBeStatic: Inner class is non-static but does not reference enclosing class
final class JInnerClass extends JClass { | |
static final class JInnerClass extends JClass { |
ℹ️ Expand to see all @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
|
||
File modelFile = new File( basedir, modelStr ); | ||
buildContext.removeMessages( modelFile ); | ||
File modelFile = new File(basedir, modelStr); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PATH_TRAVERSAL_IN: This API (java/io/File.(Ljava/lang/String;Ljava/lang/String;)V) reads a file whose location might be specified by user input
❗❗ 20 similar findings have been found in this PR
🔎 Expand here to view all instances of this finding
File Path | Line Number |
---|---|
modello-plugins/modello-plugin-xdoc/src/main/java/org/codehaus/modello/plugin/xdoc/XdocGenerator.java | 110 |
modello-plugins/modello-plugin-jsonschema/src/main/java/org/codehaus/modello/plugin/jsonschema/JsonSchemaGenerator.java | 87 |
modello-plugins/modello-plugin-java/src/main/java/org/codehaus/modello/plugin/java/javasource/JStructure.java | 363 |
modello-test/src/main/java/org/codehaus/modello/AbstractModelloJavaGeneratorTest.java | 278 |
modello-plugins/modello-plugin-xsd/src/main/java/org/codehaus/modello/plugin/xsd/XsdGenerator.java | 90 |
modello-plugins/modello-plugin-jsonschema/src/main/java/org/codehaus/modello/plugin/jsonschema/JsonSchemaGenerator.java | 85 |
modello-plugins/modello-plugin-xdoc/src/main/java/org/codehaus/modello/plugin/xdoc/XdocGenerator.java | 113 |
modello-plugins/modello-plugin-velocity/src/main/java/org/codehaus/modello/plugin/velocity/VelocityGenerator.java | 82 |
modello-test/src/main/java/org/codehaus/modello/AbstractModelloGeneratorTest.java | 107 |
modello-test/src/main/java/org/codehaus/modello/verifier/Verifier.java | 42 |
Showing 10 of 20 findings. Visit the Lift Web Console to see all.
ℹ️ Expand to see all @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
jsw.flush(); | ||
jsw.close(); | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PULSE_RESOURCE_LEAK: Resource dynamically allocated by constructor org.codehaus.modello.plugin.java.javasource.JSourceWriter() on line 340 is not closed after the last access at line 353.
ℹ️ Expand to see all @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
{ | ||
protected Writer newWriter(Path path, Charset charset) throws IOException { | ||
CachingWriter cachingWriter = new CachingWriter(path, charset); | ||
return new FilterWriter(cachingWriter) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PULSE_RESOURCE_LEAK: Resource dynamically allocated by constructor org.codehaus.plexus.util.io.CachingWriter() on line 255 is not closed after the last access at line 256.
ℹ️ Expand to see all @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sonatype-lift ignoreall
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ignoreall command is active on this PR, all the existing Lift issues are ignored.
🛠 Lift Auto-fixSome of the Lift findings in this PR can be automatically fixed. You can download and apply these changes in your local project directory of your branch to review the suggestions before committing.1 # Download the patch
curl https://lift.sonatype.com/api/patch/github.com/codehaus-plexus/modello/344.diff -o lift-autofixes.diff
# Apply the patch with git
git apply lift-autofixes.diff
# Review the changes
git diff Want it all in a single command? Open a terminal in your project's directory and copy and paste the following command: curl https://lift.sonatype.com/api/patch/github.com/codehaus-plexus/modello/344.diff | git apply Once you're satisfied, commit and push your changes in your project. Footnotes |