Merge "Limit namespace length." into udc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
6db854c14e
@@ -4124,6 +4124,10 @@ public class JobSchedulerService extends com.android.server.SystemService
|
|||||||
if (namespace.isEmpty()) {
|
if (namespace.isEmpty()) {
|
||||||
throw new IllegalArgumentException("namespace cannot be empty");
|
throw new IllegalArgumentException("namespace cannot be empty");
|
||||||
}
|
}
|
||||||
|
if (namespace.length() > 1000) {
|
||||||
|
throw new IllegalArgumentException(
|
||||||
|
"namespace cannot be more than 1000 characters");
|
||||||
|
}
|
||||||
namespace = namespace.intern();
|
namespace = namespace.intern();
|
||||||
}
|
}
|
||||||
return namespace;
|
return namespace;
|
||||||
|
|||||||
Reference in New Issue
Block a user