mirror of https://github.com/jruby-gradle/jem
Clean up some minor codenarc complaints
This commit is contained in:
parent
14cc95fa9e
commit
f7c756839c
|
@ -164,7 +164,7 @@ ruleset {
|
||||||
InconsistentPropertyLocking
|
InconsistentPropertyLocking
|
||||||
InconsistentPropertySynchronization
|
InconsistentPropertySynchronization
|
||||||
InsecureRandom
|
InsecureRandom
|
||||||
Instanceof
|
//Instanceof
|
||||||
IntegerGetInteger
|
IntegerGetInteger
|
||||||
InterfaceName
|
InterfaceName
|
||||||
InterfaceNameSameAsSuperInterface
|
InterfaceNameSameAsSuperInterface
|
||||||
|
@ -184,7 +184,7 @@ ruleset {
|
||||||
JUnitUnnecessarySetUp
|
JUnitUnnecessarySetUp
|
||||||
JUnitUnnecessaryTearDown
|
JUnitUnnecessaryTearDown
|
||||||
JUnitUnnecessaryThrowsException
|
JUnitUnnecessaryThrowsException
|
||||||
JavaIoPackageAccess
|
//JavaIoPackageAccess
|
||||||
JdbcConnectionReference
|
JdbcConnectionReference
|
||||||
JdbcResultSetReference
|
JdbcResultSetReference
|
||||||
JdbcStatementReference
|
JdbcStatementReference
|
||||||
|
@ -320,7 +320,7 @@ ruleset {
|
||||||
UnnecessaryPackageReference
|
UnnecessaryPackageReference
|
||||||
UnnecessaryParenthesesForMethodCallWithClosure
|
UnnecessaryParenthesesForMethodCallWithClosure
|
||||||
UnnecessaryPublicModifier
|
UnnecessaryPublicModifier
|
||||||
UnnecessaryReturnKeyword
|
//UnnecessaryReturnKeyword
|
||||||
UnnecessarySafeNavigationOperator
|
UnnecessarySafeNavigationOperator
|
||||||
UnnecessarySelfAssignment
|
UnnecessarySelfAssignment
|
||||||
UnnecessarySemicolon
|
UnnecessarySemicolon
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
package com.github.jrubygradle.groovygem
|
package com.github.jrubygradle.groovygem
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty
|
import com.fasterxml.jackson.annotation.JsonProperty
|
||||||
|
import groovy.transform.CompileStatic
|
||||||
import groovy.transform.TypeChecked
|
import groovy.transform.TypeChecked
|
||||||
import sun.org.mozilla.javascript.commonjs.module.Require
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@TypeChecked
|
@TypeChecked
|
||||||
|
@CompileStatic
|
||||||
class Dependency {
|
class Dependency {
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
String name
|
String name
|
||||||
|
|
|
@ -58,7 +58,7 @@ class Gem {
|
||||||
/**
|
/**
|
||||||
* Take the given argument and produce a {@code Gem} instance
|
* Take the given argument and produce a {@code Gem} instance
|
||||||
*
|
*
|
||||||
* @param metadata a {@code java.lang.String} or a {@code java.io.File}
|
* @param metadata a {@code java.lang.String}, a {@code java.io.File} or a {@code java.util.zip.GZIPInputStream}
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
static Gem fromFile(Object metadata) {
|
static Gem fromFile(Object metadata) {
|
||||||
|
@ -73,13 +73,13 @@ class Gem {
|
||||||
metadataFile = metadata as File
|
metadataFile = metadata as File
|
||||||
}
|
}
|
||||||
else if (metadata instanceof InputStream) {
|
else if (metadata instanceof InputStream) {
|
||||||
return mapper.readValue(metadata, Gem.class)
|
return mapper.readValue(metadata, Gem)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(metadataFile?.exists())) {
|
if (!(metadataFile?.exists())) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
return mapper.readValue(metadataFile, Gem.class)
|
return mapper.readValue(metadataFile, Gem)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
package com.github.jrubygradle.groovygem
|
package com.github.jrubygradle.groovygem
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty
|
import groovy.transform.CompileStatic
|
||||||
import groovy.transform.TypeChecked
|
import groovy.transform.TypeChecked
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@TypeChecked
|
@TypeChecked
|
||||||
|
@CompileStatic
|
||||||
class Requirement {
|
class Requirement {
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
package com.github.jrubygradle.groovygem
|
package com.github.jrubygradle.groovygem
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty
|
import com.fasterxml.jackson.annotation.JsonProperty
|
||||||
|
import groovy.transform.CompileStatic
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
|
@CompileStatic
|
||||||
class Version {
|
class Version {
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
String version
|
String version
|
||||||
|
|
Loading…
Reference in New Issue