Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a0be50e4 authored by Yang Ni's avatar Yang Ni Committed by Android Git Automerger
Browse files

am 7591574d: am 07cd641b: Merge "Add a name to ScriptGroup2.Builder.create method"

* commit '7591574d':
  Add a name to ScriptGroup2.Builder.create method
parents a978a3d6 7591574d
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -412,7 +412,11 @@ public class ScriptGroup2 extends BaseObj {
            return addInvoke(invoke, args.toArray(), bindingMap);
        }

        public ScriptGroup2 create(Future... outputs) {
        public ScriptGroup2 create(String name, Future... outputs) {
            if (name == null || name.isEmpty() || name.length() > 100 ||
                !name.equals(name.replaceAll("[^a-zA-Z0-9-]", "_"))) {
                throw new RSIllegalArgumentException("invalid script group name");
            }
            ScriptGroup2 ret = new ScriptGroup2(mRS, mClosures, mInputs, outputs);
            return ret;
        }