Skip to content

Commit aba2d20

Browse files
authored
Migrate Module.getPageContextJson() to return new JSONObject (#148)
1 parent 0195862 commit aba2d20

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

laboratory/src/org/labkey/laboratory/LaboratoryModule.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
import org.jetbrains.annotations.NotNull;
1919
import org.jetbrains.annotations.Nullable;
20-
import org.json.old.JSONObject;
20+
import org.json.JSONObject;
2121
import org.labkey.api.data.Container;
2222
import org.labkey.api.data.ContainerManager;
2323
import org.labkey.api.data.UpgradeCode;
@@ -218,11 +218,10 @@ public Set<String> getSchemaNames()
218218
@Override
219219
public JSONObject getPageContextJson(ContainerUser context)
220220
{
221-
Map<String, Object> ret = new HashMap<>(super.getPageContextJson(context));
222-
221+
JSONObject ret = super.getPageContextJson(context);
223222
ret.put("isLaboratoryAdmin", context.getContainer().hasPermission(context.getUser(), LaboratoryAdminPermission.class));
224223

225-
return new JSONObject(ret);
224+
return ret;
226225
}
227226

228227
@Override

0 commit comments

Comments
 (0)