Fix typings

This commit is contained in:
René Pfeuffer
2020-11-10 08:29:19 +01:00
parent 650e451501
commit 8d797a454a
3 changed files with 10 additions and 9 deletions

View File

@@ -21,7 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package sonia.scm;
import java.util.Collections;
@@ -33,7 +33,7 @@ public class ConcurrentModificationException extends ExceptionWithContext {
private static final String CODE = "2wR7UzpPG1";
public ConcurrentModificationException(Class type, String id) {
public ConcurrentModificationException(Class<?> type, String id) {
this(Collections.singletonList(new ContextEntry(type, id)));
}
@@ -56,4 +56,4 @@ public class ConcurrentModificationException extends ExceptionWithContext {
.collect(joining(" in ", "", " has been modified concurrently"));
}
}

View File

@@ -21,22 +21,23 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package sonia.scm;
import sonia.scm.repository.NamespaceAndName;
import sonia.scm.repository.Repository;
import sonia.scm.util.AssertUtil;
import java.io.Serializable;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
public class ContextEntry {
public class ContextEntry implements Serializable {
private final String type;
private final String id;
ContextEntry(Class type, String id) {
ContextEntry(Class<?> type, String id) {
this(type.getSimpleName(), id);
}
@@ -91,7 +92,7 @@ public class ContextEntry {
return this.in(Repository.class, namespaceAndName.logString());
}
public ContextBuilder in(Class type, String id) {
public ContextBuilder in(Class<?> type, String id) {
context.add(new ContextEntry(type, id));
return this;
}

View File

@@ -21,7 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package sonia.scm;
import java.util.Collections;
@@ -35,7 +35,7 @@ public class NotFoundException extends ExceptionWithContext {
private static final String CODE = "AGR7UzkhA1";
public NotFoundException(Class type, String id) {
public NotFoundException(Class<?> type, String id) {
this(Collections.singletonList(new ContextEntry(type, id)));
}