Project Information
Project:
FindBugs version: 3.0.1
Code analyzed:
- /var/snap-ci/repo/build/classes/test/au/com/mountainpass/hyperstate/client/GetAction.class
- /var/snap-ci/repo/build/classes/test/au/com/mountainpass/hyperstate/client/SpringBeanHandlerInstantiator.class
- /var/snap-ci/repo/build/classes/test/au/com/mountainpass/hyperstate/client/AutowiringDeserializer.class
- /var/snap-ci/repo/build/classes/test/au/com/mountainpass/hyperstate/client/MediaTypeDeserializer.class
- /var/snap-ci/repo/build/classes/test/au/com/mountainpass/hyperstate/client/EntityWrapperProxyDeserializer.class
- /var/snap-ci/repo/build/classes/test/au/com/mountainpass/hyperstate/client/CreateAction.class
- /var/snap-ci/repo/build/classes/test/au/com/mountainpass/hyperstate/client/UpdateAction.class
- /var/snap-ci/repo/build/classes/test/au/com/mountainpass/hyperstate/client/RepositoryResolver.class
- /var/snap-ci/repo/build/classes/test/au/com/mountainpass/hyperstate/client/webdriver/WebDriverFactory.class
- /var/snap-ci/repo/build/classes/test/au/com/mountainpass/hyperstate/client/webdriver/WebDriverResolver$1.class
- /var/snap-ci/repo/build/classes/test/au/com/mountainpass/hyperstate/client/webdriver/WebDriverResolver$2.class
- /var/snap-ci/repo/build/classes/test/au/com/mountainpass/hyperstate/client/webdriver/WebDriverResolver.class
- /var/snap-ci/repo/build/classes/test/au/com/mountainpass/hyperstate/client/webdriver/WebDriverTestConfiguration.class
- /var/snap-ci/repo/build/classes/test/au/com/mountainpass/hyperstate/client/webdriver/WebDriverResolver$2$1.class
- /var/snap-ci/repo/build/classes/test/au/com/mountainpass/hyperstate/client/webdriver/WebDriverLink.class
- /var/snap-ci/repo/build/classes/test/au/com/mountainpass/hyperstate/client/builder/RestActionBuilder$1.class
- /var/snap-ci/repo/build/classes/test/au/com/mountainpass/hyperstate/client/builder/RestActionBuilder.class
- /var/snap-ci/repo/build/classes/test/au/com/mountainpass/hyperstate/client/builder/NavigationalRelationshipBuilder.class
- /var/snap-ci/repo/build/classes/test/au/com/mountainpass/hyperstate/client/builder/EntityRelationshipBuilder.class
- /var/snap-ci/repo/build/classes/test/au/com/mountainpass/hyperstate/client/RestLink.class
- /var/snap-ci/repo/build/classes/test/au/com/mountainpass/hyperstate/client/RestTemplateResolver.class
- /var/snap-ci/repo/build/classes/test/au/com/mountainpass/hyperstate/client/EntityWrapperProxyDeserializer$1.class
- /var/snap-ci/repo/build/classes/test/au/com/mountainpass/hyperstate/client/DeleteAction.class
- /var/snap-ci/repo/build/classes/test/au/com/mountainpass/hyperstate/client/RestEntity.class
- /var/snap-ci/repo/build/classes/test/au/com/mountainpass/hyperstate/client/mixins/NavigationalRelationshipMixin.class
- /var/snap-ci/repo/build/classes/test/au/com/mountainpass/hyperstate/client/mixins/ActionMixin.class
- /var/snap-ci/repo/build/classes/test/au/com/mountainpass/hyperstate/client/mixins/LinkMixin.class
- /var/snap-ci/repo/build/classes/test/au/com/mountainpass/hyperstate/client/mixins/EntityRelationshipMixin.class
- /var/snap-ci/repo/build/classes/test/au/com/mountainpass/hyperstate/server/config/HyperstateTestConfiguration$CustomTomcatEmbeddedServletContainerFactory.class
- /var/snap-ci/repo/build/classes/test/au/com/mountainpass/hyperstate/server/config/HyperstateTestConfiguration$1.class
- /var/snap-ci/repo/build/classes/test/au/com/mountainpass/hyperstate/server/config/HyperstateTestMapper.class
- /var/snap-ci/repo/build/classes/test/au/com/mountainpass/hyperstate/server/config/HyperstateTestConfiguration$2.class
- /var/snap-ci/repo/build/classes/test/au/com/mountainpass/hyperstate/server/config/HyperstateTestKeyStoreManager.class
- /var/snap-ci/repo/build/classes/test/au/com/mountainpass/hyperstate/server/config/HyperstateTestConfiguration.class
- /var/snap-ci/repo/build/classes/test/au/com/mountainpass/hyperstate/server/HyperstateTestController.class
- /var/snap-ci/repo/build/classes/test/au/com/mountainpass/hyperstate/server/entities/Account.class
- /var/snap-ci/repo/build/classes/test/au/com/mountainpass/hyperstate/server/entities/AccountProperties.class
- /var/snap-ci/repo/build/classes/test/au/com/mountainpass/hyperstate/server/StepDefs$AccountBuilder.class
- /var/snap-ci/repo/build/classes/test/au/com/mountainpass/hyperstate/server/InMemoryRepository.class
- /var/snap-ci/repo/build/classes/test/au/com/mountainpass/hyperstate/server/StepDefs.class
- /var/snap-ci/repo/build/classes/test/HyperstateTests.class
Metrics
1056 lines of code analyzed,
in 41 classes,
in 8 packages.
| High Priority Warnings |
|
0.00 |
| Medium Priority Warnings |
15 |
14.20 |
| Low Priority Warnings |
11 |
10.42 |
|
Total Warnings
|
26
|
24.62
|
(* Defects per Thousand lines of non-commenting source statements)
Contents
Summary
Warnings
Click on a warning row to see full context information.
|
OS
|
au.com.mountainpass.hyperstate.server.config.HyperstateTestConfiguration.trustStore() may fail to close stream |
|
Bug type OS_OPEN_STREAM (click for details)
In class au.com.mountainpass.hyperstate.server.config.HyperstateTestConfiguration In method au.com.mountainpass.hyperstate.server.config.HyperstateTestConfiguration.trustStore() Need to close java.io.InputStream At HyperstateTestConfiguration.java:[line 442]
|
|
OS
|
au.com.mountainpass.hyperstate.server.config.HyperstateTestKeyStoreManager.createKeyStore(String, String, String, String, String, String, String, String) may fail to close stream on exception |
|
Bug type OS_OPEN_STREAM_EXCEPTION_PATH (click for details)
In class au.com.mountainpass.hyperstate.server.config.HyperstateTestKeyStoreManager In method au.com.mountainpass.hyperstate.server.config.HyperstateTestKeyStoreManager.createKeyStore(String, String, String, String, String, String, String, String) Need to close java.io.OutputStream At HyperstateTestKeyStoreManager.java:[line 54]
|
|
OS
|
au.com.mountainpass.hyperstate.server.config.HyperstateTestKeyStoreManager.createSelfSignedCertificate(KeyPair, String, String, String, String, String) may fail to close stream on exception |
|
Bug type OS_OPEN_STREAM_EXCEPTION_PATH (click for details)
In class au.com.mountainpass.hyperstate.server.config.HyperstateTestKeyStoreManager In method au.com.mountainpass.hyperstate.server.config.HyperstateTestKeyStoreManager.createSelfSignedCertificate(KeyPair, String, String, String, String, String) Need to close java.io.OutputStream At HyperstateTestKeyStoreManager.java:[line 90]
|
|
Se
|
Class au.com.mountainpass.hyperstate.client.AutowiringDeserializer defines non-transient non-serializable instance field context |
|
Bug type SE_BAD_FIELD (click for details)
In class au.com.mountainpass.hyperstate.client.AutowiringDeserializer Field au.com.mountainpass.hyperstate.client.AutowiringDeserializer.context Actual type org.springframework.context.ApplicationContext In AutowiringDeserializer.java
|
|
Se
|
Class au.com.mountainpass.hyperstate.client.EntityWrapperProxyDeserializer defines non-transient non-serializable instance field context |
|
Bug type SE_BAD_FIELD (click for details)
In class au.com.mountainpass.hyperstate.client.EntityWrapperProxyDeserializer Field au.com.mountainpass.hyperstate.client.EntityWrapperProxyDeserializer.context Actual type org.springframework.context.ApplicationContext In EntityWrapperProxyDeserializer.java
|
|
Se
|
Class au.com.mountainpass.hyperstate.server.entities.AccountProperties defines non-transient non-serializable instance field LOGGER |
|
Bug type SE_BAD_FIELD (click for details)
In class au.com.mountainpass.hyperstate.server.entities.AccountProperties Field au.com.mountainpass.hyperstate.server.entities.AccountProperties.LOGGER Actual type org.slf4j.Logger In AccountProperties.java
|
|
OBL
|
au.com.mountainpass.hyperstate.server.config.HyperstateTestConfiguration.trustStore() may fail to clean up java.io.InputStream |
|
Bug type OBL_UNSATISFIED_OBLIGATION (click for details)
In class au.com.mountainpass.hyperstate.server.config.HyperstateTestConfiguration In method au.com.mountainpass.hyperstate.server.config.HyperstateTestConfiguration.trustStore() Reference type java.io.InputStream 1 instances of obligation remaining Obligation to clean up resource created at HyperstateTestConfiguration.java:[line 442] is not discharged Path continues at HyperstateTestConfiguration.java:[line 443] Remaining obligations: {InputStream x 1}
|
|
OBL
|
au.com.mountainpass.hyperstate.server.config.HyperstateTestKeyStoreManager.createKeyStore(String, String, String, String, String, String, String, String) may fail to clean up java.io.OutputStream on checked exception |
|
Bug type OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE (click for details)
In class au.com.mountainpass.hyperstate.server.config.HyperstateTestKeyStoreManager In method au.com.mountainpass.hyperstate.server.config.HyperstateTestKeyStoreManager.createKeyStore(String, String, String, String, String, String, String, String) Reference type java.io.OutputStream 1 instances of obligation remaining Obligation to clean up resource created at HyperstateTestKeyStoreManager.java:[line 54] is not discharged Path continues at HyperstateTestKeyStoreManager.java:[line 55] Remaining obligations: {OutputStream x 1}
|
|
OBL
|
au.com.mountainpass.hyperstate.server.config.HyperstateTestKeyStoreManager.createSelfSignedCertificate(KeyPair, String, String, String, String, String) may fail to clean up java.io.OutputStream on checked exception |
|
Bug type OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE (click for details)
In class au.com.mountainpass.hyperstate.server.config.HyperstateTestKeyStoreManager In method au.com.mountainpass.hyperstate.server.config.HyperstateTestKeyStoreManager.createSelfSignedCertificate(KeyPair, String, String, String, String, String) Reference type java.io.OutputStream 1 instances of obligation remaining Obligation to clean up resource created at HyperstateTestKeyStoreManager.java:[line 90] is not discharged Path continues at HyperstateTestKeyStoreManager.java:[line 91] Remaining obligations: {OutputStream x 1}
|
|
Dm
|
Use of non-localized String.toUpperCase() or String.toLowerCase() in au.com.mountainpass.hyperstate.client.webdriver.WebDriverResolver$2$1.intercept(Object, Method, Object[], MethodProxy) |
|
Bug type DM_CONVERT_CASE (click for details)
In class au.com.mountainpass.hyperstate.client.webdriver.WebDriverResolver$2$1 In method au.com.mountainpass.hyperstate.client.webdriver.WebDriverResolver$2$1.intercept(Object, Method, Object[], MethodProxy) At WebDriverResolver.java:[line 272]
|
|
EI2
|
au.com.mountainpass.hyperstate.client.builder.EntityRelationshipBuilder.setClass(String[]) may expose internal representation by storing an externally mutable object into EntityRelationshipBuilder.entityNatures |
|
Bug type EI_EXPOSE_REP2 (click for details)
In class au.com.mountainpass.hyperstate.client.builder.EntityRelationshipBuilder In method au.com.mountainpass.hyperstate.client.builder.EntityRelationshipBuilder.setClass(String[]) Field au.com.mountainpass.hyperstate.client.builder.EntityRelationshipBuilder.entityNatures Local variable named natures At EntityRelationshipBuilder.java:[line 33]
|
|
EI2
|
au.com.mountainpass.hyperstate.client.builder.EntityRelationshipBuilder.setRel(String[]) may expose internal representation by storing an externally mutable object into EntityRelationshipBuilder.relationshipNatures |
|
Bug type EI_EXPOSE_REP2 (click for details)
In class au.com.mountainpass.hyperstate.client.builder.EntityRelationshipBuilder In method au.com.mountainpass.hyperstate.client.builder.EntityRelationshipBuilder.setRel(String[]) Field au.com.mountainpass.hyperstate.client.builder.EntityRelationshipBuilder.relationshipNatures Local variable named natures At EntityRelationshipBuilder.java:[line 45]
|
|
EI2
|
au.com.mountainpass.hyperstate.client.builder.NavigationalRelationshipBuilder.setHref(String[]) may expose internal representation by storing an externally mutable object into NavigationalRelationshipBuilder.natures |
|
Bug type EI_EXPOSE_REP2 (click for details)
In class au.com.mountainpass.hyperstate.client.builder.NavigationalRelationshipBuilder In method au.com.mountainpass.hyperstate.client.builder.NavigationalRelationshipBuilder.setHref(String[]) Field au.com.mountainpass.hyperstate.client.builder.NavigationalRelationshipBuilder.natures Local variable named natures At NavigationalRelationshipBuilder.java:[line 28]
|
|
EI2
|
au.com.mountainpass.hyperstate.client.builder.RestActionBuilder.setFields(Parameter[]) may expose internal representation by storing an externally mutable object into RestActionBuilder.fields |
|
Bug type EI_EXPOSE_REP2 (click for details)
In class au.com.mountainpass.hyperstate.client.builder.RestActionBuilder In method au.com.mountainpass.hyperstate.client.builder.RestActionBuilder.setFields(Parameter[]) Field au.com.mountainpass.hyperstate.client.builder.RestActionBuilder.fields Local variable named fields At RestActionBuilder.java:[line 58]
|
|
SIC
|
The class au.com.mountainpass.hyperstate.client.EntityWrapperProxyDeserializer$1 could be refactored into a named _static_ inner class |
|
Bug type SIC_INNER_SHOULD_BE_STATIC_ANON (click for details)
In class au.com.mountainpass.hyperstate.client.EntityWrapperProxyDeserializer$1 At EntityWrapperProxyDeserializer.java:[lines 50-79]
|
|
UrF
|
Unread field: au.com.mountainpass.hyperstate.client.builder.EntityRelationshipBuilder.type |
|
Bug type URF_UNREAD_FIELD (click for details)
In class au.com.mountainpass.hyperstate.client.builder.EntityRelationshipBuilder Field au.com.mountainpass.hyperstate.client.builder.EntityRelationshipBuilder.type At EntityRelationshipBuilder.java:[line 51]
|
|
UrF
|
Unread field: au.com.mountainpass.hyperstate.client.SpringBeanHandlerInstantiator.applicationContext |
|
Bug type URF_UNREAD_FIELD (click for details)
In class au.com.mountainpass.hyperstate.client.SpringBeanHandlerInstantiator Field au.com.mountainpass.hyperstate.client.SpringBeanHandlerInstantiator.applicationContext At SpringBeanHandlerInstantiator.java:[line 26]
|
|
UrF
|
Unread field: au.com.mountainpass.hyperstate.client.webdriver.WebDriverResolver.LOGGER |
|
Bug type URF_UNREAD_FIELD (click for details)
In class au.com.mountainpass.hyperstate.client.webdriver.WebDriverResolver Field au.com.mountainpass.hyperstate.client.webdriver.WebDriverResolver.LOGGER At WebDriverResolver.java:[line 81]
|
|
UrF
|
Unread field: au.com.mountainpass.hyperstate.server.InMemoryRepository.children |
|
Bug type URF_UNREAD_FIELD (click for details)
In class au.com.mountainpass.hyperstate.server.InMemoryRepository Field au.com.mountainpass.hyperstate.server.InMemoryRepository.children At InMemoryRepository.java:[line 20]
|
|
UrF
|
Unread field: au.com.mountainpass.hyperstate.server.StepDefs$AccountBuilder.path |
|
Bug type URF_UNREAD_FIELD (click for details)
In class au.com.mountainpass.hyperstate.server.StepDefs$AccountBuilder Field au.com.mountainpass.hyperstate.server.StepDefs$AccountBuilder.path At StepDefs.java:[line 86]
|
|
NP
|
driver must be non-null but is marked as nullable |
|
Bug type NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE (click for details)
In class au.com.mountainpass.hyperstate.client.webdriver.WebDriverResolver$1 In method au.com.mountainpass.hyperstate.client.webdriver.WebDriverResolver$1.apply(WebDriver) Parameter driver At WebDriverResolver.java:[lines 60-73]
|
|
UrF
|
Unread public/protected field: au.com.mountainpass.hyperstate.server.config.HyperstateTestKeyStoreManager.LOGGER |
|
Bug type URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD (click for details)
In class au.com.mountainpass.hyperstate.server.config.HyperstateTestKeyStoreManager Field au.com.mountainpass.hyperstate.server.config.HyperstateTestKeyStoreManager.LOGGER At HyperstateTestKeyStoreManager.java:[line 29]
|
|
UrF
|
Unread public/protected field: au.com.mountainpass.hyperstate.server.StepDefs.LOGGER |
|
Bug type URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD (click for details)
In class au.com.mountainpass.hyperstate.server.StepDefs Field au.com.mountainpass.hyperstate.server.StepDefs.LOGGER At StepDefs.java:[line 106]
|
|
UwF
|
RestActionBuilder.method not initialized in constructor and dereferenced in au.com.mountainpass.hyperstate.client.builder.RestActionBuilder.build() |
|
Bug type UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR (click for details)
In class au.com.mountainpass.hyperstate.client.builder.RestActionBuilder Field au.com.mountainpass.hyperstate.client.builder.RestActionBuilder.method In method au.com.mountainpass.hyperstate.client.builder.RestActionBuilder.build() At RestActionBuilder.java:[line 37]
|
|
UwF
|
RestLink.restTemplate not initialized in constructor and dereferenced in au.com.mountainpass.hyperstate.client.RestLink.resolve(Class) |
|
Bug type UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR (click for details)
In class au.com.mountainpass.hyperstate.client.RestLink Field au.com.mountainpass.hyperstate.client.RestLink.restTemplate In method au.com.mountainpass.hyperstate.client.RestLink.resolve(Class) At RestLink.java:[line 68]
|
|
UwF
|
RestLink.restTemplate not initialized in constructor and dereferenced in au.com.mountainpass.hyperstate.client.RestLink.resolve(ParameterizedTypeReference) |
|
Bug type UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR (click for details)
In class au.com.mountainpass.hyperstate.client.RestLink Field au.com.mountainpass.hyperstate.client.RestLink.restTemplate In method au.com.mountainpass.hyperstate.client.RestLink.resolve(ParameterizedTypeReference) At RestLink.java:[line 77]
|
A String is being converted to upper or lowercase, using the platform's default encoding. This may
result in improper conversions when used with international characters. Use the
- String.toUpperCase( Locale l )
- String.toLowerCase( Locale l )
versions instead.
This code stores a reference to an externally mutable object into the
internal representation of the object.
If instances
are accessed by untrusted code, and unchecked changes to
the mutable object would compromise security or other
important properties, you will need to do something different.
Storing a copy of the object is better approach in many situations.
This parameter is always used in a way that requires it to be non-null,
but the parameter is explicitly annotated as being Nullable. Either the use
of the parameter or the annotation is wrong.
This method may fail to clean up (close, dispose of) a stream,
database object, or other
resource requiring an explicit cleanup operation.
In general, if a method opens a stream or other resource,
the method should use a try/finally block to ensure that
the stream or resource is cleaned up before the method
returns.
This bug pattern is essentially the same as the
OS_OPEN_STREAM and ODR_OPEN_DATABASE_RESOURCE
bug patterns, but is based on a different
(and hopefully better) static analysis technique.
We are interested is getting feedback about the
usefulness of this bug pattern.
To send feedback, either:
In particular,
the false-positive suppression heuristics for this
bug pattern have not been extensively tuned, so
reports about false positives are helpful to us.
See Weimer and Necula, Finding and Preventing Run-Time Error Handling Mistakes, for
a description of the analysis technique.
This method may fail to clean up (close, dispose of) a stream,
database object, or other
resource requiring an explicit cleanup operation.
In general, if a method opens a stream or other resource,
the method should use a try/finally block to ensure that
the stream or resource is cleaned up before the method
returns.
This bug pattern is essentially the same as the
OS_OPEN_STREAM and ODR_OPEN_DATABASE_RESOURCE
bug patterns, but is based on a different
(and hopefully better) static analysis technique.
We are interested is getting feedback about the
usefulness of this bug pattern.
To send feedback, either:
In particular,
the false-positive suppression heuristics for this
bug pattern have not been extensively tuned, so
reports about false positives are helpful to us.
See Weimer and Necula, Finding and Preventing Run-Time Error Handling Mistakes, for
a description of the analysis technique.
The method creates an IO stream object, does not assign it to any
fields, pass it to other methods that might close it,
or return it, and does not appear to close
the stream on all paths out of the method. This may result in
a file descriptor leak. It is generally a good
idea to use a finally block to ensure that streams are
closed.
The method creates an IO stream object, does not assign it to any
fields, pass it to other methods, or return it, and does not appear to close
it on all possible exception paths out of the method.
This may result in a file descriptor leak. It is generally a good
idea to use a finally block to ensure that streams are
closed.
This Serializable class defines a non-primitive instance field which is neither transient,
Serializable, or java.lang.Object, and does not appear to implement
the Externalizable interface or the
readObject() and writeObject() methods.
Objects of this class will not be deserialized correctly if a non-Serializable
object is stored in this field.
This class is an inner class, but does not use its embedded reference
to the object which created it. This reference makes the instances
of the class larger, and may keep the reference to the creator object
alive longer than necessary. If possible, the class should be
made into a static inner class. Since anonymous inner
classes cannot be marked as static, doing this will require refactoring
the inner class so that it is a named inner class.
This field is never read. Consider removing it from the class.
This field is never read.
The field is public or protected, so perhaps
it is intended to be used with classes not seen as part of the analysis. If not,
consider removing it from the class.
This field is never initialized within any constructor, and is therefore could be null after
the object is constructed. Elsewhere, it is loaded and dereferenced without a null check.
This could be a either an error or a questionable design, since
it means a null pointer exception will be generated if that field is dereferenced
before being initialized.